diff options
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/pdc_intel.h | 29 | ||||
-rw-r--r-- | include/acpi/processor.h | 34 |
2 files changed, 61 insertions, 2 deletions
diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h new file mode 100644 index 000000000000..fd6730e4e567 --- /dev/null +++ b/include/acpi/pdc_intel.h | |||
@@ -0,0 +1,29 @@ | |||
1 | |||
2 | /* _PDC bit definition for Intel processors */ | ||
3 | |||
4 | #ifndef __PDC_INTEL_H__ | ||
5 | #define __PDC_INTEL_H__ | ||
6 | |||
7 | #define ACPI_PDC_P_FFH (0x0001) | ||
8 | #define ACPI_PDC_C_C1_HALT (0x0002) | ||
9 | #define ACPI_PDC_T_FFH (0x0004) | ||
10 | #define ACPI_PDC_SMP_C1PT (0x0008) | ||
11 | #define ACPI_PDC_SMP_C2C3 (0x0010) | ||
12 | #define ACPI_PDC_SMP_P_SWCOORD (0x0020) | ||
13 | #define ACPI_PDC_SMP_C_SWCOORD (0x0040) | ||
14 | #define ACPI_PDC_SMP_T_SWCOORD (0x0080) | ||
15 | #define ACPI_PDC_C_C1_FFH (0x0100) | ||
16 | |||
17 | |||
18 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ | ||
19 | ACPI_PDC_C_C1_HALT) | ||
20 | |||
21 | #define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \ | ||
22 | ACPI_PDC_P_FFH) | ||
23 | |||
24 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ | ||
25 | ACPI_PDC_SMP_C1PT | \ | ||
26 | ACPI_PDC_C_C1_HALT) | ||
27 | |||
28 | #endif /* __PDC_INTEL_H__ */ | ||
29 | |||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 2f50a5bb0c78..50cfea4ff6ca 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | #include <asm/acpi.h> | ||
8 | |||
7 | #define ACPI_PROCESSOR_BUSY_METRIC 10 | 9 | #define ACPI_PROCESSOR_BUSY_METRIC 10 |
8 | 10 | ||
9 | #define ACPI_PROCESSOR_MAX_POWER 8 | 11 | #define ACPI_PROCESSOR_MAX_POWER 8 |
@@ -14,6 +16,8 @@ | |||
14 | #define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */ | 16 | #define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */ |
15 | #define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4 | 17 | #define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4 |
16 | 18 | ||
19 | #define ACPI_PDC_REVISION_ID 0x1 | ||
20 | |||
17 | /* Power Management */ | 21 | /* Power Management */ |
18 | 22 | ||
19 | struct acpi_processor_cx; | 23 | struct acpi_processor_cx; |
@@ -59,6 +63,9 @@ struct acpi_processor_power { | |||
59 | u32 bm_activity; | 63 | u32 bm_activity; |
60 | int count; | 64 | int count; |
61 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 65 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
66 | |||
67 | /* the _PDC objects passed by the driver, if any */ | ||
68 | struct acpi_object_list *pdc; | ||
62 | }; | 69 | }; |
63 | 70 | ||
64 | /* Performance Management */ | 71 | /* Performance Management */ |
@@ -82,8 +89,6 @@ struct acpi_processor_px { | |||
82 | acpi_integer status; /* success indicator */ | 89 | acpi_integer status; /* success indicator */ |
83 | }; | 90 | }; |
84 | 91 | ||
85 | #define ACPI_PDC_REVISION_ID 0x1 | ||
86 | |||
87 | struct acpi_processor_performance { | 92 | struct acpi_processor_performance { |
88 | unsigned int state; | 93 | unsigned int state; |
89 | unsigned int platform_limit; | 94 | unsigned int platform_limit; |
@@ -179,7 +184,32 @@ int acpi_processor_notify_smm(struct module *calling_module); | |||
179 | extern struct acpi_processor *processors[NR_CPUS]; | 184 | extern struct acpi_processor *processors[NR_CPUS]; |
180 | extern struct acpi_processor_errata errata; | 185 | extern struct acpi_processor_errata errata; |
181 | 186 | ||
187 | int acpi_processor_set_pdc(struct acpi_processor *pr, | ||
188 | struct acpi_object_list *pdc_in); | ||
189 | |||
190 | #ifdef ARCH_HAS_POWER_PDC_INIT | ||
191 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
192 | unsigned int cpu); | ||
193 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | ||
194 | unsigned int cpu); | ||
195 | #else | ||
196 | static inline void acpi_processor_power_init_pdc( | ||
197 | struct acpi_processor_power *pow, unsigned int cpu) | ||
198 | { | ||
199 | pow->pdc = NULL; | ||
200 | return; | ||
201 | } | ||
202 | |||
203 | static inline void acpi_processor_power_init_bm_check( | ||
204 | struct acpi_processor_flags *flags, unsigned int cpu) | ||
205 | { | ||
206 | flags->bm_check = 1; | ||
207 | return; | ||
208 | } | ||
209 | #endif | ||
210 | |||
182 | /* in processor_perflib.c */ | 211 | /* in processor_perflib.c */ |
212 | |||
183 | #ifdef CONFIG_CPU_FREQ | 213 | #ifdef CONFIG_CPU_FREQ |
184 | void acpi_processor_ppc_init(void); | 214 | void acpi_processor_ppc_init(void); |
185 | void acpi_processor_ppc_exit(void); | 215 | void acpi_processor_ppc_exit(void); |