Blame view

include/acpi/processor.h 11 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
2
3
4
5
  #ifndef __ACPI_PROCESSOR_H
  #define __ACPI_PROCESSOR_H
  
  #include <linux/kernel.h>
3b2d99429   Venkatesh Pallipadi   P-state software ...
6
  #include <linux/cpu.h>
d9460fd22   Zhang Rui   ACPI: register AC...
7
  #include <linux/thermal.h>
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
8
  #include <asm/acpi.h>
ac212b698   Rafael J. Wysocki   ACPI / processor:...
9
10
11
  #define ACPI_PROCESSOR_CLASS		"processor"
  #define ACPI_PROCESSOR_DEVICE_NAME	"Processor"
  #define ACPI_PROCESSOR_DEVICE_HID	"ACPI0007"
db62fda31   Sudeep Holla   ACPI / processor ...
12
  #define ACPI_PROCESSOR_CONTAINER_HID	"ACPI0010"
ac212b698   Rafael J. Wysocki   ACPI / processor:...
13

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
14
15
16
17
18
19
20
21
22
  #define ACPI_PROCESSOR_BUSY_METRIC	10
  
  #define ACPI_PROCESSOR_MAX_POWER	8
  #define ACPI_PROCESSOR_MAX_C2_LATENCY	100
  #define ACPI_PROCESSOR_MAX_C3_LATENCY	1000
  
  #define ACPI_PROCESSOR_MAX_THROTTLING	16
  #define ACPI_PROCESSOR_MAX_THROTTLE	250	/* 25% */
  #define ACPI_PROCESSOR_MAX_DUTY_WIDTH	4
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
23
  #define ACPI_PDC_REVISION_ID		0x1
fd3509436   Len Brown   ACPICA: Lindent
24
  #define ACPI_PSD_REV0_REVISION		0	/* Support for _PSD as in ACPI 3.0 */
3b2d99429   Venkatesh Pallipadi   P-state software ...
25
  #define ACPI_PSD_REV0_ENTRIES		5
01854e697   Luming Yu   ACPI: add ACPI 3....
26
27
  #define ACPI_TSD_REV0_REVISION		0	/* Support for _PSD as in ACPI 3.0 */
  #define ACPI_TSD_REV0_ENTRIES		5
3b2d99429   Venkatesh Pallipadi   P-state software ...
28
29
30
31
32
33
34
  /*
   * Types of coordination defined in ACPI 3.0. Same macros can be used across
   * P, C and T states
   */
  #define DOMAIN_COORD_TYPE_SW_ALL	0xfc
  #define DOMAIN_COORD_TYPE_SW_ANY	0xfd
  #define DOMAIN_COORD_TYPE_HW_ALL	0xfe
4fcb2fcd4   Venkatesh Pallipadi   ACPI, cpuidle: Cl...
35
36
37
  #define ACPI_CSTATE_SYSTEMIO	0
  #define ACPI_CSTATE_FFH		1
  #define ACPI_CSTATE_HALT	2
a36a7fecf   Sudeep Holla   ACPI / processor_...
38
  #define ACPI_CSTATE_INTEGER	3
4fcb2fcd4   Venkatesh Pallipadi   ACPI, cpuidle: Cl...
39
40
  
  #define ACPI_CX_DESC_LEN	32
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
41

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
42
43
44
45
46
  /* Power Management */
  
  struct acpi_processor_cx;
  
  struct acpi_power_register {
4be44fcd3   Len Brown   [ACPI] Lindent al...
47
48
49
50
51
  	u8 descriptor;
  	u16 length;
  	u8 space_id;
  	u8 bit_width;
  	u8 bit_offset;
718be4aaf   Len Brown   ACPI: skip checki...
52
  	u8 access_size;
4be44fcd3   Len Brown   [ACPI] Lindent al...
53
  	u64 address;
92c4d2ad3   Fabian Frederick   ACPI / processor ...
54
  } __packed;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
