History

intel_rapl: introduce struct rapl_if_private

Introduce a new structure, rapl_if_private, to save the private data for different RAPL Interface.

Zhang Rui committed 7 years ago

Commit 7ebf8ef1 parent ff956822 files · +44 −30Browse files

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

Unified · Split

include/linux/intel_rapl.h+15−0
@@ -88,6 +88,20 @@ struct rapl_domain { · 87 unmodified lines
88 struct rapl_package *rp;88 struct rapl_package *rp;
89};89};
90 90
91/**
92 * struct rapl_if_priv: private data for different RAPL interfaces
93 * @control_type: Each RAPL interface must have its own powercap
94 * control type.
95 * @platform_rapl_domain: Optional. Some RAPL interface may have platform
96 * level RAPL control.
97 * @pcap_rapl_online: CPU hotplug state for each RAPL interface.
98 */
99struct rapl_if_priv {
100 struct powercap_control_type *control_type;
101 struct rapl_domain *platform_rapl_domain;
102 enum cpuhp_state pcap_rapl_online;
103};
104
91/* maximum rapl package domain name: package-%d-die-%d */105/* maximum rapl package domain name: package-%d-die-%d */
92#define PACKAGE_DOMAIN_NAME_LENGTH 30106#define PACKAGE_DOMAIN_NAME_LENGTH 30
93 107
@@ -108,6 +122,7 @@ struct rapl_package { · 14 unmodified lines
108 /* Track active cpus */122 /* Track active cpus */
109 struct cpumask cpumask;123 struct cpumask cpumask;
110 char name[PACKAGE_DOMAIN_NAME_LENGTH];124 char name[PACKAGE_DOMAIN_NAME_LENGTH];
125 struct rapl_if_priv *priv;
111};126};
112 127
113#endif /* __INTEL_RAPL_H__ */128#endif /* __INTEL_RAPL_H__ */

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