diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/pdc_intel.h | 29 | ||||
-rw-r--r-- | include/acpi/processor.h | 34 | ||||
-rw-r--r-- | include/asm-i386/acpi.h | 10 | ||||
-rw-r--r-- | include/asm-x86_64/acpi.h | 8 |
4 files changed, 67 insertions, 14 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); |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index c976c1dadece..cf828ace13f9 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | 30 | ||
31 | #include <acpi/pdc_intel.h> | ||
32 | |||
31 | #include <asm/system.h> /* defines cmpxchg */ | 33 | #include <asm/system.h> /* defines cmpxchg */ |
32 | 34 | ||
33 | #define COMPILER_DEPENDENT_INT64 long long | 35 | #define COMPILER_DEPENDENT_INT64 long long |
@@ -101,12 +103,6 @@ __acpi_release_global_lock (unsigned int *lock) | |||
101 | :"=r"(n_hi), "=r"(n_lo) \ | 103 | :"=r"(n_hi), "=r"(n_lo) \ |
102 | :"0"(n_hi), "1"(n_lo)) | 104 | :"0"(n_hi), "1"(n_lo)) |
103 | 105 | ||
104 | /* | ||
105 | * Refer Intel ACPI _PDC support document for bit definitions | ||
106 | */ | ||
107 | #define ACPI_PDC_EST_CAPABILITY_SMP 0xa | ||
108 | #define ACPI_PDC_EST_CAPABILITY_MSR 0x1 | ||
109 | |||
110 | #ifdef CONFIG_ACPI_BOOT | 106 | #ifdef CONFIG_ACPI_BOOT |
111 | extern int acpi_lapic; | 107 | extern int acpi_lapic; |
112 | extern int acpi_ioapic; | 108 | extern int acpi_ioapic; |
@@ -185,6 +181,8 @@ extern void acpi_reserve_bootmem(void); | |||
185 | 181 | ||
186 | extern u8 x86_acpiid_to_apicid[]; | 182 | extern u8 x86_acpiid_to_apicid[]; |
187 | 183 | ||
184 | #define ARCH_HAS_POWER_PDC_INIT 1 | ||
185 | |||
188 | #endif /*__KERNEL__*/ | 186 | #endif /*__KERNEL__*/ |
189 | 187 | ||
190 | #endif /*_ASM_ACPI_H*/ | 188 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index a6b41b892062..dc8c981af27f 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | 30 | ||
31 | #include <acpi/pdc_intel.h> | ||
32 | |||
31 | #define COMPILER_DEPENDENT_INT64 long long | 33 | #define COMPILER_DEPENDENT_INT64 long long |
32 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 34 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
33 | 35 | ||
@@ -99,12 +101,6 @@ __acpi_release_global_lock (unsigned int *lock) | |||
99 | :"=r"(n_hi), "=r"(n_lo) \ | 101 | :"=r"(n_hi), "=r"(n_lo) \ |
100 | :"0"(n_hi), "1"(n_lo)) | 102 | :"0"(n_hi), "1"(n_lo)) |
101 | 103 | ||
102 | /* | ||
103 | * Refer Intel ACPI _PDC support document for bit definitions | ||
104 | */ | ||
105 | #define ACPI_PDC_EST_CAPABILITY_SMP 0xa | ||
106 | #define ACPI_PDC_EST_CAPABILITY_MSR 0x1 | ||
107 | |||
108 | #ifdef CONFIG_ACPI_BOOT | 104 | #ifdef CONFIG_ACPI_BOOT |
109 | extern int acpi_lapic; | 105 | extern int acpi_lapic; |
110 | extern int acpi_ioapic; | 106 | extern int acpi_ioapic; |