]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powercap: intel_rapl: Move TPMI default settings into TPMI interface driver
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Thu, 12 Feb 2026 23:30:41 +0000 (15:30 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Mar 2026 14:52:39 +0000 (15:52 +0100)
commit22e729c5e5e0c5a35ae9fbc691bb7635dae3378b
treeee8444174c12beb5793fd3016257bdb49d9fb320
parentd7ca7d1488cc916dbf0a6a594abbda81d4eaeee9
powercap: intel_rapl: Move TPMI default settings into TPMI interface driver

TPMI-specific RAPL defaults differ from those used by MSR and MMIO
interfaces. Keeping them in RAPL common driver introduces unnecessary
complexity.

Move the TPMI defaults into the TPMI interface driver. This change
includes the following updates:

1. Add a TPMI-local struct rapl_defaults instance and assign it to
priv->defaults during TPMI probe.
2. Move rapl_check_unit_tpmi() and related unit-field definitions from
the common driver into the TPMI driver.
3. In rapl_check_unit_tpmi(), replace the generic get_rid() usage with
direct access to the TPMI package ID, since the function is now
interface-specific.

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>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260212233044.329790-10-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_tpmi.c