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
95 * @platform_rapl_domain: Optional. Some RAPL interface may have platform95 * @platform_rapl_domain: Optional. Some RAPL interface may have platform
96 * level RAPL control.96 * level RAPL control.
97 * @pcap_rapl_online: CPU hotplug state for each RAPL interface.97 * @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.
98 */100 */
99struct rapl_if_priv {101struct rapl_if_priv {
100 struct powercap_control_type *control_type;102 struct powercap_control_type *control_type;
101 struct rapl_domain *platform_rapl_domain;103 struct rapl_domain *platform_rapl_domain;
102 enum cpuhp_state pcap_rapl_online;104 enum cpuhp_state pcap_rapl_online;
105 u32 reg_unit;
106 u32 regs[RAPL_DOMAIN_MAX][RAPL_DOMAIN_REG_MAX];
103};107};
104 108
105/* maximum rapl package domain name: package-%d-die-%d */109/* 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