WSL2-Linux-Kernel/drivers/thermal/intel
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
..
int340x_thermal thermal: int340x: processor_thermal: Use module_pci_driver() macro 2022-09-24 19:22:09 +02:00
Kconfig thermal: intel: hfi: INTEL_HFI_THERMAL depends on NET 2022-02-10 20:58:24 +01:00
Makefile thermal: intel: hfi: Minimally initialize the Hardware Feedback Interface 2022-02-03 19:50:49 +01:00
intel_bxt_pmic_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
intel_hfi.c thermal: intel: hfi: remove NULL check after container_of() call 2022-05-18 20:53:05 +02:00
intel_hfi.h thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
intel_menlow.c thermal/drivers/intel: Move intel_menlow to thermal drivers 2021-08-17 14:11:48 +02:00
intel_pch_thermal.c intel: thermal: PCH: Drop ACPI_FADT_LOW_POWER_S0 check 2022-07-22 21:32:47 +02:00
intel_powerclamp.c thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-15 19:33:57 +02:00
intel_quark_dts_thermal.c thermal: Rename set_mode() to change_mode() 2020-06-29 20:26:39 +02:00
intel_soc_dts_iosf.c thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit() 2021-07-04 18:28:04 +02:00
intel_soc_dts_iosf.h thermal: intel: intel_soc_dts_iosf: Utilize for_each_set_clump8 macro 2019-12-04 19:44:12 -08:00
intel_soc_dts_thermal.c thermal: Convert to new X86 CPU match macros 2020-03-24 21:33:53 +01:00
intel_tcc_cooling.c thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P 2022-08-03 19:11:38 +02:00
therm_throt.c thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
thermal_interrupt.h thermal/drivers/intel: Allow processing of HWP interrupt 2021-09-09 16:33:20 +02:00
x86_pkg_temp_thermal.c thermal: intel: x86_pkg_temp_thermal: Drop duplicate 'is' from comment 2022-07-12 20:23:16 +02:00