linux/include
Kuppuswamy Sathyanarayanan 7537bae8b6 powercap: intel_rapl: Remove incorrect CPU check in PMU context
The RAPL MSR read path incorrectly validates CPU context when called
from the PMU subsystem:

    if (atomic) {
        if (unlikely(smp_processor_id() != cpu))
            return -EIO;
        rdmsrq(ra->reg.msr, ra->value);
    }

This check fails for package-scoped MSRs like RAPL energy counters,
which are readable from any CPU within the package.

The perf tool avoids hitting this check by validating against
/sys/bus/event_source/devices/power/cpumask before opening events.
However, turbostat does not perform this validation and may attempt
reads from non-lead CPUs, causing the check to fail and return zero
power values.

Since package-scoped MSRs are architecturally accessible from any CPU
in the package, remove the CPU matching check.

Also rename 'atomic' to 'pmu_ctx' to clarify this indicates PMU context
where rdmsrq() can be used directly instead of rdmsrl_safe_on_cpu().

Fixes: 748d6ba43a ("powercap: intel_rapl: Enable MSR-based RAPL PMU support")
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Tested-by: Furquim Ulisses <ulisses.furquim@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260209234310.1440722-2-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-02-11 21:03:39 +01:00
..
acpi Power management updates for 6.20-rc1/7.0-rc1 2026-02-09 19:00:42 -08:00
asm-generic struct filename series 2026-02-09 16:58:28 -08:00
clocksource
crypto This update includes the following changes: 2025-12-03 11:28:38 -08:00
cxl ACPI: extlog: Trace CPER CXL Protocol Error Section 2026-01-14 17:09:34 +01:00
drm drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE 2026-01-22 10:41:18 +01:00
dt-bindings dt-bindings: power: qcom,rpmpd: Add SC8280XP_MXC_AO 2025-12-16 15:24:09 -08:00
hyperv mshv: add definitions for arm64 gpa intercepts 2026-01-15 07:28:58 +00:00
keys
kunit kunit: Protect KUNIT_BINARY_STR_ASSERTION against ERR_PTR values 2026-01-05 15:32:03 -07:00
kvm
linux powercap: intel_rapl: Remove incorrect CPU check in PMU context 2026-02-11 21:03:39 +01:00
math-emu
media
memory
misc
net nfc: nci: Fix race between rfkill and nci_unregister_device(). 2026-01-28 19:32:26 -08:00
pcmcia
ras Significant patch series in this merge are as follows: 2025-12-05 13:52:43 -08:00
rdma
rv rv: Fix compilation if !CONFIG_RV_REACTORS 2025-12-02 12:33:37 -05:00
scsi scsi: core: Fix error handler encryption support 2026-01-04 15:16:20 -05:00
soc This pull request is entirely SoC clk drivers, not for lack of trying to modify 2025-12-08 09:38:52 +09:00
sound ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer 2026-01-08 08:07:54 +01:00
target
trace Changes since last update: 2026-02-09 16:08:40 -08:00
uapi for-7.0/block-20260206 2026-02-09 17:57:21 -08:00
ufs
vdso
video
xen
Kbuild