linux-imx/drivers/thermal/intel/int340x_thermal
Zhang Rui d6c83ee705 powercap: intel_rapl: Fix locking in TPMI RAPL
[ Upstream commit 1aa09b9379 ]

The RAPL framework uses CPU hotplug locking to protect the rapl_packages
list and rp->lead_cpu to guarantee that

 1. the RAPL package device is not unprobed and freed
 2. the cached rp->lead_cpu is always valid

for operations like powercap sysfs accesses.

Current RAPL APIs assume being called from CPU hotplug callbacks which
hold the CPU hotplug lock, but TPMI RAPL driver invokes the APIs in the
driver's .probe() function without acquiring the CPU hotplug lock.

Fix the problem by providing both locked and lockless versions of RAPL
APIs.

Fixes: 9eef7f9da9 ("powercap: intel_rapl: Introduce RAPL TPMI interface driver")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: 6.5+ <stable@vger.kernel.org> # 6.5+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:28:19 +02:00
..
acpi_thermal_rel.c thermal: intel: int340x_thermal: New IOCTLs for Passive v2 table 2023-06-13 17:57:39 +02:00
acpi_thermal_rel.h thermal: intel: int340x_thermal: New IOCTLs for Passive v2 table 2023-06-13 17:57:39 +02:00
int340x_thermal_zone.c thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers 2023-03-03 20:45:02 +01:00
int340x_thermal_zone.h thermal: intel: int340x: Use generic trip points table 2023-01-27 15:11:12 +01:00
int3400_thermal.c thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
int3401_thermal.c thermal: intel: int340x: simplify the code with module_platform_driver() 2023-08-22 21:46:13 +02:00
int3402_thermal.c
int3403_thermal.c thermal: intel: int340x: Rework updating trip points 2023-01-27 15:11:12 +01:00
int3406_thermal.c
Kconfig thermal: intel: int340x: Use generic trip points table 2023-01-27 15:11:12 +01:00
Makefile
processor_thermal_device_pci_legacy.c thermal: intel: intel_soc_dts_iosf: Rework critical trip setup 2023-08-11 18:44:45 +02:00
processor_thermal_device_pci.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_device.c thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature 2024-04-03 15:28:18 +02:00
processor_thermal_device.h thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_mbox.c
processor_thermal_rapl.c powercap: intel_rapl: Fix locking in TPMI RAPL 2024-04-03 15:28:19 +02:00
processor_thermal_rfim.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00