Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ACPI_PROCESSOR_H |
| 2 | #define __ACPI_PROCESSOR_H |
| 3 | |
| 4 | #include <linux/kernel.h> |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 5 | #include <linux/cpu.h> |
Len Brown | 4f86d3a | 2007-10-03 18:58:00 -0400 | [diff] [blame] | 6 | #include <linux/cpuidle.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 8 | #include <asm/acpi.h> |
| 9 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #define ACPI_PROCESSOR_BUSY_METRIC 10 |
| 11 | |
| 12 | #define ACPI_PROCESSOR_MAX_POWER 8 |
| 13 | #define ACPI_PROCESSOR_MAX_C2_LATENCY 100 |
| 14 | #define ACPI_PROCESSOR_MAX_C3_LATENCY 1000 |
| 15 | |
| 16 | #define ACPI_PROCESSOR_MAX_THROTTLING 16 |
| 17 | #define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */ |
| 18 | #define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4 |
| 19 | |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 20 | #define ACPI_PDC_REVISION_ID 0x1 |
| 21 | |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 22 | #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 23 | #define ACPI_PSD_REV0_ENTRIES 5 |
| 24 | |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 25 | #define ACPI_TSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ |
| 26 | #define ACPI_TSD_REV0_ENTRIES 5 |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 27 | /* |
| 28 | * Types of coordination defined in ACPI 3.0. Same macros can be used across |
| 29 | * P, C and T states |
| 30 | */ |
| 31 | #define DOMAIN_COORD_TYPE_SW_ALL 0xfc |
| 32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd |
| 33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe |
| 34 | |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 35 | #define ACPI_CSTATE_SYSTEMIO (0) |
| 36 | #define ACPI_CSTATE_FFH (1) |
| 37 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | /* Power Management */ |
| 39 | |
| 40 | struct acpi_processor_cx; |
| 41 | |
| 42 | struct acpi_power_register { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 43 | u8 descriptor; |
| 44 | u16 length; |
| 45 | u8 space_id; |
| 46 | u8 bit_width; |
| 47 | u8 bit_offset; |
| 48 | u8 reserved; |
| 49 | u64 address; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | } __attribute__ ((packed)); |
| 51 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | struct acpi_processor_cx_policy { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 53 | u32 count; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | struct acpi_processor_cx *state; |
| 55 | struct { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 56 | u32 time; |
| 57 | u32 ticks; |
| 58 | u32 count; |
| 59 | u32 bm; |
| 60 | } threshold; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | struct acpi_processor_cx { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 64 | u8 valid; |
| 65 | u8 type; |
| 66 | u32 address; |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 67 | u8 space_id; |
| 68 | u8 index; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 69 | u32 latency; |
| 70 | u32 latency_ticks; |
| 71 | u32 power; |
| 72 | u32 usage; |
Dominik Brodowski | a3c6598 | 2006-06-24 19:37:00 -0400 | [diff] [blame] | 73 | u64 time; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | struct acpi_processor_cx_policy promotion; |
| 75 | struct acpi_processor_cx_policy demotion; |
| 76 | }; |
| 77 | |
| 78 | struct acpi_processor_power { |
Len Brown | 4f86d3a | 2007-10-03 18:58:00 -0400 | [diff] [blame] | 79 | struct cpuidle_device dev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | struct acpi_processor_cx *state; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 81 | unsigned long bm_check_timestamp; |
| 82 | u32 default_state; |
| 83 | u32 bm_activity; |
| 84 | int count; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
Thomas Gleixner | 169a0ab | 2007-02-16 01:27:55 -0800 | [diff] [blame] | 86 | int timer_broadcast_on_state; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | /* Performance Management */ |
| 90 | |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 91 | struct acpi_psd_package { |
| 92 | acpi_integer num_entries; |
| 93 | acpi_integer revision; |
| 94 | acpi_integer domain; |
| 95 | acpi_integer coord_type; |
| 96 | acpi_integer num_processors; |
| 97 | } __attribute__ ((packed)); |
| 98 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | struct acpi_pct_register { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 100 | u8 descriptor; |
| 101 | u16 length; |
| 102 | u8 space_id; |
| 103 | u8 bit_width; |
| 104 | u8 bit_offset; |
| 105 | u8 reserved; |
| 106 | u64 address; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | } __attribute__ ((packed)); |
| 108 | |
| 109 | struct acpi_processor_px { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 110 | acpi_integer core_frequency; /* megahertz */ |
| 111 | acpi_integer power; /* milliWatts */ |
| 112 | acpi_integer transition_latency; /* microseconds */ |
| 113 | acpi_integer bus_master_latency; /* microseconds */ |
| 114 | acpi_integer control; /* control value */ |
| 115 | acpi_integer status; /* success indicator */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | }; |
| 117 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | struct acpi_processor_performance { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 119 | unsigned int state; |
| 120 | unsigned int platform_limit; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | struct acpi_pct_register control_register; |
| 122 | struct acpi_pct_register status_register; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 123 | unsigned int state_count; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | struct acpi_processor_px *states; |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 125 | struct acpi_psd_package domain_info; |
| 126 | cpumask_t shared_cpu_map; |
| 127 | unsigned int shared_type; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | }; |
| 129 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | /* Throttling Control */ |
| 131 | |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 132 | struct acpi_tsd_package { |
| 133 | acpi_integer num_entries; |
| 134 | acpi_integer revision; |
| 135 | acpi_integer domain; |
| 136 | acpi_integer coord_type; |
| 137 | acpi_integer num_processors; |
| 138 | } __attribute__ ((packed)); |
| 139 | |
| 140 | struct acpi_ptc_register { |
| 141 | u8 descriptor; |
| 142 | u16 length; |
| 143 | u8 space_id; |
| 144 | u8 bit_width; |
| 145 | u8 bit_offset; |
| 146 | u8 reserved; |
| 147 | u64 address; |
| 148 | } __attribute__ ((packed)); |
| 149 | |
| 150 | struct acpi_processor_tx_tss { |
| 151 | acpi_integer freqpercentage; /* */ |
| 152 | acpi_integer power; /* milliWatts */ |
| 153 | acpi_integer transition_latency; /* microseconds */ |
| 154 | acpi_integer control; /* control value */ |
| 155 | acpi_integer status; /* success indicator */ |
| 156 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | struct acpi_processor_tx { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 158 | u16 power; |
| 159 | u16 performance; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | }; |
| 161 | |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 162 | struct acpi_processor; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 163 | struct acpi_processor_throttling { |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 164 | unsigned int state; |
| 165 | unsigned int platform_limit; |
| 166 | struct acpi_pct_register control_register; |
| 167 | struct acpi_pct_register status_register; |
| 168 | unsigned int state_count; |
| 169 | struct acpi_processor_tx_tss *states_tss; |
| 170 | struct acpi_tsd_package domain_info; |
| 171 | cpumask_t shared_cpu_map; |
Len Brown | ff55a9c | 2007-06-02 00:15:25 -0400 | [diff] [blame] | 172 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); |
| 173 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, |
| 174 | int state); |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 175 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 176 | u32 address; |
| 177 | u8 duty_offset; |
| 178 | u8 duty_width; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; |
| 180 | }; |
| 181 | |
| 182 | /* Limit Interface */ |
| 183 | |
| 184 | struct acpi_processor_lx { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 185 | int px; /* performace state */ |
| 186 | int tx; /* throttle level */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | }; |
| 188 | |
| 189 | struct acpi_processor_limit { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 190 | struct acpi_processor_lx state; /* current limit */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | struct acpi_processor_lx thermal; /* thermal limit */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 192 | struct acpi_processor_lx user; /* user limit */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | }; |
| 194 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | struct acpi_processor_flags { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 196 | u8 power:1; |
| 197 | u8 performance:1; |
| 198 | u8 throttling:1; |
| 199 | u8 limit:1; |
| 200 | u8 bm_control:1; |
| 201 | u8 bm_check:1; |
| 202 | u8 has_cst:1; |
| 203 | u8 power_setup_done:1; |
Len Brown | 4f86d3a | 2007-10-03 18:58:00 -0400 | [diff] [blame] | 204 | u8 bm_rld_set:1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | }; |
| 206 | |
| 207 | struct acpi_processor { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 208 | acpi_handle handle; |
| 209 | u32 acpi_id; |
| 210 | u32 id; |
| 211 | u32 pblk; |
| 212 | int performance_platform_limit; |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 213 | int throttling_platform_limit; |
Len Brown | ff55a9c | 2007-06-02 00:15:25 -0400 | [diff] [blame] | 214 | /* 0 - states 0..n-th state available */ |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 215 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | struct acpi_processor_flags flags; |
| 217 | struct acpi_processor_power power; |
| 218 | struct acpi_processor_performance *performance; |
| 219 | struct acpi_processor_throttling throttling; |
| 220 | struct acpi_processor_limit limit; |
Venkatesh Pallipadi | 05131ec | 2005-10-23 16:31:00 -0400 | [diff] [blame] | 221 | |
| 222 | /* the _PDC objects for this processor, if any */ |
| 223 | struct acpi_object_list *pdc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | }; |
| 225 | |
| 226 | struct acpi_processor_errata { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 227 | u8 smp; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 228 | struct { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 229 | u8 throttle:1; |
| 230 | u8 fdma:1; |
| 231 | u8 reserved:6; |
| 232 | u32 bmisx; |
| 233 | } piix4; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | }; |
| 235 | |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 236 | extern int acpi_processor_preregister_performance(struct |
| 237 | acpi_processor_performance |
Fenghua Yu | 5010929 | 2007-08-07 18:40:30 -0400 | [diff] [blame] | 238 | *performance); |
Venkatesh Pallipadi | 3b2d994 | 2005-12-14 15:05:00 -0500 | [diff] [blame] | 239 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 240 | extern int acpi_processor_register_performance(struct acpi_processor_performance |
| 241 | *performance, unsigned int cpu); |
| 242 | extern void acpi_processor_unregister_performance(struct |
| 243 | acpi_processor_performance |
| 244 | *performance, |
| 245 | unsigned int cpu); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | |
| 247 | /* note: this locks both the calling module and the processor module |
| 248 | if a _PPC object exists, rmmod is disallowed then */ |
| 249 | int acpi_processor_notify_smm(struct module *calling_module); |
| 250 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | /* for communication between multiple parts of the processor kernel module */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 252 | extern struct acpi_processor *processors[NR_CPUS]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | extern struct acpi_processor_errata errata; |
| 254 | |
Venkatesh Pallipadi | 05131ec | 2005-10-23 16:31:00 -0400 | [diff] [blame] | 255 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 256 | |
Venkatesh Pallipadi | 05131ec | 2005-10-23 16:31:00 -0400 | [diff] [blame] | 257 | #ifdef ARCH_HAS_POWER_INIT |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 258 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 259 | unsigned int cpu); |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 260 | int acpi_processor_ffh_cstate_probe(unsigned int cpu, |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 261 | struct acpi_processor_cx *cx, |
| 262 | struct acpi_power_register *reg); |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 263 | void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cstate); |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 264 | #else |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 265 | static inline void acpi_processor_power_init_bm_check(struct |
| 266 | acpi_processor_flags |
| 267 | *flags, unsigned int cpu) |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 268 | { |
| 269 | flags->bm_check = 1; |
| 270 | return; |
| 271 | } |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 272 | static inline int acpi_processor_ffh_cstate_probe(unsigned int cpu, |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 273 | struct acpi_processor_cx *cx, |
| 274 | struct acpi_power_register |
| 275 | *reg) |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 276 | { |
| 277 | return -1; |
| 278 | } |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 279 | static inline void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx |
| 280 | *cstate) |
Venkatesh Pallipadi | 991528d | 2006-09-25 16:28:13 -0700 | [diff] [blame] | 281 | { |
| 282 | return; |
| 283 | } |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 284 | #endif |
| 285 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | /* in processor_perflib.c */ |
Venkatesh Pallipadi | 02df8b9 | 2005-04-15 15:07:10 -0400 | [diff] [blame] | 287 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | #ifdef CONFIG_CPU_FREQ |
| 289 | void acpi_processor_ppc_init(void); |
| 290 | void acpi_processor_ppc_exit(void); |
| 291 | int acpi_processor_ppc_has_changed(struct acpi_processor *pr); |
| 292 | #else |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 293 | static inline void acpi_processor_ppc_init(void) |
| 294 | { |
| 295 | return; |
| 296 | } |
| 297 | static inline void acpi_processor_ppc_exit(void) |
| 298 | { |
| 299 | return; |
| 300 | } |
| 301 | static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) |
| 302 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | static unsigned int printout = 1; |
| 304 | if (printout) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 305 | printk(KERN_WARNING |
| 306 | "Warning: Processor Platform Limit event detected, but not handled.\n"); |
| 307 | printk(KERN_WARNING |
| 308 | "Consider compiling CPUfreq support into your kernel.\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | printout = 0; |
| 310 | } |
| 311 | return 0; |
| 312 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 313 | #endif /* CONFIG_CPU_FREQ */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | |
| 315 | /* in processor_throttling.c */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 316 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
Luming Yu | 01854e6 | 2007-05-26 22:49:58 +0800 | [diff] [blame] | 317 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | extern struct file_operations acpi_processor_throttling_fops; |
| 319 | |
| 320 | /* in processor_idle.c */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 321 | int acpi_processor_power_init(struct acpi_processor *pr, |
| 322 | struct acpi_device *device); |
| 323 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); |
| 324 | int acpi_processor_power_exit(struct acpi_processor *pr, |
| 325 | struct acpi_device *device); |
Thomas Gleixner | b04e7bd | 2007-09-22 22:29:05 +0000 | [diff] [blame] | 326 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); |
| 327 | int acpi_processor_resume(struct acpi_device * device); |
Len Brown | 4f86d3a | 2007-10-03 18:58:00 -0400 | [diff] [blame] | 328 | extern struct cpuidle_driver acpi_idle_driver; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | |
| 330 | /* in processor_thermal.c */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 331 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | extern struct file_operations acpi_processor_limit_fops; |
| 333 | |
| 334 | #ifdef CONFIG_CPU_FREQ |
| 335 | void acpi_thermal_cpufreq_init(void); |
| 336 | void acpi_thermal_cpufreq_exit(void); |
| 337 | #else |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 338 | static inline void acpi_thermal_cpufreq_init(void) |
| 339 | { |
| 340 | return; |
| 341 | } |
| 342 | static inline void acpi_thermal_cpufreq_exit(void) |
| 343 | { |
| 344 | return; |
| 345 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | #endif |
| 347 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | #endif |