diff options
author | Len Brown <len.brown@intel.com> | 2007-07-22 02:28:18 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-07-22 02:28:18 -0400 |
commit | dcb76f88683618ed6ef0df66643dba1285881ee5 (patch) | |
tree | c43b6162c6d5cd7afeaa5ee44a5eed1e30b23adc /include/acpi | |
parent | 08e31686d6d119ba26bf0690f5f872f6f5bd1a97 (diff) | |
parent | 6c5cf8aa5849819958311644ffaf8467e9fcf07e (diff) |
Pull throttle into release branch
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/processor.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index b4b0ffdab098..f9f987f8e661 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ | 21 | #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ |
22 | #define ACPI_PSD_REV0_ENTRIES 5 | 22 | #define ACPI_PSD_REV0_ENTRIES 5 |
23 | 23 | ||
24 | #define ACPI_TSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ | ||
25 | #define ACPI_TSD_REV0_ENTRIES 5 | ||
24 | /* | 26 | /* |
25 | * Types of coordination defined in ACPI 3.0. Same macros can be used across | 27 | * Types of coordination defined in ACPI 3.0. Same macros can be used across |
26 | * P, C and T states | 28 | * P, C and T states |
@@ -125,17 +127,53 @@ struct acpi_processor_performance { | |||
125 | 127 | ||
126 | /* Throttling Control */ | 128 | /* Throttling Control */ |
127 | 129 | ||
130 | struct acpi_tsd_package { | ||
131 | acpi_integer num_entries; | ||
132 | acpi_integer revision; | ||
133 | acpi_integer domain; | ||
134 | acpi_integer coord_type; | ||
135 | acpi_integer num_processors; | ||
136 | } __attribute__ ((packed)); | ||
137 | |||
138 | struct acpi_ptc_register { | ||
139 | u8 descriptor; | ||
140 | u16 length; | ||
141 | u8 space_id; | ||
142 | u8 bit_width; | ||
143 | u8 bit_offset; | ||
144 | u8 reserved; | ||
145 | u64 address; | ||
146 | } __attribute__ ((packed)); | ||
147 | |||
148 | struct acpi_processor_tx_tss { | ||
149 | acpi_integer freqpercentage; /* */ | ||
150 | acpi_integer power; /* milliWatts */ | ||
151 | acpi_integer transition_latency; /* microseconds */ | ||
152 | acpi_integer control; /* control value */ | ||
153 | acpi_integer status; /* success indicator */ | ||
154 | }; | ||
128 | struct acpi_processor_tx { | 155 | struct acpi_processor_tx { |
129 | u16 power; | 156 | u16 power; |
130 | u16 performance; | 157 | u16 performance; |
131 | }; | 158 | }; |
132 | 159 | ||
160 | struct acpi_processor; | ||
133 | struct acpi_processor_throttling { | 161 | struct acpi_processor_throttling { |
134 | int state; | 162 | unsigned int state; |
163 | unsigned int platform_limit; | ||
164 | struct acpi_pct_register control_register; | ||
165 | struct acpi_pct_register status_register; | ||
166 | unsigned int state_count; | ||
167 | struct acpi_processor_tx_tss *states_tss; | ||
168 | struct acpi_tsd_package domain_info; | ||
169 | cpumask_t shared_cpu_map; | ||
170 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); | ||
171 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, | ||
172 | int state); | ||
173 | |||
135 | u32 address; | 174 | u32 address; |
136 | u8 duty_offset; | 175 | u8 duty_offset; |
137 | u8 duty_width; | 176 | u8 duty_width; |
138 | int state_count; | ||
139 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; | 177 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; |
140 | }; | 178 | }; |
141 | 179 | ||
@@ -169,6 +207,9 @@ struct acpi_processor { | |||
169 | u32 id; | 207 | u32 id; |
170 | u32 pblk; | 208 | u32 pblk; |
171 | int performance_platform_limit; | 209 | int performance_platform_limit; |
210 | int throttling_platform_limit; | ||
211 | /* 0 - states 0..n-th state available */ | ||
212 | |||
172 | struct acpi_processor_flags flags; | 213 | struct acpi_processor_flags flags; |
173 | struct acpi_processor_power power; | 214 | struct acpi_processor_power power; |
174 | struct acpi_processor_performance *performance; | 215 | struct acpi_processor_performance *performance; |
@@ -270,7 +311,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
270 | 311 | ||
271 | /* in processor_throttling.c */ | 312 | /* in processor_throttling.c */ |
272 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 313 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
273 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 314 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
274 | extern struct file_operations acpi_processor_throttling_fops; | 315 | extern struct file_operations acpi_processor_throttling_fops; |
275 | 316 | ||
276 | /* in processor_idle.c */ | 317 | /* in processor_idle.c */ |