diff mbox series

cpuidle: governor: export cpuidle_register_governor

Message ID 20200902205720.2548-1-ilina@codeaurora.org
State New
Headers show
Series cpuidle: governor: export cpuidle_register_governor | expand

Commit Message

Lina Iyer Sept. 2, 2020, 8:57 p.m. UTC
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.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
---
 drivers/cpuidle/governor.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Lezcano Sept. 3, 2020, 10:35 a.m. UTC | #1
On 02/09/2020 22:57, Lina Iyer wrote:
> 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.

> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
> ---
>  drivers/cpuidle/governor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
> index 29acaf48e575..480ec58cffa9 100644
> --- a/drivers/cpuidle/governor.c
> +++ b/drivers/cpuidle/governor.c
> @@ -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
>
Lina Iyer Sept. 3, 2020, 3:23 p.m. UTC | #2
On Thu, Sep 03 2020 at 04:35 -0600, Daniel Lezcano wrote:
>On 02/09/2020 22:57, Lina Iyer wrote:
>> 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

>> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
>> ---
>>  drivers/cpuidle/governor.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
>> index 29acaf48e575..480ec58cffa9 100644
>> --- a/drivers/cpuidle/governor.c
>> +++ b/drivers/cpuidle/governor.c
>> @@ -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
>>
>
>
>-- 
><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
Lina Iyer Sept. 3, 2020, 3:50 p.m. UTC | #3
On Thu, Sep 03 2020 at 09:23 -0600, Lina Iyer wrote:
>On Thu, Sep 03 2020 at 04:35 -0600, Daniel Lezcano wrote:
>>On 02/09/2020 22:57, Lina Iyer wrote:
>>>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.
>
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.

>--Lina
>
>>>Signed-off-by: Lina Iyer <ilina@codeaurora.org>
>>>---
>>> drivers/cpuidle/governor.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>>diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
>>>index 29acaf48e575..480ec58cffa9 100644
>>>--- a/drivers/cpuidle/governor.c
>>>+++ b/drivers/cpuidle/governor.c
>>>@@ -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
>>>
>>
>>
>>-- 
>><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
diff mbox series

Patch

diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
index 29acaf48e575..480ec58cffa9 100644
--- a/drivers/cpuidle/governor.c
+++ b/drivers/cpuidle/governor.c
@@ -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