From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 0/6] powercap: intel_rapl: Move primitives to interface drivers
Date: Fri, 13 Mar 2026 11:53:26 -0700 [thread overview]
Message-ID: <20260313185333.2370733-1-sathyanarayanan.kuppuswamy@linux.intel.com> (raw)
RAPL supports multiple interfaces (MSR, MMIO, and TPMI), each with their
own register layouts and bitmask definitions. Currently, the primitive
tables and bitmasks for all three interfaces live in the common driver,
which requires interface-specific handling logic in shared code and makes
the common layer unnecessarily complex.
This series cleans this up by moving each interface's primitive
definitions into its own driver, so the common driver no longer needs to
know anything about per-interface register layouts.
All patches are no-functional-change refactoring.
This series is based on top of the earlier RAPL cleanup series:
https://lore.kernel.org/linux-pm/20260212233044.329790-1-sathyanarayanan.kuppuswamy@linux.intel.com/T/#t
Patch Summary:
Patch 1/6: Remove unused AVERAGE_POWER primitive and RAPL_PRIMITIVE_DERIVED
flag from the common driver.
Patch 2/6: Remove other unused macro definitions from the common driver.
Patch 3/6: Move struct rapl_primitive_info, enum unit_type, and
PRIMITIVE_INFO_INIT macro to intel_rapl.h to allow interface
drivers to define their own primitive tables.
Patch 4/6: Move TPMI primitive definitions and associated bitmasks into
the TPMI interface driver.
Patch 5/6: Move MMIO primitive definitions and associated bitmasks into
the MMIO interface driver.
Patch 6/6: Move MSR primitive definitions and associated bitmasks into
the MSR interface driver.
Kuppuswamy Sathyanarayanan (6):
powercap: intel_rapl: Remove unused AVERAGE_POWER primitive
powercap: intel_rapl: Remove unused macro definitions
powercap: intel_rapl: Move primitive info to header for interface
drivers
powercap: intel_rapl: Move TPMI primitives to TPMI driver
thermal: intel: int340x: processor: Move MMIO primitives to MMIO
driver
powercap: intel_rapl: Move MSR primitives to MSR driver
drivers/powercap/intel_rapl_common.c | 206 ------------------
drivers/powercap/intel_rapl_msr.c | 99 +++++++++
drivers/powercap/intel_rapl_tpmi.c | 53 +++++
.../int340x_thermal/processor_thermal_rapl.c | 72 ++++++
include/linux/intel_rapl.h | 33 ++-
5 files changed, 254 insertions(+), 209 deletions(-)
--
2.43.0
next reply other threads:[~2026-03-13 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 18:53 Kuppuswamy Sathyanarayanan [this message]
2026-03-13 18:53 ` [PATCH v1 1/6] powercap: intel_rapl: Remove unused AVERAGE_POWER primitive Kuppuswamy Sathyanarayanan
2026-03-13 18:53 ` [PATCH v1 2/6] powercap: intel_rapl: Remove unused macro definitions Kuppuswamy Sathyanarayanan
2026-03-13 18:53 ` [PATCH v1 3/6] powercap: intel_rapl: Move primitive info to header for interface drivers Kuppuswamy Sathyanarayanan
2026-03-13 18:53 ` [PATCH v1 4/6] powercap: intel_rapl: Move TPMI primitives to TPMI driver Kuppuswamy Sathyanarayanan
2026-03-13 18:53 ` [PATCH v1 5/6] thermal: intel: int340x: processor: Move MMIO primitives to MMIO driver Kuppuswamy Sathyanarayanan
2026-03-13 18:53 ` [PATCH v1 6/6] powercap: intel_rapl: Move MSR primitives to MSR driver Kuppuswamy Sathyanarayanan
2026-03-20 17:02 ` [PATCH v1 0/6] powercap: intel_rapl: Move primitives to interface drivers srinivas pandruvada
2026-03-20 18:10 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313185333.2370733-1-sathyanarayanan.kuppuswamy@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox