diff mbox

[2/2] cpufreq: scmi: add thermal dependency

Message ID 20180313114607.2061209-2-arnd@arndb.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arnd Bergmann March 13, 2018, 11:45 a.m. UTC
A built-in scmi cpufreq driver cannot link against a modular
thermal framework:

drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_ready':
scmi-cpufreq.c:(.text+0x40): undefined reference to `of_cpufreq_cooling_register'
drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_exit':
scmi-cpufreq.c:(.text+0x88): undefined reference to `cpufreq_cooling_unregister'

This adds a Kconfig dependency that makes sure this configuration
is not possible, while allowing all configurations that can work.
Note that disabling CPU_THERMAL means we don't care about the
THERMAL dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)

Comments

Sudeep Holla March 13, 2018, 2:09 p.m. UTC | #1
On 13/03/18 11:45, Arnd Bergmann wrote:
> A built-in scmi cpufreq driver cannot link against a modular
> thermal framework:
> 
> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_ready':
> scmi-cpufreq.c:(.text+0x40): undefined reference to `of_cpufreq_cooling_register'
> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_exit':
> scmi-cpufreq.c:(.text+0x88): undefined reference to `cpufreq_cooling_unregister'
> 
> This adds a Kconfig dependency that makes sure this configuration
> is not possible, while allowing all configurations that can work.
> Note that disabling CPU_THERMAL means we don't care about the
> THERMAL dependency.
> 

This newly added entry is only in arm-soc linux-next. Let me know if you
want pull request with other possible fixes or you want to merge
directly as it might be need to suppress these errors in your build
system. For now I assume you will merge this directly in your tree, so

Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Arnd Bergmann March 13, 2018, 2:27 p.m. UTC | #2
On Tue, Mar 13, 2018 at 3:09 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>
> On 13/03/18 11:45, Arnd Bergmann wrote:
>> A built-in scmi cpufreq driver cannot link against a modular
>> thermal framework:
>>
>> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_ready':
>> scmi-cpufreq.c:(.text+0x40): undefined reference to `of_cpufreq_cooling_register'
>> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_exit':
>> scmi-cpufreq.c:(.text+0x88): undefined reference to `cpufreq_cooling_unregister'
>>
>> This adds a Kconfig dependency that makes sure this configuration
>> is not possible, while allowing all configurations that can work.
>> Note that disabling CPU_THERMAL means we don't care about the
>> THERMAL dependency.
>>
>
> This newly added entry is only in arm-soc linux-next. Let me know if you
> want pull request with other possible fixes or you want to merge
> directly as it might be need to suppress these errors in your build
> system. For now I assume you will merge this directly in your tree, so
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

I've applied it into my next/drivers branch now. Thanks for the Ack.
I assume the cpufreq maintainers will pick up the other one. I'm not
sure why I didn't run into that problem earlier, but today I saw both
for the first time.

      Arnd
Viresh Kumar March 14, 2018, 5:10 a.m. UTC | #3
On 13-03-18, 12:45, Arnd Bergmann wrote:
> A built-in scmi cpufreq driver cannot link against a modular
> thermal framework:
> 
> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_ready':
> scmi-cpufreq.c:(.text+0x40): undefined reference to `of_cpufreq_cooling_register'
> drivers/cpufreq/scmi-cpufreq.o: In function `scmi_cpufreq_exit':
> scmi-cpufreq.c:(.text+0x88): undefined reference to `cpufreq_cooling_unregister'
> 
> This adds a Kconfig dependency that makes sure this configuration
> is not possible, while allowing all configurations that can work.
> Note that disabling CPU_THERMAL means we don't care about the
> THERMAL dependency.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/cpufreq/Kconfig.arm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index d9457d1e535c..7f56fe5183f2 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -242,6 +242,7 @@ config ARM_SA1110_CPUFREQ
>  config ARM_SCMI_CPUFREQ
>  	tristate "SCMI based CPUfreq driver"
>  	depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
> +	depends on !CPU_THERMAL || THERMAL
>  	select PM_OPP
>  	help
>  	  This adds the CPUfreq driver support for ARM platforms using SCMI

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
diff mbox

Patch

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index d9457d1e535c..7f56fe5183f2 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -242,6 +242,7 @@  config ARM_SA1110_CPUFREQ
 config ARM_SCMI_CPUFREQ
 	tristate "SCMI based CPUfreq driver"
 	depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
+	depends on !CPU_THERMAL || THERMAL
 	select PM_OPP
 	help
 	  This adds the CPUfreq driver support for ARM platforms using SCMI