lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191119054607.m4bcztc5euhe3jve@vireshk-i7>
Date:   Tue, 19 Nov 2019 11:16:07 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     rjw@...ysocki.net, edubezval@...il.com, rui.zhang@...el.com,
        linux-pm@...r.kernel.org, amit.kucheria@...aro.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] thermal/drivers/Kconfig: Convert the CPU cooling
 device to a choice

On 13-11-19, 09:40, Daniel Lezcano wrote:
> The next changes will add a new way to cool down a CPU by injecting
> idle cycles. With the current configuration, a CPU cooling device is
> the cpufreq cooling device. As we want to add a new CPU cooling
> device, let's convert the CPU cooling to a choice giving a list of CPU
> cooling devices. At this point, there is obviously only one CPU
> cooling device.
> 
> There is no functional changes.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
>  drivers/thermal/Kconfig     | 13 +++++++++++--
>  drivers/thermal/Makefile    |  2 +-
>  include/linux/cpu_cooling.h |  6 +++---
>  3 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 001a21abcc28..2b82c4861091 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -150,8 +150,17 @@ config THERMAL_GOV_POWER_ALLOCATOR
>  
>  config CPU_THERMAL
>  	bool "Generic cpu cooling support"
> -	depends on CPU_FREQ
>  	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.
> +
> +if CPU_THERMAL
> +
> +config CPU_FREQ_THERMAL
> +	bool "CPU frequency cooling device"
> +	depends on CPU_FREQ

Many of the current set of defconfigs have CONFIG_CPU_THERMAL=y for
them and they will break now as CONFIG_CPU_FREQ_THERMAL won't be
selected for them without any defconfig changes. Can we have this
option selected by default if CONFIG_CPU_THERMAL is enabled ?

>  	help
>  	  This implements the generic cpu cooling mechanism through frequency
>  	  reduction. An ACPI version of this already exists
> @@ -159,7 +168,7 @@ config CPU_THERMAL
>  	  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.
> +endif
>  
>  config CLOCK_THERMAL
>  	bool "Generic clock cooling support"
> diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
> index 74a37c7f847a..d3b01cc96981 100644
> --- a/drivers/thermal/Makefile
> +++ b/drivers/thermal/Makefile
> @@ -19,7 +19,7 @@ thermal_sys-$(CONFIG_THERMAL_GOV_USER_SPACE)	+= user_space.o
>  thermal_sys-$(CONFIG_THERMAL_GOV_POWER_ALLOCATOR)	+= power_allocator.o
>  
>  # cpufreq cooling
> -thermal_sys-$(CONFIG_CPU_THERMAL)	+= cpu_cooling.o
> +thermal_sys-$(CONFIG_CPU_FREQ_THERMAL)	+= cpu_cooling.o
>  
>  # clock cooling
>  thermal_sys-$(CONFIG_CLOCK_THERMAL)	+= clock_cooling.o
> diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
> index b74732535e4b..3cdd85f987d7 100644
> --- a/include/linux/cpu_cooling.h
> +++ b/include/linux/cpu_cooling.h
> @@ -19,7 +19,7 @@
>  
>  struct cpufreq_policy;
>  
> -#ifdef CONFIG_CPU_THERMAL
> +#ifdef CONFIG_CPU_FREQ_THERMAL
>  /**
>   * cpufreq_cooling_register - function to create cpufreq cooling device.
>   * @policy: cpufreq policy.
> @@ -40,7 +40,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
>  struct thermal_cooling_device *
>  of_cpufreq_cooling_register(struct cpufreq_policy *policy);
>  
> -#else /* !CONFIG_CPU_THERMAL */
> +#else /* !CONFIG_CPU_FREQ_THERMAL */
>  static inline struct thermal_cooling_device *
>  cpufreq_cooling_register(struct cpufreq_policy *policy)
>  {
> @@ -58,6 +58,6 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
>  {
>  	return NULL;
>  }
> -#endif /* CONFIG_CPU_THERMAL */
> +#endif /* CONFIG_CPU_FREQ_THERMAL */
>  
>  #endif /* __CPU_COOLING_H__ */
> -- 
> 2.17.1

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