From: Zhang Rui <rui.zhang@intel.com>
To: linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com,
daniel.lezcano@linaro.org
Cc: linux-kernel@vger.kernel.org, srinivas.pandruvada@intel.com
Subject: [PATCH v2 0/15] powercap/intel_rapl: Introduce RAPL TPMI support
Date: Wed, 19 Apr 2023 10:44:04 +0800 [thread overview]
Message-ID: <20230419024419.324436-1-rui.zhang@intel.com> (raw)
The TPMI (Topology Aware Register and PM Capsule Interface) provides a
flexible, extendable and PCIe enumerable MMIO interface for PM features.
The TPMI documentation can be downloaded from:
https://github.com/intel/tpmi_power_management
Intel RAPL (Running Average Power Limit) is one of the features that
benefit from this. Using TPMI Interface has advantage over traditional MSR
(Model Specific Register) interface, where a thread needs to be scheduled
on the target CPU to read or write. Also the RAPL features vary between
CPU models, and hence lot of model specific code. Here TPMI provides an
architectural interface by providing hierarchical tables and fields,
which will not need any model specific implementation.
Given that there are some differences between RAPL TPMI Interface and the
existing RAPL MSR/MMIO Interface, this patch series improves the RAPL
common code to satisfy the new requirements from TPMI interface, and then
introduces the RAPL TPMI Interface driver.
Patch 1-4 cleanups and preparation work.
Patch 5 adds support for per Domain Unit register.
Patch 6-10 improves Power Limits handling, and provides support
for per Power Limit register, and per Power Limit Lock.
Patch 11-12 support rapl_package without online CPUs. So that TPMI
rapl_package still works with whole package offlined.
Patch 13-15 introduces RAPL Core support for TPMI Interface and the
RAPL TPMI Interface driver.
This series depends on the TPMI base driver which has been merged in 6.3-rc1.
thanks,
rui
---
Changes since v1:
- use set_defaults() and variable name 'defaults' for rapl_defaults
structure.
- use 'rpi_default' instead of 'rpis' for the default rapl primitive
information of MSR/MMIO Interface.
- rephase the changelog of patch 7/15.
- change the subject of patch 10/15 and use a helper for getting the
primitive for power limit LOCK bit control.
----------------------------------------------------------------
Zhang Rui (15):
powercap/intel_rapl: Remove unused field in struct rapl_if_priv
powercap/intel_rapl: Allow probing without CPUID match
powercap/intel_rapl: Support per Interface rapl_defaults
powercap/intel_rapl: Support per Interface primitive information
powercap/intel_rapl: Support per domain energy/power/time unit
powercap/intel_rapl: Use index to initialize primitive information
powercap/intel_rapl: Change primitive order
powercap/intel_rapl: Use bitmap for Power Limits
powercap/intel_rapl: Cleanup Power Limits support
powercap/intel_rapl: Introduce per Power Limit lock
powercap/intel_rapl: Remove redundant cpu parameter
powercap/intel_rapl: Make cpu optional for rapl_package
powercap/intel_rapl: Introduce RAPL I/F type
powercap/intel_rapl: Introduce core support for TPMI interface
powercap/intel_rapl_tpmi: Introduce RAPL TPMI interface driver
drivers/powercap/Kconfig | 14 +
drivers/powercap/Makefile | 1 +
drivers/powercap/intel_rapl_common.c | 868 ++++++++++++---------
drivers/powercap/intel_rapl_msr.c | 14 +-
drivers/powercap/intel_rapl_tpmi.c | 325 ++++++++
.../intel/int340x_thermal/processor_thermal_rapl.c | 11 +-
include/linux/intel_rapl.h | 40 +-
7 files changed, 875 insertions(+), 398 deletions(-)
create mode 100644 drivers/powercap/intel_rapl_tpmi.c
next reply other threads:[~2023-04-19 2:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 2:44 Zhang Rui [this message]
2023-04-19 2:44 ` [PATCH v2 01/15] powercap/intel_rapl: Remove unused field in struct rapl_if_priv Zhang Rui
2023-04-19 2:44 ` [PATCH v2 02/15] powercap/intel_rapl: Allow probing without CPUID match Zhang Rui
2023-04-19 2:44 ` [PATCH v2 03/15] powercap/intel_rapl: Support per Interface rapl_defaults Zhang Rui
2023-04-19 2:44 ` [PATCH v2 04/15] powercap/intel_rapl: Support per Interface primitive information Zhang Rui
2023-04-19 2:44 ` [PATCH v2 05/15] powercap/intel_rapl: Support per domain energy/power/time unit Zhang Rui
2023-04-19 2:44 ` [PATCH v2 06/15] powercap/intel_rapl: Use index to initialize primitive information Zhang Rui
2023-04-19 2:44 ` [PATCH v2 07/15] powercap/intel_rapl: Change primitive order Zhang Rui
2023-04-19 2:44 ` [PATCH v2 08/15] powercap/intel_rapl: Use bitmap for Power Limits Zhang Rui
2023-04-19 2:44 ` [PATCH v2 09/15] powercap/intel_rapl: Cleanup Power Limits support Zhang Rui
2023-09-05 6:21 ` Ville Syrjälä
2023-09-06 3:14 ` Zhang, Rui
2023-09-06 15:32 ` Pandruvada, Srinivas
2023-04-19 2:44 ` [PATCH v2 10/15] powercap/intel_rapl: Add support for lock bit per Power Limit Zhang Rui
2023-04-19 2:44 ` [PATCH v2 11/15] powercap/intel_rapl: Remove redundant cpu parameter Zhang Rui
2023-04-19 2:44 ` [PATCH v2 12/15] powercap/intel_rapl: Make cpu optional for rapl_package Zhang Rui
2023-04-19 2:44 ` [PATCH v2 13/15] powercap/intel_rapl: Introduce RAPL I/F type Zhang Rui
2023-04-19 2:44 ` [PATCH v2 14/15] powercap/intel_rapl: Introduce core support for TPMI interface Zhang Rui
2023-04-19 2:44 ` [PATCH v2 15/15] powercap/intel_rapl_tpmi: Introduce RAPL TPMI interface driver Zhang Rui
2023-05-24 16:54 ` [PATCH v2 0/15] powercap/intel_rapl: Introduce RAPL TPMI support 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=20230419024419.324436-1-rui.zhang@intel.com \
--to=rui.zhang@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=srinivas.pandruvada@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