55

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
56
  struct acpi_processor_cx {
4be44fcd3   Len Brown   [ACPI] Lindent al...
57
58
59
  	u8 valid;
  	u8 type;
  	u32 address;
bc71bec91   venkatesh.pallipadi@intel.com   ACPI: enable MWAI...
60
  	u8 entry_method;
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
61
  	u8 index;
4be44fcd3   Len Brown   [ACPI] Lindent al...
62
  	u32 latency;
718be4aaf   Len Brown   ACPI: skip checki...
63
  	u8 bm_sts_skip;
4fcb2fcd4   Venkatesh Pallipadi   ACPI, cpuidle: Cl...
64
  	char desc[ACPI_CX_DESC_LEN];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
65
  };
a36a7fecf   Sudeep Holla   ACPI / processor_...
66
67
68
69
70
71
72
73
74
75
76
77
  struct acpi_lpi_state {
  	u32 min_residency;
  	u32 wake_latency; /* worst case */
  	u32 flags;
  	u32 arch_flags;
  	u32 res_cnt_freq;
  	u32 enable_parent_state;
  	u64 address;
  	u8 index;
  	u8 entry_method;
  	char desc[ACPI_CX_DESC_LEN];
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
78
  struct acpi_processor_power {
4be44fcd3   Len Brown   [ACPI] Lindent al...
79
  	int count;
a36a7fecf   Sudeep Holla   ACPI / processor_...
80
81
82
83
  	union {
  		struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
  		struct acpi_lpi_state lpi_states[ACPI_PROCESSOR_MAX_POWER];
  	};
169a0abbe   Thomas Gleixner   [PATCH] ACPI keep...
84
  	int timer_broadcast_on_state;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
85
86
87
  };
  
  /* Performance Management */
3b2d99429   Venkatesh Pallipadi   P-state software ...
88
  struct acpi_psd_package {
439913fff   Lin Ming   ACPI: replace acp...
89
90
91
92
93
  	u64 num_entries;
  	u64 revision;
  	u64 domain;
  	u64 coord_type;
  	u64 num_processors;
92c4d2ad3   Fabian Frederick   ACPI / processor ...
94
  } __packed;
3b2d99429   Venkatesh Pallipadi   P-state software ...
95

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
96
  struct acpi_pct_register {
4be44fcd3   Len Brown   [ACPI] Lindent al...
97
98
99
100
101
102
103
  	u8 descriptor;
  	u16 length;
  	u8 space_id;
  	u8 bit_width;
  	u8 bit_offset;
  	u8 reserved;
  	u64 address;
92c4d2ad3   Fabian Frederick   ACPI / processor ...
104
  } __packed;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
105
106
  
  struct acpi_processor_px {
439913fff   Lin Ming   ACPI: replace acp...
107
108
109
110
111
112
  	u64 core_frequency;	/* megahertz */
  	u64 power;	/* milliWatts */
  	u64 transition_latency;	/* microseconds */
  	u64 bus_master_latency;	/* microseconds */
  	u64 control;	/* control value */
  	u64 status;	/* success indicator */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
113
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
114
  struct acpi_processor_performance {
4be44fcd3   Len Brown   [ACPI] Lindent al...
115
116
  	unsigned int state;
  	unsigned int platform_limit;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
117
118
  	struct acpi_pct_register control_register;
  	struct acpi_pct_register status_register;
4be44fcd3   Len Brown   [ACPI] Lindent al...
119
  	unsigned int state_count;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
120
  	struct acpi_processor_px *states;
3b2d99429   Venkatesh Pallipadi   P-state software ...
121
  	struct acpi_psd_package domain_info;
2fdf66b49   Rusty Russell   cpumask: convert ...
122
  	cpumask_var_t shared_cpu_map;
3b2d99429   Venkatesh Pallipadi   P-state software ...
123
  	unsigned int shared_type;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
124
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
125
  /* Throttling Control */
01854e697   Luming Yu   ACPI: add ACPI 3....
126
  struct acpi_tsd_package {
439913fff   Lin Ming   ACPI: replace acp...
127
128
129
130
131
  	u64 num_entries;
  	u64 revision;
  	u64 domain;
  	u64 coord_type;
  	u64 num_processors;
92c4d2ad3   Fabian Frederick   ACPI / processor ...
132
  } __packed;
01854e697   Luming Yu   ACPI: add ACPI 3....
133
134
135
136
137
138
139
140
141
  
  struct acpi_ptc_register {
  	u8 descriptor;
  	u16 length;
  	u8 space_id;
  	u8 bit_width;
  	u8 bit_offset;
  	u8 reserved;
  	u64 address;
92c4d2ad3   Fabian Frederick   ACPI / processor ...
142
  } __packed;
01854e697   Luming Yu   ACPI: add ACPI 3....
143
144
  
  struct acpi_processor_tx_tss {
439913fff   Lin Ming   ACPI: replace acp...
145
146
147
148
149
  	u64 freqpercentage;	/* */
  	u64 power;	/* milliWatts */
  	u64 transition_latency;	/* microseconds */
  	u64 control;	/* control value */
  	u64 status;	/* success indicator */
01854e697   Luming Yu   ACPI: add ACPI 3....
150
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
151
  struct acpi_processor_tx {
4be44fcd3   Len Brown   [ACPI] Lindent al...
152
153
  	u16 power;
  	u16 performance;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
154
  };
01854e697   Luming Yu   ACPI: add ACPI 3....
155
  struct acpi_processor;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
156
  struct acpi_processor_throttling {
01854e697   Luming Yu   ACPI: add ACPI 3....
157
158
159
160
161
162
163
  	unsigned int state;
  	unsigned int platform_limit;
  	struct acpi_pct_register control_register;
  	struct acpi_pct_register status_register;
  	unsigned int state_count;
  	struct acpi_processor_tx_tss *states_tss;
  	struct acpi_tsd_package domain_info;
2fdf66b49   Rusty Russell   cpumask: convert ...
164
  	cpumask_var_t shared_cpu_map;
ff55a9ceb   Len Brown   ACPI: Lindent pro...
165
166
  	int (*acpi_processor_get_throttling) (struct acpi_processor * pr);
  	int (*acpi_processor_set_throttling) (struct acpi_processor * pr,
2a908002c   Frans Pop   ACPI processor: f...
167
  					      int state, bool force);
01854e697   Luming Yu   ACPI: add ACPI 3....
168

4be44fcd3   Len Brown   [ACPI] Lindent al...
169
170
171
  	u32 address;
  	u8 duty_offset;
  	u8 duty_width;
1180509f6   Zhao Yakui   ACPI : Update T-s...
172
173
  	u8 tsd_valid_flag;
  	unsigned int shared_type;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
174
175
176
177
178
179
  	struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING];
  };
  
  /* Limit Interface */
  
  struct acpi_processor_lx {
aee07ba68   Joe Perches   include/acpi/: Sp...
180
  	int px;			/* performance state */
4be44fcd3   Len Brown   [ACPI] Lindent al...
181
  	int tx;			/* throttle level */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
182
183
184
  };
  
  struct acpi_processor_limit {
4be44fcd3   Len Brown   [ACPI] Lindent al...
185
  	struct acpi_processor_lx state;	/* current limit */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
186
  	struct acpi_processor_lx thermal;	/* thermal limit */
4be44fcd3   Len Brown   [ACPI] Lindent al...
187
  	struct acpi_processor_lx user;	/* user limit */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
188
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
189
  struct acpi_processor_flags {
4be44fcd3   Len Brown   [ACPI] Lindent al...
190
191
192
193
194
195
196
  	u8 power:1;
  	u8 performance:1;
  	u8 throttling:1;
  	u8 limit:1;
  	u8 bm_control:1;
  	u8 bm_check:1;
  	u8 has_cst:1;
a36a7fecf   Sudeep Holla   ACPI / processor_...
197
  	u8 has_lpi:1;
4be44fcd3   Len Brown   [ACPI] Lindent al...
198
  	u8 power_setup_done:1;
4f86d3a8e   Len Brown   cpuidle: consolid...
199
  	u8 bm_rld_set:1;
99b725084   Thomas Renninger   ACPI processor ho...
200
  	u8 need_hotplug_init:1;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
201
202
203
  };
  
  struct acpi_processor {
4be44fcd3   Len Brown   [ACPI] Lindent al...
204
205
  	acpi_handle handle;
  	u32 acpi_id;
828aef376   Catalin Marinas   ACPI / processor:...
206
  	phys_cpuid_t phys_id;	/* CPU hardware ID such as APIC ID for x86 */
af8f3f514   Hanjun Guo   ACPI / processor:...
207
  	u32 id;		/* CPU logical ID allocated by OS */
4be44fcd3   Len Brown   [ACPI] Lindent al...
208
209
  	u32 pblk;
  	int performance_platform_limit;
01854e697   Luming Yu   ACPI: add ACPI 3....
210
  	int throttling_platform_limit;
ff55a9ceb   Len Brown   ACPI: Lindent pro...
211
  	/* 0 - states 0..n-th state available */
01854e697   Luming Yu   ACPI: add ACPI 3....
212

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
213
214
215
216
217
  	struct acpi_processor_flags flags;
  	struct acpi_processor_power power;
  	struct acpi_processor_performance *performance;
  	struct acpi_processor_throttling throttling;
  	struct acpi_processor_limit limit;
d9460fd22   Zhang Rui   ACPI: register AC...
218
  	struct thermal_cooling_device *cdev;
ac212b698   Rafael J. Wysocki   ACPI / processor:...
219
  	struct device *dev; /* Processor device. */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
220
221
222
  };
  
  struct acpi_processor_errata {
4be44fcd3   Len Brown   [ACPI] Lindent al...
223
  	u8 smp;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
224
  	struct {
4be44fcd3   Len Brown   [ACPI] Lindent al...
225
226
227
228
229
  		u8 throttle:1;
  		u8 fdma:1;
  		u8 reserved:6;
  		u32 bmisx;
  	} piix4;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
230
  };
fd3509436   Len Brown   ACPICA: Lindent
231
232
  extern int acpi_processor_preregister_performance(struct
  						  acpi_processor_performance
a29d8b8e2   Tejun Heo   percpu: add __per...
233
  						  __percpu *performance);
3b2d99429   Venkatesh Pallipadi   P-state software ...
234

4be44fcd3   Len Brown   [ACPI] Lindent al...
235
236
  extern int acpi_processor_register_performance(struct acpi_processor_performance
  					       *performance, unsigned int cpu);
b2f8dc4ce   Rafael J. Wysocki   ACPI / processor:...
237
  extern void acpi_processor_unregister_performance(unsigned int cpu);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
238

d0ea59e18   Rafael J. Wysocki   cpufreq: intel_ps...
239
  int acpi_processor_pstate_control(void);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
240
241
242
  /* note: this locks both the calling module and the processor module
           if a _PPC object exists, rmmod is disallowed then */
  int acpi_processor_notify_smm(struct module *calling_module);
4d0f1ce69   Joao Martins   xen/acpi: upload ...
243
244
  int acpi_processor_get_psd(acpi_handle handle,
  			   struct acpi_psd_package *pdomain);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
245

c705c78c0   Konrad Rzeszutek Wilk   acpi: Export the ...
246
247
  /* parsing the _P* objects. */
  extern int acpi_processor_get_performance_info(struct acpi_processor *pr);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
248
  /* for communication between multiple parts of the processor kernel module */
706546d02   Mike Travis   ACPI: change proc...
249
  DECLARE_PER_CPU(struct acpi_processor *, processors);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
250
  extern struct acpi_processor_errata errata;
35ae71335   Sudeep Holla   ACPI / processor_...
251
  #if defined(ARCH_HAS_POWER_INIT) && defined(CONFIG_ACPI_PROCESSOR_CSTATE)
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
252
  void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
4be44fcd3   Len Brown   [ACPI] Lindent al...
253
  					unsigned int cpu);
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
254
  int acpi_processor_ffh_cstate_probe(unsigned int cpu,
fd3509436   Len Brown   ACPICA: Lindent
255
256
  				    struct acpi_processor_cx *cx,
  				    struct acpi_power_register *reg);
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
257
  void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cstate);
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
258
  #else
4be44fcd3   Len Brown   [ACPI] Lindent al...
259
260
261
  static inline void acpi_processor_power_init_bm_check(struct
  						      acpi_processor_flags
  						      *flags, unsigned int cpu)
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
262
263
264
265
  {
  	flags->bm_check = 1;
  	return;
  }
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
266
  static inline int acpi_processor_ffh_cstate_probe(unsigned int cpu,
fd3509436   Len Brown   ACPICA: Lindent
267
268
269
  						  struct acpi_processor_cx *cx,
  						  struct acpi_power_register
  						  *reg)
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
270
271
272
  {
  	return -1;
  }
fd3509436   Len Brown   ACPICA: Lindent
273
274
  static inline void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx
  						   *cstate)
991528d73   Venkatesh Pallipadi   ACPI: Processor n...
275
276
277
  {
  	return;
  }
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
278
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
279
  /* in processor_perflib.c */
02df8b938   Venkatesh Pallipadi   [ACPI] enable C2 ...
280

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
281
282
283
  #ifdef CONFIG_CPU_FREQ
  void acpi_processor_ppc_init(void);
  void acpi_processor_ppc_exit(void);
bca5f557d   Rafael J. Wysocki   ACPI / processor:...
284
  void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag);
