]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powercap: intel_rapl: Move MSR primitives to MSR driver
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Tue, 31 Mar 2026 21:19:49 +0000 (14:19 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 1 Apr 2026 14:03:05 +0000 (16:03 +0200)
commitb0ee5110ef1c684eab41bd03fbe8bf2a8f964054
tree15c607e8f1568b01b5776ddba58b5cbc24d2d84b
parentd7a718fff34b8b4a2d54672f2c685aef7a281b5e
powercap: intel_rapl: Move MSR primitives to MSR driver

MSR-specific RAPL primitives differ from those used by TPMI and MMIO
interfaces. Keeping them in the common driver requires
interface-specific handling logic and makes the common layer
unnecessarily complex.

Move the MSR primitive definitions and associated bitmasks into the
MSR interface driver. This change includes:

 1. Move MSR-specific bitmask definitions to RAPL MSR driver.
 2. Add MSR-local struct rapl_primitive_info instance and assign it to
    priv->rpi during MSR probe.
 3. Remove the primitive assignment logic from rapl_config() in the
    common driver.

No functional changes are intended.

Co-developed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20260331211950.3329932-7-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl_common.c
drivers/powercap/intel_rapl_msr.c