diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2005-10-23 16:31:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-01 01:30:35 -0500 |
commit | 05131ecc99ea9da7f45ba3058fe8a2c1d0ceeab8 (patch) | |
tree | dec76975406874cf677d6391302f42a6da55ac38 /include | |
parent | d2149b542382bfc206cb28485108f6470c979566 (diff) |
[ACPI] Avoid BIOS inflicted crashes by evaluating _PDC only once
Linux invokes the AML _PDC method (Processor Driver Capabilities)
to tell the BIOS what features it can handle. While the ACPI
spec says nothing about the OS invoking _PDC multiple times,
doing so with changing bits seems to hopelessly confuse the BIOS
on multiple platforms up to and including crashing the system.
Factor out the _PDC invocation so Linux invokes it only once.
http://bugzilla.kernel.org/show_bug.cgi?id=5483
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/pdc_intel.h | 4 | ||||
-rw-r--r-- | include/acpi/processor.h | 22 | ||||
-rw-r--r-- | include/asm-i386/acpi.h | 2 |
3 files changed, 7 insertions, 21 deletions
diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h index 91f4a12a99a1..3fa81d55cd0c 100644 --- a/include/acpi/pdc_intel.h +++ b/include/acpi/pdc_intel.h | |||
@@ -15,9 +15,7 @@ | |||
15 | #define ACPI_PDC_C_C1_FFH (0x0100) | 15 | #define ACPI_PDC_C_C1_FFH (0x0100) |
16 | 16 | ||
17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ | 17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ |
18 | ACPI_PDC_C_C1_HALT) | 18 | ACPI_PDC_C_C1_HALT | \ |
19 | |||
20 | #define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \ | ||
21 | ACPI_PDC_P_FFH) | 19 | ACPI_PDC_P_FFH) |
22 | 20 | ||
23 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ | 21 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 7a00d5089de9..82a9b7d430ec 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -62,9 +62,6 @@ struct acpi_processor_power { | |||
62 | u32 bm_activity; | 62 | u32 bm_activity; |
63 | int count; | 63 | int count; |
64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
65 | |||
66 | /* the _PDC objects passed by the driver, if any */ | ||
67 | struct acpi_object_list *pdc; | ||
68 | }; | 65 | }; |
69 | 66 | ||
70 | /* Performance Management */ | 67 | /* Performance Management */ |
@@ -96,8 +93,6 @@ struct acpi_processor_performance { | |||
96 | unsigned int state_count; | 93 | unsigned int state_count; |
97 | struct acpi_processor_px *states; | 94 | struct acpi_processor_px *states; |
98 | 95 | ||
99 | /* the _PDC objects passed by the driver, if any */ | ||
100 | struct acpi_object_list *pdc; | ||
101 | }; | 96 | }; |
102 | 97 | ||
103 | /* Throttling Control */ | 98 | /* Throttling Control */ |
@@ -151,6 +146,9 @@ struct acpi_processor { | |||
151 | struct acpi_processor_performance *performance; | 146 | struct acpi_processor_performance *performance; |
152 | struct acpi_processor_throttling throttling; | 147 | struct acpi_processor_throttling throttling; |
153 | struct acpi_processor_limit limit; | 148 | struct acpi_processor_limit limit; |
149 | |||
150 | /* the _PDC objects for this processor, if any */ | ||
151 | struct acpi_object_list *pdc; | ||
154 | }; | 152 | }; |
155 | 153 | ||
156 | struct acpi_processor_errata { | 154 | struct acpi_processor_errata { |
@@ -178,22 +176,12 @@ int acpi_processor_notify_smm(struct module *calling_module); | |||
178 | extern struct acpi_processor *processors[NR_CPUS]; | 176 | extern struct acpi_processor *processors[NR_CPUS]; |
179 | extern struct acpi_processor_errata errata; | 177 | extern struct acpi_processor_errata errata; |
180 | 178 | ||
181 | int acpi_processor_set_pdc(struct acpi_processor *pr, | 179 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
182 | struct acpi_object_list *pdc_in); | ||
183 | 180 | ||
184 | #ifdef ARCH_HAS_POWER_PDC_INIT | 181 | #ifdef ARCH_HAS_POWER_INIT |
185 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
186 | unsigned int cpu); | ||
187 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 182 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
188 | unsigned int cpu); | 183 | unsigned int cpu); |
189 | #else | 184 | #else |
190 | static inline void acpi_processor_power_init_pdc(struct acpi_processor_power | ||
191 | *pow, unsigned int cpu) | ||
192 | { | ||
193 | pow->pdc = NULL; | ||
194 | return; | ||
195 | } | ||
196 | |||
197 | static inline void acpi_processor_power_init_bm_check(struct | 185 | static inline void acpi_processor_power_init_bm_check(struct |
198 | acpi_processor_flags | 186 | acpi_processor_flags |
199 | *flags, unsigned int cpu) | 187 | *flags, unsigned int cpu) |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index df4ed323aa4d..55059abf9c95 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -179,7 +179,7 @@ extern void acpi_reserve_bootmem(void); | |||
179 | 179 | ||
180 | extern u8 x86_acpiid_to_apicid[]; | 180 | extern u8 x86_acpiid_to_apicid[]; |
181 | 181 | ||
182 | #define ARCH_HAS_POWER_PDC_INIT 1 | 182 | #define ARCH_HAS_POWER_INIT 1 |
183 | 183 | ||
184 | #endif /*__KERNEL__*/ | 184 | #endif /*__KERNEL__*/ |
185 | 185 | ||