e2f74f355   Thomas Renninger   [ACPI/CPUFREQ] In...
285
  extern int acpi_processor_get_bios_limit(int cpu, unsigned int *limit);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
286
  #else
4be44fcd3   Len Brown   [ACPI] Lindent al...
287
288
289
290
291
292
293
294
  static inline void acpi_processor_ppc_init(void)
  {
  	return;
  }
  static inline void acpi_processor_ppc_exit(void)
  {
  	return;
  }
a507a3065   Brian Norris   ACPI / processor:...
295
  static inline void acpi_processor_ppc_has_changed(struct acpi_processor *pr,
d81c45e1c   Zhao Yakui   ACPI: Notify the ...
296
  								int event_flag)
4be44fcd3   Len Brown   [ACPI] Lindent al...
297
  {
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
298
299
  	static unsigned int printout = 1;
  	if (printout) {
4be44fcd3   Len Brown   [ACPI] Lindent al...
300
301
302
303
304
305
  		printk(KERN_WARNING
  		       "Warning: Processor Platform Limit event detected, but not handled.
  ");
  		printk(KERN_WARNING
  		       "Consider compiling CPUfreq support into your kernel.
  ");
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
306
307
  		printout = 0;
  	}
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
308
  }
e2f74f355   Thomas Renninger   [ACPI/CPUFREQ] In...
309
310
311
312
  static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
  {
  	return -ENODEV;
  }
4be44fcd3   Len Brown   [ACPI] Lindent al...
313
  #endif				/* CONFIG_CPU_FREQ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
314

4d5d4cd88   Alex Chiang   ACPI: processor: ...
315
  /* in processor_core.c */
828aef376   Catalin Marinas   ACPI / processor:...
316
  phys_cpuid_t acpi_get_phys_id(acpi_handle, int type, u32 acpi_id);
fb7c2bae8   David Daney   ACPI / processor:...
317
  phys_cpuid_t acpi_map_madt_entry(u32 acpi_id);
828aef376   Catalin Marinas   ACPI / processor:...
318
  int acpi_map_cpuid(phys_cpuid_t phys_id, u32 acpi_id);
2e9d5e4ef   Alex Chiang   ACPI: processor: ...
319
  int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
78f169965   Alex Chiang   ACPI: processor: ...
320

4f2f75735   Ashwin Chaugule   CPPC: Probe for C...
321
322
323
324
325
326
327
328
329
330
331
332
333
  #ifdef CONFIG_ACPI_CPPC_LIB
  extern int acpi_cppc_processor_probe(struct acpi_processor *pr);
  extern void acpi_cppc_processor_exit(struct acpi_processor *pr);
  #else
  static inline int acpi_cppc_processor_probe(struct acpi_processor *pr)
  {
  	return 0;
  }
  static inline void acpi_cppc_processor_exit(struct acpi_processor *pr)
  {
  	return;
  }
  #endif	/* CONFIG_ACPI_CPPC_LIB */
24119a882   Hanjun Guo   ACPI / processor:...
334
335
  /* in processor_pdc.c */
  void acpi_processor_set_pdc(acpi_handle handle);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
336
  /* in processor_throttling.c */
239708a3a   Ashwin Chaugule   ACPI: Split out A...
337
  #ifdef CONFIG_ACPI_CPU_FREQ_PSS
a66b34b26   Adrian Bunk   proper prototype ...
338
  int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
4be44fcd3   Len Brown   [ACPI] Lindent al...
339
  int acpi_processor_get_throttling_info(struct acpi_processor *pr);
2a908002c   Frans Pop   ACPI processor: f...
340
341
  extern int acpi_processor_set_throttling(struct acpi_processor *pr,
  					 int state, bool force);
5a344a505   Zhao Yakui   ACPI: Reevaluate ...
342
343
344
345
346
  /*
   * Reevaluate whether the T-state is invalid after one cpu is
   * onlined/offlined. In such case the flags.throttling will be updated.
   */
  extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
64f3bf2f8   Sebastian Andrzej Siewior   ACPI/processor: C...
347
  			bool is_dead);
070d8eb1f   Jan Engelhardt   ACPI: constify VF...
348
  extern const struct file_operations acpi_processor_throttling_fops;
1180509f6   Zhao Yakui   ACPI : Update T-s...
349
  extern void acpi_processor_throttling_init(void);
239708a3a   Ashwin Chaugule   ACPI: Split out A...
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
  #else
  static inline int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
  {
  	return 0;
  }
  
  static inline int acpi_processor_get_throttling_info(struct acpi_processor *pr)
  {
  	return -ENODEV;
  }
  
  static inline int acpi_processor_set_throttling(struct acpi_processor *pr,
  					 int state, bool force)
  {
  	return -ENODEV;
  }
  
  static inline void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
64f3bf2f8   Sebastian Andrzej Siewior   ACPI/processor: C...
368
  			bool is_dead) {}
