History

intel_rapl: support two power limits for every RAPL domain

RAPL MSR interface supports 2 power limits for package domain, and 1 power limit for other domains, while RAPL MMIO interface supports 2 power limits for both package and dram domains. And when 2 power limits are supported, the FW_LOCK bit is in bit 63 of the register, instead of bit 31. Remove the assumption that only pakcage domain supports 2 power limits. And allow the RAPL interface driver to specify the number of power limits supported, for every single RAPL domain it owns..

Zhang Rui committed 7 years ago

Commit 0c2dded1 parent d978e753 files · +28 −47Browse files

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

Unified · Split

include/linux/intel_rapl.h+2−0
@@ -104,6 +104,7 @@ struct reg_action { · 103 unmodified lines
104104 * @pcap_rapl_online: CPU hotplug state for each RAPL interface.
105105 * @reg_unit: Register for getting energy/power/time unit.
106106 * @regs: Register sets for different RAPL Domains.
107+ * @limits: Number of power limits supported by each domain.
107108 * @read_raw: Callback for reading RAPL interface specific
108109 * registers.
109110 * @write_raw: Callback for writing RAPL interface specific
@@ -115,6 +116,7 @@ struct rapl_if_priv { · 5 unmodified lines
115116 enum cpuhp_state pcap_rapl_online;
116117 u64 reg_unit;
117118 u64 regs[RAPL_DOMAIN_MAX][RAPL_DOMAIN_REG_MAX];
119+ int limits[RAPL_DOMAIN_MAX];
118120 int (*read_raw)(int cpu, struct reg_action *ra);
119121 int (*write_raw)(int cpu, struct reg_action *ra);
120122 };

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