linux-stable/drivers/thermal
Rafael J. Wysocki a83ed01f2f thermal: intel_powerclamp: Use first online CPU as control_cpu
commit 4bb7f6c278 upstream.

Commit 68b99e94a4 ("thermal: intel_powerclamp: Use get_cpu() instead
of smp_processor_id() to avoid crash") fixed an issue related to using
smp_processor_id() in preemptible context by replacing it with a pair
of get_cpu()/put_cpu(), but what is needed there really is any online
CPU and not necessarily the one currently running the code.  Arguably,
getting the one that's running the code in there is confusing.

For this reason, simply give the control CPU role to the first online
one which automatically will be CPU0 if it is online, so one check
can be dropped from the code for an added benefit.

Link: https://lore.kernel.org/linux-pm/20221011113646.GA12080@duo.ucw.cz/
Fixes: 68b99e94a4 ("thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:15:48 +02:00
..
int340x_thermal thermal: int340x: Increase bitmap size 2022-04-20 09:06:30 +02:00
qcom
samsung thermal/drivers/exynos: Fix an error code in exynos_tmu_probe() 2021-09-26 13:36:18 +02:00
st
tegra
ti-soc-thermal thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 2020-09-12 11:47:34 +02:00
Kconfig
Makefile
armada_thermal.c
clock_cooling.c
cpu_cooling.c
db8500_cpufreq_cooling.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c thermal/core/fair share: Lock the thermal zone while looping over instances 2021-05-22 10:40:33 +02:00
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c
intel_bxt_pmic_thermal.c
intel_pch_thermal.c
intel_powerclamp.c thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 13:15:48 +02:00
intel_quark_dts_thermal.c
intel_soc_dts_iosf.c
intel_soc_dts_iosf.h
intel_soc_dts_thermal.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c Revert "thermal: mediatek: fix register index error" 2020-07-22 09:10:51 +02:00
of-thermal.c
power_allocator.c
qcom-spmi-temp-alarm.c
qoriq_thermal.c
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
step_wise.c
tango_thermal.c
thermal-generic-adc.c
thermal_core.c thermal: core: Reset previous low and high trip during thermal zone init 2021-12-08 08:45:05 +01:00
thermal_core.h
thermal_hwmon.c
thermal_hwmon.h
user_space.c
x86_pkg_temp_thermal.c