aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig1
-rw-r--r--arch/i386/defconfig4
-rw-r--r--arch/i386/kernel/Makefile2
-rw-r--r--arch/i386/kernel/acpi/Makefile2
-rw-r--r--arch/i386/kernel/acpi/boot.c557
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c40
-rw-r--r--arch/i386/kernel/acpi/sleep.c35
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c57
-rw-r--r--arch/i386/kernel/io_apic.c4
-rw-r--r--arch/i386/kernel/mpparse.c14
-rw-r--r--arch/i386/kernel/setup.c10
-rw-r--r--arch/i386/mach-es7000/es7000plat.c4
-rw-r--r--arch/i386/pci/Makefile2
-rw-r--r--arch/i386/pci/irq.c2
14 files changed, 358 insertions, 376 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 619d843ba231..9ba334908742 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -1203,7 +1203,6 @@ config PCI_DIRECT
1203config PCI_MMCONFIG 1203config PCI_MMCONFIG
1204 bool 1204 bool
1205 depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) 1205 depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
1206 select ACPI_BOOT
1207 default y 1206 default y
1208 1207
1209source "drivers/pci/pcie/Kconfig" 1208source "drivers/pci/pcie/Kconfig"
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index ca07b95c06b8..6a431b926019 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -131,8 +131,6 @@ CONFIG_SOFTWARE_SUSPEND=y
131# ACPI (Advanced Configuration and Power Interface) Support 131# ACPI (Advanced Configuration and Power Interface) Support
132# 132#
133CONFIG_ACPI=y 133CONFIG_ACPI=y
134CONFIG_ACPI_BOOT=y
135CONFIG_ACPI_INTERPRETER=y
136CONFIG_ACPI_SLEEP=y 134CONFIG_ACPI_SLEEP=y
137CONFIG_ACPI_SLEEP_PROC_FS=y 135CONFIG_ACPI_SLEEP_PROC_FS=y
138CONFIG_ACPI_AC=y 136CONFIG_ACPI_AC=y
@@ -144,10 +142,8 @@ CONFIG_ACPI_THERMAL=y
144# CONFIG_ACPI_ASUS is not set 142# CONFIG_ACPI_ASUS is not set
145# CONFIG_ACPI_TOSHIBA is not set 143# CONFIG_ACPI_TOSHIBA is not set
146# CONFIG_ACPI_DEBUG is not set 144# CONFIG_ACPI_DEBUG is not set
147CONFIG_ACPI_BUS=y
148CONFIG_ACPI_EC=y 145CONFIG_ACPI_EC=y
149CONFIG_ACPI_POWER=y 146CONFIG_ACPI_POWER=y
150CONFIG_ACPI_PCI=y
151CONFIG_ACPI_SYSTEM=y 147CONFIG_ACPI_SYSTEM=y
152# CONFIG_X86_PM_TIMER is not set 148# CONFIG_X86_PM_TIMER is not set
153 149
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4cc83b322b36..c52b4fad011b 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -11,7 +11,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
11 11
12obj-y += cpu/ 12obj-y += cpu/
13obj-y += timers/ 13obj-y += timers/
14obj-$(CONFIG_ACPI_BOOT) += acpi/ 14obj-$(CONFIG_ACPI) += acpi/
15obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o 15obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
16obj-$(CONFIG_MCA) += mca.o 16obj-$(CONFIG_MCA) += mca.o
17obj-$(CONFIG_X86_MSR) += msr.o 17obj-$(CONFIG_X86_MSR) += msr.o
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile
index 5e291a20c03d..267ca48e1b6c 100644
--- a/arch/i386/kernel/acpi/Makefile
+++ b/arch/i386/kernel/acpi/Makefile
@@ -1,4 +1,4 @@
1obj-$(CONFIG_ACPI_BOOT) := boot.o 1obj-y := boot.o
2obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o 2obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
3obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 3obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
4 4
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index b7808a89d945..0fb23c30eb98 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -40,19 +40,25 @@
40 40
41#ifdef CONFIG_X86_64 41#ifdef CONFIG_X86_64
42 42
43static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } 43static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
44{
45}
44extern void __init clustered_apic_check(void); 46extern void __init clustered_apic_check(void);
45static inline int ioapic_setup_disabled(void) { return 0; } 47static inline int ioapic_setup_disabled(void)
48{
49 return 0;
50}
51
46#include <asm/proto.h> 52#include <asm/proto.h>
47 53
48#else /* X86 */ 54#else /* X86 */
49 55
50#ifdef CONFIG_X86_LOCAL_APIC 56#ifdef CONFIG_X86_LOCAL_APIC
51#include <mach_apic.h> 57#include <mach_apic.h>
52#include <mach_mpparse.h> 58#include <mach_mpparse.h>
53#endif /* CONFIG_X86_LOCAL_APIC */ 59#endif /* CONFIG_X86_LOCAL_APIC */
54 60
55#endif /* X86 */ 61#endif /* X86 */
56 62
57#define BAD_MADT_ENTRY(entry, end) ( \ 63#define BAD_MADT_ENTRY(entry, end) ( \
58 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 64 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \
@@ -60,13 +66,8 @@ static inline int ioapic_setup_disabled(void) { return 0; }
60 66
61#define PREFIX "ACPI: " 67#define PREFIX "ACPI: "
62 68
63#ifdef CONFIG_ACPI_PCI
64int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ 69int acpi_noirq __initdata; /* skip ACPI IRQ initialization */
65int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ 70int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */
66#else
67int acpi_noirq __initdata = 1;
68int acpi_pci_disabled __initdata = 1;
69#endif
70int acpi_ht __initdata = 1; /* enable HT */ 71int acpi_ht __initdata = 1; /* enable HT */
71 72
72int acpi_lapic; 73int acpi_lapic;
@@ -88,7 +89,7 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
88 89
89#define MAX_MADT_ENTRIES 256 90#define MAX_MADT_ENTRIES 256
90u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] = 91u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
91 { [0 ... MAX_MADT_ENTRIES-1] = 0xff }; 92 {[0 ... MAX_MADT_ENTRIES - 1] = 0xff };
92EXPORT_SYMBOL(x86_acpiid_to_apicid); 93EXPORT_SYMBOL(x86_acpiid_to_apicid);
93 94
94/* -------------------------------------------------------------------------- 95/* --------------------------------------------------------------------------
@@ -99,7 +100,7 @@ EXPORT_SYMBOL(x86_acpiid_to_apicid);
99 * The default interrupt routing model is PIC (8259). This gets 100 * The default interrupt routing model is PIC (8259). This gets
100 * overriden if IOAPICs are enumerated (below). 101 * overriden if IOAPICs are enumerated (below).
101 */ 102 */
102enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; 103enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC;
103 104
104#ifdef CONFIG_X86_64 105#ifdef CONFIG_X86_64
105 106
@@ -107,7 +108,7 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC;
107char *__acpi_map_table(unsigned long phys_addr, unsigned long size) 108char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
108{ 109{
109 if (!phys_addr || !size) 110 if (!phys_addr || !size)
110 return NULL; 111 return NULL;
111 112
112 if (phys_addr < (end_pfn_map << PAGE_SHIFT)) 113 if (phys_addr < (end_pfn_map << PAGE_SHIFT))
113 return __va(phys_addr); 114 return __va(phys_addr);
@@ -134,8 +135,8 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
134 unsigned long base, offset, mapped_size; 135 unsigned long base, offset, mapped_size;
135 int idx; 136 int idx;
136 137
137 if (phys + size < 8*1024*1024) 138 if (phys + size < 8 * 1024 * 1024)
138 return __va(phys); 139 return __va(phys);
139 140
140 offset = phys & (PAGE_SIZE - 1); 141 offset = phys & (PAGE_SIZE - 1);
141 mapped_size = PAGE_SIZE - offset; 142 mapped_size = PAGE_SIZE - offset;
@@ -154,7 +155,7 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
154 mapped_size += PAGE_SIZE; 155 mapped_size += PAGE_SIZE;
155 } 156 }
156 157
157 return ((unsigned char *) base + offset); 158 return ((unsigned char *)base + offset);
158} 159}
159#endif 160#endif
160 161
@@ -172,7 +173,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
172 if (!phys_addr || !size) 173 if (!phys_addr || !size)
173 return -EINVAL; 174 return -EINVAL;
174 175
175 mcfg = (struct acpi_table_mcfg *) __acpi_map_table(phys_addr, size); 176 mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size);
176 if (!mcfg) { 177 if (!mcfg) {
177 printk(KERN_WARNING PREFIX "Unable to map MCFG\n"); 178 printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
178 return -ENODEV; 179 return -ENODEV;
@@ -209,20 +210,17 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
209 210
210 return 0; 211 return 0;
211} 212}
212#endif /* CONFIG_PCI_MMCONFIG */ 213#endif /* CONFIG_PCI_MMCONFIG */
213 214
214#ifdef CONFIG_X86_LOCAL_APIC 215#ifdef CONFIG_X86_LOCAL_APIC
215static int __init 216static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size)
216acpi_parse_madt (
217 unsigned long phys_addr,
218 unsigned long size)
219{ 217{
220 struct acpi_table_madt *madt = NULL; 218 struct acpi_table_madt *madt = NULL;
221 219
222 if (!phys_addr || !size) 220 if (!phys_addr || !size)
223 return -EINVAL; 221 return -EINVAL;
224 222
225 madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size); 223 madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size);
226 if (!madt) { 224 if (!madt) {
227 printk(KERN_WARNING PREFIX "Unable to map MADT\n"); 225 printk(KERN_WARNING PREFIX "Unable to map MADT\n");
228 return -ENODEV; 226 return -ENODEV;
@@ -232,22 +230,20 @@ acpi_parse_madt (
232 acpi_lapic_addr = (u64) madt->lapic_address; 230 acpi_lapic_addr = (u64) madt->lapic_address;
233 231
234 printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n", 232 printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n",
235 madt->lapic_address); 233 madt->lapic_address);
236 } 234 }
237 235
238 acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); 236 acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
239 237
240 return 0; 238 return 0;
241} 239}
242 240
243
244static int __init 241static int __init
245acpi_parse_lapic ( 242acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
246 acpi_table_entry_header *header, const unsigned long end)
247{ 243{
248 struct acpi_table_lapic *processor = NULL; 244 struct acpi_table_lapic *processor = NULL;
249 245
250 processor = (struct acpi_table_lapic*) header; 246 processor = (struct acpi_table_lapic *)header;
251 247
252 if (BAD_MADT_ENTRY(processor, end)) 248 if (BAD_MADT_ENTRY(processor, end))
253 return -EINVAL; 249 return -EINVAL;
@@ -260,20 +256,19 @@ acpi_parse_lapic (
260 256
261 x86_acpiid_to_apicid[processor->acpi_id] = processor->id; 257 x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
262 258
263 mp_register_lapic ( 259 mp_register_lapic(processor->id, /* APIC ID */
264 processor->id, /* APIC ID */ 260 processor->flags.enabled); /* Enabled? */
265 processor->flags.enabled); /* Enabled? */
266 261
267 return 0; 262 return 0;
268} 263}
269 264
270static int __init 265static int __init
271acpi_parse_lapic_addr_ovr ( 266acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
272 acpi_table_entry_header *header, const unsigned long end) 267 const unsigned long end)
273{ 268{
274 struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL; 269 struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL;
275 270
276 lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr*) header; 271 lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header;
277 272
278 if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) 273 if (BAD_MADT_ENTRY(lapic_addr_ovr, end))
279 return -EINVAL; 274 return -EINVAL;
@@ -284,12 +279,11 @@ acpi_parse_lapic_addr_ovr (
284} 279}
285 280
286static int __init 281static int __init
287acpi_parse_lapic_nmi ( 282acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
288 acpi_table_entry_header *header, const unsigned long end)
289{ 283{
290 struct acpi_table_lapic_nmi *lapic_nmi = NULL; 284 struct acpi_table_lapic_nmi *lapic_nmi = NULL;
291 285
292 lapic_nmi = (struct acpi_table_lapic_nmi*) header; 286 lapic_nmi = (struct acpi_table_lapic_nmi *)header;
293 287
294 if (BAD_MADT_ENTRY(lapic_nmi, end)) 288 if (BAD_MADT_ENTRY(lapic_nmi, end))
295 return -EINVAL; 289 return -EINVAL;
@@ -302,37 +296,32 @@ acpi_parse_lapic_nmi (
302 return 0; 296 return 0;
303} 297}
304 298
299#endif /*CONFIG_X86_LOCAL_APIC */
305 300
306#endif /*CONFIG_X86_LOCAL_APIC*/ 301#ifdef CONFIG_X86_IO_APIC
307
308#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
309 302
310static int __init 303static int __init
311acpi_parse_ioapic ( 304acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end)
312 acpi_table_entry_header *header, const unsigned long end)
313{ 305{
314 struct acpi_table_ioapic *ioapic = NULL; 306 struct acpi_table_ioapic *ioapic = NULL;
315 307
316 ioapic = (struct acpi_table_ioapic*) header; 308 ioapic = (struct acpi_table_ioapic *)header;
317 309
318 if (BAD_MADT_ENTRY(ioapic, end)) 310 if (BAD_MADT_ENTRY(ioapic, end))
319 return -EINVAL; 311 return -EINVAL;
320 312
321 acpi_table_print_madt_entry(header); 313 acpi_table_print_madt_entry(header);
322 314
323 mp_register_ioapic ( 315 mp_register_ioapic(ioapic->id,
324 ioapic->id, 316 ioapic->address, ioapic->global_irq_base);
325 ioapic->address, 317
326 ioapic->global_irq_base);
327
328 return 0; 318 return 0;
329} 319}
330 320
331/* 321/*
332 * Parse Interrupt Source Override for the ACPI SCI 322 * Parse Interrupt Source Override for the ACPI SCI
333 */ 323 */
334static void 324static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
335acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
336{ 325{
337 if (trigger == 0) /* compatible SCI trigger is level */ 326 if (trigger == 0) /* compatible SCI trigger is level */
338 trigger = 3; 327 trigger = 3;
@@ -348,7 +337,7 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
348 polarity = acpi_sci_flags.polarity; 337 polarity = acpi_sci_flags.polarity;
349 338
350 /* 339 /*
351 * mp_config_acpi_legacy_irqs() already setup IRQs < 16 340 * mp_config_acpi_legacy_irqs() already setup IRQs < 16
352 * If GSI is < 16, this will update its flags, 341 * If GSI is < 16, this will update its flags,
353 * else it will create a new mp_irqs[] entry. 342 * else it will create a new mp_irqs[] entry.
354 */ 343 */
@@ -363,12 +352,12 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
363} 352}
364 353
365static int __init 354static int __init
366acpi_parse_int_src_ovr ( 355acpi_parse_int_src_ovr(acpi_table_entry_header * header,
367 acpi_table_entry_header *header, const unsigned long end) 356 const unsigned long end)
368{ 357{
369 struct acpi_table_int_src_ovr *intsrc = NULL; 358 struct acpi_table_int_src_ovr *intsrc = NULL;
370 359
371 intsrc = (struct acpi_table_int_src_ovr*) header; 360 intsrc = (struct acpi_table_int_src_ovr *)header;
372 361
373 if (BAD_MADT_ENTRY(intsrc, end)) 362 if (BAD_MADT_ENTRY(intsrc, end))
374 return -EINVAL; 363 return -EINVAL;
@@ -377,33 +366,30 @@ acpi_parse_int_src_ovr (
377 366
378 if (intsrc->bus_irq == acpi_fadt.sci_int) { 367 if (intsrc->bus_irq == acpi_fadt.sci_int) {
379 acpi_sci_ioapic_setup(intsrc->global_irq, 368 acpi_sci_ioapic_setup(intsrc->global_irq,
380 intsrc->flags.polarity, intsrc->flags.trigger); 369 intsrc->flags.polarity,
370 intsrc->flags.trigger);
381 return 0; 371 return 0;
382 } 372 }
383 373
384 if (acpi_skip_timer_override && 374 if (acpi_skip_timer_override &&
385 intsrc->bus_irq == 0 && intsrc->global_irq == 2) { 375 intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
386 printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); 376 printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
387 return 0; 377 return 0;
388 } 378 }
389 379
390 mp_override_legacy_irq ( 380 mp_override_legacy_irq(intsrc->bus_irq,
391 intsrc->bus_irq, 381 intsrc->flags.polarity,
392 intsrc->flags.polarity, 382 intsrc->flags.trigger, intsrc->global_irq);
393 intsrc->flags.trigger,
394 intsrc->global_irq);
395 383
396 return 0; 384 return 0;
397} 385}
398 386
399
400static int __init 387static int __init
401acpi_parse_nmi_src ( 388acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end)
402 acpi_table_entry_header *header, const unsigned long end)
403{ 389{
404 struct acpi_table_nmi_src *nmi_src = NULL; 390 struct acpi_table_nmi_src *nmi_src = NULL;
405 391
406 nmi_src = (struct acpi_table_nmi_src*) header; 392 nmi_src = (struct acpi_table_nmi_src *)header;
407 393
408 if (BAD_MADT_ENTRY(nmi_src, end)) 394 if (BAD_MADT_ENTRY(nmi_src, end))
409 return -EINVAL; 395 return -EINVAL;
@@ -415,9 +401,7 @@ acpi_parse_nmi_src (
415 return 0; 401 return 0;
416} 402}
417 403
418#endif /* CONFIG_X86_IO_APIC */ 404#endif /* CONFIG_X86_IO_APIC */
419
420#ifdef CONFIG_ACPI_BUS
421 405
422/* 406/*
423 * acpi_pic_sci_set_trigger() 407 * acpi_pic_sci_set_trigger()
@@ -433,8 +417,7 @@ acpi_parse_nmi_src (
433 * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) 417 * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
434 */ 418 */
435 419
436void __init 420void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
437acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
438{ 421{
439 unsigned int mask = 1 << irq; 422 unsigned int mask = 1 << irq;
440 unsigned int old, new; 423 unsigned int old, new;
@@ -454,10 +437,10 @@ acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
454 * routing tables.. 437 * routing tables..
455 */ 438 */
456 switch (trigger) { 439 switch (trigger) {
457 case 1: /* Edge - clear */ 440 case 1: /* Edge - clear */
458 new &= ~mask; 441 new &= ~mask;
459 break; 442 break;
460 case 3: /* Level - set */ 443 case 3: /* Level - set */
461 new |= mask; 444 new |= mask;
462 break; 445 break;
463 } 446 }
@@ -470,21 +453,22 @@ acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
470 outb(new >> 8, 0x4d1); 453 outb(new >> 8, 0x4d1);
471} 454}
472 455
473
474#endif /* CONFIG_ACPI_BUS */
475
476int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) 456int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
477{ 457{
478#ifdef CONFIG_X86_IO_APIC 458#ifdef CONFIG_X86_IO_APIC
479 if (use_pci_vector() && !platform_legacy_irq(gsi)) 459 if (use_pci_vector() && !platform_legacy_irq(gsi))
480 *irq = IO_APIC_VECTOR(gsi); 460 *irq = IO_APIC_VECTOR(gsi);
481 else 461 else
482#endif 462#endif
483 *irq = gsi; 463 *irq = gsi;
484 return 0; 464 return 0;
485} 465}
486 466
487unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) 467/*
468 * success: return IRQ number (>=0)
469 * failure: return < 0
470 */
471int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
488{ 472{
489 unsigned int irq; 473 unsigned int irq;
490 unsigned int plat_gsi = gsi; 474 unsigned int plat_gsi = gsi;
@@ -497,7 +481,7 @@ unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
497 extern void eisa_set_level_irq(unsigned int irq); 481 extern void eisa_set_level_irq(unsigned int irq);
498 482
499 if (edge_level == ACPI_LEVEL_SENSITIVE) 483 if (edge_level == ACPI_LEVEL_SENSITIVE)
500 eisa_set_level_irq(gsi); 484 eisa_set_level_irq(gsi);
501 } 485 }
502#endif 486#endif
503 487
@@ -509,60 +493,58 @@ unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
509 acpi_gsi_to_irq(plat_gsi, &irq); 493 acpi_gsi_to_irq(plat_gsi, &irq);
510 return irq; 494 return irq;
511} 495}
496
512EXPORT_SYMBOL(acpi_register_gsi); 497EXPORT_SYMBOL(acpi_register_gsi);
513 498
514/* 499/*
515 * ACPI based hotplug support for CPU 500 * ACPI based hotplug support for CPU
516 */ 501 */
517#ifdef CONFIG_ACPI_HOTPLUG_CPU 502#ifdef CONFIG_ACPI_HOTPLUG_CPU
518int 503int acpi_map_lsapic(acpi_handle handle, int *pcpu)
519acpi_map_lsapic(acpi_handle handle, int *pcpu)
520{ 504{
521 /* TBD */ 505 /* TBD */
522 return -EINVAL; 506 return -EINVAL;
523} 507}
524EXPORT_SYMBOL(acpi_map_lsapic);
525 508
509EXPORT_SYMBOL(acpi_map_lsapic);
526 510
527int 511int acpi_unmap_lsapic(int cpu)
528acpi_unmap_lsapic(int cpu)
529{ 512{
530 /* TBD */ 513 /* TBD */
531 return -EINVAL; 514 return -EINVAL;
532} 515}
516
533EXPORT_SYMBOL(acpi_unmap_lsapic); 517EXPORT_SYMBOL(acpi_unmap_lsapic);
534#endif /* CONFIG_ACPI_HOTPLUG_CPU */ 518#endif /* CONFIG_ACPI_HOTPLUG_CPU */
535 519
536int 520int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
537acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
538{ 521{
539 /* TBD */ 522 /* TBD */
540 return -EINVAL; 523 return -EINVAL;
541} 524}
525
542EXPORT_SYMBOL(acpi_register_ioapic); 526EXPORT_SYMBOL(acpi_register_ioapic);
543 527
544int 528int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
545acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
546{ 529{
547 /* TBD */ 530 /* TBD */
548 return -EINVAL; 531 return -EINVAL;
549} 532}
533
550EXPORT_SYMBOL(acpi_unregister_ioapic); 534EXPORT_SYMBOL(acpi_unregister_ioapic);
551 535
552static unsigned long __init 536static unsigned long __init
553acpi_scan_rsdp ( 537acpi_scan_rsdp(unsigned long start, unsigned long length)
554 unsigned long start,
555 unsigned long length)
556{ 538{
557 unsigned long offset = 0; 539 unsigned long offset = 0;
558 unsigned long sig_len = sizeof("RSD PTR ") - 1; 540 unsigned long sig_len = sizeof("RSD PTR ") - 1;
559 541
560 /* 542 /*
561 * Scan all 16-byte boundaries of the physical memory region for the 543 * Scan all 16-byte boundaries of the physical memory region for the
562 * RSDP signature. 544 * RSDP signature.
563 */ 545 */
564 for (offset = 0; offset < length; offset += 16) { 546 for (offset = 0; offset < length; offset += 16) {
565 if (strncmp((char *) (start + offset), "RSD PTR ", sig_len)) 547 if (strncmp((char *)(start + offset), "RSD PTR ", sig_len))
566 continue; 548 continue;
567 return (start + offset); 549 return (start + offset);
568 } 550 }
@@ -575,20 +557,19 @@ static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size)
575 struct acpi_table_sbf *sb; 557 struct acpi_table_sbf *sb;
576 558
577 if (!phys_addr || !size) 559 if (!phys_addr || !size)
578 return -EINVAL; 560 return -EINVAL;
579 561
580 sb = (struct acpi_table_sbf *) __acpi_map_table(phys_addr, size); 562 sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size);
581 if (!sb) { 563 if (!sb) {
582 printk(KERN_WARNING PREFIX "Unable to map SBF\n"); 564 printk(KERN_WARNING PREFIX "Unable to map SBF\n");
583 return -ENODEV; 565 return -ENODEV;
584 } 566 }
585 567
586 sbf_port = sb->sbf_cmos; /* Save CMOS port */ 568 sbf_port = sb->sbf_cmos; /* Save CMOS port */
587 569
588 return 0; 570 return 0;
589} 571}
590 572
591
592#ifdef CONFIG_HPET_TIMER 573#ifdef CONFIG_HPET_TIMER
593 574
594static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) 575static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
@@ -598,7 +579,7 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
598 if (!phys || !size) 579 if (!phys || !size)
599 return -EINVAL; 580 return -EINVAL;
600 581
601 hpet_tbl = (struct acpi_table_hpet *) __acpi_map_table(phys, size); 582 hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size);
602 if (!hpet_tbl) { 583 if (!hpet_tbl) {
603 printk(KERN_WARNING PREFIX "Unable to map HPET\n"); 584 printk(KERN_WARNING PREFIX "Unable to map HPET\n");
604 return -ENODEV; 585 return -ENODEV;
@@ -609,22 +590,21 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
609 "memory.\n"); 590 "memory.\n");
610 return -1; 591 return -1;
611 } 592 }
612
613#ifdef CONFIG_X86_64 593#ifdef CONFIG_X86_64
614 vxtime.hpet_address = hpet_tbl->addr.addrl | 594 vxtime.hpet_address = hpet_tbl->addr.addrl |
615 ((long) hpet_tbl->addr.addrh << 32); 595 ((long)hpet_tbl->addr.addrh << 32);
616 596
617 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", 597 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
618 hpet_tbl->id, vxtime.hpet_address); 598 hpet_tbl->id, vxtime.hpet_address);
619#else /* X86 */ 599#else /* X86 */
620 { 600 {
621 extern unsigned long hpet_address; 601 extern unsigned long hpet_address;
622 602
623 hpet_address = hpet_tbl->addr.addrl; 603 hpet_address = hpet_tbl->addr.addrl;
624 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", 604 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
625 hpet_tbl->id, hpet_address); 605 hpet_tbl->id, hpet_address);
626 } 606 }
627#endif /* X86 */ 607#endif /* X86 */
628 608
629 return 0; 609 return 0;
630} 610}
@@ -640,28 +620,25 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
640{ 620{
641 struct fadt_descriptor_rev2 *fadt = NULL; 621 struct fadt_descriptor_rev2 *fadt = NULL;
642 622
643 fadt = (struct fadt_descriptor_rev2*) __acpi_map_table(phys,size); 623 fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size);
644 if(!fadt) { 624 if (!fadt) {
645 printk(KERN_WARNING PREFIX "Unable to map FADT\n"); 625 printk(KERN_WARNING PREFIX "Unable to map FADT\n");
646 return 0; 626 return 0;
647 } 627 }
648
649#ifdef CONFIG_ACPI_INTERPRETER
650 /* initialize sci_int early for INT_SRC_OVR MADT parsing */ 628 /* initialize sci_int early for INT_SRC_OVR MADT parsing */
651 acpi_fadt.sci_int = fadt->sci_int; 629 acpi_fadt.sci_int = fadt->sci_int;
652#endif
653 630
654#ifdef CONFIG_ACPI_BUS
655 /* initialize rev and apic_phys_dest_mode for x86_64 genapic */ 631 /* initialize rev and apic_phys_dest_mode for x86_64 genapic */
656 acpi_fadt.revision = fadt->revision; 632 acpi_fadt.revision = fadt->revision;
657 acpi_fadt.force_apic_physical_destination_mode = fadt->force_apic_physical_destination_mode; 633 acpi_fadt.force_apic_physical_destination_mode =
658#endif 634 fadt->force_apic_physical_destination_mode;
659 635
660#ifdef CONFIG_X86_PM_TIMER 636#ifdef CONFIG_X86_PM_TIMER
661 /* detect the location of the ACPI PM Timer */ 637 /* detect the location of the ACPI PM Timer */
662 if (fadt->revision >= FADT2_REVISION_ID) { 638 if (fadt->revision >= FADT2_REVISION_ID) {
663 /* FADT rev. 2 */ 639 /* FADT rev. 2 */
664 if (fadt->xpm_tmr_blk.address_space_id != ACPI_ADR_SPACE_SYSTEM_IO) 640 if (fadt->xpm_tmr_blk.address_space_id !=
641 ACPI_ADR_SPACE_SYSTEM_IO)
665 return 0; 642 return 0;
666 643
667 pmtmr_ioport = fadt->xpm_tmr_blk.address; 644 pmtmr_ioport = fadt->xpm_tmr_blk.address;
@@ -670,16 +647,15 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
670 pmtmr_ioport = fadt->V1_pm_tmr_blk; 647 pmtmr_ioport = fadt->V1_pm_tmr_blk;
671 } 648 }
672 if (pmtmr_ioport) 649 if (pmtmr_ioport)
673 printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", pmtmr_ioport); 650 printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n",
651 pmtmr_ioport);
674#endif 652#endif
675 return 0; 653 return 0;
676} 654}
677 655
678 656unsigned long __init acpi_find_rsdp(void)
679unsigned long __init
680acpi_find_rsdp (void)
681{ 657{
682 unsigned long rsdp_phys = 0; 658 unsigned long rsdp_phys = 0;
683 659
684 if (efi_enabled) { 660 if (efi_enabled) {
685 if (efi.acpi20) 661 if (efi.acpi20)
@@ -691,9 +667,9 @@ acpi_find_rsdp (void)
691 * Scan memory looking for the RSDP signature. First search EBDA (low 667 * Scan memory looking for the RSDP signature. First search EBDA (low
692 * memory) paragraphs and then search upper memory (E0000-FFFFF). 668 * memory) paragraphs and then search upper memory (E0000-FFFFF).
693 */ 669 */
694 rsdp_phys = acpi_scan_rsdp (0, 0x400); 670 rsdp_phys = acpi_scan_rsdp(0, 0x400);
695 if (!rsdp_phys) 671 if (!rsdp_phys)
696 rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000); 672 rsdp_phys = acpi_scan_rsdp(0xE0000, 0x20000);
697 673
698 return rsdp_phys; 674 return rsdp_phys;
699} 675}
@@ -703,8 +679,7 @@ acpi_find_rsdp (void)
703 * Parse LAPIC entries in MADT 679 * Parse LAPIC entries in MADT
704 * returns 0 on success, < 0 on error 680 * returns 0 on success, < 0 on error
705 */ 681 */
706static int __init 682static int __init acpi_parse_madt_lapic_entries(void)
707acpi_parse_madt_lapic_entries(void)
708{ 683{
709 int count; 684 int count;
710 685
@@ -713,28 +688,31 @@ acpi_parse_madt_lapic_entries(void)
713 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). 688 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
714 */ 689 */
715 690
716 count = acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr, 0); 691 count =
692 acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR,
693 acpi_parse_lapic_addr_ovr, 0);
717 if (count < 0) { 694 if (count < 0) {
718 printk(KERN_ERR PREFIX "Error parsing LAPIC address override entry\n"); 695 printk(KERN_ERR PREFIX
696 "Error parsing LAPIC address override entry\n");
719 return count; 697 return count;
720 } 698 }
721 699
722 mp_register_lapic_address(acpi_lapic_addr); 700 mp_register_lapic_address(acpi_lapic_addr);
723 701
724 count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic, 702 count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic,
725 MAX_APICS); 703 MAX_APICS);
726 if (!count) { 704 if (!count) {
727 printk(KERN_ERR PREFIX "No LAPIC entries present\n"); 705 printk(KERN_ERR PREFIX "No LAPIC entries present\n");
728 /* TBD: Cleanup to allow fallback to MPS */ 706 /* TBD: Cleanup to allow fallback to MPS */
729 return -ENODEV; 707 return -ENODEV;
730 } 708 } else if (count < 0) {
731 else if (count < 0) {
732 printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); 709 printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
733 /* TBD: Cleanup to allow fallback to MPS */ 710 /* TBD: Cleanup to allow fallback to MPS */
734 return count; 711 return count;
735 } 712 }
736 713
737 count = acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0); 714 count =
715 acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0);
738 if (count < 0) { 716 if (count < 0) {
739 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); 717 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
740 /* TBD: Cleanup to allow fallback to MPS */ 718 /* TBD: Cleanup to allow fallback to MPS */
@@ -742,15 +720,14 @@ acpi_parse_madt_lapic_entries(void)
742 } 720 }
743 return 0; 721 return 0;
744} 722}
745#endif /* CONFIG_X86_LOCAL_APIC */ 723#endif /* CONFIG_X86_LOCAL_APIC */
746 724
747#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) 725#ifdef CONFIG_X86_IO_APIC
748/* 726/*
749 * Parse IOAPIC related entries in MADT 727 * Parse IOAPIC related entries in MADT
750 * returns 0 on success, < 0 on error 728 * returns 0 on success, < 0 on error
751 */ 729 */
752static int __init 730static int __init acpi_parse_madt_ioapic_entries(void)
753acpi_parse_madt_ioapic_entries(void)
754{ 731{
755 int count; 732 int count;
756 733
@@ -762,30 +739,34 @@ acpi_parse_madt_ioapic_entries(void)
762 */ 739 */
763 if (acpi_disabled || acpi_noirq) { 740 if (acpi_disabled || acpi_noirq) {
764 return -ENODEV; 741 return -ENODEV;
765 } 742 }
766 743
767 /* 744 /*
768 * if "noapic" boot option, don't look for IO-APICs 745 * if "noapic" boot option, don't look for IO-APICs
769 */ 746 */
770 if (skip_ioapic_setup) { 747 if (skip_ioapic_setup) {
771 printk(KERN_INFO PREFIX "Skipping IOAPIC probe " 748 printk(KERN_INFO PREFIX "Skipping IOAPIC probe "
772 "due to 'noapic' option.\n"); 749 "due to 'noapic' option.\n");
773 return -ENODEV; 750 return -ENODEV;
774 } 751 }
775 752
776 count = acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, MAX_IO_APICS); 753 count =
754 acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic,
755 MAX_IO_APICS);
777 if (!count) { 756 if (!count) {
778 printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); 757 printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
779 return -ENODEV; 758 return -ENODEV;
780 } 759 } else if (count < 0) {
781 else if (count < 0) {
782 printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n"); 760 printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n");
783 return count; 761 return count;
784 } 762 }
785 763
786 count = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, NR_IRQ_VECTORS); 764 count =
765 acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr,
766 NR_IRQ_VECTORS);
787 if (count < 0) { 767 if (count < 0) {
788 printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n"); 768 printk(KERN_ERR PREFIX
769 "Error parsing interrupt source overrides entry\n");
789 /* TBD: Cleanup to allow fallback to MPS */ 770 /* TBD: Cleanup to allow fallback to MPS */
790 return count; 771 return count;
791 } 772 }
@@ -800,7 +781,9 @@ acpi_parse_madt_ioapic_entries(void)
800 /* Fill in identity legacy mapings where no override */ 781 /* Fill in identity legacy mapings where no override */
801 mp_config_acpi_legacy_irqs(); 782 mp_config_acpi_legacy_irqs();
802 783
803 count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS); 784 count =
785 acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src,
786 NR_IRQ_VECTORS);
804 if (count < 0) { 787 if (count < 0) {
805 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); 788 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
806 /* TBD: Cleanup to allow fallback to MPS */ 789 /* TBD: Cleanup to allow fallback to MPS */
@@ -814,11 +797,9 @@ static inline int acpi_parse_madt_ioapic_entries(void)
814{ 797{
815 return -1; 798 return -1;
816} 799}
817#endif /* !(CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER) */ 800#endif /* !CONFIG_X86_IO_APIC */
818 801
819 802static void __init acpi_process_madt(void)
820static void __init
821acpi_process_madt(void)
822{ 803{
823#ifdef CONFIG_X86_LOCAL_APIC 804#ifdef CONFIG_X86_LOCAL_APIC
824 int count, error; 805 int count, error;
@@ -850,7 +831,8 @@ acpi_process_madt(void)
850 /* 831 /*
851 * Dell Precision Workstation 410, 610 come here. 832 * Dell Precision Workstation 410, 610 come here.
852 */ 833 */
853 printk(KERN_ERR PREFIX "Invalid BIOS MADT, disabling ACPI\n"); 834 printk(KERN_ERR PREFIX
835 "Invalid BIOS MADT, disabling ACPI\n");
854 disable_acpi(); 836 disable_acpi();
855 } 837 }
856 } 838 }
@@ -862,7 +844,6 @@ extern int acpi_force;
862 844
863#ifdef __i386__ 845#ifdef __i386__
864 846
865#ifdef CONFIG_ACPI_PCI
866static int __init disable_acpi_irq(struct dmi_system_id *d) 847static int __init disable_acpi_irq(struct dmi_system_id *d)
867{ 848{
868 if (!acpi_force) { 849 if (!acpi_force) {
@@ -882,12 +863,11 @@ static int __init disable_acpi_pci(struct dmi_system_id *d)
882 } 863 }
883 return 0; 864 return 0;
884} 865}
885#endif
886 866
887static int __init dmi_disable_acpi(struct dmi_system_id *d) 867static int __init dmi_disable_acpi(struct dmi_system_id *d)
888{ 868{
889 if (!acpi_force) { 869 if (!acpi_force) {
890 printk(KERN_NOTICE "%s detected: acpi off\n",d->ident); 870 printk(KERN_NOTICE "%s detected: acpi off\n", d->ident);
891 disable_acpi(); 871 disable_acpi();
892 } else { 872 } else {
893 printk(KERN_NOTICE 873 printk(KERN_NOTICE
@@ -902,7 +882,8 @@ static int __init dmi_disable_acpi(struct dmi_system_id *d)
902static int __init force_acpi_ht(struct dmi_system_id *d) 882static int __init force_acpi_ht(struct dmi_system_id *d)
903{ 883{
904 if (!acpi_force) { 884 if (!acpi_force) {
905 printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident); 885 printk(KERN_NOTICE "%s detected: force use of acpi=ht\n",
886 d->ident);
906 disable_acpi(); 887 disable_acpi();
907 acpi_ht = 1; 888 acpi_ht = 1;
908 } else { 889 } else {
@@ -921,155 +902,155 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
921 * Boxes that need ACPI disabled 902 * Boxes that need ACPI disabled
922 */ 903 */
923 { 904 {
924 .callback = dmi_disable_acpi, 905 .callback = dmi_disable_acpi,
925 .ident = "IBM Thinkpad", 906 .ident = "IBM Thinkpad",
926 .matches = { 907 .matches = {
927 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), 908 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
928 DMI_MATCH(DMI_BOARD_NAME, "2629H1G"), 909 DMI_MATCH(DMI_BOARD_NAME, "2629H1G"),
929 }, 910 },
930 }, 911 },
931 912
932 /* 913 /*
933 * Boxes that need acpi=ht 914 * Boxes that need acpi=ht
934 */ 915 */
935 { 916 {
936 .callback = force_acpi_ht, 917 .callback = force_acpi_ht,
937 .ident = "FSC Primergy T850", 918 .ident = "FSC Primergy T850",
938 .matches = { 919 .matches = {
939 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), 920 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
940 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"), 921 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
941 }, 922 },
942 }, 923 },
943 { 924 {
944 .callback = force_acpi_ht, 925 .callback = force_acpi_ht,
945 .ident = "DELL GX240", 926 .ident = "DELL GX240",
946 .matches = { 927 .matches = {
947 DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"), 928 DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
948 DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"), 929 DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
949 }, 930 },
950 }, 931 },
951 { 932 {
952 .callback = force_acpi_ht, 933 .callback = force_acpi_ht,
953 .ident = "HP VISUALIZE NT Workstation", 934 .ident = "HP VISUALIZE NT Workstation",
954 .matches = { 935 .matches = {
955 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), 936 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
956 DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"), 937 DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
957 }, 938 },
958 }, 939 },
959 { 940 {
960 .callback = force_acpi_ht, 941 .callback = force_acpi_ht,
961 .ident = "Compaq Workstation W8000", 942 .ident = "Compaq Workstation W8000",
962 .matches = { 943 .matches = {
963 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), 944 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
964 DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"), 945 DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
965 }, 946 },
966 }, 947 },
967 { 948 {
968 .callback = force_acpi_ht, 949 .callback = force_acpi_ht,
969 .ident = "ASUS P4B266", 950 .ident = "ASUS P4B266",
970 .matches = { 951 .matches = {
971 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), 952 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
972 DMI_MATCH(DMI_BOARD_NAME, "P4B266"), 953 DMI_MATCH(DMI_BOARD_NAME, "P4B266"),
973 }, 954 },
974 }, 955 },
975 { 956 {
976 .callback = force_acpi_ht, 957 .callback = force_acpi_ht,
977 .ident = "ASUS P2B-DS", 958 .ident = "ASUS P2B-DS",
978 .matches = { 959 .matches = {
979 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), 960 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
980 DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"), 961 DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
981 }, 962 },
982 }, 963 },
983 { 964 {
984 .callback = force_acpi_ht, 965 .callback = force_acpi_ht,
985 .ident = "ASUS CUR-DLS", 966 .ident = "ASUS CUR-DLS",
986 .matches = { 967 .matches = {
987 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), 968 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
988 DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"), 969 DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
989 }, 970 },
990 }, 971 },
991 { 972 {
992 .callback = force_acpi_ht, 973 .callback = force_acpi_ht,
993 .ident = "ABIT i440BX-W83977", 974 .ident = "ABIT i440BX-W83977",
994 .matches = { 975 .matches = {
995 DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"), 976 DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
996 DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"), 977 DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
997 }, 978 },
998 }, 979 },
999 { 980 {
1000 .callback = force_acpi_ht, 981 .callback = force_acpi_ht,
1001 .ident = "IBM Bladecenter", 982 .ident = "IBM Bladecenter",
1002 .matches = { 983 .matches = {
1003 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), 984 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
1004 DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"), 985 DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
1005 }, 986 },
1006 }, 987 },
1007 { 988 {
1008 .callback = force_acpi_ht, 989 .callback = force_acpi_ht,
1009 .ident = "IBM eServer xSeries 360", 990 .ident = "IBM eServer xSeries 360",
1010 .matches = { 991 .matches = {
1011 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), 992 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
1012 DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"), 993 DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
1013 }, 994 },
1014 }, 995 },
1015 { 996 {
1016 .callback = force_acpi_ht, 997 .callback = force_acpi_ht,
1017 .ident = "IBM eserver xSeries 330", 998 .ident = "IBM eserver xSeries 330",
1018 .matches = { 999 .matches = {
1019 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), 1000 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
1020 DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"), 1001 DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
1021 }, 1002 },
1022 }, 1003 },
1023 { 1004 {
1024 .callback = force_acpi_ht, 1005 .callback = force_acpi_ht,
1025 .ident = "IBM eserver xSeries 440", 1006 .ident = "IBM eserver xSeries 440",
1026 .matches = { 1007 .matches = {
1027 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), 1008 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
1028 DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), 1009 DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
1029 }, 1010 },
1030 }, 1011 },
1031 1012
1032#ifdef CONFIG_ACPI_PCI
1033 /* 1013 /*
1034 * Boxes that need ACPI PCI IRQ routing disabled 1014 * Boxes that need ACPI PCI IRQ routing disabled
1035 */ 1015 */
1036 { 1016 {
1037 .callback = disable_acpi_irq, 1017 .callback = disable_acpi_irq,
1038 .ident = "ASUS A7V", 1018 .ident = "ASUS A7V",
1039 .matches = { 1019 .matches = {
1040 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), 1020 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
1041 DMI_MATCH(DMI_BOARD_NAME, "<A7V>"), 1021 DMI_MATCH(DMI_BOARD_NAME, "<A7V>"),
1042 /* newer BIOS, Revision 1011, does work */ 1022 /* newer BIOS, Revision 1011, does work */
1043 DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), 1023 DMI_MATCH(DMI_BIOS_VERSION,
1044 }, 1024 "ASUS A7V ACPI BIOS Revision 1007"),
1045 }, 1025 },
1026 },
1046 1027
1047 /* 1028 /*
1048 * Boxes that need ACPI PCI IRQ routing and PCI scan disabled 1029 * Boxes that need ACPI PCI IRQ routing and PCI scan disabled
1049 */ 1030 */
1050 { /* _BBN 0 bug */ 1031 { /* _BBN 0 bug */
1051 .callback = disable_acpi_pci, 1032 .callback = disable_acpi_pci,
1052 .ident = "ASUS PR-DLS", 1033 .ident = "ASUS PR-DLS",
1053 .matches = { 1034 .matches = {
1054 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), 1035 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
1055 DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"), 1036 DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
1056 DMI_MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"), 1037 DMI_MATCH(DMI_BIOS_VERSION,
1057 DMI_MATCH(DMI_BIOS_DATE, "03/21/2003") 1038 "ASUS PR-DLS ACPI BIOS Revision 1010"),
1058 }, 1039 DMI_MATCH(DMI_BIOS_DATE, "03/21/2003")
1059 }, 1040 },
1041 },
1060 { 1042 {
1061 .callback = disable_acpi_pci, 1043 .callback = disable_acpi_pci,
1062 .ident = "Acer TravelMate 36x Laptop", 1044 .ident = "Acer TravelMate 36x Laptop",
1063 .matches = { 1045 .matches = {
1064 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 1046 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1065 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), 1047 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
1066 }, 1048 },
1067 }, 1049 },
1068#endif 1050 {}
1069 { }
1070}; 1051};
1071 1052
1072#endif /* __i386__ */ 1053#endif /* __i386__ */
1073 1054
1074/* 1055/*
1075 * acpi_boot_table_init() and acpi_boot_init() 1056 * acpi_boot_table_init() and acpi_boot_init()
@@ -1094,8 +1075,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
1094 * !0: failure 1075 * !0: failure
1095 */ 1076 */
1096 1077
1097int __init 1078int __init acpi_boot_table_init(void)
1098acpi_boot_table_init(void)
1099{ 1079{
1100 int error; 1080 int error;
1101 1081
@@ -1108,7 +1088,7 @@ acpi_boot_table_init(void)
1108 * One exception: acpi=ht continues far enough to enumerate LAPICs 1088 * One exception: acpi=ht continues far enough to enumerate LAPICs
1109 */ 1089 */
1110 if (acpi_disabled && !acpi_ht) 1090 if (acpi_disabled && !acpi_ht)
1111 return 1; 1091 return 1;
1112 1092
1113 /* 1093 /*
1114 * Initialize the ACPI boot-time table parser. 1094 * Initialize the ACPI boot-time table parser.
@@ -1118,7 +1098,6 @@ acpi_boot_table_init(void)
1118 disable_acpi(); 1098 disable_acpi();
1119 return error; 1099 return error;
1120 } 1100 }
1121
1122#ifdef __i386__ 1101#ifdef __i386__
1123 check_acpi_pci(); 1102 check_acpi_pci();
1124#endif 1103#endif
@@ -1142,7 +1121,6 @@ acpi_boot_table_init(void)
1142 return 0; 1121 return 0;
1143} 1122}
1144 1123
1145
1146int __init acpi_boot_init(void) 1124int __init acpi_boot_init(void)
1147{ 1125{
1148 /* 1126 /*
@@ -1150,7 +1128,7 @@ int __init acpi_boot_init(void)
1150 * One exception: acpi=ht continues far enough to enumerate LAPICs 1128 * One exception: acpi=ht continues far enough to enumerate LAPICs
1151 */ 1129 */
1152 if (acpi_disabled && !acpi_ht) 1130 if (acpi_disabled && !acpi_ht)
1153 return 1; 1131 return 1;
1154 1132
1155 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); 1133 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
1156 1134
@@ -1168,4 +1146,3 @@ int __init acpi_boot_init(void)
1168 1146
1169 return 0; 1147 return 0;
1170} 1148}
1171
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index 726a5ca4b165..f1b9d2a46dab 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -8,44 +8,44 @@
8#include <asm/pci-direct.h> 8#include <asm/pci-direct.h>
9#include <asm/acpi.h> 9#include <asm/acpi.h>
10 10
11static int __init check_bridge(int vendor, int device) 11static int __init check_bridge(int vendor, int device)
12{ 12{
13 /* According to Nvidia all timer overrides are bogus. Just ignore 13 /* According to Nvidia all timer overrides are bogus. Just ignore
14 them all. */ 14 them all. */
15 if (vendor == PCI_VENDOR_ID_NVIDIA) { 15 if (vendor == PCI_VENDOR_ID_NVIDIA) {
16 acpi_skip_timer_override = 1; 16 acpi_skip_timer_override = 1;
17 } 17 }
18 return 0; 18 return 0;
19} 19}
20 20
21void __init check_acpi_pci(void) 21void __init check_acpi_pci(void)
22{ 22{
23 int num,slot,func; 23 int num, slot, func;
24 24
25 /* Assume the machine supports type 1. If not it will 25 /* Assume the machine supports type 1. If not it will
26 always read ffffffff and should not have any side effect. */ 26 always read ffffffff and should not have any side effect. */
27 27
28 /* Poor man's PCI discovery */ 28 /* Poor man's PCI discovery */
29 for (num = 0; num < 32; num++) { 29 for (num = 0; num < 32; num++) {
30 for (slot = 0; slot < 32; slot++) { 30 for (slot = 0; slot < 32; slot++) {
31 for (func = 0; func < 8; func++) { 31 for (func = 0; func < 8; func++) {
32 u32 class; 32 u32 class;
33 u32 vendor; 33 u32 vendor;
34 class = read_pci_config(num,slot,func, 34 class = read_pci_config(num, slot, func,
35 PCI_CLASS_REVISION); 35 PCI_CLASS_REVISION);
36 if (class == 0xffffffff) 36 if (class == 0xffffffff)
37 break; 37 break;
38 38
39 if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) 39 if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
40 continue; 40 continue;
41 41
42 vendor = read_pci_config(num, slot, func, 42 vendor = read_pci_config(num, slot, func,
43 PCI_VENDOR_ID); 43 PCI_VENDOR_ID);
44 44
45 if (check_bridge(vendor&0xffff, vendor >> 16)) 45 if (check_bridge(vendor & 0xffff, vendor >> 16))
46 return; 46 return;
47 } 47 }
48 48
49 } 49 }
50 } 50 }
51} 51}
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c
index c1af93032ff3..1cb2b186a3af 100644
--- a/arch/i386/kernel/acpi/sleep.c
+++ b/arch/i386/kernel/acpi/sleep.c
@@ -20,12 +20,13 @@ extern void zap_low_mappings(void);
20 20
21extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); 21extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
22 22
23static void init_low_mapping(pgd_t *pgd, int pgd_limit) 23static void init_low_mapping(pgd_t * pgd, int pgd_limit)
24{ 24{
25 int pgd_ofs = 0; 25 int pgd_ofs = 0;
26 26
27 while ((pgd_ofs < pgd_limit) && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) { 27 while ((pgd_ofs < pgd_limit)
28 set_pgd(pgd, *(pgd+USER_PTRS_PER_PGD)); 28 && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) {
29 set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD));
29 pgd_ofs++, pgd++; 30 pgd_ofs++, pgd++;
30 } 31 }
31 flush_tlb_all(); 32 flush_tlb_all();
@@ -37,12 +38,13 @@ static void init_low_mapping(pgd_t *pgd, int pgd_limit)
37 * Create an identity mapped page table and copy the wakeup routine to 38 * Create an identity mapped page table and copy the wakeup routine to
38 * low memory. 39 * low memory.
39 */ 40 */
40int acpi_save_state_mem (void) 41int acpi_save_state_mem(void)
41{ 42{
42 if (!acpi_wakeup_address) 43 if (!acpi_wakeup_address)
43 return 1; 44 return 1;
44 init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD); 45 init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
45 memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); 46 memcpy((void *)acpi_wakeup_address, &wakeup_start,
47 &wakeup_end - &wakeup_start);
46 acpi_copy_wakeup_routine(acpi_wakeup_address); 48 acpi_copy_wakeup_routine(acpi_wakeup_address);
47 49
48 return 0; 50 return 0;
@@ -51,7 +53,7 @@ int acpi_save_state_mem (void)
51/* 53/*
52 * acpi_restore_state - undo effects of acpi_save_state_mem 54 * acpi_restore_state - undo effects of acpi_save_state_mem
53 */ 55 */
54void acpi_restore_state_mem (void) 56void acpi_restore_state_mem(void)
55{ 57{
56 zap_low_mappings(); 58 zap_low_mappings();
57} 59}
@@ -67,7 +69,8 @@ void acpi_restore_state_mem (void)
67void __init acpi_reserve_bootmem(void) 69void __init acpi_reserve_bootmem(void)
68{ 70{
69 if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) { 71 if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) {
70 printk(KERN_ERR "ACPI: Wakeup code way too big, S3 disabled.\n"); 72 printk(KERN_ERR
73 "ACPI: Wakeup code way too big, S3 disabled.\n");
71 return; 74 return;
72 } 75 }
73 76
@@ -90,10 +93,8 @@ static int __init acpi_sleep_setup(char *str)
90 return 1; 93 return 1;
91} 94}
92 95
93
94__setup("acpi_sleep=", acpi_sleep_setup); 96__setup("acpi_sleep=", acpi_sleep_setup);
95 97
96
97static __init int reset_videomode_after_s3(struct dmi_system_id *d) 98static __init int reset_videomode_after_s3(struct dmi_system_id *d)
98{ 99{
99 acpi_video_flags |= 2; 100 acpi_video_flags |= 2;
@@ -101,14 +102,14 @@ static __init int reset_videomode_after_s3(struct dmi_system_id *d)
101} 102}
102 103
103static __initdata struct dmi_system_id acpisleep_dmi_table[] = { 104static __initdata struct dmi_system_id acpisleep_dmi_table[] = {
104 { /* Reset video mode after returning from ACPI S3 sleep */ 105 { /* Reset video mode after returning from ACPI S3 sleep */
105 .callback = reset_videomode_after_s3, 106 .callback = reset_videomode_after_s3,
106 .ident = "Toshiba Satellite 4030cdt", 107 .ident = "Toshiba Satellite 4030cdt",
107 .matches = { 108 .matches = {
108 DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), 109 DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
109 }, 110 },
110 }, 111 },
111 { } 112 {}
112}; 113};
113 114
114static int __init acpisleep_dmi_init(void) 115static int __init acpisleep_dmi_init(void)
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 60a9e54dd20e..822c8ce9d1f1 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -31,6 +31,7 @@
31#include <linux/cpufreq.h> 31#include <linux/cpufreq.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/compiler.h>
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/delay.h> 36#include <asm/delay.h>
36#include <asm/uaccess.h> 37#include <asm/uaccess.h>
@@ -57,6 +58,8 @@ static struct cpufreq_acpi_io *acpi_io_data[NR_CPUS];
57 58
58static struct cpufreq_driver acpi_cpufreq_driver; 59static struct cpufreq_driver acpi_cpufreq_driver;
59 60
61static unsigned int acpi_pstate_strict;
62
60static int 63static int
61acpi_processor_write_port( 64acpi_processor_write_port(
62 u16 port, 65 u16 port,
@@ -163,34 +166,44 @@ acpi_processor_set_performance (
163 } 166 }
164 167
165 /* 168 /*
166 * Then we read the 'status_register' and compare the value with the 169 * Assume the write went through when acpi_pstate_strict is not used.
167 * target state's 'status' to make sure the transition was successful. 170 * As read status_register is an expensive operation and there
168 * Note that we'll poll for up to 1ms (100 cycles of 10us) before 171 * are no specific error cases where an IO port write will fail.
169 * giving up.
170 */ 172 */
171 173 if (acpi_pstate_strict) {
172 port = data->acpi_data.status_register.address; 174 /* Then we read the 'status_register' and compare the value
173 bit_width = data->acpi_data.status_register.bit_width; 175 * with the target state's 'status' to make sure the
174 176 * transition was successful.
175 dprintk("Looking for 0x%08x from port 0x%04x\n", 177 * Note that we'll poll for up to 1ms (100 cycles of 10us)
176 (u32) data->acpi_data.states[state].status, port); 178 * before giving up.
177 179 */
178 for (i=0; i<100; i++) { 180
179 ret = acpi_processor_read_port(port, bit_width, &value); 181 port = data->acpi_data.status_register.address;
180 if (ret) { 182 bit_width = data->acpi_data.status_register.bit_width;
181 dprintk("Invalid port width 0x%04x\n", bit_width); 183
182 retval = ret; 184 dprintk("Looking for 0x%08x from port 0x%04x\n",
183 goto migrate_end; 185 (u32) data->acpi_data.states[state].status, port);
186
187 for (i=0; i<100; i++) {
188 ret = acpi_processor_read_port(port, bit_width, &value);
189 if (ret) {
190 dprintk("Invalid port width 0x%04x\n", bit_width);
191 retval = ret;
192 goto migrate_end;
193 }
194 if (value == (u32) data->acpi_data.states[state].status)
195 break;
196 udelay(10);
184 } 197 }
185 if (value == (u32) data->acpi_data.states[state].status) 198 } else {
186 break; 199 i = 0;
187 udelay(10); 200 value = (u32) data->acpi_data.states[state].status;
188 } 201 }
189 202
190 /* notify cpufreq */ 203 /* notify cpufreq */
191 cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE); 204 cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
192 205
193 if (value != (u32) data->acpi_data.states[state].status) { 206 if (unlikely(value != (u32) data->acpi_data.states[state].status)) {
194 unsigned int tmp = cpufreq_freqs.new; 207 unsigned int tmp = cpufreq_freqs.new;
195 cpufreq_freqs.new = cpufreq_freqs.old; 208 cpufreq_freqs.new = cpufreq_freqs.old;
196 cpufreq_freqs.old = tmp; 209 cpufreq_freqs.old = tmp;
@@ -537,6 +550,8 @@ acpi_cpufreq_exit (void)
537 return; 550 return;
538} 551}
539 552
553module_param(acpi_pstate_strict, uint, 0644);
554MODULE_PARM_DESC(acpi_pstate_strict, "value 0 or non-zero. non-zero -> strict ACPI checks are performed during frequency changes.");
540 555
541late_initcall(acpi_cpufreq_init); 556late_initcall(acpi_cpufreq_init);
542module_exit(acpi_cpufreq_exit); 557module_exit(acpi_cpufreq_exit);
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 6578f40bd501..ebedd2e21670 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -2421,7 +2421,7 @@ device_initcall(ioapic_init_sysfs);
2421 ACPI-based IOAPIC Configuration 2421 ACPI-based IOAPIC Configuration
2422 -------------------------------------------------------------------------- */ 2422 -------------------------------------------------------------------------- */
2423 2423
2424#ifdef CONFIG_ACPI_BOOT 2424#ifdef CONFIG_ACPI
2425 2425
2426int __init io_apic_get_unique_id (int ioapic, int apic_id) 2426int __init io_apic_get_unique_id (int ioapic, int apic_id)
2427{ 2427{
@@ -2574,4 +2574,4 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
2574 return 0; 2574 return 0;
2575} 2575}
2576 2576
2577#endif /*CONFIG_ACPI_BOOT*/ 2577#endif /* CONFIG_ACPI */
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index ce838abb27d8..97dbf289dbd5 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -653,8 +653,6 @@ void __init get_smp_config (void)
653 struct intel_mp_floating *mpf = mpf_found; 653 struct intel_mp_floating *mpf = mpf_found;
654 654
655 /* 655 /*
656 * ACPI may be used to obtain the entire SMP configuration or just to
657 * enumerate/configure processors (CONFIG_ACPI_BOOT). Note that
658 * ACPI supports both logical (e.g. Hyper-Threading) and physical 656 * ACPI supports both logical (e.g. Hyper-Threading) and physical
659 * processors, where MPS only supports physical. 657 * processors, where MPS only supports physical.
660 */ 658 */
@@ -810,7 +808,7 @@ void __init find_smp_config (void)
810 ACPI-based MP Configuration 808 ACPI-based MP Configuration
811 -------------------------------------------------------------------------- */ 809 -------------------------------------------------------------------------- */
812 810
813#ifdef CONFIG_ACPI_BOOT 811#ifdef CONFIG_ACPI
814 812
815void __init mp_register_lapic_address ( 813void __init mp_register_lapic_address (
816 u64 address) 814 u64 address)
@@ -856,7 +854,7 @@ void __init mp_register_lapic (
856 MP_processor_info(&processor); 854 MP_processor_info(&processor);
857} 855}
858 856
859#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) 857#ifdef CONFIG_X86_IO_APIC
860 858
861#define MP_ISA_BUS 0 859#define MP_ISA_BUS 0
862#define MP_MAX_IOAPIC_PIN 127 860#define MP_MAX_IOAPIC_PIN 127
@@ -1071,11 +1069,9 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1071 */ 1069 */
1072 static int gsi_to_irq[MAX_GSI_NUM]; 1070 static int gsi_to_irq[MAX_GSI_NUM];
1073 1071
1074#ifdef CONFIG_ACPI_BUS
1075 /* Don't set up the ACPI SCI because it's already set up */ 1072 /* Don't set up the ACPI SCI because it's already set up */
1076 if (acpi_fadt.sci_int == gsi) 1073 if (acpi_fadt.sci_int == gsi)
1077 return gsi; 1074 return gsi;
1078#endif
1079 1075
1080 ioapic = mp_find_ioapic(gsi); 1076 ioapic = mp_find_ioapic(gsi);
1081 if (ioapic < 0) { 1077 if (ioapic < 0) {
@@ -1118,13 +1114,11 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1118 if (gsi < MAX_GSI_NUM) { 1114 if (gsi < MAX_GSI_NUM) {
1119 if (gsi > 15) 1115 if (gsi > 15)
1120 gsi = pci_irq++; 1116 gsi = pci_irq++;
1121#ifdef CONFIG_ACPI_BUS
1122 /* 1117 /*
1123 * Don't assign IRQ used by ACPI SCI 1118 * Don't assign IRQ used by ACPI SCI
1124 */ 1119 */
1125 if (gsi == acpi_fadt.sci_int) 1120 if (gsi == acpi_fadt.sci_int)
1126 gsi = pci_irq++; 1121 gsi = pci_irq++;
1127#endif
1128 gsi_to_irq[irq] = gsi; 1122 gsi_to_irq[irq] = gsi;
1129 } else { 1123 } else {
1130 printk(KERN_ERR "GSI %u is too high\n", gsi); 1124 printk(KERN_ERR "GSI %u is too high\n", gsi);
@@ -1138,5 +1132,5 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1138 return gsi; 1132 return gsi;
1139} 1133}
1140 1134
1141#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/ 1135#endif /* CONFIG_X86_IO_APIC */
1142#endif /*CONFIG_ACPI_BOOT*/ 1136#endif /* CONFIG_ACPI */
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index af4de58cab54..d52eda399a7a 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -87,14 +87,14 @@ EXPORT_SYMBOL(boot_cpu_data);
87 87
88unsigned long mmu_cr4_features; 88unsigned long mmu_cr4_features;
89 89
90#ifdef CONFIG_ACPI_INTERPRETER 90#ifdef CONFIG_ACPI
91 int acpi_disabled = 0; 91 int acpi_disabled = 0;
92#else 92#else
93 int acpi_disabled = 1; 93 int acpi_disabled = 1;
94#endif 94#endif
95EXPORT_SYMBOL(acpi_disabled); 95EXPORT_SYMBOL(acpi_disabled);
96 96
97#ifdef CONFIG_ACPI_BOOT 97#ifdef CONFIG_ACPI
98int __initdata acpi_force = 0; 98int __initdata acpi_force = 0;
99extern acpi_interrupt_flags acpi_sci_flags; 99extern acpi_interrupt_flags acpi_sci_flags;
100#endif 100#endif
@@ -794,7 +794,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
794 } 794 }
795#endif 795#endif
796 796
797#ifdef CONFIG_ACPI_BOOT 797#ifdef CONFIG_ACPI
798 /* "acpi=off" disables both ACPI table parsing and interpreter */ 798 /* "acpi=off" disables both ACPI table parsing and interpreter */
799 else if (!memcmp(from, "acpi=off", 8)) { 799 else if (!memcmp(from, "acpi=off", 8)) {
800 disable_acpi(); 800 disable_acpi();
@@ -850,7 +850,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
850 else if (!memcmp(from, "noapic", 6)) 850 else if (!memcmp(from, "noapic", 6))
851 disable_ioapic_setup(); 851 disable_ioapic_setup();
852#endif /* CONFIG_X86_LOCAL_APIC */ 852#endif /* CONFIG_X86_LOCAL_APIC */
853#endif /* CONFIG_ACPI_BOOT */ 853#endif /* CONFIG_ACPI */
854 854
855#ifdef CONFIG_X86_LOCAL_APIC 855#ifdef CONFIG_X86_LOCAL_APIC
856 /* enable local APIC */ 856 /* enable local APIC */
@@ -1575,7 +1575,7 @@ void __init setup_arch(char **cmdline_p)
1575 if (efi_enabled) 1575 if (efi_enabled)
1576 efi_map_memmap(); 1576 efi_map_memmap();
1577 1577
1578#ifdef CONFIG_ACPI_BOOT 1578#ifdef CONFIG_ACPI
1579 /* 1579 /*
1580 * Parse the ACPI tables for possible boot-time SMP configuration. 1580 * Parse the ACPI tables for possible boot-time SMP configuration.
1581 */ 1581 */
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index d5936d500479..f549c0efdb9f 100644
--- a/arch/i386/mach-es7000/es7000plat.c
+++ b/arch/i386/mach-es7000/es7000plat.c
@@ -51,7 +51,7 @@ struct mip_reg *host_reg;
51int mip_port; 51int mip_port;
52unsigned long mip_addr, host_addr; 52unsigned long mip_addr, host_addr;
53 53
54#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) 54#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)
55 55
56/* 56/*
57 * GSI override for ES7000 platforms. 57 * GSI override for ES7000 platforms.
@@ -73,7 +73,7 @@ es7000_rename_gsi(int ioapic, int gsi)
73 return gsi; 73 return gsi;
74} 74}
75 75
76#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) 76#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
77 77
78/* 78/*
79 * Parse the OEM Table 79 * Parse the OEM Table
diff --git a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
index 1bff03f36965..ead6122dd06d 100644
--- a/arch/i386/pci/Makefile
+++ b/arch/i386/pci/Makefile
@@ -5,7 +5,7 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
5obj-$(CONFIG_PCI_DIRECT) += direct.o 5obj-$(CONFIG_PCI_DIRECT) += direct.o
6 6
7pci-y := fixup.o 7pci-y := fixup.o
8pci-$(CONFIG_ACPI_PCI) += acpi.o 8pci-$(CONFIG_ACPI) += acpi.o
9pci-y += legacy.o irq.o 9pci-y += legacy.o irq.o
10 10
11pci-$(CONFIG_X86_VISWS) := visws.o fixup.o 11pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 86348b68fda1..326a2edc3834 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -1075,7 +1075,7 @@ static void pirq_penalize_isa_irq(int irq, int active)
1075 1075
1076void pcibios_penalize_isa_irq(int irq, int active) 1076void pcibios_penalize_isa_irq(int irq, int active)
1077{ 1077{
1078#ifdef CONFIG_ACPI_PCI 1078#ifdef CONFIG_ACPI
1079 if (!acpi_noirq) 1079 if (!acpi_noirq)
1080 acpi_penalize_isa_irq(irq, active); 1080 acpi_penalize_isa_irq(irq, active);
1081 else 1081 else