mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: edubezval@gmail.com, kevin.wangtao@linaro.org,
	leo.yan@linaro.org, vincent.guittot@linaro.org,
	amit.kachhap@gmail.com, linux-kernel@vger.kernel.org,
	javi.merino@kernel.org, rui.zhang@intel.com,
	daniel.thompson@linaro.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH V2 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice
Date: Fri, 23 Feb 2018 10:10:59 +0100	[thread overview]
Message-ID: <1dd1fe8a-d7e7-b4c7-9114-c9de41fc9284@linaro.org> (raw)
In-Reply-To: <20180223052416.GE26947@vireshk-i7>

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

  reply	other threads:[~2018-02-23  9:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 15:29 [PATCH V2 0/7] CPU cooling device new strategies Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 1/7] thermal/drivers/cpu_cooling: Fixup the header and copyright Daniel Lezcano
2018-02-23  4:32   ` Viresh Kumar
2018-02-21 15:29 ` [PATCH V2 2/7] thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 3/7] thermal/drivers/cpu_cooling: Remove pointless field Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Daniel Lezcano
2018-02-23  5:24   ` Viresh Kumar
2018-02-23  9:10     ` Daniel Lezcano [this message]
2018-02-21 15:29 ` [PATCH V2 5/7] thermal/drivers/cpu_cooling: Add idle cooling device documentation Daniel Lezcano
2018-03-06 23:19   ` Pavel Machek
2018-03-07 11:42     ` Daniel Lezcano
2018-03-08  8:59       ` Pavel Machek
2018-03-08 11:54         ` Daniel Thompson
2018-02-21 15:29 ` [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Daniel Lezcano
2018-02-23  7:34   ` Viresh Kumar
2018-02-23 11:28     ` Daniel Lezcano
2018-02-26  4:30       ` Viresh Kumar
2018-03-13 19:15         ` Daniel Lezcano
2018-04-04  8:50         ` Daniel Lezcano
2018-04-05  4:49           ` Viresh Kumar
2018-03-27  3:43       ` Leo Yan
2018-03-27 11:10         ` Daniel Lezcano
2018-02-23 15:26   ` Vincent Guittot
2018-02-24 23:01     ` Daniel Lezcano
2018-03-27  2:03   ` Leo Yan
2018-03-27 10:26     ` Daniel Lezcano
2018-03-27 12:28       ` Juri Lelli
2018-03-27 12:31         ` Daniel Lezcano
2018-03-27 13:08           ` Juri Lelli
2018-03-27  3:35   ` Leo Yan
2018-03-27 10:56     ` Daniel Lezcano
2018-02-21 15:29 ` [PATCH V2 7/7] cpuidle/drivers/cpuidle-arm: Register the cooling device Daniel Lezcano
2018-02-23  5:35   ` Viresh Kumar
2018-02-24  2:50   ` Wangtao (Kevin, Kirin)
2018-02-24 22:53     ` Daniel Lezcano
2018-02-23  5:26 ` [PATCH V2 0/7] CPU cooling device new strategies Viresh Kumar
2018-02-23  9:11   ` Daniel Lezcano
2018-03-07 17:09 ` Eduardo Valentin
2018-03-07 18:57   ` Daniel Lezcano
2018-03-08 12:03     ` Daniel Thompson
2018-03-26 14:30       ` Leo Yan
2018-03-27  9:35         ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1dd1fe8a-d7e7-b4c7-9114-c9de41fc9284@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amit.kachhap@gmail.com \
    --cc=daniel.thompson@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=javi.merino@kernel.org \
    --cc=kevin.wangtao@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®