239708a3a   Ashwin Chaugule   ACPI: Split out A...
369
370
371
  
  static inline void acpi_processor_throttling_init(void) {}
  #endif	/* CONFIG_ACPI_CPU_FREQ_PSS */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
372
  /* in processor_idle.c */
5f05586c6   Ashwin Chaugule   ACPI: Decouple AC...
373
374
  extern struct cpuidle_driver acpi_idle_driver;
  #ifdef CONFIG_ACPI_PROCESSOR_IDLE
38a991b62   Daniel Lezcano   ACPI / processor:...
375
376
  int acpi_processor_power_init(struct acpi_processor *pr);
  int acpi_processor_power_exit(struct acpi_processor *pr);
a36a7fecf   Sudeep Holla   ACPI / processor_...
377
  int acpi_processor_power_state_has_changed(struct acpi_processor *pr);
46bcfad7a   Deepthi Dharwar   cpuidle: Single/G...
378
  int acpi_processor_hotplug(struct acpi_processor *pr);
5f05586c6   Ashwin Chaugule   ACPI: Decouple AC...
379
380
381
382
383
384
385
386
387
388
  #else
  static inline int acpi_processor_power_init(struct acpi_processor *pr)
  {
  	return -ENODEV;
  }
  
  static inline int acpi_processor_power_exit(struct acpi_processor *pr)
  {
  	return -ENODEV;
  }
