linux/drivers/thermal/intel/int340x_thermal
Zhang Rui 1aa09b9379 powercap: intel_rapl: Fix locking in TPMI RAPL
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>
2024-02-13 17:31:48 +01: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: trip: Send trip change notifications on all trip updates 2023-12-13 12:37:01 +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: int3400: Convert to platform remove callback returning void 2023-09-29 12:34:16 +02:00
int3401_thermal.c thermal: int3401: Convert to platform remove callback returning void 2023-09-29 12:34:16 +02:00
int3402_thermal.c thermal: int3402: Convert to platform remove callback returning void 2023-09-29 12:34:16 +02:00
int3403_thermal.c thermal: int3403: Convert to platform remove callback returning void 2023-09-29 12:34:17 +02:00
int3406_thermal.c thermal: int3406: Convert to platform remove callback returning void 2023-09-29 12:34:17 +02:00
Kconfig thermal: ACPI: Move the ACPI thermal library to drivers/acpi/ 2023-11-21 15:04:08 +01:00
Makefile thermal: int340x: processor_thermal: Support power floor notifications 2023-10-12 21:09:48 +02:00
processor_thermal_device_pci_legacy.c thermal: int340x: processor_thermal: Move mailbox code to common module 2023-09-14 21:52:19 +02:00
processor_thermal_device_pci.c thermal: int340x: processor_thermal: Enable power floor support 2023-10-12 21:09:48 +02:00
processor_thermal_device.c thermal: int340x: processor_thermal: Support power floor notifications 2023-10-12 21:09:48 +02:00
processor_thermal_device.h thermal: int340x: processor_thermal: Support power floor notifications 2023-10-12 21:09:48 +02:00
processor_thermal_mbox.c thermal: int340x: processor_thermal: Add interrupt configuration function 2023-09-14 21:52:19 +02:00
processor_thermal_power_floor.c thermal: int340x: processor_thermal: Support power floor notifications 2023-10-12 21:09:48 +02:00
processor_thermal_rapl.c powercap: intel_rapl: Fix locking in TPMI RAPL 2024-02-13 17:31:48 +01:00
processor_thermal_rfim.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_wt_hint.c thermal: int340x: processor_thermal: Common function to clear SOC interrupt 2023-10-12 21:09:48 +02:00
processor_thermal_wt_req.c thermal: int340x: processor_thermal: Move mailbox code to common module 2023-09-14 21:52:19 +02:00