History

intel_rapl: abstract register address

MSR and MMIO RAPL interface have different sets of registers, thus the RAPL register address should be obtained from interface specific structure, i.e. struct rapl_if_private, instead.

Zhang Rui committed 7 years ago

Commit 7fde2711 parent 7ebf8ef2 files · +37 −40Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/intel_rapl.h+4−0
@@ -95,11 +95,15 @@ struct rapl_domain { · 94 unmodified lines
9595 * @platform_rapl_domain: Optional. Some RAPL interface may have platform
9696 * level RAPL control.
9797 * @pcap_rapl_online: CPU hotplug state for each RAPL interface.
98+ * @reg_unit: Register for getting energy/power/time unit.
99+ * @regs: Register sets for different RAPL Domains.
98100 */
99101 struct rapl_if_priv {
100102 struct powercap_control_type *control_type;
101103 struct rapl_domain *platform_rapl_domain;
102104 enum cpuhp_state pcap_rapl_online;
105+ u32 reg_unit;
106+ u32 regs[RAPL_DOMAIN_MAX][RAPL_DOMAIN_REG_MAX];
103107 };
104108
105109 /* maximum rapl package domain name: package-%d-die-%d */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t