a36a7fecf   Sudeep Holla   ACPI / processor_...
389
  static inline int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
5f05586c6   Ashwin Chaugule   ACPI: Decouple AC...
390
391
392
393
394
395
396
397
398
  {
  	return -ENODEV;
  }
  
  static inline int acpi_processor_hotplug(struct acpi_processor *pr)
  {
  	return -ENODEV;
  }
  #endif /* CONFIG_ACPI_PROCESSOR_IDLE */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
399
400
  
  /* in processor_thermal.c */
4be44fcd3   Len Brown   [ACPI] Lindent al...
401
  int acpi_processor_get_limit_info(struct acpi_processor *pr);
9c8b04be4   Vasiliy Kulikov   ACPI: constify op...
402
  extern const struct thermal_cooling_device_ops processor_cooling_ops;
239708a3a   Ashwin Chaugule   ACPI: Split out A...
403
  #if defined(CONFIG_ACPI_CPU_FREQ_PSS) & defined(CONFIG_CPU_FREQ)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
404
405
406
  void acpi_thermal_cpufreq_init(void);
  void acpi_thermal_cpufreq_exit(void);
  #else
4be44fcd3   Len Brown   [ACPI] Lindent al...
407
408
409
410
411
412
413
414
  static inline void acpi_thermal_cpufreq_init(void)
  {
  	return;
  }
  static inline void acpi_thermal_cpufreq_exit(void)
  {
  	return;
  }
239708a3a   Ashwin Chaugule   ACPI: Split out A...
415
  #endif	/* CONFIG_ACPI_CPU_FREQ_PSS */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
416

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
417
  #endif