aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2019-01-29 10:25:07 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-01-29 11:46:31 +0100
commitafa1f2ab43d48d0e1fa1bda524a0cf53e4cd6c87 (patch)
tree5b2e70efe058376f7d3a50c3c4b83b27e273d00f /include/linux/cpufreq.h
parentcpufreq: Use struct kobj_attribute instead of struct global_attr (diff)
downloadwireguard-linux-afa1f2ab43d48d0e1fa1bda524a0cf53e4cd6c87.tar.xz
wireguard-linux-afa1f2ab43d48d0e1fa1bda524a0cf53e4cd6c87.zip
thermal: cpu_cooling: Require thermal core to be compiled in
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. As a result of this change, get rid of the ugly (!CPU_THERMAL || THERMAL) dependency in all cpufreq drivers using CPU_THERMAL. Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpufreq.h')
0 files changed, 0 insertions, 0 deletions