Introduce a new structure, rapl_if_private, to save the private data for different RAPL Interface.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -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 | */ | ||
| 99 | struct 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 30 | 106 | #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__ */ |