WSL2-Linux-Kernel/drivers/thermal
Rafael J. Wysocki 8418c1672c 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 12:35:56 +02:00
..
broadcom thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe 2022-06-09 10:23:01 +02:00
intel thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 12:35:56 +02:00
qcom thermal/drivers/qcom/tsens-v0_1: Fix MSM8939 fourth sensor hw_id 2022-10-26 12:35:28 +02:00
samsung
st
tegra
ti-soc-thermal
Kconfig
Makefile
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register() 2022-10-26 12:34:36 +02:00
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c thermal: devfreq_cooling: use local ops instead of global ops 2022-06-09 10:23:26 +02:00
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c
hisi_thermal.c
imx8mm_thermal.c
imx_sc_thermal.c thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe 2022-06-09 10:23:01 +02:00
imx_thermal.c
k3_bandgap.c
khadas_mcu_fan.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c
qoriq_thermal.c
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c
thermal-generic-adc.c
thermal_core.c thermal/core: Fix memory leak in __thermal_cooling_device_register() 2022-06-09 10:23:01 +02:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c thermal: core: Fix TZ_GET_TRIP NULL pointer dereference 2022-03-08 19:12:43 +01:00
thermal_netlink.h
thermal_of.c
thermal_sysfs.c thermal: sysfs: Fix cooling_device_stats_setup() error code path 2022-08-17 14:22:50 +02:00
uniphier_thermal.c