Re: [PATCH V2 7/7] cpuidle/drivers/cpuidle-arm: Register the cooling device

From: Daniel Lezcano
Date: Sat Feb 24 2018 - 17:54:08 EST


On 24/02/2018 03:50, Wangtao (Kevin, Kirin) wrote:
>
>
> On 2018/2/21 23:29, Daniel Lezcano wrote:
>> Register the ARM generic cpuidle driver as a cooling device.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
>> ---
>> Â drivers/cpuidle/cpuidle-arm.c | 5 +++++
>> Â 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/cpuidle/cpuidle-arm.c
>> b/drivers/cpuidle/cpuidle-arm.c
>> index ddee1b6..c100915 100644
>> --- a/drivers/cpuidle/cpuidle-arm.c
>> +++ b/drivers/cpuidle/cpuidle-arm.c
>> @@ -11,6 +11,7 @@
>> Â Â #define pr_fmt(fmt) "CPUidle arm: " fmt
>> Â +#include <linux/cpu_cooling.h>
>> Â #include <linux/cpuidle.h>
>> Â #include <linux/cpumask.h>
>> Â #include <linux/cpu_pm.h>
>> @@ -172,6 +173,10 @@ static int __init arm_idle_init(void)
>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ goto out_fail;
>> ÂÂÂÂÂ }
>> Â +ÂÂÂ ret = cpuidle_cooling_register();
>> +ÂÂÂ if (ret)
>> +ÂÂÂÂÂÂÂ pr_warn("Failed to register the cpuidle cooling device\n");
>> +
> SoC which uses Big-Little architecture doesn't use cpuidle-arm driver,
> is it
> better to put cpuidle_cooling_register to cpuidle_register_driver, and
> use the
> cpumask of cpuidle driver to register cpuidle cooling device intead of
> get it
> from topology?

The bL is supported by the cpuidle-arm driver, however due to how the
cpumask is built, we can't use this in cpuidle_register_driver for that,
it is a soapy board for now.


--
<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