summaryrefslogtreecommitdiff
path: root/include/linux/intel_rapl.h
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2023-04-19 05:44:17 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-05-24 19:46:20 +0300
commitb4288ce788aaf160f2a706672af2eaef417bb057 (patch)
tree4d14de322daf10a899e33f20e8d953e0308556be /include/linux/intel_rapl.h
parentbf44b9011df3d6e34a23be77d86540553ba2bbe2 (diff)
downloadlinux-b4288ce788aaf160f2a706672af2eaef417bb057.tar.xz
powercap: intel_rapl: Introduce RAPL I/F type
Different RAPL Interfaces may have different primitive information and rapl_defaults calls. To better distinguish this difference in the RAPL framework code, introduce a new enum to represent different types of RAPL Interfaces. No functional change. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Wang Wendy <wendy.wang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/intel_rapl.h')
-rw-r--r--include/linux/intel_rapl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/intel_rapl.h b/include/linux/intel_rapl.h
index 51509f35027b..65f358b64096 100644
--- a/include/linux/intel_rapl.h
+++ b/include/linux/intel_rapl.h
@@ -14,6 +14,11 @@
#include <linux/powercap.h>
#include <linux/cpuhotplug.h>
+enum rapl_if_type {
+ RAPL_IF_MSR, /* RAPL I/F using MSR registers */
+ RAPL_IF_MMIO, /* RAPL I/F using MMIO registers */
+};
+
enum rapl_domain_type {
RAPL_DOMAIN_PACKAGE, /* entire package/socket */
RAPL_DOMAIN_PP0, /* core power plane */
@@ -130,6 +135,7 @@ struct reg_action {
* @rpi: internal pointer to interface primitive info
*/
struct rapl_if_priv {
+ enum rapl_if_type type;
struct powercap_control_type *control_type;
enum cpuhp_state pcap_rapl_online;
u64 reg_unit;