Skip to contentSkip to conversation

cpufreq: Add ARM_MT8173_CPUFREQ dependencyon THERMAL

PATCH In review Guenter Roeck 4 participants 5 messages Sep 3, 2015 – Sep 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: Add ARM_MT8173_CPUFREQ dependencyon THERMAL

If ARM_MT8173_CPUFREQ is configured, and THERMAL is configured as module, the following build error is seen for arm:allmodconfig and arm64:allmodconfig.

drivers/built-in.o: In function `mtk_cpufreq_ready':
:(.text+0x32a20c): undefined reference to of_cpufreq_cooling_register' drivers/built-in.o: In function mtk_cpufreq_exit':
:(.text+0x32a420): undefined reference to `cpufreq_cooling_unregister'

The fix is similar to CPUFREQ_DT, but more restrictive since ARM_MT8173_CPUFREQ can not be built as module.

Fixes 1453863fb02a ("cpufreq: mediatek: Add MT8173 cpufreq driver")

---
It might also make sense to declare ARM_MT8173_CPUFREQ as tristate and relax the conditions, but I don't know if that is feasible.

 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.arm +1 -0
index 77aa34eae92c..c4c6200be435 100644
@@ -133,6 +133,7 @@ config ARM_KIRKWOOD_CPUFREQ
 config ARM_MT8173_CPUFREQ
 	bool "Mediatek MT8173 CPUFreq support"
 	depends on ARCH_MEDIATEK && REGULATOR
+	depends on !CPU_THERMAL || THERMAL=y
 	select PM_OPP
 	help
 	  This adds the CPUFreq driver support for Mediatek MT8173 SoC.
Signature · 1 line
2.1.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Guenter Roeck

If ARM_MT8173_CPUFREQ is configured, and THERMAL is configured as module, the following build error is seen for arm:allmodconfig and arm64:allmodconfig.

drivers/built-in.o: In function `mtk_cpufreq_ready':
:(.text+0x32a20c): undefined reference to of_cpufreq_cooling_register' drivers/built-in.o: In function mtk_cpufreq_exit':
:(.text+0x32a420): undefined reference to `cpufreq_cooling_unregister'

The fix is similar to CPUFREQ_DT, but more restrictive since ARM_MT8173_CPUFREQ can not be built as module.

Quoted 8 lines
Fixes 1453863fb02a ("cpufreq: mediatek: Add MT8173 cpufreq driver")

---
It might also make sense to declare ARM_MT8173_CPUFREQ as tristate and relax the conditions, but I don't know if that is feasible.

 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
viresh
#2 lore raw
Quoted 19 lines · Viresh Kumar
Quoted 18 lines · Guenter Roeck

If ARM_MT8173_CPUFREQ is configured, and THERMAL is configured as module, the following build error is seen for arm:allmodconfig and arm64:allmodconfig.

drivers/built-in.o: In function `mtk_cpufreq_ready':
:(.text+0x32a20c): undefined reference to of_cpufreq_cooling_register' drivers/built-in.o: In function mtk_cpufreq_exit':
:(.text+0x32a420): undefined reference to `cpufreq_cooling_unregister'

The fix is similar to CPUFREQ_DT, but more restrictive since ARM_MT8173_CPUFREQ can not be built as module.

Fixes 1453863fb02a ("cpufreq: mediatek: Add MT8173 cpufreq driver")

---
It might also make sense to declare ARM_MT8173_CPUFREQ as tristate and relax the conditions, but I don't know if that is feasible.

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

Who's applying and sending this up to avoid extended period of build breakage?

-Olof

#3 lore raw
Quoted 20 lines · Olof Johansson
Quoted 19 lines · Viresh Kumar
Quoted 18 lines · Guenter Roeck

If ARM_MT8173_CPUFREQ is configured, and THERMAL is configured as module, the following build error is seen for arm:allmodconfig and arm64:allmodconfig.

drivers/built-in.o: In function `mtk_cpufreq_ready':
:(.text+0x32a20c): undefined reference to of_cpufreq_cooling_register' drivers/built-in.o: In function mtk_cpufreq_exit':
:(.text+0x32a420): undefined reference to `cpufreq_cooling_unregister'

The fix is similar to CPUFREQ_DT, but more restrictive since ARM_MT8173_CPUFREQ can not be built as module.

Fixes 1453863fb02a ("cpufreq: mediatek: Add MT8173 cpufreq driver")

---
It might also make sense to declare ARM_MT8173_CPUFREQ as tristate and relax the conditions, but I don't know if that is feasible.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
  drivers/cpufreq/Kconfig.arm | 1 +
  1 file changed, 1 insertion(+)

Who's applying and sending this up to avoid extended period of build breakage?

Good question.

This one isn't really bad (yet), but there are other build and qemu test breakages which have been in -next, sometimes for a long period of time, with patches submitted but ignored by the maintainers. Those are creeping into mainline now.

Wonder if I (or someone else) should just collect those patches and send a pull request to Linus right after (or even before) -rc1.

Guenter

#4 lore raw
In reply to Olof Johansson

Hi,

Quoted 20 lines · Olof Johansson
Quoted 19 lines · Viresh Kumar
Quoted 18 lines · Guenter Roeck

If ARM_MT8173_CPUFREQ is configured, and THERMAL is configured as module, the following build error is seen for arm:allmodconfig and arm64:allmodconfig.

drivers/built-in.o: In function `mtk_cpufreq_ready':
:(.text+0x32a20c): undefined reference to of_cpufreq_cooling_register' drivers/built-in.o: In function mtk_cpufreq_exit':
:(.text+0x32a420): undefined reference to `cpufreq_cooling_unregister'

The fix is similar to CPUFREQ_DT, but more restrictive since ARM_MT8173_CPUFREQ can not be built as module.

Fixes 1453863fb02a ("cpufreq: mediatek: Add MT8173 cpufreq driver")

---
It might also make sense to declare ARM_MT8173_CPUFREQ as tristate and relax the conditions, but I don't know if that is feasible.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)

Who's applying and sending this up to avoid extended period of build breakage?

I'll queue up this particular one.

Thanks,
Rafael