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: <20190123103451.ap5vws3kj2ch4uba@vireshk-i7>
Date:   Wed, 23 Jan 2019 16:04:51 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Amit Kucheria <amit.kucheria@...aro.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        edubezval@...il.com, swboyd@...omium.org, dianders@...omium.org,
        mka@...omium.org, Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be
 compiled in

On 21-01-19, 21:10, Amit Kucheria wrote:
> The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq
> driver to register as a cooling device and cool down the platform by
> throttling the CPU frequency. In order to be able to auto-register a
> cpufreq driver as a cooling device from the cpufreq core, we need access
> to code inside cpu_cooling.c which, in turn, accesses code inside
> thermal core.
> 
> CPU_FREQ is a bool while THERMAL is tristate.  In some configurations
> (e.g. allmodconfig), CONFIG_THERMAL ends up as a module while
> CONFIG_CPU_FREQ is compiled in. This leads to following error:
> 
> drivers/cpufreq/cpufreq.o: In function `cpufreq_offline':
> cpufreq.c:(.text+0x407c): undefined reference to `cpufreq_cooling_unregister'
> drivers/cpufreq/cpufreq.o: In function `cpufreq_online':
> cpufreq.c:(.text+0x70c0): undefined reference to `of_cpufreq_cooling_register'
> 
> Given that platforms using CPU_THERMAL usually want it compiled-in so it
> is available early in boot, make CPU_THERMAL depend on THERMAL being
> compiled-in instead of allowing it to be a module.
> 
> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Signed-off-by: Amit Kucheria <amit.kucheria@...aro.org>
> ---
>  drivers/thermal/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 30323426902e..58bb7d72dc2b 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -152,6 +152,7 @@ config CPU_THERMAL
>  	bool "generic cpu cooling support"
>  	depends on CPU_FREQ
>  	depends on THERMAL_OF
> +	depends on THERMAL=y
>  	help
>  	  This implements the generic cpu cooling mechanism through frequency
>  	  reduction. An ACPI version of this already exists

Please remove all Kconfig crap, which gets fixed with this, as well in
this patch itself. Like:

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 10bc5c798d17..40f8cc323996 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -40,8 +40,6 @@ config ARM_ARMADA_8K_CPUFREQ
 config ARM_BIG_LITTLE_CPUFREQ
        tristate "Generic ARM big LITTLE CPUfreq driver"
        depends on ARM_CPU_TOPOLOGY && HAVE_CLK
-       # if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y
-       depends on !CPU_THERMAL || THERMAL
        select PM_OPP
        help
          This enables the Generic CPUfreq driver for ARM big.LITTLE platforms.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