WSL2-Linux-Kernel/drivers/thermal
Rafael J. Wysocki 4bb7f6c278 thermal: intel_powerclamp: Use first online CPU as control_cpu
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>
2022-10-15 19:33:57 +02:00
..
broadcom
intel thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-15 19:33:57 +02:00
qcom More thermal control updates for 6.1-rc1 2022-10-10 13:52:14 -07:00
samsung
st
tegra
ti-soc-thermal
Kconfig
Makefile thermal/drivers/qcom: Drop false build dependency of all QCOM drivers on QCOM_TSENS 2022-10-04 11:21:11 +02:00
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c Merge branches 'thermal-intel' and 'thermal-drivers' 2022-10-03 20:43:32 +02:00
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
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: Rely on the platform data to get the resource id 2022-10-04 11:20:59 +02:00
imx_thermal.c
k3_bandgap.c
k3_j72xx_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 thermal/drivers/rcar_thermal: Constify static thermal_zone_device_ops 2022-10-04 11:21:18 +02:00
rockchip_thermal.c
rzg2l_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c
thermal-generic-adc.c
thermal_core.c thermal/core: Drop valid pointer check for type 2022-10-04 11:21:30 +02:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c Merge branches 'thermal-intel' and 'thermal-drivers' 2022-10-03 20:43:32 +02:00
thermal_netlink.c
thermal_netlink.h
thermal_of.c thermal/of: Remove the thermal_zone_of_get_sensor_id() function 2022-10-04 11:21:06 +02:00
thermal_sysfs.c thermal/core: Add a check before calling set_trip_temp() 2022-10-04 11:21:36 +02:00
uniphier_thermal.c