diff options
author | Zhang Rui <rui.zhang@intel.com> | 2019-07-10 16:44:25 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-11 16:08:57 +0300 |
commit | 7ebf8eff63b4f349e7b2ded6aa5036d94bdf94b9 (patch) | |
tree | cefe857c784b2f2b2e6da6d088bc6b38cf792513 /include/linux | |
parent | ff956826a403f5cf189978d5ff6b3eb53aa11610 (diff) | |
download | linux-7ebf8eff63b4f349e7b2ded6aa5036d94bdf94b9.tar.xz |
intel_rapl: introduce struct rapl_if_private
Introduce a new structure, rapl_if_private, to save the private data
for different RAPL Interface.
Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Tested-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/intel_rapl.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/intel_rapl.h b/include/linux/intel_rapl.h index 94716036d829..7bf1683e4a63 100644 --- a/include/linux/intel_rapl.h +++ b/include/linux/intel_rapl.h @@ -88,6 +88,20 @@ struct rapl_domain { struct rapl_package *rp; }; +/** + * struct rapl_if_priv: private data for different RAPL interfaces + * @control_type: Each RAPL interface must have its own powercap + * control type. + * @platform_rapl_domain: Optional. Some RAPL interface may have platform + * level RAPL control. + * @pcap_rapl_online: CPU hotplug state for each RAPL interface. + */ +struct rapl_if_priv { + struct powercap_control_type *control_type; + struct rapl_domain *platform_rapl_domain; + enum cpuhp_state pcap_rapl_online; +}; + /* maximum rapl package domain name: package-%d-die-%d */ #define PACKAGE_DOMAIN_NAME_LENGTH 30 @@ -108,6 +122,7 @@ struct rapl_package { /* Track active cpus */ struct cpumask cpumask; char name[PACKAGE_DOMAIN_NAME_LENGTH]; + struct rapl_if_priv *priv; }; #endif /* __INTEL_RAPL_H__ */ |