Skip to contentSkip to conversation

cpuidle: governor: export cpuidle_register_governor

PATCH In review Lina Iyer 2 participants 4 messages Sep 2, 2020 – Sep 3, 2020

Subsystems (2)
lore
Share & tools
lore

Lina Iyer

author
#0 lore raw

PATCH 1/1 cpuidle: governor: export cpuidle_register_governor

Commit 83788c0caed3 ("cpuidle: remove unused exports") removed capability of registering cpuidle governors, which was unused at that time. By exporting the symbol, let's allow platform specific modules to register cpuidle governors.

---
 drivers/cpuidle/governor.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/governor.c +1 -0
index 29acaf48e575..480ec58cffa9 100644
@@ -102,6 +102,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
 
 /**
  * cpuidle_governor_latency_req - Compute a latency constraint for CPU
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 4 lines · Lina Iyer

Commit 83788c0caed3 ("cpuidle: remove unused exports") removed capability of registering cpuidle governors, which was unused at that time. By exporting the symbol, let's allow platform specific modules to register cpuidle governors.

That would make sense as that follows the same pattern than the cpufreq framework. However, the unregister part is missing.

Quoted 18 lines
---
 drivers/cpuidle/governor.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/governor.c +1 -0
index 29acaf48e575..480ec58cffa9 100644
@@ -102,6 +102,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
 
 /**
  * cpuidle_governor_latency_req - Compute a latency constraint for CPU
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author
#2 lore raw
Quoted 9 lines · Daniel Lezcano
Quoted 4 lines · Lina Iyer

Commit 83788c0caed3 ("cpuidle: remove unused exports") removed capability of registering cpuidle governors, which was unused at that time. By exporting the symbol, let's allow platform specific modules to register cpuidle governors.

That would make sense as that follows the same pattern than the cpufreq framework. However, the unregister part is missing.

Sure, let me add that too and repost.

--Lina

Quoted 26 lines
Quoted 18 lines
---
 drivers/cpuidle/governor.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/governor.c +1 -0
index 29acaf48e575..480ec58cffa9 100644
@@ -102,6 +102,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
 
 /**
  * cpuidle_governor_latency_req - Compute a latency constraint for CPU
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author
#3 lore raw
Quoted 7 lines · Lina Iyer
Quoted 6 lines · Daniel Lezcano
Quoted 4 lines · Lina Iyer

Commit 83788c0caed3 ("cpuidle: remove unused exports") removed capability of registering cpuidle governors, which was unused at that time. By exporting the symbol, let's allow platform specific modules to register cpuidle governors.

Quoted 5 lines
Quoted 3 lines

That would make sense as that follows the same pattern than the cpufreq framework. However, the unregister part is missing.

Sure, let me add that too and repost.

Looks like there isn't any call to unregister a governor, which seems fair.

Also, what do you think about exporting cpuidle_governor_latency_req()? This could prove quite useful for a governor. I could add that in a repost.

Quoted 28 lines

--Lina

Quoted 26 lines
Quoted 18 lines

---
drivers/cpuidle/governor.c | 1 +

1 file changed, 1 insertion(+)
drivers/cpuidle/governor.c +1 -0
index 29acaf48e575..480ec58cffa9 100644
@@ -102,6 +102,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
 
 /**
 * cpuidle_governor_latency_req - Compute a latency constraint for CPU
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog