lkml.org 
[lkml]   [2018]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice
From
Date
On 23/02/2018 06:24, Viresh Kumar wrote:
> On 21-02-18, 16:29, Daniel Lezcano wrote:
>> The next changes will add new way to cool down a CPU. In order to
>> sanitize and make the overall cpu cooling code consistent and robust
>> we must prevent the cpu cooling devices to co-exists with the same
>> purpose at the same time in the kernel.
>>
>> Make the CPU cooling device a choice in the Kconfig, so only one CPU
>> cooling strategy can be chosen.
>
> Daniel T. already raised his concern (which I share too) about the
> multi-platform builds, where we would want this to be runtime
> selectable. I am fine with your approach of making that possible later
> on, but I would really like that to be merged before the combo thing
> comes in. So, I would suggest to merge stuff in this order:
>
> - this series
> - runtime selectable strategy
> - combo stuff
>
> I hope that would be fine ?

Yes, for me it is ok. So meanwhile we can also check the cpufreq cooling
device unregistering at suspend/resume/hotplug and hopefully that will
simplify the addition of the combo cooling device.


>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>> drivers/thermal/Kconfig | 20 +++++++++++++++++---
>> drivers/thermal/cpu_cooling.c | 2 ++
>> include/linux/cpu_cooling.h | 6 +++---
>> 3 files changed, 22 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
>> index b6adc54..5aaae1b 100644
>> --- a/drivers/thermal/Kconfig
>> +++ b/drivers/thermal/Kconfig
>> @@ -142,17 +142,31 @@ config THERMAL_GOV_POWER_ALLOCATOR
>> allocating and limiting power to devices.
>>
>> config CPU_THERMAL
>> - bool "generic cpu cooling support"
>> - depends on CPU_FREQ
>> + bool "Generic cpu cooling support"
>> depends on THERMAL_OF
>> help
>> + Enable the CPU cooling features. If the system has no active
>> + cooling device available, this option allows to use the CPU
>> + as a cooling device.
>> +
>> +choice
>> + prompt "CPU cooling strategies"
>> + depends on CPU_THERMAL
>> + default CPU_FREQ_THERMAL
>> + help
>> + Select the CPU cooling strategy.
>> +
>> +config CPU_FREQ_THERMAL
>> + bool "CPU frequency cooling strategy"
>> + depends on CPU_FREQ
>> + help
>> This implements the generic cpu cooling mechanism through frequency
>> reduction. An ACPI version of this already exists
>> (drivers/acpi/processor_thermal.c).
>> This will be useful for platforms using the generic thermal interface
>> and not the ACPI interface.
>>
>> - If you want this support, you should say Y here.
>
> Should this line be moved to the CPU_THERMAL section above ?
>

Probably, I will double check it.

[ ... ]

>> -#endif /* CONFIG_CPU_THERMAL */
>> +#endif /* CONFIG_CPU_FREQ_THERMAL */
>>
>> #endif /* __CPU_COOLING_H__ */
>
> drivers/cpufreq/Kconfig: # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
> drivers/cpufreq/Kconfig: depends on !CPU_THERMAL || THERMAL
> drivers/cpufreq/Kconfig: depends on !CPU_THERMAL || THERMAL
> drivers/cpufreq/Kconfig.arm: # if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y
> drivers/cpufreq/Kconfig.arm: depends on !CPU_THERMAL || THERMAL
> drivers/cpufreq/Kconfig.arm: depends on !CPU_THERMAL || THERMAL
>
> All of these need to use CPU_FREQ_THERMAL now>
> include/trace/events/thermal.h:#ifdef CONFIG_CPU_THERMAL
> include/trace/events/thermal.h:#endif /* CONFIG_CPU_THERMAL */

Ok.

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

\
 
 \ /
  Last update: 2018-02-23 10:11    [W:0.065 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site