aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2005-10-23 16:31:00 -0400
committerLen Brown <len.brown@intel.com>2005-12-01 01:30:35 -0500
commit05131ecc99ea9da7f45ba3058fe8a2c1d0ceeab8 (patch)
treedec76975406874cf677d6391302f42a6da55ac38 /include/acpi
parentd2149b542382bfc206cb28485108f6470c979566 (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/acpi')
-rw-r--r--include/acpi/pdc_intel.h4
-rw-r--r--include/acpi/processor.h22
2 files changed, 6 insertions, 20 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
156struct acpi_processor_errata { 154struct acpi_processor_errata {
@@ -178,22 +176,12 @@ int acpi_processor_notify_smm(struct module *calling_module);
178extern struct acpi_processor *processors[NR_CPUS]; 176extern struct acpi_processor *processors[NR_CPUS];
179extern struct acpi_processor_errata errata; 177extern struct acpi_processor_errata errata;
180 178
181int acpi_processor_set_pdc(struct acpi_processor *pr, 179void 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
185void acpi_processor_power_init_pdc(struct acpi_processor_power *pow,
186 unsigned int cpu);
187void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, 182void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
188 unsigned int cpu); 183 unsigned int cpu);
189#else 184#else
190static 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
197static inline void acpi_processor_power_init_bm_check(struct 185static 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)