Skip to contentSkip to conversation

cpufreq: scpi: add thermal dependency

PATCH Applied Arnd Bergmann 4 participants 8 messages Mar 13, 2018 – Mar 22, 2018 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cpufreq: scpi: add thermal dependency

A built-in scpi cpufreq driver cannot link against a modular thermal framework:

drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':
scpi-cpufreq.c:(.text+0x4c): undefined reference to of_cpufreq_cooling_register' drivers/cpufreq/scpi-cpufreq.o: In function scpi_cpufreq_exit':
scpi-cpufreq.c:(.text+0x9c): 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.

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.arm +1 -0
index 9bbb5b39d18a..d9457d1e535c 100644
@@ -45,6 +45,7 @@ config ARM_DT_BL_CPUFREQ
 config ARM_SCPI_CPUFREQ
 	tristate "SCPI based CPUfreq driver"
 	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
+	depends on !CPU_THERMAL || THERMAL
 	help
 	  This adds the CPUfreq driver support for ARM platforms using SCPI
 	  protocol for CPU power management.
Signature · 1 line
2.9.0
#1 lore raw

PATCH 2/2 cpufreq: scmi: add thermal dependency

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.

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.arm +1 -0
index d9457d1e535c..7f56fe5183f2 100644
@@ -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
Signature · 1 line
2.9.0
Acked-by on v1 2/2
#2 lore raw

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

Quoted 8 lines · Arnd Bergmann

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'

Quoted 5 lines

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

Signature · 2 lines
Regards,
Sudeep
#3 lore raw

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

Quoted 17 lines · Sudeep Holla
Quoted 8 lines · Arnd Bergmann

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'

Quoted 5 lines

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.

Quoted 6 lines

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

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

maintainer Acked-by on v1 2/2
#4 lore raw

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

In reply to Arnd Bergmann
Quoted 23 lines · Arnd Bergmann

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.

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.arm +0 -0
index d9457d1e535c..7f56fe5183f2 100644

drivers/cpufreq/Kconfig.arm config ARM_SA1110_CPUFREQ · line 248

Quoted 7 lines
drivers/cpufreq/Kconfig.arm +1 -0
@@ -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
Signature · 1 line
viresh
Acked-by on v1 1/2
#5 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

A built-in scpi cpufreq driver cannot link against a modular thermal framework:

drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':
scpi-cpufreq.c:(.text+0x4c): undefined reference to of_cpufreq_cooling_register' drivers/cpufreq/scpi-cpufreq.o: In function scpi_cpufreq_exit':
scpi-cpufreq.c:(.text+0x9c): undefined reference to `cpufreq_cooling_unregister'

Quoted 5 lines

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.

Makes sense,

Signature · 2 lines
Regards,
Sudeep
maintainer Acked-by on v1 1/2
#6 lore raw
In reply to Arnd Bergmann
Quoted 23 lines · Arnd Bergmann

A built-in scpi cpufreq driver cannot link against a modular thermal framework:

drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':
scpi-cpufreq.c:(.text+0x4c): undefined reference to of_cpufreq_cooling_register' drivers/cpufreq/scpi-cpufreq.o: In function scpi_cpufreq_exit':
scpi-cpufreq.c:(.text+0x9c): 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.

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.arm +0 -0
index 9bbb5b39d18a..d9457d1e535c 100644

drivers/cpufreq/Kconfig.arm config ARM_DT_BL_CPUFREQ · line 51

Quoted 7 lines
drivers/cpufreq/Kconfig.arm +1 -0
@@ -45,6 +45,7 @@ config ARM_DT_BL_CPUFREQ
 config ARM_SCPI_CPUFREQ
 	tristate "SCPI based CPUfreq driver"
 	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
+	depends on !CPU_THERMAL || THERMAL
 	help
 	  This adds the CPUfreq driver support for ARM platforms using SCPI
 	  protocol for CPU power management.
Signature · 1 line
viresh
#7 lore raw
Quoted 19 lines · CET Viresh Kumar
Quoted 18 lines · Arnd Bergmann

A built-in scpi cpufreq driver cannot link against a modular thermal framework:

drivers/cpufreq/scpi-cpufreq.o: In function `scpi_cpufreq_ready':
scpi-cpufreq.c:(.text+0x4c): undefined reference to of_cpufreq_cooling_register' drivers/cpufreq/scpi-cpufreq.o: In function scpi_cpufreq_exit':
scpi-cpufreq.c:(.text+0x9c): 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.

---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

drivers/cpufreq/Kconfig.arm config ARM_DT_BL_CPUFREQ · line 51

Quoted 12 lines
drivers/cpufreq/Kconfig.arm +1 -0
index 9bbb5b39d18a..d9457d1e535c 100644
@@ -45,6 +45,7 @@ config ARM_DT_BL_CPUFREQ
 config ARM_SCPI_CPUFREQ
 	tristate "SCPI based CPUfreq driver"
 	depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
+	depends on !CPU_THERMAL || THERMAL
 	help
 	  This adds the CPUfreq driver support for ARM platforms using SCPI
 	  protocol for CPU power management.

Applied, thanks!