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