diff options
| author | Luming Yu <luming.yu@gmail.com> | 2007-05-26 10:49:58 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2007-06-02 00:07:47 -0400 |
| commit | 01854e697a77a434104b2f7e6d7fd463a978af32 (patch) | |
| tree | 5882fceb379dacfc9e9f784d8c265a3be46b513e /include/acpi | |
| parent | f285e3d329ce68cc355fadf4ab2c8f34d7f264cb (diff) | |
ACPI: add ACPI 3.0 _TPC _TSS _PTC throttling support
adds _TPC _TSS _PTC -- Throttling Present Capabilities
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/processor.h | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index b4b0ffdab098..01d2f24c224f 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,52 @@ 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, int state); | ||
| 172 | |||
| 135 | u32 address; | 173 | u32 address; |
| 136 | u8 duty_offset; | 174 | u8 duty_offset; |
| 137 | u8 duty_width; | 175 | u8 duty_width; |
| 138 | int state_count; | ||
| 139 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; | 176 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; |
| 140 | }; | 177 | }; |
| 141 | 178 | ||
| @@ -169,6 +206,9 @@ struct acpi_processor { | |||
| 169 | u32 id; | 206 | u32 id; |
| 170 | u32 pblk; | 207 | u32 pblk; |
| 171 | int performance_platform_limit; | 208 | int performance_platform_limit; |
| 209 | int throttling_platform_limit; | ||
| 210 | /*0 - states 0..n-th satte available*/ | ||
| 211 | |||
| 172 | struct acpi_processor_flags flags; | 212 | struct acpi_processor_flags flags; |
| 173 | struct acpi_processor_power power; | 213 | struct acpi_processor_power power; |
| 174 | struct acpi_processor_performance *performance; | 214 | struct acpi_processor_performance *performance; |
| @@ -270,7 +310,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
| 270 | 310 | ||
| 271 | /* in processor_throttling.c */ | 311 | /* in processor_throttling.c */ |
| 272 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 312 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
| 273 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 313 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
| 274 | extern struct file_operations acpi_processor_throttling_fops; | 314 | extern struct file_operations acpi_processor_throttling_fops; |
| 275 | 315 | ||
| 276 | /* in processor_idle.c */ | 316 | /* in processor_idle.c */ |
