diff options
Diffstat (limited to 'arch')
39 files changed, 600 insertions, 660 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 5d51b38bd70d..b22f003eaa6d 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -1212,7 +1212,6 @@ config PCI_DIRECT | |||
1212 | config PCI_MMCONFIG | 1212 | config PCI_MMCONFIG |
1213 | bool | 1213 | bool |
1214 | depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) | 1214 | depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) |
1215 | select ACPI_BOOT | ||
1216 | default y | 1215 | default y |
1217 | 1216 | ||
1218 | source "drivers/pci/pcie/Kconfig" | 1217 | source "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 | # |
133 | CONFIG_ACPI=y | 133 | CONFIG_ACPI=y |
134 | CONFIG_ACPI_BOOT=y | ||
135 | CONFIG_ACPI_INTERPRETER=y | ||
136 | CONFIG_ACPI_SLEEP=y | 134 | CONFIG_ACPI_SLEEP=y |
137 | CONFIG_ACPI_SLEEP_PROC_FS=y | 135 | CONFIG_ACPI_SLEEP_PROC_FS=y |
138 | CONFIG_ACPI_AC=y | 136 | CONFIG_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 |
147 | CONFIG_ACPI_BUS=y | ||
148 | CONFIG_ACPI_EC=y | 145 | CONFIG_ACPI_EC=y |
149 | CONFIG_ACPI_POWER=y | 146 | CONFIG_ACPI_POWER=y |
150 | CONFIG_ACPI_PCI=y | ||
151 | CONFIG_ACPI_SYSTEM=y | 147 | CONFIG_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 64682a0edacf..f10de0f2c5e6 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 | ||
12 | obj-y += cpu/ | 12 | obj-y += cpu/ |
13 | obj-y += timers/ | 13 | obj-y += timers/ |
14 | obj-$(CONFIG_ACPI_BOOT) += acpi/ | 14 | obj-$(CONFIG_ACPI) += acpi/ |
15 | obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o | 15 | obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o |
16 | obj-$(CONFIG_MCA) += mca.o | 16 | obj-$(CONFIG_MCA) += mca.o |
17 | obj-$(CONFIG_X86_MSR) += msr.o | 17 | obj-$(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 @@ | |||
1 | obj-$(CONFIG_ACPI_BOOT) := boot.o | 1 | obj-y := boot.o |
2 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o | 2 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(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 34ee500c26e5..a63351c085c6 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 | ||
43 | static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } | 43 | static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
44 | { | ||
45 | } | ||
44 | extern void __init clustered_apic_check(void); | 46 | extern void __init clustered_apic_check(void); |
45 | static inline int ioapic_setup_disabled(void) { return 0; } | 47 | static 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 | ||
64 | int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ | 69 | int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ |
65 | int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ | 70 | int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ |
66 | #else | ||
67 | int acpi_noirq __initdata = 1; | ||
68 | int acpi_pci_disabled __initdata = 1; | ||
69 | #endif | ||
70 | int acpi_ht __initdata = 1; /* enable HT */ | 71 | int acpi_ht __initdata = 1; /* enable HT */ |
71 | 72 | ||
72 | int acpi_lapic; | 73 | int 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 |
90 | u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] = | 91 | u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] = |
91 | { [0 ... MAX_MADT_ENTRIES-1] = 0xff }; | 92 | {[0 ... MAX_MADT_ENTRIES - 1] = 0xff }; |
92 | EXPORT_SYMBOL(x86_acpiid_to_apicid); | 93 | EXPORT_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 | */ |
102 | enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; | 103 | enum 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; | |||
107 | char *__acpi_map_table(unsigned long phys_addr, unsigned long size) | 108 | char *__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 |
215 | static int __init | 216 | static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) |
216 | acpi_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 | |||
244 | static int __init | 241 | static int __init |
245 | acpi_parse_lapic ( | 242 | acpi_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 | ||
270 | static int __init | 265 | static int __init |
271 | acpi_parse_lapic_addr_ovr ( | 266 | acpi_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 | ||
286 | static int __init | 281 | static int __init |
287 | acpi_parse_lapic_nmi ( | 282 | acpi_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 | ||
310 | static int __init | 303 | static int __init |
311 | acpi_parse_ioapic ( | 304 | acpi_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 | */ |
334 | static void | 324 | static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) |
335 | acpi_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 | ||
365 | static int __init | 354 | static int __init |
366 | acpi_parse_int_src_ovr ( | 355 | acpi_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 | |||
400 | static int __init | 387 | static int __init |
401 | acpi_parse_nmi_src ( | 388 | acpi_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 | ||
436 | void __init | 420 | void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) |
437 | acpi_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 | |||
476 | int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | 456 | int 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 | ||
487 | unsigned 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 | */ | ||
471 | int 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 | |||
512 | EXPORT_SYMBOL(acpi_register_gsi); | 497 | EXPORT_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 |
518 | int | 503 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) |
519 | acpi_map_lsapic(acpi_handle handle, int *pcpu) | ||
520 | { | 504 | { |
521 | /* TBD */ | 505 | /* TBD */ |
522 | return -EINVAL; | 506 | return -EINVAL; |
523 | } | 507 | } |
524 | EXPORT_SYMBOL(acpi_map_lsapic); | ||
525 | 508 | ||
509 | EXPORT_SYMBOL(acpi_map_lsapic); | ||
526 | 510 | ||
527 | int | 511 | int acpi_unmap_lsapic(int cpu) |
528 | acpi_unmap_lsapic(int cpu) | ||
529 | { | 512 | { |
530 | /* TBD */ | 513 | /* TBD */ |
531 | return -EINVAL; | 514 | return -EINVAL; |
532 | } | 515 | } |
516 | |||
533 | EXPORT_SYMBOL(acpi_unmap_lsapic); | 517 | EXPORT_SYMBOL(acpi_unmap_lsapic); |
534 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 518 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
535 | 519 | ||
536 | int | 520 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) |
537 | acpi_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 | |||
542 | EXPORT_SYMBOL(acpi_register_ioapic); | 526 | EXPORT_SYMBOL(acpi_register_ioapic); |
543 | 527 | ||
544 | int | 528 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) |
545 | acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) | ||
546 | { | 529 | { |
547 | /* TBD */ | 530 | /* TBD */ |
548 | return -EINVAL; | 531 | return -EINVAL; |
549 | } | 532 | } |
533 | |||
550 | EXPORT_SYMBOL(acpi_unregister_ioapic); | 534 | EXPORT_SYMBOL(acpi_unregister_ioapic); |
551 | 535 | ||
552 | static unsigned long __init | 536 | static unsigned long __init |
553 | acpi_scan_rsdp ( | 537 | acpi_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 | ||
594 | static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | 575 | static 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 | 656 | unsigned long __init acpi_find_rsdp(void) | |
679 | unsigned long __init | ||
680 | acpi_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 | */ |
706 | static int __init | 682 | static int __init acpi_parse_madt_lapic_entries(void) |
707 | acpi_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 | */ |
752 | static int __init | 730 | static int __init acpi_parse_madt_ioapic_entries(void) |
753 | acpi_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 | 802 | static void __init acpi_process_madt(void) | |
820 | static void __init | ||
821 | acpi_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; |
@@ -853,7 +834,8 @@ acpi_process_madt(void) | |||
853 | /* | 834 | /* |
854 | * Dell Precision Workstation 410, 610 come here. | 835 | * Dell Precision Workstation 410, 610 come here. |
855 | */ | 836 | */ |
856 | printk(KERN_ERR PREFIX "Invalid BIOS MADT, disabling ACPI\n"); | 837 | printk(KERN_ERR PREFIX |
838 | "Invalid BIOS MADT, disabling ACPI\n"); | ||
857 | disable_acpi(); | 839 | disable_acpi(); |
858 | } | 840 | } |
859 | } | 841 | } |
@@ -865,7 +847,6 @@ extern int acpi_force; | |||
865 | 847 | ||
866 | #ifdef __i386__ | 848 | #ifdef __i386__ |
867 | 849 | ||
868 | #ifdef CONFIG_ACPI_PCI | ||
869 | static int __init disable_acpi_irq(struct dmi_system_id *d) | 850 | static int __init disable_acpi_irq(struct dmi_system_id *d) |
870 | { | 851 | { |
871 | if (!acpi_force) { | 852 | if (!acpi_force) { |
@@ -885,12 +866,11 @@ static int __init disable_acpi_pci(struct dmi_system_id *d) | |||
885 | } | 866 | } |
886 | return 0; | 867 | return 0; |
887 | } | 868 | } |
888 | #endif | ||
889 | 869 | ||
890 | static int __init dmi_disable_acpi(struct dmi_system_id *d) | 870 | static int __init dmi_disable_acpi(struct dmi_system_id *d) |
891 | { | 871 | { |
892 | if (!acpi_force) { | 872 | if (!acpi_force) { |
893 | printk(KERN_NOTICE "%s detected: acpi off\n",d->ident); | 873 | printk(KERN_NOTICE "%s detected: acpi off\n", d->ident); |
894 | disable_acpi(); | 874 | disable_acpi(); |
895 | } else { | 875 | } else { |
896 | printk(KERN_NOTICE | 876 | printk(KERN_NOTICE |
@@ -905,7 +885,8 @@ static int __init dmi_disable_acpi(struct dmi_system_id *d) | |||
905 | static int __init force_acpi_ht(struct dmi_system_id *d) | 885 | static int __init force_acpi_ht(struct dmi_system_id *d) |
906 | { | 886 | { |
907 | if (!acpi_force) { | 887 | if (!acpi_force) { |
908 | printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident); | 888 | printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", |
889 | d->ident); | ||
909 | disable_acpi(); | 890 | disable_acpi(); |
910 | acpi_ht = 1; | 891 | acpi_ht = 1; |
911 | } else { | 892 | } else { |
@@ -924,155 +905,155 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { | |||
924 | * Boxes that need ACPI disabled | 905 | * Boxes that need ACPI disabled |
925 | */ | 906 | */ |
926 | { | 907 | { |
927 | .callback = dmi_disable_acpi, | 908 | .callback = dmi_disable_acpi, |
928 | .ident = "IBM Thinkpad", | 909 | .ident = "IBM Thinkpad", |
929 | .matches = { | 910 | .matches = { |
930 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), | 911 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), |
931 | DMI_MATCH(DMI_BOARD_NAME, "2629H1G"), | 912 | DMI_MATCH(DMI_BOARD_NAME, "2629H1G"), |
932 | }, | 913 | }, |
933 | }, | 914 | }, |
934 | 915 | ||
935 | /* | 916 | /* |
936 | * Boxes that need acpi=ht | 917 | * Boxes that need acpi=ht |
937 | */ | 918 | */ |
938 | { | 919 | { |
939 | .callback = force_acpi_ht, | 920 | .callback = force_acpi_ht, |
940 | .ident = "FSC Primergy T850", | 921 | .ident = "FSC Primergy T850", |
941 | .matches = { | 922 | .matches = { |
942 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 923 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
943 | DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"), | 924 | DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"), |
944 | }, | 925 | }, |
945 | }, | 926 | }, |
946 | { | 927 | { |
947 | .callback = force_acpi_ht, | 928 | .callback = force_acpi_ht, |
948 | .ident = "DELL GX240", | 929 | .ident = "DELL GX240", |
949 | .matches = { | 930 | .matches = { |
950 | DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"), | 931 | DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"), |
951 | DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"), | 932 | DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"), |
952 | }, | 933 | }, |
953 | }, | 934 | }, |
954 | { | 935 | { |
955 | .callback = force_acpi_ht, | 936 | .callback = force_acpi_ht, |
956 | .ident = "HP VISUALIZE NT Workstation", | 937 | .ident = "HP VISUALIZE NT Workstation", |
957 | .matches = { | 938 | .matches = { |
958 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), | 939 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), |
959 | DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"), | 940 | DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"), |
960 | }, | 941 | }, |
961 | }, | 942 | }, |
962 | { | 943 | { |
963 | .callback = force_acpi_ht, | 944 | .callback = force_acpi_ht, |
964 | .ident = "Compaq Workstation W8000", | 945 | .ident = "Compaq Workstation W8000", |
965 | .matches = { | 946 | .matches = { |
966 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), | 947 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), |
967 | DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"), | 948 | DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"), |
968 | }, | 949 | }, |
969 | }, | 950 | }, |
970 | { | 951 | { |
971 | .callback = force_acpi_ht, | 952 | .callback = force_acpi_ht, |
972 | .ident = "ASUS P4B266", | 953 | .ident = "ASUS P4B266", |
973 | .matches = { | 954 | .matches = { |
974 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 955 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
975 | DMI_MATCH(DMI_BOARD_NAME, "P4B266"), | 956 | DMI_MATCH(DMI_BOARD_NAME, "P4B266"), |
976 | }, | 957 | }, |
977 | }, | 958 | }, |
978 | { | 959 | { |
979 | .callback = force_acpi_ht, | 960 | .callback = force_acpi_ht, |
980 | .ident = "ASUS P2B-DS", | 961 | .ident = "ASUS P2B-DS", |
981 | .matches = { | 962 | .matches = { |
982 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 963 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
983 | DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"), | 964 | DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"), |
984 | }, | 965 | }, |
985 | }, | 966 | }, |
986 | { | 967 | { |
987 | .callback = force_acpi_ht, | 968 | .callback = force_acpi_ht, |
988 | .ident = "ASUS CUR-DLS", | 969 | .ident = "ASUS CUR-DLS", |
989 | .matches = { | 970 | .matches = { |
990 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 971 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
991 | DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"), | 972 | DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"), |
992 | }, | 973 | }, |
993 | }, | 974 | }, |
994 | { | 975 | { |
995 | .callback = force_acpi_ht, | 976 | .callback = force_acpi_ht, |
996 | .ident = "ABIT i440BX-W83977", | 977 | .ident = "ABIT i440BX-W83977", |
997 | .matches = { | 978 | .matches = { |
998 | DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"), | 979 | DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"), |
999 | DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"), | 980 | DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"), |
1000 | }, | 981 | }, |
1001 | }, | 982 | }, |
1002 | { | 983 | { |
1003 | .callback = force_acpi_ht, | 984 | .callback = force_acpi_ht, |
1004 | .ident = "IBM Bladecenter", | 985 | .ident = "IBM Bladecenter", |
1005 | .matches = { | 986 | .matches = { |
1006 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), | 987 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), |
1007 | DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"), | 988 | DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"), |
1008 | }, | 989 | }, |
1009 | }, | 990 | }, |
1010 | { | 991 | { |
1011 | .callback = force_acpi_ht, | 992 | .callback = force_acpi_ht, |
1012 | .ident = "IBM eServer xSeries 360", | 993 | .ident = "IBM eServer xSeries 360", |
1013 | .matches = { | 994 | .matches = { |
1014 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), | 995 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), |
1015 | DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"), | 996 | DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"), |
1016 | }, | 997 | }, |
1017 | }, | 998 | }, |
1018 | { | 999 | { |
1019 | .callback = force_acpi_ht, | 1000 | .callback = force_acpi_ht, |
1020 | .ident = "IBM eserver xSeries 330", | 1001 | .ident = "IBM eserver xSeries 330", |
1021 | .matches = { | 1002 | .matches = { |
1022 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), | 1003 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), |
1023 | DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"), | 1004 | DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"), |
1024 | }, | 1005 | }, |
1025 | }, | 1006 | }, |
1026 | { | 1007 | { |
1027 | .callback = force_acpi_ht, | 1008 | .callback = force_acpi_ht, |
1028 | .ident = "IBM eserver xSeries 440", | 1009 | .ident = "IBM eserver xSeries 440", |
1029 | .matches = { | 1010 | .matches = { |
1030 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), | 1011 | DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), |
1031 | DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), | 1012 | DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), |
1032 | }, | 1013 | }, |
1033 | }, | 1014 | }, |
1034 | 1015 | ||
1035 | #ifdef CONFIG_ACPI_PCI | ||
1036 | /* | 1016 | /* |
1037 | * Boxes that need ACPI PCI IRQ routing disabled | 1017 | * Boxes that need ACPI PCI IRQ routing disabled |
1038 | */ | 1018 | */ |
1039 | { | 1019 | { |
1040 | .callback = disable_acpi_irq, | 1020 | .callback = disable_acpi_irq, |
1041 | .ident = "ASUS A7V", | 1021 | .ident = "ASUS A7V", |
1042 | .matches = { | 1022 | .matches = { |
1043 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), | 1023 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), |
1044 | DMI_MATCH(DMI_BOARD_NAME, "<A7V>"), | 1024 | DMI_MATCH(DMI_BOARD_NAME, "<A7V>"), |
1045 | /* newer BIOS, Revision 1011, does work */ | 1025 | /* newer BIOS, Revision 1011, does work */ |
1046 | DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), | 1026 | DMI_MATCH(DMI_BIOS_VERSION, |
1047 | }, | 1027 | "ASUS A7V ACPI BIOS Revision 1007"), |
1048 | }, | 1028 | }, |
1029 | }, | ||
1049 | 1030 | ||
1050 | /* | 1031 | /* |
1051 | * Boxes that need ACPI PCI IRQ routing and PCI scan disabled | 1032 | * Boxes that need ACPI PCI IRQ routing and PCI scan disabled |
1052 | */ | 1033 | */ |
1053 | { /* _BBN 0 bug */ | 1034 | { /* _BBN 0 bug */ |
1054 | .callback = disable_acpi_pci, | 1035 | .callback = disable_acpi_pci, |
1055 | .ident = "ASUS PR-DLS", | 1036 | .ident = "ASUS PR-DLS", |
1056 | .matches = { | 1037 | .matches = { |
1057 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 1038 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
1058 | DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"), | 1039 | DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"), |
1059 | DMI_MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"), | 1040 | DMI_MATCH(DMI_BIOS_VERSION, |
1060 | DMI_MATCH(DMI_BIOS_DATE, "03/21/2003") | 1041 | "ASUS PR-DLS ACPI BIOS Revision 1010"), |
1061 | }, | 1042 | DMI_MATCH(DMI_BIOS_DATE, "03/21/2003") |
1062 | }, | 1043 | }, |
1044 | }, | ||
1063 | { | 1045 | { |
1064 | .callback = disable_acpi_pci, | 1046 | .callback = disable_acpi_pci, |
1065 | .ident = "Acer TravelMate 36x Laptop", | 1047 | .ident = "Acer TravelMate 36x Laptop", |
1066 | .matches = { | 1048 | .matches = { |
1067 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 1049 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
1068 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), | 1050 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), |
1069 | }, | 1051 | }, |
1070 | }, | 1052 | }, |
1071 | #endif | 1053 | {} |
1072 | { } | ||
1073 | }; | 1054 | }; |
1074 | 1055 | ||
1075 | #endif /* __i386__ */ | 1056 | #endif /* __i386__ */ |
1076 | 1057 | ||
1077 | /* | 1058 | /* |
1078 | * acpi_boot_table_init() and acpi_boot_init() | 1059 | * acpi_boot_table_init() and acpi_boot_init() |
@@ -1097,8 +1078,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { | |||
1097 | * !0: failure | 1078 | * !0: failure |
1098 | */ | 1079 | */ |
1099 | 1080 | ||
1100 | int __init | 1081 | int __init acpi_boot_table_init(void) |
1101 | acpi_boot_table_init(void) | ||
1102 | { | 1082 | { |
1103 | int error; | 1083 | int error; |
1104 | 1084 | ||
@@ -1111,7 +1091,7 @@ acpi_boot_table_init(void) | |||
1111 | * One exception: acpi=ht continues far enough to enumerate LAPICs | 1091 | * One exception: acpi=ht continues far enough to enumerate LAPICs |
1112 | */ | 1092 | */ |
1113 | if (acpi_disabled && !acpi_ht) | 1093 | if (acpi_disabled && !acpi_ht) |
1114 | return 1; | 1094 | return 1; |
1115 | 1095 | ||
1116 | /* | 1096 | /* |
1117 | * Initialize the ACPI boot-time table parser. | 1097 | * Initialize the ACPI boot-time table parser. |
@@ -1121,7 +1101,6 @@ acpi_boot_table_init(void) | |||
1121 | disable_acpi(); | 1101 | disable_acpi(); |
1122 | return error; | 1102 | return error; |
1123 | } | 1103 | } |
1124 | |||
1125 | #ifdef __i386__ | 1104 | #ifdef __i386__ |
1126 | check_acpi_pci(); | 1105 | check_acpi_pci(); |
1127 | #endif | 1106 | #endif |
@@ -1145,7 +1124,6 @@ acpi_boot_table_init(void) | |||
1145 | return 0; | 1124 | return 0; |
1146 | } | 1125 | } |
1147 | 1126 | ||
1148 | |||
1149 | int __init acpi_boot_init(void) | 1127 | int __init acpi_boot_init(void) |
1150 | { | 1128 | { |
1151 | /* | 1129 | /* |
@@ -1153,7 +1131,7 @@ int __init acpi_boot_init(void) | |||
1153 | * One exception: acpi=ht continues far enough to enumerate LAPICs | 1131 | * One exception: acpi=ht continues far enough to enumerate LAPICs |
1154 | */ | 1132 | */ |
1155 | if (acpi_disabled && !acpi_ht) | 1133 | if (acpi_disabled && !acpi_ht) |
1156 | return 1; | 1134 | return 1; |
1157 | 1135 | ||
1158 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1136 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); |
1159 | 1137 | ||
@@ -1171,4 +1149,3 @@ int __init acpi_boot_init(void) | |||
1171 | 1149 | ||
1172 | return 0; | 1150 | return 0; |
1173 | } | 1151 | } |
1174 | |||
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 | ||
11 | static int __init check_bridge(int vendor, int device) | 11 | static 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 | ||
21 | void __init check_acpi_pci(void) | 21 | void __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 | ||
21 | extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); | 21 | extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); |
22 | 22 | ||
23 | static void init_low_mapping(pgd_t *pgd, int pgd_limit) | 23 | static 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 | */ |
40 | int acpi_save_state_mem (void) | 41 | int 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 | */ |
54 | void acpi_restore_state_mem (void) | 56 | void 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) | |||
67 | void __init acpi_reserve_bootmem(void) | 69 | void __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 | |||
97 | static __init int reset_videomode_after_s3(struct dmi_system_id *d) | 98 | static __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 | ||
103 | static __initdata struct dmi_system_id acpisleep_dmi_table[] = { | 104 | static __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 | ||
114 | static int __init acpisleep_dmi_init(void) | 115 | static 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 | ||
58 | static struct cpufreq_driver acpi_cpufreq_driver; | 59 | static struct cpufreq_driver acpi_cpufreq_driver; |
59 | 60 | ||
61 | static unsigned int acpi_pstate_strict; | ||
62 | |||
60 | static int | 63 | static int |
61 | acpi_processor_write_port( | 64 | acpi_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 | ||
553 | module_param(acpi_pstate_strict, uint, 0644); | ||
554 | MODULE_PARM_DESC(acpi_pstate_strict, "value 0 or non-zero. non-zero -> strict ACPI checks are performed during frequency changes."); | ||
540 | 555 | ||
541 | late_initcall(acpi_cpufreq_init); | 556 | late_initcall(acpi_cpufreq_init); |
542 | module_exit(acpi_cpufreq_exit); | 557 | module_exit(acpi_cpufreq_exit); |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 0e727e6da5c9..889eda2d7b17 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2423,7 +2423,7 @@ device_initcall(ioapic_init_sysfs); | |||
2423 | ACPI-based IOAPIC Configuration | 2423 | ACPI-based IOAPIC Configuration |
2424 | -------------------------------------------------------------------------- */ | 2424 | -------------------------------------------------------------------------- */ |
2425 | 2425 | ||
2426 | #ifdef CONFIG_ACPI_BOOT | 2426 | #ifdef CONFIG_ACPI |
2427 | 2427 | ||
2428 | int __init io_apic_get_unique_id (int ioapic, int apic_id) | 2428 | int __init io_apic_get_unique_id (int ioapic, int apic_id) |
2429 | { | 2429 | { |
@@ -2577,4 +2577,4 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a | |||
2577 | return 0; | 2577 | return 0; |
2578 | } | 2578 | } |
2579 | 2579 | ||
2580 | #endif /*CONFIG_ACPI_BOOT*/ | 2580 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 5d0b9a8fc43d..cafaeffe3818 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -668,8 +668,6 @@ void __init get_smp_config (void) | |||
668 | struct intel_mp_floating *mpf = mpf_found; | 668 | struct intel_mp_floating *mpf = mpf_found; |
669 | 669 | ||
670 | /* | 670 | /* |
671 | * ACPI may be used to obtain the entire SMP configuration or just to | ||
672 | * enumerate/configure processors (CONFIG_ACPI_BOOT). Note that | ||
673 | * ACPI supports both logical (e.g. Hyper-Threading) and physical | 671 | * ACPI supports both logical (e.g. Hyper-Threading) and physical |
674 | * processors, where MPS only supports physical. | 672 | * processors, where MPS only supports physical. |
675 | */ | 673 | */ |
@@ -825,7 +823,7 @@ void __init find_smp_config (void) | |||
825 | ACPI-based MP Configuration | 823 | ACPI-based MP Configuration |
826 | -------------------------------------------------------------------------- */ | 824 | -------------------------------------------------------------------------- */ |
827 | 825 | ||
828 | #ifdef CONFIG_ACPI_BOOT | 826 | #ifdef CONFIG_ACPI |
829 | 827 | ||
830 | void __init mp_register_lapic_address ( | 828 | void __init mp_register_lapic_address ( |
831 | u64 address) | 829 | u64 address) |
@@ -871,7 +869,7 @@ void __init mp_register_lapic ( | |||
871 | MP_processor_info(&processor); | 869 | MP_processor_info(&processor); |
872 | } | 870 | } |
873 | 871 | ||
874 | #if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) | 872 | #ifdef CONFIG_X86_IO_APIC |
875 | 873 | ||
876 | #define MP_ISA_BUS 0 | 874 | #define MP_ISA_BUS 0 |
877 | #define MP_MAX_IOAPIC_PIN 127 | 875 | #define MP_MAX_IOAPIC_PIN 127 |
@@ -1086,11 +1084,9 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1086 | */ | 1084 | */ |
1087 | static int gsi_to_irq[MAX_GSI_NUM]; | 1085 | static int gsi_to_irq[MAX_GSI_NUM]; |
1088 | 1086 | ||
1089 | #ifdef CONFIG_ACPI_BUS | ||
1090 | /* Don't set up the ACPI SCI because it's already set up */ | 1087 | /* Don't set up the ACPI SCI because it's already set up */ |
1091 | if (acpi_fadt.sci_int == gsi) | 1088 | if (acpi_fadt.sci_int == gsi) |
1092 | return gsi; | 1089 | return gsi; |
1093 | #endif | ||
1094 | 1090 | ||
1095 | ioapic = mp_find_ioapic(gsi); | 1091 | ioapic = mp_find_ioapic(gsi); |
1096 | if (ioapic < 0) { | 1092 | if (ioapic < 0) { |
@@ -1133,13 +1129,11 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1133 | if (gsi < MAX_GSI_NUM) { | 1129 | if (gsi < MAX_GSI_NUM) { |
1134 | if (gsi > 15) | 1130 | if (gsi > 15) |
1135 | gsi = pci_irq++; | 1131 | gsi = pci_irq++; |
1136 | #ifdef CONFIG_ACPI_BUS | ||
1137 | /* | 1132 | /* |
1138 | * Don't assign IRQ used by ACPI SCI | 1133 | * Don't assign IRQ used by ACPI SCI |
1139 | */ | 1134 | */ |
1140 | if (gsi == acpi_fadt.sci_int) | 1135 | if (gsi == acpi_fadt.sci_int) |
1141 | gsi = pci_irq++; | 1136 | gsi = pci_irq++; |
1142 | #endif | ||
1143 | gsi_to_irq[irq] = gsi; | 1137 | gsi_to_irq[irq] = gsi; |
1144 | } else { | 1138 | } else { |
1145 | printk(KERN_ERR "GSI %u is too high\n", gsi); | 1139 | printk(KERN_ERR "GSI %u is too high\n", gsi); |
@@ -1153,5 +1147,5 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1153 | return gsi; | 1147 | return gsi; |
1154 | } | 1148 | } |
1155 | 1149 | ||
1156 | #endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/ | 1150 | #endif /* CONFIG_X86_IO_APIC */ |
1157 | #endif /*CONFIG_ACPI_BOOT*/ | 1151 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index e29fd5aeaf8e..a659d274914c 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -87,14 +87,14 @@ EXPORT_SYMBOL(boot_cpu_data); | |||
87 | 87 | ||
88 | unsigned long mmu_cr4_features; | 88 | unsigned 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 |
95 | EXPORT_SYMBOL(acpi_disabled); | 95 | EXPORT_SYMBOL(acpi_disabled); |
96 | 96 | ||
97 | #ifdef CONFIG_ACPI_BOOT | 97 | #ifdef CONFIG_ACPI |
98 | int __initdata acpi_force = 0; | 98 | int __initdata acpi_force = 0; |
99 | extern acpi_interrupt_flags acpi_sci_flags; | 99 | extern acpi_interrupt_flags acpi_sci_flags; |
100 | #endif | 100 | #endif |
@@ -798,7 +798,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) | |||
798 | } | 798 | } |
799 | #endif | 799 | #endif |
800 | 800 | ||
801 | #ifdef CONFIG_ACPI_BOOT | 801 | #ifdef CONFIG_ACPI |
802 | /* "acpi=off" disables both ACPI table parsing and interpreter */ | 802 | /* "acpi=off" disables both ACPI table parsing and interpreter */ |
803 | else if (!memcmp(from, "acpi=off", 8)) { | 803 | else if (!memcmp(from, "acpi=off", 8)) { |
804 | disable_acpi(); | 804 | disable_acpi(); |
@@ -854,7 +854,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) | |||
854 | else if (!memcmp(from, "noapic", 6)) | 854 | else if (!memcmp(from, "noapic", 6)) |
855 | disable_ioapic_setup(); | 855 | disable_ioapic_setup(); |
856 | #endif /* CONFIG_X86_LOCAL_APIC */ | 856 | #endif /* CONFIG_X86_LOCAL_APIC */ |
857 | #endif /* CONFIG_ACPI_BOOT */ | 857 | #endif /* CONFIG_ACPI */ |
858 | 858 | ||
859 | #ifdef CONFIG_X86_LOCAL_APIC | 859 | #ifdef CONFIG_X86_LOCAL_APIC |
860 | /* enable local APIC */ | 860 | /* enable local APIC */ |
@@ -1579,7 +1579,7 @@ void __init setup_arch(char **cmdline_p) | |||
1579 | if (efi_enabled) | 1579 | if (efi_enabled) |
1580 | efi_map_memmap(); | 1580 | efi_map_memmap(); |
1581 | 1581 | ||
1582 | #ifdef CONFIG_ACPI_BOOT | 1582 | #ifdef CONFIG_ACPI |
1583 | /* | 1583 | /* |
1584 | * Parse the ACPI tables for possible boot-time SMP configuration. | 1584 | * Parse the ACPI tables for possible boot-time SMP configuration. |
1585 | */ | 1585 | */ |
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c index 2000bdca2fc2..dc6660511b07 100644 --- a/arch/i386/mach-es7000/es7000plat.c +++ b/arch/i386/mach-es7000/es7000plat.c | |||
@@ -51,7 +51,7 @@ struct mip_reg *host_reg; | |||
51 | int mip_port; | 51 | int mip_port; |
52 | unsigned long mip_addr, host_addr; | 52 | unsigned 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 | void __init | 78 | void __init |
79 | setup_unisys () | 79 | setup_unisys () |
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 | |||
5 | obj-$(CONFIG_PCI_DIRECT) += direct.o | 5 | obj-$(CONFIG_PCI_DIRECT) += direct.o |
6 | 6 | ||
7 | pci-y := fixup.o | 7 | pci-y := fixup.o |
8 | pci-$(CONFIG_ACPI_PCI) += acpi.o | 8 | pci-$(CONFIG_ACPI) += acpi.o |
9 | pci-y += legacy.o irq.o | 9 | pci-y += legacy.o irq.o |
10 | 10 | ||
11 | pci-$(CONFIG_X86_VISWS) := visws.o fixup.o | 11 | pci-$(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 | ||
1076 | void pcibios_penalize_isa_irq(int irq, int active) | 1076 | void 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 |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 17b5dbf8c311..00151a8320d8 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -60,6 +60,7 @@ choice | |||
60 | 60 | ||
61 | config IA64_GENERIC | 61 | config IA64_GENERIC |
62 | bool "generic" | 62 | bool "generic" |
63 | select ACPI | ||
63 | select NUMA | 64 | select NUMA |
64 | select ACPI_NUMA | 65 | select ACPI_NUMA |
65 | select VIRTUAL_MEM_MAP | 66 | select VIRTUAL_MEM_MAP |
@@ -340,6 +341,7 @@ config IA64_PALINFO | |||
340 | 341 | ||
341 | config ACPI_DEALLOCATE_IRQ | 342 | config ACPI_DEALLOCATE_IRQ |
342 | bool | 343 | bool |
344 | depends on ACPI | ||
343 | depends on IOSAPIC && EXPERIMENTAL | 345 | depends on IOSAPIC && EXPERIMENTAL |
344 | default y | 346 | default y |
345 | 347 | ||
@@ -351,38 +353,10 @@ endmenu | |||
351 | 353 | ||
352 | menu "Power management and ACPI" | 354 | menu "Power management and ACPI" |
353 | 355 | ||
354 | config PM | 356 | source "kernel/power/Kconfig" |
355 | bool "Power Management support" | ||
356 | depends on !IA64_HP_SIM | ||
357 | default y | ||
358 | help | ||
359 | "Power Management" means that parts of your computer are shut | ||
360 | off or put into a power conserving "sleep" mode if they are not | ||
361 | being used. There are two competing standards for doing this: APM | ||
362 | and ACPI. If you want to use either one, say Y here and then also | ||
363 | to the requisite support below. | ||
364 | |||
365 | Power Management is most important for battery powered laptop | ||
366 | computers; if you have a laptop, check out the Linux Laptop home | ||
367 | page on the WWW at <http://www.linux-on-laptops.com/> and the | ||
368 | Battery Powered Linux mini-HOWTO, available from | ||
369 | <http://www.tldp.org/docs.html#howto>. | ||
370 | |||
371 | Note that, even if you say N here, Linux on the x86 architecture | ||
372 | will issue the hlt instruction if nothing is to be done, thereby | ||
373 | sending the processor to sleep and saving power. | ||
374 | |||
375 | config ACPI | ||
376 | bool | ||
377 | depends on !IA64_HP_SIM | ||
378 | default y | ||
379 | |||
380 | if !IA64_HP_SIM | ||
381 | 357 | ||
382 | source "drivers/acpi/Kconfig" | 358 | source "drivers/acpi/Kconfig" |
383 | 359 | ||
384 | endif | ||
385 | |||
386 | if PM | 360 | if PM |
387 | 361 | ||
388 | source "arch/ia64/kernel/cpufreq/Kconfig" | 362 | source "arch/ia64/kernel/cpufreq/Kconfig" |
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig index b95fcf86ea00..3b65cbb31b1d 100644 --- a/arch/ia64/configs/bigsur_defconfig +++ b/arch/ia64/configs/bigsur_defconfig | |||
@@ -107,18 +107,12 @@ CONFIG_ACPI=y | |||
107 | # | 107 | # |
108 | # ACPI (Advanced Configuration and Power Interface) Support | 108 | # ACPI (Advanced Configuration and Power Interface) Support |
109 | # | 109 | # |
110 | CONFIG_ACPI_BOOT=y | ||
111 | CONFIG_ACPI_INTERPRETER=y | ||
112 | CONFIG_ACPI_BUTTON=m | 110 | CONFIG_ACPI_BUTTON=m |
113 | CONFIG_ACPI_VIDEO=m | ||
114 | CONFIG_ACPI_FAN=m | 111 | CONFIG_ACPI_FAN=m |
115 | CONFIG_ACPI_PROCESSOR=m | 112 | CONFIG_ACPI_PROCESSOR=m |
116 | CONFIG_ACPI_THERMAL=m | 113 | CONFIG_ACPI_THERMAL=m |
117 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
118 | # CONFIG_ACPI_DEBUG is not set | 114 | # CONFIG_ACPI_DEBUG is not set |
119 | CONFIG_ACPI_BUS=y | ||
120 | CONFIG_ACPI_POWER=y | 115 | CONFIG_ACPI_POWER=y |
121 | CONFIG_ACPI_PCI=y | ||
122 | CONFIG_ACPI_SYSTEM=y | 116 | CONFIG_ACPI_SYSTEM=y |
123 | 117 | ||
124 | # | 118 | # |
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig index dccf35c60b94..1ca6e6e11b42 100644 --- a/arch/ia64/configs/sn2_defconfig +++ b/arch/ia64/configs/sn2_defconfig | |||
@@ -130,19 +130,12 @@ CONFIG_ACPI=y | |||
130 | # | 130 | # |
131 | # ACPI (Advanced Configuration and Power Interface) Support | 131 | # ACPI (Advanced Configuration and Power Interface) Support |
132 | # | 132 | # |
133 | CONFIG_ACPI_BOOT=y | ||
134 | CONFIG_ACPI_INTERPRETER=y | ||
135 | # CONFIG_ACPI_BUTTON is not set | 133 | # CONFIG_ACPI_BUTTON is not set |
136 | CONFIG_ACPI_VIDEO=m | ||
137 | CONFIG_ACPI_HOTKEY=m | ||
138 | # CONFIG_ACPI_FAN is not set | 134 | # CONFIG_ACPI_FAN is not set |
139 | # CONFIG_ACPI_PROCESSOR is not set | 135 | # CONFIG_ACPI_PROCESSOR is not set |
140 | CONFIG_ACPI_NUMA=y | 136 | CONFIG_ACPI_NUMA=y |
141 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
142 | # CONFIG_ACPI_DEBUG is not set | 137 | # CONFIG_ACPI_DEBUG is not set |
143 | CONFIG_ACPI_BUS=y | ||
144 | CONFIG_ACPI_POWER=y | 138 | CONFIG_ACPI_POWER=y |
145 | CONFIG_ACPI_PCI=y | ||
146 | CONFIG_ACPI_SYSTEM=y | 139 | CONFIG_ACPI_SYSTEM=y |
147 | # CONFIG_ACPI_CONTAINER is not set | 140 | # CONFIG_ACPI_CONTAINER is not set |
148 | 141 | ||
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index c853cfcd2d11..3ec94a12eac0 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig | |||
@@ -128,20 +128,13 @@ CONFIG_ACPI=y | |||
128 | # | 128 | # |
129 | # ACPI (Advanced Configuration and Power Interface) Support | 129 | # ACPI (Advanced Configuration and Power Interface) Support |
130 | # | 130 | # |
131 | CONFIG_ACPI_BOOT=y | ||
132 | CONFIG_ACPI_INTERPRETER=y | ||
133 | CONFIG_ACPI_BUTTON=m | 131 | CONFIG_ACPI_BUTTON=m |
134 | # CONFIG_ACPI_VIDEO is not set | ||
135 | # CONFIG_ACPI_HOTKEY is not set | ||
136 | CONFIG_ACPI_FAN=m | 132 | CONFIG_ACPI_FAN=m |
137 | CONFIG_ACPI_PROCESSOR=m | 133 | CONFIG_ACPI_PROCESSOR=m |
138 | # CONFIG_ACPI_HOTPLUG_CPU is not set | 134 | # CONFIG_ACPI_HOTPLUG_CPU is not set |
139 | CONFIG_ACPI_THERMAL=m | 135 | CONFIG_ACPI_THERMAL=m |
140 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
141 | # CONFIG_ACPI_DEBUG is not set | 136 | # CONFIG_ACPI_DEBUG is not set |
142 | CONFIG_ACPI_BUS=y | ||
143 | CONFIG_ACPI_POWER=y | 137 | CONFIG_ACPI_POWER=y |
144 | CONFIG_ACPI_PCI=y | ||
145 | CONFIG_ACPI_SYSTEM=y | 138 | CONFIG_ACPI_SYSTEM=y |
146 | # CONFIG_ACPI_CONTAINER is not set | 139 | # CONFIG_ACPI_CONTAINER is not set |
147 | 140 | ||
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig index 88e8867fa8e8..d4cf73d124bc 100644 --- a/arch/ia64/configs/zx1_defconfig +++ b/arch/ia64/configs/zx1_defconfig | |||
@@ -128,19 +128,12 @@ CONFIG_ACPI=y | |||
128 | # | 128 | # |
129 | # ACPI (Advanced Configuration and Power Interface) Support | 129 | # ACPI (Advanced Configuration and Power Interface) Support |
130 | # | 130 | # |
131 | CONFIG_ACPI_BOOT=y | ||
132 | CONFIG_ACPI_INTERPRETER=y | ||
133 | CONFIG_ACPI_BUTTON=y | 131 | CONFIG_ACPI_BUTTON=y |
134 | CONFIG_ACPI_VIDEO=m | ||
135 | CONFIG_ACPI_HOTKEY=m | ||
136 | CONFIG_ACPI_FAN=y | 132 | CONFIG_ACPI_FAN=y |
137 | CONFIG_ACPI_PROCESSOR=y | 133 | CONFIG_ACPI_PROCESSOR=y |
138 | CONFIG_ACPI_THERMAL=y | 134 | CONFIG_ACPI_THERMAL=y |
139 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
140 | # CONFIG_ACPI_DEBUG is not set | 135 | # CONFIG_ACPI_DEBUG is not set |
141 | CONFIG_ACPI_BUS=y | ||
142 | CONFIG_ACPI_POWER=y | 136 | CONFIG_ACPI_POWER=y |
143 | CONFIG_ACPI_PCI=y | ||
144 | CONFIG_ACPI_SYSTEM=y | 137 | CONFIG_ACPI_SYSTEM=y |
145 | # CONFIG_ACPI_CONTAINER is not set | 138 | # CONFIG_ACPI_CONTAINER is not set |
146 | 139 | ||
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig index 8444add76380..b6ec8d32c346 100644 --- a/arch/ia64/defconfig +++ b/arch/ia64/defconfig | |||
@@ -118,20 +118,14 @@ CONFIG_ACPI=y | |||
118 | # | 118 | # |
119 | # ACPI (Advanced Configuration and Power Interface) Support | 119 | # ACPI (Advanced Configuration and Power Interface) Support |
120 | # | 120 | # |
121 | CONFIG_ACPI_BOOT=y | ||
122 | CONFIG_ACPI_INTERPRETER=y | ||
123 | CONFIG_ACPI_BUTTON=m | 121 | CONFIG_ACPI_BUTTON=m |
124 | CONFIG_ACPI_VIDEO=m | ||
125 | CONFIG_ACPI_FAN=m | 122 | CONFIG_ACPI_FAN=m |
126 | CONFIG_ACPI_PROCESSOR=m | 123 | CONFIG_ACPI_PROCESSOR=m |
127 | CONFIG_ACPI_HOTPLUG_CPU=y | 124 | CONFIG_ACPI_HOTPLUG_CPU=y |
128 | CONFIG_ACPI_THERMAL=m | 125 | CONFIG_ACPI_THERMAL=m |
129 | CONFIG_ACPI_NUMA=y | 126 | CONFIG_ACPI_NUMA=y |
130 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
131 | # CONFIG_ACPI_DEBUG is not set | 127 | # CONFIG_ACPI_DEBUG is not set |
132 | CONFIG_ACPI_BUS=y | ||
133 | CONFIG_ACPI_POWER=y | 128 | CONFIG_ACPI_POWER=y |
134 | CONFIG_ACPI_PCI=y | ||
135 | CONFIG_ACPI_SYSTEM=y | 129 | CONFIG_ACPI_SYSTEM=y |
136 | CONFIG_ACPI_CONTAINER=m | 130 | CONFIG_ACPI_CONTAINER=m |
137 | 131 | ||
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index 2623df5e2633..13a5b3b49bf8 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c | |||
@@ -17,20 +17,20 @@ | |||
17 | #include <asm/acpi-ext.h> | 17 | #include <asm/acpi-ext.h> |
18 | 18 | ||
19 | struct acpi_vendor_descriptor { | 19 | struct acpi_vendor_descriptor { |
20 | u8 guid_id; | 20 | u8 guid_id; |
21 | efi_guid_t guid; | 21 | efi_guid_t guid; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct acpi_vendor_info { | 24 | struct acpi_vendor_info { |
25 | struct acpi_vendor_descriptor *descriptor; | 25 | struct acpi_vendor_descriptor *descriptor; |
26 | u8 *data; | 26 | u8 *data; |
27 | u32 length; | 27 | u32 length; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | acpi_status | 30 | acpi_status |
31 | acpi_vendor_resource_match(struct acpi_resource *resource, void *context) | 31 | acpi_vendor_resource_match(struct acpi_resource *resource, void *context) |
32 | { | 32 | { |
33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *) context; | 33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *)context; |
34 | struct acpi_resource_vendor *vendor; | 34 | struct acpi_resource_vendor *vendor; |
35 | struct acpi_vendor_descriptor *descriptor; | 35 | struct acpi_vendor_descriptor *descriptor; |
36 | u32 length; | 36 | u32 length; |
@@ -38,8 +38,8 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) | |||
38 | if (resource->id != ACPI_RSTYPE_VENDOR) | 38 | if (resource->id != ACPI_RSTYPE_VENDOR) |
39 | return AE_OK; | 39 | return AE_OK; |
40 | 40 | ||
41 | vendor = (struct acpi_resource_vendor *) &resource->data; | 41 | vendor = (struct acpi_resource_vendor *)&resource->data; |
42 | descriptor = (struct acpi_vendor_descriptor *) vendor->reserved; | 42 | descriptor = (struct acpi_vendor_descriptor *)vendor->reserved; |
43 | if (vendor->length <= sizeof(*info->descriptor) || | 43 | if (vendor->length <= sizeof(*info->descriptor) || |
44 | descriptor->guid_id != info->descriptor->guid_id || | 44 | descriptor->guid_id != info->descriptor->guid_id || |
45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) | 45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) |
@@ -50,21 +50,24 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) | |||
50 | if (!info->data) | 50 | if (!info->data) |
51 | return AE_NO_MEMORY; | 51 | return AE_NO_MEMORY; |
52 | 52 | ||
53 | memcpy(info->data, vendor->reserved + sizeof(struct acpi_vendor_descriptor), length); | 53 | memcpy(info->data, |
54 | vendor->reserved + sizeof(struct acpi_vendor_descriptor), | ||
55 | length); | ||
54 | info->length = length; | 56 | info->length = length; |
55 | return AE_CTRL_TERMINATE; | 57 | return AE_CTRL_TERMINATE; |
56 | } | 58 | } |
57 | 59 | ||
58 | acpi_status | 60 | acpi_status |
59 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id, | 61 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, |
60 | u8 **data, u32 *length) | 62 | u8 ** data, u32 * length) |
61 | { | 63 | { |
62 | struct acpi_vendor_info info; | 64 | struct acpi_vendor_info info; |
63 | 65 | ||
64 | info.descriptor = id; | 66 | info.descriptor = id; |
65 | info.data = NULL; | 67 | info.data = NULL; |
66 | 68 | ||
67 | acpi_walk_resources(obj, METHOD_NAME__CRS, acpi_vendor_resource_match, &info); | 69 | acpi_walk_resources(obj, METHOD_NAME__CRS, acpi_vendor_resource_match, |
70 | &info); | ||
68 | if (!info.data) | 71 | if (!info.data) |
69 | return AE_NOT_FOUND; | 72 | return AE_NOT_FOUND; |
70 | 73 | ||
@@ -75,17 +78,19 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id, | |||
75 | 78 | ||
76 | struct acpi_vendor_descriptor hp_ccsr_descriptor = { | 79 | struct acpi_vendor_descriptor hp_ccsr_descriptor = { |
77 | .guid_id = 2, | 80 | .guid_id = 2, |
78 | .guid = EFI_GUID(0x69e9adf9, 0x924f, 0xab5f, 0xf6, 0x4a, 0x24, 0xd2, 0x01, 0x37, 0x0e, 0xad) | 81 | .guid = |
82 | EFI_GUID(0x69e9adf9, 0x924f, 0xab5f, 0xf6, 0x4a, 0x24, 0xd2, 0x01, | ||
83 | 0x37, 0x0e, 0xad) | ||
79 | }; | 84 | }; |
80 | 85 | ||
81 | acpi_status | 86 | acpi_status hp_acpi_csr_space(acpi_handle obj, u64 * csr_base, u64 * csr_length) |
82 | hp_acpi_csr_space(acpi_handle obj, u64 *csr_base, u64 *csr_length) | ||
83 | { | 87 | { |
84 | acpi_status status; | 88 | acpi_status status; |
85 | u8 *data; | 89 | u8 *data; |
86 | u32 length; | 90 | u32 length; |
87 | 91 | ||
88 | status = acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data, &length); | 92 | status = |
93 | acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data, &length); | ||
89 | 94 | ||
90 | if (ACPI_FAILURE(status) || length != 16) | 95 | if (ACPI_FAILURE(status) || length != 16) |
91 | return AE_NOT_FOUND; | 96 | return AE_NOT_FOUND; |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 9609f243e5d0..318787c84ac0 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -74,12 +74,11 @@ unsigned int acpi_cpei_override; | |||
74 | unsigned int acpi_cpei_phys_cpuid; | 74 | unsigned int acpi_cpei_phys_cpuid; |
75 | 75 | ||
76 | #define MAX_SAPICS 256 | 76 | #define MAX_SAPICS 256 |
77 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = | 77 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0 ... MAX_SAPICS - 1] = -1 }; |
78 | { [0 ... MAX_SAPICS - 1] = -1 }; | 78 | |
79 | EXPORT_SYMBOL(ia64_acpiid_to_sapicid); | 79 | EXPORT_SYMBOL(ia64_acpiid_to_sapicid); |
80 | 80 | ||
81 | const char * | 81 | const char *acpi_get_sysname(void) |
82 | acpi_get_sysname (void) | ||
83 | { | 82 | { |
84 | #ifdef CONFIG_IA64_GENERIC | 83 | #ifdef CONFIG_IA64_GENERIC |
85 | unsigned long rsdp_phys; | 84 | unsigned long rsdp_phys; |
@@ -89,27 +88,29 @@ acpi_get_sysname (void) | |||
89 | 88 | ||
90 | rsdp_phys = acpi_find_rsdp(); | 89 | rsdp_phys = acpi_find_rsdp(); |
91 | if (!rsdp_phys) { | 90 | if (!rsdp_phys) { |
92 | printk(KERN_ERR "ACPI 2.0 RSDP not found, default to \"dig\"\n"); | 91 | printk(KERN_ERR |
92 | "ACPI 2.0 RSDP not found, default to \"dig\"\n"); | ||
93 | return "dig"; | 93 | return "dig"; |
94 | } | 94 | } |
95 | 95 | ||
96 | rsdp = (struct acpi20_table_rsdp *) __va(rsdp_phys); | 96 | rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); |
97 | if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { | 97 | if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { |
98 | printk(KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); | 98 | printk(KERN_ERR |
99 | "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); | ||
99 | return "dig"; | 100 | return "dig"; |
100 | } | 101 | } |
101 | 102 | ||
102 | xsdt = (struct acpi_table_xsdt *) __va(rsdp->xsdt_address); | 103 | xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); |
103 | hdr = &xsdt->header; | 104 | hdr = &xsdt->header; |
104 | if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { | 105 | if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { |
105 | printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); | 106 | printk(KERN_ERR |
107 | "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); | ||
106 | return "dig"; | 108 | return "dig"; |
107 | } | 109 | } |
108 | 110 | ||
109 | if (!strcmp(hdr->oem_id, "HP")) { | 111 | if (!strcmp(hdr->oem_id, "HP")) { |
110 | return "hpzx1"; | 112 | return "hpzx1"; |
111 | } | 113 | } else if (!strcmp(hdr->oem_id, "SGI")) { |
112 | else if (!strcmp(hdr->oem_id, "SGI")) { | ||
113 | return "sn2"; | 114 | return "sn2"; |
114 | } | 115 | } |
115 | 116 | ||
@@ -131,7 +132,7 @@ acpi_get_sysname (void) | |||
131 | #endif | 132 | #endif |
132 | } | 133 | } |
133 | 134 | ||
134 | #ifdef CONFIG_ACPI_BOOT | 135 | #ifdef CONFIG_ACPI |
135 | 136 | ||
136 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 | 137 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 |
137 | 138 | ||
@@ -146,8 +147,7 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC; | |||
146 | * Interrupt routing API for device drivers. Provides interrupt vector for | 147 | * Interrupt routing API for device drivers. Provides interrupt vector for |
147 | * a generic platform event. Currently only CPEI is implemented. | 148 | * a generic platform event. Currently only CPEI is implemented. |
148 | */ | 149 | */ |
149 | int | 150 | int acpi_request_vector(u32 int_type) |
150 | acpi_request_vector (u32 int_type) | ||
151 | { | 151 | { |
152 | int vector = -1; | 152 | int vector = -1; |
153 | 153 | ||
@@ -155,12 +155,12 @@ acpi_request_vector (u32 int_type) | |||
155 | /* corrected platform error interrupt */ | 155 | /* corrected platform error interrupt */ |
156 | vector = platform_intr_list[int_type]; | 156 | vector = platform_intr_list[int_type]; |
157 | } else | 157 | } else |
158 | printk(KERN_ERR "acpi_request_vector(): invalid interrupt type\n"); | 158 | printk(KERN_ERR |
159 | "acpi_request_vector(): invalid interrupt type\n"); | ||
159 | return vector; | 160 | return vector; |
160 | } | 161 | } |
161 | 162 | ||
162 | char * | 163 | char *__acpi_map_table(unsigned long phys_addr, unsigned long size) |
163 | __acpi_map_table (unsigned long phys_addr, unsigned long size) | ||
164 | { | 164 | { |
165 | return __va(phys_addr); | 165 | return __va(phys_addr); |
166 | } | 166 | } |
@@ -169,19 +169,18 @@ __acpi_map_table (unsigned long phys_addr, unsigned long size) | |||
169 | Boot-time Table Parsing | 169 | Boot-time Table Parsing |
170 | -------------------------------------------------------------------------- */ | 170 | -------------------------------------------------------------------------- */ |
171 | 171 | ||
172 | static int total_cpus __initdata; | 172 | static int total_cpus __initdata; |
173 | static int available_cpus __initdata; | 173 | static int available_cpus __initdata; |
174 | struct acpi_table_madt * acpi_madt __initdata; | 174 | struct acpi_table_madt *acpi_madt __initdata; |
175 | static u8 has_8259; | 175 | static u8 has_8259; |
176 | |||
177 | 176 | ||
178 | static int __init | 177 | static int __init |
179 | acpi_parse_lapic_addr_ovr ( | 178 | acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, |
180 | acpi_table_entry_header *header, const unsigned long end) | 179 | const unsigned long end) |
181 | { | 180 | { |
182 | struct acpi_table_lapic_addr_ovr *lapic; | 181 | struct acpi_table_lapic_addr_ovr *lapic; |
183 | 182 | ||
184 | lapic = (struct acpi_table_lapic_addr_ovr *) header; | 183 | lapic = (struct acpi_table_lapic_addr_ovr *)header; |
185 | 184 | ||
186 | if (BAD_MADT_ENTRY(lapic, end)) | 185 | if (BAD_MADT_ENTRY(lapic, end)) |
187 | return -EINVAL; | 186 | return -EINVAL; |
@@ -193,22 +192,23 @@ acpi_parse_lapic_addr_ovr ( | |||
193 | return 0; | 192 | return 0; |
194 | } | 193 | } |
195 | 194 | ||
196 | |||
197 | static int __init | 195 | static int __init |
198 | acpi_parse_lsapic (acpi_table_entry_header *header, const unsigned long end) | 196 | acpi_parse_lsapic(acpi_table_entry_header * header, const unsigned long end) |
199 | { | 197 | { |
200 | struct acpi_table_lsapic *lsapic; | 198 | struct acpi_table_lsapic *lsapic; |
201 | 199 | ||
202 | lsapic = (struct acpi_table_lsapic *) header; | 200 | lsapic = (struct acpi_table_lsapic *)header; |
203 | 201 | ||
204 | if (BAD_MADT_ENTRY(lsapic, end)) | 202 | if (BAD_MADT_ENTRY(lsapic, end)) |
205 | return -EINVAL; | 203 | return -EINVAL; |
206 | 204 | ||
207 | if (lsapic->flags.enabled) { | 205 | if (lsapic->flags.enabled) { |
208 | #ifdef CONFIG_SMP | 206 | #ifdef CONFIG_SMP |
209 | smp_boot_data.cpu_phys_id[available_cpus] = (lsapic->id << 8) | lsapic->eid; | 207 | smp_boot_data.cpu_phys_id[available_cpus] = |
208 | (lsapic->id << 8) | lsapic->eid; | ||
210 | #endif | 209 | #endif |
211 | ia64_acpiid_to_sapicid[lsapic->acpi_id] = (lsapic->id << 8) | lsapic->eid; | 210 | ia64_acpiid_to_sapicid[lsapic->acpi_id] = |
211 | (lsapic->id << 8) | lsapic->eid; | ||
212 | ++available_cpus; | 212 | ++available_cpus; |
213 | } | 213 | } |
214 | 214 | ||
@@ -216,13 +216,12 @@ acpi_parse_lsapic (acpi_table_entry_header *header, const unsigned long end) | |||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | |||
220 | static int __init | 219 | static int __init |
221 | acpi_parse_lapic_nmi (acpi_table_entry_header *header, const unsigned long end) | 220 | acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) |
222 | { | 221 | { |
223 | struct acpi_table_lapic_nmi *lacpi_nmi; | 222 | struct acpi_table_lapic_nmi *lacpi_nmi; |
224 | 223 | ||
225 | lacpi_nmi = (struct acpi_table_lapic_nmi*) header; | 224 | lacpi_nmi = (struct acpi_table_lapic_nmi *)header; |
226 | 225 | ||
227 | if (BAD_MADT_ENTRY(lacpi_nmi, end)) | 226 | if (BAD_MADT_ENTRY(lacpi_nmi, end)) |
228 | return -EINVAL; | 227 | return -EINVAL; |
@@ -231,13 +230,12 @@ acpi_parse_lapic_nmi (acpi_table_entry_header *header, const unsigned long end) | |||
231 | return 0; | 230 | return 0; |
232 | } | 231 | } |
233 | 232 | ||
234 | |||
235 | static int __init | 233 | static int __init |
236 | acpi_parse_iosapic (acpi_table_entry_header *header, const unsigned long end) | 234 | acpi_parse_iosapic(acpi_table_entry_header * header, const unsigned long end) |
237 | { | 235 | { |
238 | struct acpi_table_iosapic *iosapic; | 236 | struct acpi_table_iosapic *iosapic; |
239 | 237 | ||
240 | iosapic = (struct acpi_table_iosapic *) header; | 238 | iosapic = (struct acpi_table_iosapic *)header; |
241 | 239 | ||
242 | if (BAD_MADT_ENTRY(iosapic, end)) | 240 | if (BAD_MADT_ENTRY(iosapic, end)) |
243 | return -EINVAL; | 241 | return -EINVAL; |
@@ -245,15 +243,14 @@ acpi_parse_iosapic (acpi_table_entry_header *header, const unsigned long end) | |||
245 | return iosapic_init(iosapic->address, iosapic->global_irq_base); | 243 | return iosapic_init(iosapic->address, iosapic->global_irq_base); |
246 | } | 244 | } |
247 | 245 | ||
248 | |||
249 | static int __init | 246 | static int __init |
250 | acpi_parse_plat_int_src ( | 247 | acpi_parse_plat_int_src(acpi_table_entry_header * header, |
251 | acpi_table_entry_header *header, const unsigned long end) | 248 | const unsigned long end) |
252 | { | 249 | { |
253 | struct acpi_table_plat_int_src *plintsrc; | 250 | struct acpi_table_plat_int_src *plintsrc; |
254 | int vector; | 251 | int vector; |
255 | 252 | ||
256 | plintsrc = (struct acpi_table_plat_int_src *) header; | 253 | plintsrc = (struct acpi_table_plat_int_src *)header; |
257 | 254 | ||
258 | if (BAD_MADT_ENTRY(plintsrc, end)) | 255 | if (BAD_MADT_ENTRY(plintsrc, end)) |
259 | return -EINVAL; | 256 | return -EINVAL; |
@@ -267,8 +264,12 @@ acpi_parse_plat_int_src ( | |||
267 | plintsrc->iosapic_vector, | 264 | plintsrc->iosapic_vector, |
268 | plintsrc->eid, | 265 | plintsrc->eid, |
269 | plintsrc->id, | 266 | plintsrc->id, |
270 | (plintsrc->flags.polarity == 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, | 267 | (plintsrc->flags.polarity == |
271 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 268 | 1) ? IOSAPIC_POL_HIGH : |
269 | IOSAPIC_POL_LOW, | ||
270 | (plintsrc->flags.trigger == | ||
271 | 1) ? IOSAPIC_EDGE : | ||
272 | IOSAPIC_LEVEL); | ||
272 | 273 | ||
273 | platform_intr_list[plintsrc->type] = vector; | 274 | platform_intr_list[plintsrc->type] = vector; |
274 | if (acpi_madt_rev > 1) { | 275 | if (acpi_madt_rev > 1) { |
@@ -283,7 +284,6 @@ acpi_parse_plat_int_src ( | |||
283 | return 0; | 284 | return 0; |
284 | } | 285 | } |
285 | 286 | ||
286 | |||
287 | unsigned int can_cpei_retarget(void) | 287 | unsigned int can_cpei_retarget(void) |
288 | { | 288 | { |
289 | extern int cpe_vector; | 289 | extern int cpe_vector; |
@@ -322,29 +322,30 @@ unsigned int get_cpei_target_cpu(void) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | static int __init | 324 | static int __init |
325 | acpi_parse_int_src_ovr ( | 325 | acpi_parse_int_src_ovr(acpi_table_entry_header * header, |
326 | acpi_table_entry_header *header, const unsigned long end) | 326 | const unsigned long end) |
327 | { | 327 | { |
328 | struct acpi_table_int_src_ovr *p; | 328 | struct acpi_table_int_src_ovr *p; |
329 | 329 | ||
330 | p = (struct acpi_table_int_src_ovr *) header; | 330 | p = (struct acpi_table_int_src_ovr *)header; |
331 | 331 | ||
332 | if (BAD_MADT_ENTRY(p, end)) | 332 | if (BAD_MADT_ENTRY(p, end)) |
333 | return -EINVAL; | 333 | return -EINVAL; |
334 | 334 | ||
335 | iosapic_override_isa_irq(p->bus_irq, p->global_irq, | 335 | iosapic_override_isa_irq(p->bus_irq, p->global_irq, |
336 | (p->flags.polarity == 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, | 336 | (p->flags.polarity == |
337 | (p->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 337 | 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, |
338 | (p->flags.trigger == | ||
339 | 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | ||
338 | return 0; | 340 | return 0; |
339 | } | 341 | } |
340 | 342 | ||
341 | |||
342 | static int __init | 343 | static int __init |
343 | acpi_parse_nmi_src (acpi_table_entry_header *header, const unsigned long end) | 344 | acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) |
344 | { | 345 | { |
345 | struct acpi_table_nmi_src *nmi_src; | 346 | struct acpi_table_nmi_src *nmi_src; |
346 | 347 | ||
347 | nmi_src = (struct acpi_table_nmi_src*) header; | 348 | nmi_src = (struct acpi_table_nmi_src *)header; |
348 | 349 | ||
349 | if (BAD_MADT_ENTRY(nmi_src, end)) | 350 | if (BAD_MADT_ENTRY(nmi_src, end)) |
350 | return -EINVAL; | 351 | return -EINVAL; |
@@ -353,11 +354,9 @@ acpi_parse_nmi_src (acpi_table_entry_header *header, const unsigned long end) | |||
353 | return 0; | 354 | return 0; |
354 | } | 355 | } |
355 | 356 | ||
356 | static void __init | 357 | static void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
357 | acpi_madt_oem_check (char *oem_id, char *oem_table_id) | ||
358 | { | 358 | { |
359 | if (!strncmp(oem_id, "IBM", 3) && | 359 | if (!strncmp(oem_id, "IBM", 3) && (!strncmp(oem_table_id, "SERMOW", 6))) { |
360 | (!strncmp(oem_table_id, "SERMOW", 6))) { | ||
361 | 360 | ||
362 | /* | 361 | /* |
363 | * Unfortunately ITC_DRIFT is not yet part of the | 362 | * Unfortunately ITC_DRIFT is not yet part of the |
@@ -370,19 +369,18 @@ acpi_madt_oem_check (char *oem_id, char *oem_table_id) | |||
370 | } | 369 | } |
371 | } | 370 | } |
372 | 371 | ||
373 | static int __init | 372 | static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) |
374 | acpi_parse_madt (unsigned long phys_addr, unsigned long size) | ||
375 | { | 373 | { |
376 | if (!phys_addr || !size) | 374 | if (!phys_addr || !size) |
377 | return -EINVAL; | 375 | return -EINVAL; |
378 | 376 | ||
379 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); | 377 | acpi_madt = (struct acpi_table_madt *)__va(phys_addr); |
380 | 378 | ||
381 | acpi_madt_rev = acpi_madt->header.revision; | 379 | acpi_madt_rev = acpi_madt->header.revision; |
382 | 380 | ||
383 | /* remember the value for reference after free_initmem() */ | 381 | /* remember the value for reference after free_initmem() */ |
384 | #ifdef CONFIG_ITANIUM | 382 | #ifdef CONFIG_ITANIUM |
385 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ | 383 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ |
386 | #else | 384 | #else |
387 | has_8259 = acpi_madt->flags.pcat_compat; | 385 | has_8259 = acpi_madt->flags.pcat_compat; |
388 | #endif | 386 | #endif |
@@ -396,19 +394,18 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size) | |||
396 | printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr); | 394 | printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr); |
397 | 395 | ||
398 | acpi_madt_oem_check(acpi_madt->header.oem_id, | 396 | acpi_madt_oem_check(acpi_madt->header.oem_id, |
399 | acpi_madt->header.oem_table_id); | 397 | acpi_madt->header.oem_table_id); |
400 | 398 | ||
401 | return 0; | 399 | return 0; |
402 | } | 400 | } |
403 | 401 | ||
404 | |||
405 | #ifdef CONFIG_ACPI_NUMA | 402 | #ifdef CONFIG_ACPI_NUMA |
406 | 403 | ||
407 | #undef SLIT_DEBUG | 404 | #undef SLIT_DEBUG |
408 | 405 | ||
409 | #define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) | 406 | #define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) |
410 | 407 | ||
411 | static int __initdata srat_num_cpus; /* number of cpus */ | 408 | static int __initdata srat_num_cpus; /* number of cpus */ |
412 | static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; | 409 | static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; |
413 | #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) | 410 | #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) |
414 | #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) | 411 | #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) |
@@ -421,15 +418,15 @@ static struct acpi_table_slit __initdata *slit_table; | |||
421 | * ACPI 2.0 SLIT (System Locality Information Table) | 418 | * ACPI 2.0 SLIT (System Locality Information Table) |
422 | * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf | 419 | * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf |
423 | */ | 420 | */ |
424 | void __init | 421 | void __init acpi_numa_slit_init(struct acpi_table_slit *slit) |
425 | acpi_numa_slit_init (struct acpi_table_slit *slit) | ||
426 | { | 422 | { |
427 | u32 len; | 423 | u32 len; |
428 | 424 | ||
429 | len = sizeof(struct acpi_table_header) + 8 | 425 | len = sizeof(struct acpi_table_header) + 8 |
430 | + slit->localities * slit->localities; | 426 | + slit->localities * slit->localities; |
431 | if (slit->header.length != len) { | 427 | if (slit->header.length != len) { |
432 | printk(KERN_ERR "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", | 428 | printk(KERN_ERR |
429 | "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", | ||
433 | len, slit->header.length); | 430 | len, slit->header.length); |
434 | memset(numa_slit, 10, sizeof(numa_slit)); | 431 | memset(numa_slit, 10, sizeof(numa_slit)); |
435 | return; | 432 | return; |
@@ -438,19 +435,20 @@ acpi_numa_slit_init (struct acpi_table_slit *slit) | |||
438 | } | 435 | } |
439 | 436 | ||
440 | void __init | 437 | void __init |
441 | acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa) | 438 | acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) |
442 | { | 439 | { |
443 | /* record this node in proximity bitmap */ | 440 | /* record this node in proximity bitmap */ |
444 | pxm_bit_set(pa->proximity_domain); | 441 | pxm_bit_set(pa->proximity_domain); |
445 | 442 | ||
446 | node_cpuid[srat_num_cpus].phys_id = (pa->apic_id << 8) | (pa->lsapic_eid); | 443 | node_cpuid[srat_num_cpus].phys_id = |
444 | (pa->apic_id << 8) | (pa->lsapic_eid); | ||
447 | /* nid should be overridden as logical node id later */ | 445 | /* nid should be overridden as logical node id later */ |
448 | node_cpuid[srat_num_cpus].nid = pa->proximity_domain; | 446 | node_cpuid[srat_num_cpus].nid = pa->proximity_domain; |
449 | srat_num_cpus++; | 447 | srat_num_cpus++; |
450 | } | 448 | } |
451 | 449 | ||
452 | void __init | 450 | void __init |
453 | acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma) | 451 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) |
454 | { | 452 | { |
455 | unsigned long paddr, size; | 453 | unsigned long paddr, size; |
456 | u8 pxm; | 454 | u8 pxm; |
@@ -487,8 +485,7 @@ acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma) | |||
487 | num_node_memblks++; | 485 | num_node_memblks++; |
488 | } | 486 | } |
489 | 487 | ||
490 | void __init | 488 | void __init acpi_numa_arch_fixup(void) |
491 | acpi_numa_arch_fixup (void) | ||
492 | { | 489 | { |
493 | int i, j, node_from, node_to; | 490 | int i, j, node_from, node_to; |
494 | 491 | ||
@@ -534,21 +531,24 @@ acpi_numa_arch_fixup (void) | |||
534 | for (i = 0; i < srat_num_cpus; i++) | 531 | for (i = 0; i < srat_num_cpus; i++) |
535 | node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid]; | 532 | node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid]; |
536 | 533 | ||
537 | printk(KERN_INFO "Number of logical nodes in system = %d\n", num_online_nodes()); | 534 | printk(KERN_INFO "Number of logical nodes in system = %d\n", |
538 | printk(KERN_INFO "Number of memory chunks in system = %d\n", num_node_memblks); | 535 | num_online_nodes()); |
536 | printk(KERN_INFO "Number of memory chunks in system = %d\n", | ||
537 | num_node_memblks); | ||
539 | 538 | ||
540 | if (!slit_table) return; | 539 | if (!slit_table) |
540 | return; | ||
541 | memset(numa_slit, -1, sizeof(numa_slit)); | 541 | memset(numa_slit, -1, sizeof(numa_slit)); |
542 | for (i=0; i<slit_table->localities; i++) { | 542 | for (i = 0; i < slit_table->localities; i++) { |
543 | if (!pxm_bit_test(i)) | 543 | if (!pxm_bit_test(i)) |
544 | continue; | 544 | continue; |
545 | node_from = pxm_to_nid_map[i]; | 545 | node_from = pxm_to_nid_map[i]; |
546 | for (j=0; j<slit_table->localities; j++) { | 546 | for (j = 0; j < slit_table->localities; j++) { |
547 | if (!pxm_bit_test(j)) | 547 | if (!pxm_bit_test(j)) |
548 | continue; | 548 | continue; |
549 | node_to = pxm_to_nid_map[j]; | 549 | node_to = pxm_to_nid_map[j]; |
550 | node_distance(node_from, node_to) = | 550 | node_distance(node_from, node_to) = |
551 | slit_table->entry[i*slit_table->localities + j]; | 551 | slit_table->entry[i * slit_table->localities + j]; |
552 | } | 552 | } |
553 | } | 553 | } |
554 | 554 | ||
@@ -556,36 +556,43 @@ acpi_numa_arch_fixup (void) | |||
556 | printk("ACPI 2.0 SLIT locality table:\n"); | 556 | printk("ACPI 2.0 SLIT locality table:\n"); |
557 | for_each_online_node(i) { | 557 | for_each_online_node(i) { |
558 | for_each_online_node(j) | 558 | for_each_online_node(j) |
559 | printk("%03d ", node_distance(i,j)); | 559 | printk("%03d ", node_distance(i, j)); |
560 | printk("\n"); | 560 | printk("\n"); |
561 | } | 561 | } |
562 | #endif | 562 | #endif |
563 | } | 563 | } |
564 | #endif /* CONFIG_ACPI_NUMA */ | 564 | #endif /* CONFIG_ACPI_NUMA */ |
565 | 565 | ||
566 | unsigned int | 566 | /* |
567 | acpi_register_gsi (u32 gsi, int edge_level, int active_high_low) | 567 | * success: return IRQ number (>=0) |
568 | * failure: return < 0 | ||
569 | */ | ||
570 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | ||
568 | { | 571 | { |
569 | if (has_8259 && gsi < 16) | 572 | if (has_8259 && gsi < 16) |
570 | return isa_irq_to_vector(gsi); | 573 | return isa_irq_to_vector(gsi); |
571 | 574 | ||
572 | return iosapic_register_intr(gsi, | 575 | return iosapic_register_intr(gsi, |
573 | (active_high_low == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, | 576 | (active_high_low == |
574 | (edge_level == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : |
578 | IOSAPIC_POL_LOW, | ||
579 | (edge_level == | ||
580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : | ||
581 | IOSAPIC_LEVEL); | ||
575 | } | 582 | } |
583 | |||
576 | EXPORT_SYMBOL(acpi_register_gsi); | 584 | EXPORT_SYMBOL(acpi_register_gsi); |
577 | 585 | ||
578 | #ifdef CONFIG_ACPI_DEALLOCATE_IRQ | 586 | #ifdef CONFIG_ACPI_DEALLOCATE_IRQ |
579 | void | 587 | void acpi_unregister_gsi(u32 gsi) |
580 | acpi_unregister_gsi (u32 gsi) | ||
581 | { | 588 | { |
582 | iosapic_unregister_intr(gsi); | 589 | iosapic_unregister_intr(gsi); |
583 | } | 590 | } |
591 | |||
584 | EXPORT_SYMBOL(acpi_unregister_gsi); | 592 | EXPORT_SYMBOL(acpi_unregister_gsi); |
585 | #endif /* CONFIG_ACPI_DEALLOCATE_IRQ */ | 593 | #endif /* CONFIG_ACPI_DEALLOCATE_IRQ */ |
586 | 594 | ||
587 | static int __init | 595 | static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size) |
588 | acpi_parse_fadt (unsigned long phys_addr, unsigned long size) | ||
589 | { | 596 | { |
590 | struct acpi_table_header *fadt_header; | 597 | struct acpi_table_header *fadt_header; |
591 | struct fadt_descriptor_rev2 *fadt; | 598 | struct fadt_descriptor_rev2 *fadt; |
@@ -593,11 +600,11 @@ acpi_parse_fadt (unsigned long phys_addr, unsigned long size) | |||
593 | if (!phys_addr || !size) | 600 | if (!phys_addr || !size) |
594 | return -EINVAL; | 601 | return -EINVAL; |
595 | 602 | ||
596 | fadt_header = (struct acpi_table_header *) __va(phys_addr); | 603 | fadt_header = (struct acpi_table_header *)__va(phys_addr); |
597 | if (fadt_header->revision != 3) | 604 | if (fadt_header->revision != 3) |
598 | return -ENODEV; /* Only deal with ACPI 2.0 FADT */ | 605 | return -ENODEV; /* Only deal with ACPI 2.0 FADT */ |
599 | 606 | ||
600 | fadt = (struct fadt_descriptor_rev2 *) fadt_header; | 607 | fadt = (struct fadt_descriptor_rev2 *)fadt_header; |
601 | 608 | ||
602 | if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER)) | 609 | if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER)) |
603 | acpi_kbd_controller_present = 0; | 610 | acpi_kbd_controller_present = 0; |
@@ -609,22 +616,19 @@ acpi_parse_fadt (unsigned long phys_addr, unsigned long size) | |||
609 | return 0; | 616 | return 0; |
610 | } | 617 | } |
611 | 618 | ||
612 | 619 | unsigned long __init acpi_find_rsdp(void) | |
613 | unsigned long __init | ||
614 | acpi_find_rsdp (void) | ||
615 | { | 620 | { |
616 | unsigned long rsdp_phys = 0; | 621 | unsigned long rsdp_phys = 0; |
617 | 622 | ||
618 | if (efi.acpi20) | 623 | if (efi.acpi20) |
619 | rsdp_phys = __pa(efi.acpi20); | 624 | rsdp_phys = __pa(efi.acpi20); |
620 | else if (efi.acpi) | 625 | else if (efi.acpi) |
621 | printk(KERN_WARNING PREFIX "v1.0/r0.71 tables no longer supported\n"); | 626 | printk(KERN_WARNING PREFIX |
627 | "v1.0/r0.71 tables no longer supported\n"); | ||
622 | return rsdp_phys; | 628 | return rsdp_phys; |
623 | } | 629 | } |
624 | 630 | ||
625 | 631 | int __init acpi_boot_init(void) | |
626 | int __init | ||
627 | acpi_boot_init (void) | ||
628 | { | 632 | { |
629 | 633 | ||
630 | /* | 634 | /* |
@@ -642,31 +646,43 @@ acpi_boot_init (void) | |||
642 | 646 | ||
643 | /* Local APIC */ | 647 | /* Local APIC */ |
644 | 648 | ||
645 | if (acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr, 0) < 0) | 649 | if (acpi_table_parse_madt |
646 | printk(KERN_ERR PREFIX "Error parsing LAPIC address override entry\n"); | 650 | (ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr, 0) < 0) |
651 | printk(KERN_ERR PREFIX | ||
652 | "Error parsing LAPIC address override entry\n"); | ||
647 | 653 | ||
648 | if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_parse_lsapic, NR_CPUS) < 1) | 654 | if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_parse_lsapic, NR_CPUS) |
649 | printk(KERN_ERR PREFIX "Error parsing MADT - no LAPIC entries\n"); | 655 | < 1) |
656 | printk(KERN_ERR PREFIX | ||
657 | "Error parsing MADT - no LAPIC entries\n"); | ||
650 | 658 | ||
651 | if (acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0) < 0) | 659 | if (acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0) |
660 | < 0) | ||
652 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 661 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
653 | 662 | ||
654 | /* I/O APIC */ | 663 | /* I/O APIC */ |
655 | 664 | ||
656 | if (acpi_table_parse_madt(ACPI_MADT_IOSAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) | 665 | if (acpi_table_parse_madt |
657 | printk(KERN_ERR PREFIX "Error parsing MADT - no IOSAPIC entries\n"); | 666 | (ACPI_MADT_IOSAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) |
667 | printk(KERN_ERR PREFIX | ||
668 | "Error parsing MADT - no IOSAPIC entries\n"); | ||
658 | 669 | ||
659 | /* System-Level Interrupt Routing */ | 670 | /* System-Level Interrupt Routing */ |
660 | 671 | ||
661 | if (acpi_table_parse_madt(ACPI_MADT_PLAT_INT_SRC, acpi_parse_plat_int_src, ACPI_MAX_PLATFORM_INTERRUPTS) < 0) | 672 | if (acpi_table_parse_madt |
662 | printk(KERN_ERR PREFIX "Error parsing platform interrupt source entry\n"); | 673 | (ACPI_MADT_PLAT_INT_SRC, acpi_parse_plat_int_src, |
674 | ACPI_MAX_PLATFORM_INTERRUPTS) < 0) | ||
675 | printk(KERN_ERR PREFIX | ||
676 | "Error parsing platform interrupt source entry\n"); | ||
663 | 677 | ||
664 | if (acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, 0) < 0) | 678 | if (acpi_table_parse_madt |
665 | printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n"); | 679 | (ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, 0) < 0) |
680 | printk(KERN_ERR PREFIX | ||
681 | "Error parsing interrupt source overrides entry\n"); | ||
666 | 682 | ||
667 | if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 0) < 0) | 683 | if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 0) < 0) |
668 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); | 684 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); |
669 | skip_madt: | 685 | skip_madt: |
670 | 686 | ||
671 | /* | 687 | /* |
672 | * FADT says whether a legacy keyboard controller is present. | 688 | * FADT says whether a legacy keyboard controller is present. |
@@ -681,8 +697,9 @@ acpi_boot_init (void) | |||
681 | if (available_cpus == 0) { | 697 | if (available_cpus == 0) { |
682 | printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); | 698 | printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); |
683 | printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); | 699 | printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); |
684 | smp_boot_data.cpu_phys_id[available_cpus] = hard_smp_processor_id(); | 700 | smp_boot_data.cpu_phys_id[available_cpus] = |
685 | available_cpus = 1; /* We've got at least one of these, no? */ | 701 | hard_smp_processor_id(); |
702 | available_cpus = 1; /* We've got at least one of these, no? */ | ||
686 | } | 703 | } |
687 | smp_boot_data.cpu_count = available_cpus; | 704 | smp_boot_data.cpu_count = available_cpus; |
688 | 705 | ||
@@ -691,8 +708,10 @@ acpi_boot_init (void) | |||
691 | if (srat_num_cpus == 0) { | 708 | if (srat_num_cpus == 0) { |
692 | int cpu, i = 1; | 709 | int cpu, i = 1; |
693 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) | 710 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) |
694 | if (smp_boot_data.cpu_phys_id[cpu] != hard_smp_processor_id()) | 711 | if (smp_boot_data.cpu_phys_id[cpu] != |
695 | node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu]; | 712 | hard_smp_processor_id()) |
713 | node_cpuid[i++].phys_id = | ||
714 | smp_boot_data.cpu_phys_id[cpu]; | ||
696 | } | 715 | } |
697 | # endif | 716 | # endif |
698 | #endif | 717 | #endif |
@@ -700,12 +719,12 @@ acpi_boot_init (void) | |||
700 | build_cpu_to_node_map(); | 719 | build_cpu_to_node_map(); |
701 | #endif | 720 | #endif |
702 | /* Make boot-up look pretty */ | 721 | /* Make boot-up look pretty */ |
703 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus); | 722 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, |
723 | total_cpus); | ||
704 | return 0; | 724 | return 0; |
705 | } | 725 | } |
706 | 726 | ||
707 | int | 727 | int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) |
708 | acpi_gsi_to_irq (u32 gsi, unsigned int *irq) | ||
709 | { | 728 | { |
710 | int vector; | 729 | int vector; |
711 | 730 | ||
@@ -726,11 +745,10 @@ acpi_gsi_to_irq (u32 gsi, unsigned int *irq) | |||
726 | */ | 745 | */ |
727 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 746 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
728 | static | 747 | static |
729 | int | 748 | int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) |
730 | acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) | ||
731 | { | 749 | { |
732 | #ifdef CONFIG_ACPI_NUMA | 750 | #ifdef CONFIG_ACPI_NUMA |
733 | int pxm_id; | 751 | int pxm_id; |
734 | 752 | ||
735 | pxm_id = acpi_get_pxm(handle); | 753 | pxm_id = acpi_get_pxm(handle); |
736 | 754 | ||
@@ -738,31 +756,28 @@ acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) | |||
738 | * Assuming that the container driver would have set the proximity | 756 | * Assuming that the container driver would have set the proximity |
739 | * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag | 757 | * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag |
740 | */ | 758 | */ |
741 | node_cpuid[cpu].nid = (pxm_id < 0) ? 0: | 759 | node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_nid_map[pxm_id]; |
742 | pxm_to_nid_map[pxm_id]; | ||
743 | 760 | ||
744 | node_cpuid[cpu].phys_id = physid; | 761 | node_cpuid[cpu].phys_id = physid; |
745 | #endif | 762 | #endif |
746 | return(0); | 763 | return (0); |
747 | } | 764 | } |
748 | 765 | ||
749 | 766 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |
750 | int | ||
751 | acpi_map_lsapic(acpi_handle handle, int *pcpu) | ||
752 | { | 767 | { |
753 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; | 768 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
754 | union acpi_object *obj; | 769 | union acpi_object *obj; |
755 | struct acpi_table_lsapic *lsapic; | 770 | struct acpi_table_lsapic *lsapic; |
756 | cpumask_t tmp_map; | 771 | cpumask_t tmp_map; |
757 | long physid; | 772 | long physid; |
758 | int cpu; | 773 | int cpu; |
759 | 774 | ||
760 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) | 775 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) |
761 | return -EINVAL; | 776 | return -EINVAL; |
762 | 777 | ||
763 | if (!buffer.length || !buffer.pointer) | 778 | if (!buffer.length || !buffer.pointer) |
764 | return -EINVAL; | 779 | return -EINVAL; |
765 | 780 | ||
766 | obj = buffer.pointer; | 781 | obj = buffer.pointer; |
767 | if (obj->type != ACPI_TYPE_BUFFER || | 782 | if (obj->type != ACPI_TYPE_BUFFER || |
768 | obj->buffer.length < sizeof(*lsapic)) { | 783 | obj->buffer.length < sizeof(*lsapic)) { |
@@ -778,7 +793,7 @@ acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
778 | return -EINVAL; | 793 | return -EINVAL; |
779 | } | 794 | } |
780 | 795 | ||
781 | physid = ((lsapic->id <<8) | (lsapic->eid)); | 796 | physid = ((lsapic->id << 8) | (lsapic->eid)); |
782 | 797 | ||
783 | acpi_os_free(buffer.pointer); | 798 | acpi_os_free(buffer.pointer); |
784 | buffer.length = ACPI_ALLOCATE_BUFFER; | 799 | buffer.length = ACPI_ALLOCATE_BUFFER; |
@@ -786,50 +801,49 @@ acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
786 | 801 | ||
787 | cpus_complement(tmp_map, cpu_present_map); | 802 | cpus_complement(tmp_map, cpu_present_map); |
788 | cpu = first_cpu(tmp_map); | 803 | cpu = first_cpu(tmp_map); |
789 | if(cpu >= NR_CPUS) | 804 | if (cpu >= NR_CPUS) |
790 | return -EINVAL; | 805 | return -EINVAL; |
791 | 806 | ||
792 | acpi_map_cpu2node(handle, cpu, physid); | 807 | acpi_map_cpu2node(handle, cpu, physid); |
793 | 808 | ||
794 | cpu_set(cpu, cpu_present_map); | 809 | cpu_set(cpu, cpu_present_map); |
795 | ia64_cpu_to_sapicid[cpu] = physid; | 810 | ia64_cpu_to_sapicid[cpu] = physid; |
796 | ia64_acpiid_to_sapicid[lsapic->acpi_id] = ia64_cpu_to_sapicid[cpu]; | 811 | ia64_acpiid_to_sapicid[lsapic->acpi_id] = ia64_cpu_to_sapicid[cpu]; |
797 | 812 | ||
798 | *pcpu = cpu; | 813 | *pcpu = cpu; |
799 | return(0); | 814 | return (0); |
800 | } | 815 | } |
801 | EXPORT_SYMBOL(acpi_map_lsapic); | ||
802 | 816 | ||
817 | EXPORT_SYMBOL(acpi_map_lsapic); | ||
803 | 818 | ||
804 | int | 819 | int acpi_unmap_lsapic(int cpu) |
805 | acpi_unmap_lsapic(int cpu) | ||
806 | { | 820 | { |
807 | int i; | 821 | int i; |
808 | 822 | ||
809 | for (i=0; i<MAX_SAPICS; i++) { | 823 | for (i = 0; i < MAX_SAPICS; i++) { |
810 | if (ia64_acpiid_to_sapicid[i] == ia64_cpu_to_sapicid[cpu]) { | 824 | if (ia64_acpiid_to_sapicid[i] == ia64_cpu_to_sapicid[cpu]) { |
811 | ia64_acpiid_to_sapicid[i] = -1; | 825 | ia64_acpiid_to_sapicid[i] = -1; |
812 | break; | 826 | break; |
813 | } | 827 | } |
814 | } | 828 | } |
815 | ia64_cpu_to_sapicid[cpu] = -1; | 829 | ia64_cpu_to_sapicid[cpu] = -1; |
816 | cpu_clear(cpu,cpu_present_map); | 830 | cpu_clear(cpu, cpu_present_map); |
817 | 831 | ||
818 | #ifdef CONFIG_ACPI_NUMA | 832 | #ifdef CONFIG_ACPI_NUMA |
819 | /* NUMA specific cleanup's */ | 833 | /* NUMA specific cleanup's */ |
820 | #endif | 834 | #endif |
821 | 835 | ||
822 | return(0); | 836 | return (0); |
823 | } | 837 | } |
838 | |||
824 | EXPORT_SYMBOL(acpi_unmap_lsapic); | 839 | EXPORT_SYMBOL(acpi_unmap_lsapic); |
825 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 840 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
826 | |||
827 | 841 | ||
828 | #ifdef CONFIG_ACPI_NUMA | 842 | #ifdef CONFIG_ACPI_NUMA |
829 | acpi_status __devinit | 843 | acpi_status __devinit |
830 | acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret) | 844 | acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) |
831 | { | 845 | { |
832 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; | 846 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
833 | union acpi_object *obj; | 847 | union acpi_object *obj; |
834 | struct acpi_table_iosapic *iosapic; | 848 | struct acpi_table_iosapic *iosapic; |
835 | unsigned int gsi_base; | 849 | unsigned int gsi_base; |
@@ -878,10 +892,9 @@ acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret) | |||
878 | map_iosapic_to_node(gsi_base, node); | 892 | map_iosapic_to_node(gsi_base, node); |
879 | return AE_OK; | 893 | return AE_OK; |
880 | } | 894 | } |
881 | #endif /* CONFIG_NUMA */ | 895 | #endif /* CONFIG_NUMA */ |
882 | 896 | ||
883 | int | 897 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) |
884 | acpi_register_ioapic (acpi_handle handle, u64 phys_addr, u32 gsi_base) | ||
885 | { | 898 | { |
886 | int err; | 899 | int err; |
887 | 900 | ||
@@ -890,17 +903,18 @@ acpi_register_ioapic (acpi_handle handle, u64 phys_addr, u32 gsi_base) | |||
890 | 903 | ||
891 | #if CONFIG_ACPI_NUMA | 904 | #if CONFIG_ACPI_NUMA |
892 | acpi_map_iosapic(handle, 0, NULL, NULL); | 905 | acpi_map_iosapic(handle, 0, NULL, NULL); |
893 | #endif /* CONFIG_ACPI_NUMA */ | 906 | #endif /* CONFIG_ACPI_NUMA */ |
894 | 907 | ||
895 | return 0; | 908 | return 0; |
896 | } | 909 | } |
910 | |||
897 | EXPORT_SYMBOL(acpi_register_ioapic); | 911 | EXPORT_SYMBOL(acpi_register_ioapic); |
898 | 912 | ||
899 | int | 913 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) |
900 | acpi_unregister_ioapic (acpi_handle handle, u32 gsi_base) | ||
901 | { | 914 | { |
902 | return iosapic_remove(gsi_base); | 915 | return iosapic_remove(gsi_base); |
903 | } | 916 | } |
917 | |||
904 | EXPORT_SYMBOL(acpi_unregister_ioapic); | 918 | EXPORT_SYMBOL(acpi_unregister_ioapic); |
905 | 919 | ||
906 | #endif /* CONFIG_ACPI_BOOT */ | 920 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 7936b62f7a2e..a13df592ebf7 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -561,7 +561,7 @@ static inline int vector_is_shared (int vector) | |||
561 | return (iosapic_intr_info[vector].count > 1); | 561 | return (iosapic_intr_info[vector].count > 1); |
562 | } | 562 | } |
563 | 563 | ||
564 | static void | 564 | static int |
565 | register_intr (unsigned int gsi, int vector, unsigned char delivery, | 565 | register_intr (unsigned int gsi, int vector, unsigned char delivery, |
566 | unsigned long polarity, unsigned long trigger) | 566 | unsigned long polarity, unsigned long trigger) |
567 | { | 567 | { |
@@ -576,7 +576,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
576 | index = find_iosapic(gsi); | 576 | index = find_iosapic(gsi); |
577 | if (index < 0) { | 577 | if (index < 0) { |
578 | printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi); | 578 | printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi); |
579 | return; | 579 | return -ENODEV; |
580 | } | 580 | } |
581 | 581 | ||
582 | iosapic_address = iosapic_lists[index].addr; | 582 | iosapic_address = iosapic_lists[index].addr; |
@@ -587,7 +587,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
587 | rte = iosapic_alloc_rte(); | 587 | rte = iosapic_alloc_rte(); |
588 | if (!rte) { | 588 | if (!rte) { |
589 | printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__); | 589 | printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__); |
590 | return; | 590 | return -ENOMEM; |
591 | } | 591 | } |
592 | 592 | ||
593 | rte_index = gsi - gsi_base; | 593 | rte_index = gsi - gsi_base; |
@@ -603,7 +603,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
603 | struct iosapic_intr_info *info = &iosapic_intr_info[vector]; | 603 | struct iosapic_intr_info *info = &iosapic_intr_info[vector]; |
604 | if (info->trigger != trigger || info->polarity != polarity) { | 604 | if (info->trigger != trigger || info->polarity != polarity) { |
605 | printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__); | 605 | printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__); |
606 | return; | 606 | return -EINVAL; |
607 | } | 607 | } |
608 | } | 608 | } |
609 | 609 | ||
@@ -623,6 +623,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
623 | __FUNCTION__, vector, idesc->handler->typename, irq_type->typename); | 623 | __FUNCTION__, vector, idesc->handler->typename, irq_type->typename); |
624 | idesc->handler = irq_type; | 624 | idesc->handler = irq_type; |
625 | } | 625 | } |
626 | return 0; | ||
626 | } | 627 | } |
627 | 628 | ||
628 | static unsigned int | 629 | static unsigned int |
@@ -710,7 +711,7 @@ int | |||
710 | iosapic_register_intr (unsigned int gsi, | 711 | iosapic_register_intr (unsigned int gsi, |
711 | unsigned long polarity, unsigned long trigger) | 712 | unsigned long polarity, unsigned long trigger) |
712 | { | 713 | { |
713 | int vector, mask = 1; | 714 | int vector, mask = 1, err; |
714 | unsigned int dest; | 715 | unsigned int dest; |
715 | unsigned long flags; | 716 | unsigned long flags; |
716 | struct iosapic_rte_info *rte; | 717 | struct iosapic_rte_info *rte; |
@@ -737,8 +738,8 @@ again: | |||
737 | vector = assign_irq_vector(AUTO_ASSIGN); | 738 | vector = assign_irq_vector(AUTO_ASSIGN); |
738 | if (vector < 0) { | 739 | if (vector < 0) { |
739 | vector = iosapic_find_sharable_vector(trigger, polarity); | 740 | vector = iosapic_find_sharable_vector(trigger, polarity); |
740 | if (vector < 0) | 741 | if (vector < 0) |
741 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | 742 | return -ENOSPC; |
742 | } | 743 | } |
743 | 744 | ||
744 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); | 745 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); |
@@ -753,8 +754,13 @@ again: | |||
753 | } | 754 | } |
754 | 755 | ||
755 | dest = get_target_cpu(gsi, vector); | 756 | dest = get_target_cpu(gsi, vector); |
756 | register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, | 757 | err = register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, |
757 | polarity, trigger); | 758 | polarity, trigger); |
759 | if (err < 0) { | ||
760 | spin_unlock(&iosapic_lock); | ||
761 | spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); | ||
762 | return err; | ||
763 | } | ||
758 | 764 | ||
759 | /* | 765 | /* |
760 | * If the vector is shared and already unmasked for | 766 | * If the vector is shared and already unmasked for |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 84f89da7c640..1f5c26dbe705 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -384,7 +384,7 @@ setup_arch (char **cmdline_p) | |||
384 | if (early_console_setup(*cmdline_p) == 0) | 384 | if (early_console_setup(*cmdline_p) == 0) |
385 | mark_bsp_online(); | 385 | mark_bsp_online(); |
386 | 386 | ||
387 | #ifdef CONFIG_ACPI_BOOT | 387 | #ifdef CONFIG_ACPI |
388 | /* Initialize the ACPI boot-time table parser */ | 388 | /* Initialize the ACPI boot-time table parser */ |
389 | acpi_table_init(); | 389 | acpi_table_init(); |
390 | # ifdef CONFIG_ACPI_NUMA | 390 | # ifdef CONFIG_ACPI_NUMA |
@@ -420,7 +420,7 @@ setup_arch (char **cmdline_p) | |||
420 | 420 | ||
421 | cpu_init(); /* initialize the bootstrap CPU */ | 421 | cpu_init(); /* initialize the bootstrap CPU */ |
422 | 422 | ||
423 | #ifdef CONFIG_ACPI_BOOT | 423 | #ifdef CONFIG_ACPI |
424 | acpi_boot_init(); | 424 | acpi_boot_init(); |
425 | #endif | 425 | #endif |
426 | 426 | ||
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 92ff46ad21e2..706b7734e191 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -36,7 +36,7 @@ int arch_register_cpu(int num) | |||
36 | parent = &sysfs_nodes[cpu_to_node(num)]; | 36 | parent = &sysfs_nodes[cpu_to_node(num)]; |
37 | #endif /* CONFIG_NUMA */ | 37 | #endif /* CONFIG_NUMA */ |
38 | 38 | ||
39 | #ifdef CONFIG_ACPI_BOOT | 39 | #ifdef CONFIG_ACPI |
40 | /* | 40 | /* |
41 | * If CPEI cannot be re-targetted, and this is | 41 | * If CPEI cannot be re-targetted, and this is |
42 | * CPEI target, then dont create the control file | 42 | * CPEI target, then dont create the control file |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 9fc74631ba8a..01d18b7b5bb3 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -23,7 +23,7 @@ static void force_interrupt(int irq); | |||
23 | static void register_intr_pda(struct sn_irq_info *sn_irq_info); | 23 | static void register_intr_pda(struct sn_irq_info *sn_irq_info); |
24 | static void unregister_intr_pda(struct sn_irq_info *sn_irq_info); | 24 | static void unregister_intr_pda(struct sn_irq_info *sn_irq_info); |
25 | 25 | ||
26 | extern int sn_force_interrupt_flag; | 26 | int sn_force_interrupt_flag = 1; |
27 | extern int sn_ioif_inited; | 27 | extern int sn_ioif_inited; |
28 | static struct list_head **sn_irq_lh; | 28 | static struct list_head **sn_irq_lh; |
29 | static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */ | 29 | static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */ |
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index 51bf82720d99..a06719d752a0 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -52,7 +52,7 @@ static int licenseID_open(struct inode *inode, struct file *file) | |||
52 | * the bridge chip. The hardware will then send an interrupt message if the | 52 | * the bridge chip. The hardware will then send an interrupt message if the |
53 | * interrupt line is active. This mimics a level sensitive interrupt. | 53 | * interrupt line is active. This mimics a level sensitive interrupt. |
54 | */ | 54 | */ |
55 | int sn_force_interrupt_flag = 1; | 55 | extern int sn_force_interrupt_flag; |
56 | 56 | ||
57 | static int sn_force_interrupt_show(struct seq_file *s, void *p) | 57 | static int sn_force_interrupt_show(struct seq_file *s, void *p) |
58 | { | 58 | { |
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 0a5e723d3be6..ca9518b96c6e 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -453,6 +453,7 @@ label: | |||
453 | #else | 453 | #else |
454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) | 454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) |
455 | #endif | 455 | #endif |
456 | #endif | ||
456 | 457 | ||
457 | /* 0x1100 - Data TLB Miss Exception | 458 | /* 0x1100 - Data TLB Miss Exception |
458 | * As the name implies, translation is not in the MMU, so search the | 459 | * As the name implies, translation is not in the MMU, so search the |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 8f868b67ef0f..e63323e03ea9 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -152,7 +152,6 @@ config X86_CPUID | |||
152 | with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to | 152 | with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to |
153 | /dev/cpu/31/cpuid. | 153 | /dev/cpu/31/cpuid. |
154 | 154 | ||
155 | # disable it for opteron optimized builds because it pulls in ACPI_BOOT | ||
156 | config X86_HT | 155 | config X86_HT |
157 | bool | 156 | bool |
158 | depends on SMP && !MK8 | 157 | depends on SMP && !MK8 |
@@ -474,7 +473,6 @@ config PCI_DIRECT | |||
474 | config PCI_MMCONFIG | 473 | config PCI_MMCONFIG |
475 | bool "Support mmconfig PCI config space access" | 474 | bool "Support mmconfig PCI config space access" |
476 | depends on PCI && ACPI | 475 | depends on PCI && ACPI |
477 | select ACPI_BOOT | ||
478 | 476 | ||
479 | config UNORDERED_IO | 477 | config UNORDERED_IO |
480 | bool "Unordered IO mapping access" | 478 | bool "Unordered IO mapping access" |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index b97a61e1c71c..bf57e2362bf4 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -135,8 +135,6 @@ CONFIG_PM_STD_PARTITION="" | |||
135 | # ACPI (Advanced Configuration and Power Interface) Support | 135 | # ACPI (Advanced Configuration and Power Interface) Support |
136 | # | 136 | # |
137 | CONFIG_ACPI=y | 137 | CONFIG_ACPI=y |
138 | CONFIG_ACPI_BOOT=y | ||
139 | CONFIG_ACPI_INTERPRETER=y | ||
140 | CONFIG_ACPI_AC=y | 138 | CONFIG_ACPI_AC=y |
141 | CONFIG_ACPI_BATTERY=y | 139 | CONFIG_ACPI_BATTERY=y |
142 | CONFIG_ACPI_BUTTON=y | 140 | CONFIG_ACPI_BUTTON=y |
@@ -151,10 +149,8 @@ CONFIG_ACPI_NUMA=y | |||
151 | CONFIG_ACPI_TOSHIBA=y | 149 | CONFIG_ACPI_TOSHIBA=y |
152 | CONFIG_ACPI_BLACKLIST_YEAR=2001 | 150 | CONFIG_ACPI_BLACKLIST_YEAR=2001 |
153 | # CONFIG_ACPI_DEBUG is not set | 151 | # CONFIG_ACPI_DEBUG is not set |
154 | CONFIG_ACPI_BUS=y | ||
155 | CONFIG_ACPI_EC=y | 152 | CONFIG_ACPI_EC=y |
156 | CONFIG_ACPI_POWER=y | 153 | CONFIG_ACPI_POWER=y |
157 | CONFIG_ACPI_PCI=y | ||
158 | CONFIG_ACPI_SYSTEM=y | 154 | CONFIG_ACPI_SYSTEM=y |
159 | # CONFIG_ACPI_CONTAINER is not set | 155 | # CONFIG_ACPI_CONTAINER is not set |
160 | 156 | ||
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index c32e198d7b2b..1579bdd0adcd 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile | |||
@@ -12,7 +12,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \ | |||
12 | obj-$(CONFIG_X86_MCE) += mce.o | 12 | obj-$(CONFIG_X86_MCE) += mce.o |
13 | obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o | 13 | obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o |
14 | obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ | 14 | obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ |
15 | obj-$(CONFIG_ACPI_BOOT) += acpi/ | 15 | obj-$(CONFIG_ACPI) += acpi/ |
16 | obj-$(CONFIG_X86_MSR) += msr.o | 16 | obj-$(CONFIG_X86_MSR) += msr.o |
17 | obj-$(CONFIG_MICROCODE) += microcode.o | 17 | obj-$(CONFIG_MICROCODE) += microcode.o |
18 | obj-$(CONFIG_X86_CPUID) += cpuid.o | 18 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index d2c2ee5f9a88..7da9ace890bd 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-$(CONFIG_ACPI_BOOT) := boot.o | 1 | obj-y := boot.o |
2 | boot-$(CONFIG_ACPI_BOOT) := ../../../i386/kernel/acpi/boot.o | 2 | boot-y := ../../../i386/kernel/acpi/boot.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 7a275de6df22..148f6f7ea315 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <asm/proto.h> | 47 | #include <asm/proto.h> |
48 | #include <asm/tlbflush.h> | 48 | #include <asm/tlbflush.h> |
49 | 49 | ||
50 | |||
51 | /* -------------------------------------------------------------------------- | 50 | /* -------------------------------------------------------------------------- |
52 | Low-Level Sleep Support | 51 | Low-Level Sleep Support |
53 | -------------------------------------------------------------------------- */ | 52 | -------------------------------------------------------------------------- */ |
@@ -77,11 +76,12 @@ static void init_low_mapping(void) | |||
77 | * Create an identity mapped page table and copy the wakeup routine to | 76 | * Create an identity mapped page table and copy the wakeup routine to |
78 | * low memory. | 77 | * low memory. |
79 | */ | 78 | */ |
80 | int acpi_save_state_mem (void) | 79 | int acpi_save_state_mem(void) |
81 | { | 80 | { |
82 | init_low_mapping(); | 81 | init_low_mapping(); |
83 | 82 | ||
84 | memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); | 83 | memcpy((void *)acpi_wakeup_address, &wakeup_start, |
84 | &wakeup_end - &wakeup_start); | ||
85 | acpi_copy_wakeup_routine(acpi_wakeup_address); | 85 | acpi_copy_wakeup_routine(acpi_wakeup_address); |
86 | 86 | ||
87 | return 0; | 87 | return 0; |
@@ -90,7 +90,7 @@ int acpi_save_state_mem (void) | |||
90 | /* | 90 | /* |
91 | * acpi_restore_state | 91 | * acpi_restore_state |
92 | */ | 92 | */ |
93 | void acpi_restore_state_mem (void) | 93 | void acpi_restore_state_mem(void) |
94 | { | 94 | { |
95 | set_pgd(pgd_offset(current->mm, 0UL), low_ptr); | 95 | set_pgd(pgd_offset(current->mm, 0UL), low_ptr); |
96 | flush_tlb_all(); | 96 | flush_tlb_all(); |
@@ -108,7 +108,8 @@ void __init acpi_reserve_bootmem(void) | |||
108 | { | 108 | { |
109 | acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); | 109 | acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); |
110 | if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) | 110 | if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) |
111 | printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n"); | 111 | printk(KERN_CRIT |
112 | "ACPI: Wakeup code way too big, will crash on attempt to suspend\n"); | ||
112 | } | 113 | } |
113 | 114 | ||
114 | static int __init acpi_sleep_setup(char *str) | 115 | static int __init acpi_sleep_setup(char *str) |
@@ -127,6 +128,8 @@ static int __init acpi_sleep_setup(char *str) | |||
127 | 128 | ||
128 | __setup("acpi_sleep=", acpi_sleep_setup); | 129 | __setup("acpi_sleep=", acpi_sleep_setup); |
129 | 130 | ||
130 | #endif /*CONFIG_ACPI_SLEEP*/ | 131 | #endif /*CONFIG_ACPI_SLEEP */ |
131 | 132 | ||
132 | void acpi_pci_link_exit(void) {} | 133 | void acpi_pci_link_exit(void) |
134 | { | ||
135 | } | ||
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c index f062aa03bab7..b1c144f73149 100644 --- a/arch/x86_64/kernel/genapic.c +++ b/arch/x86_64/kernel/genapic.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/smp.h> | 20 | #include <asm/smp.h> |
21 | #include <asm/ipi.h> | 21 | #include <asm/ipi.h> |
22 | 22 | ||
23 | #if defined(CONFIG_ACPI_BUS) | 23 | #if defined(CONFIG_ACPI) |
24 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
@@ -47,7 +47,7 @@ void __init clustered_apic_check(void) | |||
47 | u8 cluster_cnt[NUM_APIC_CLUSTERS]; | 47 | u8 cluster_cnt[NUM_APIC_CLUSTERS]; |
48 | int num_cpus = 0; | 48 | int num_cpus = 0; |
49 | 49 | ||
50 | #if defined(CONFIG_ACPI_BUS) | 50 | #if defined(CONFIG_ACPI) |
51 | /* | 51 | /* |
52 | * Some x86_64 machines use physical APIC mode regardless of how many | 52 | * Some x86_64 machines use physical APIC mode regardless of how many |
53 | * procs/clusters are present (x86_64 ES7000 is an example). | 53 | * procs/clusters are present (x86_64 ES7000 is an example). |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index ba1a744e9bf0..40e0aca088fb 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1864,7 +1864,7 @@ device_initcall(ioapic_init_sysfs); | |||
1864 | ACPI-based IOAPIC Configuration | 1864 | ACPI-based IOAPIC Configuration |
1865 | -------------------------------------------------------------------------- */ | 1865 | -------------------------------------------------------------------------- */ |
1866 | 1866 | ||
1867 | #ifdef CONFIG_ACPI_BOOT | 1867 | #ifdef CONFIG_ACPI |
1868 | 1868 | ||
1869 | #define IO_APIC_MAX_ID 0xFE | 1869 | #define IO_APIC_MAX_ID 0xFE |
1870 | 1870 | ||
@@ -1947,7 +1947,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a | |||
1947 | return 0; | 1947 | return 0; |
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | #endif /*CONFIG_ACPI_BOOT*/ | 1950 | #endif /* CONFIG_ACPI */ |
1951 | 1951 | ||
1952 | 1952 | ||
1953 | /* | 1953 | /* |
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 79c362d03e2e..8d8ed6ae1d0c 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -74,7 +74,7 @@ static unsigned int num_processors = 0; | |||
74 | physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; | 74 | physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; |
75 | 75 | ||
76 | /* ACPI MADT entry parsing functions */ | 76 | /* ACPI MADT entry parsing functions */ |
77 | #ifdef CONFIG_ACPI_BOOT | 77 | #ifdef CONFIG_ACPI |
78 | extern struct acpi_boot_flags acpi_boot; | 78 | extern struct acpi_boot_flags acpi_boot; |
79 | #ifdef CONFIG_X86_LOCAL_APIC | 79 | #ifdef CONFIG_X86_LOCAL_APIC |
80 | extern int acpi_parse_lapic (acpi_table_entry_header *header); | 80 | extern int acpi_parse_lapic (acpi_table_entry_header *header); |
@@ -84,7 +84,7 @@ extern int acpi_parse_lapic_nmi (acpi_table_entry_header *header); | |||
84 | #ifdef CONFIG_X86_IO_APIC | 84 | #ifdef CONFIG_X86_IO_APIC |
85 | extern int acpi_parse_ioapic (acpi_table_entry_header *header); | 85 | extern int acpi_parse_ioapic (acpi_table_entry_header *header); |
86 | #endif /*CONFIG_X86_IO_APIC*/ | 86 | #endif /*CONFIG_X86_IO_APIC*/ |
87 | #endif /*CONFIG_ACPI_BOOT*/ | 87 | #endif /*CONFIG_ACPI*/ |
88 | 88 | ||
89 | u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; | 89 | u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; |
90 | 90 | ||
@@ -519,8 +519,6 @@ void __init get_smp_config (void) | |||
519 | struct intel_mp_floating *mpf = mpf_found; | 519 | struct intel_mp_floating *mpf = mpf_found; |
520 | 520 | ||
521 | /* | 521 | /* |
522 | * ACPI may be used to obtain the entire SMP configuration or just to | ||
523 | * enumerate/configure processors (CONFIG_ACPI_BOOT). Note that | ||
524 | * ACPI supports both logical (e.g. Hyper-Threading) and physical | 522 | * ACPI supports both logical (e.g. Hyper-Threading) and physical |
525 | * processors, where MPS only supports physical. | 523 | * processors, where MPS only supports physical. |
526 | */ | 524 | */ |
@@ -673,7 +671,7 @@ void __init find_smp_config (void) | |||
673 | ACPI-based MP Configuration | 671 | ACPI-based MP Configuration |
674 | -------------------------------------------------------------------------- */ | 672 | -------------------------------------------------------------------------- */ |
675 | 673 | ||
676 | #ifdef CONFIG_ACPI_BOOT | 674 | #ifdef CONFIG_ACPI |
677 | 675 | ||
678 | void __init mp_register_lapic_address ( | 676 | void __init mp_register_lapic_address ( |
679 | u64 address) | 677 | u64 address) |
@@ -929,11 +927,9 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
929 | if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) | 927 | if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) |
930 | return gsi; | 928 | return gsi; |
931 | 929 | ||
932 | #ifdef CONFIG_ACPI_BUS | ||
933 | /* Don't set up the ACPI SCI because it's already set up */ | 930 | /* Don't set up the ACPI SCI because it's already set up */ |
934 | if (acpi_fadt.sci_int == gsi) | 931 | if (acpi_fadt.sci_int == gsi) |
935 | return gsi; | 932 | return gsi; |
936 | #endif | ||
937 | 933 | ||
938 | ioapic = mp_find_ioapic(gsi); | 934 | ioapic = mp_find_ioapic(gsi); |
939 | if (ioapic < 0) { | 935 | if (ioapic < 0) { |
@@ -973,13 +969,11 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
973 | if (gsi < MAX_GSI_NUM) { | 969 | if (gsi < MAX_GSI_NUM) { |
974 | if (gsi > 15) | 970 | if (gsi > 15) |
975 | gsi = pci_irq++; | 971 | gsi = pci_irq++; |
976 | #ifdef CONFIG_ACPI_BUS | ||
977 | /* | 972 | /* |
978 | * Don't assign IRQ used by ACPI SCI | 973 | * Don't assign IRQ used by ACPI SCI |
979 | */ | 974 | */ |
980 | if (gsi == acpi_fadt.sci_int) | 975 | if (gsi == acpi_fadt.sci_int) |
981 | gsi = pci_irq++; | 976 | gsi = pci_irq++; |
982 | #endif | ||
983 | gsi_to_irq[irq] = gsi; | 977 | gsi_to_irq[irq] = gsi; |
984 | } else { | 978 | } else { |
985 | printk(KERN_ERR "GSI %u is too high\n", gsi); | 979 | printk(KERN_ERR "GSI %u is too high\n", gsi); |
@@ -994,4 +988,4 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
994 | } | 988 | } |
995 | 989 | ||
996 | #endif /*CONFIG_X86_IO_APIC*/ | 990 | #endif /*CONFIG_X86_IO_APIC*/ |
997 | #endif /*CONFIG_ACPI_BOOT*/ | 991 | #endif /*CONFIG_ACPI*/ |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index b356f8e6adfe..0511d8087910 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -71,7 +71,7 @@ unsigned long mmu_cr4_features; | |||
71 | 71 | ||
72 | int acpi_disabled; | 72 | int acpi_disabled; |
73 | EXPORT_SYMBOL(acpi_disabled); | 73 | EXPORT_SYMBOL(acpi_disabled); |
74 | #ifdef CONFIG_ACPI_BOOT | 74 | #ifdef CONFIG_ACPI |
75 | extern int __initdata acpi_ht; | 75 | extern int __initdata acpi_ht; |
76 | extern acpi_interrupt_flags acpi_sci_flags; | 76 | extern acpi_interrupt_flags acpi_sci_flags; |
77 | int __initdata acpi_force = 0; | 77 | int __initdata acpi_force = 0; |
@@ -294,7 +294,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
294 | maxcpus = simple_strtoul(from + 8, NULL, 0); | 294 | maxcpus = simple_strtoul(from + 8, NULL, 0); |
295 | } | 295 | } |
296 | #endif | 296 | #endif |
297 | #ifdef CONFIG_ACPI_BOOT | 297 | #ifdef CONFIG_ACPI |
298 | /* "acpi=off" disables both ACPI table parsing and interpreter init */ | 298 | /* "acpi=off" disables both ACPI table parsing and interpreter init */ |
299 | if (!memcmp(from, "acpi=off", 8)) | 299 | if (!memcmp(from, "acpi=off", 8)) |
300 | disable_acpi(); | 300 | disable_acpi(); |
@@ -566,7 +566,7 @@ void __init setup_arch(char **cmdline_p) | |||
566 | 566 | ||
567 | init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); | 567 | init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); |
568 | 568 | ||
569 | #ifdef CONFIG_ACPI_BOOT | 569 | #ifdef CONFIG_ACPI |
570 | /* | 570 | /* |
571 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). | 571 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). |
572 | * Call this early for SRAT node setup. | 572 | * Call this early for SRAT node setup. |
@@ -658,7 +658,7 @@ void __init setup_arch(char **cmdline_p) | |||
658 | 658 | ||
659 | check_ioapic(); | 659 | check_ioapic(); |
660 | 660 | ||
661 | #ifdef CONFIG_ACPI_BOOT | 661 | #ifdef CONFIG_ACPI |
662 | /* | 662 | /* |
663 | * Read APIC and some other early information from ACPI tables. | 663 | * Read APIC and some other early information from ACPI tables. |
664 | */ | 664 | */ |
diff --git a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile index 37c92e841dec..bb34e5ef916c 100644 --- a/arch/x86_64/pci/Makefile +++ b/arch/x86_64/pci/Makefile | |||
@@ -8,7 +8,7 @@ CFLAGS += -Iarch/i386/pci | |||
8 | obj-y := i386.o | 8 | obj-y := i386.o |
9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o | 9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o |
10 | obj-y += fixup.o | 10 | obj-y += fixup.o |
11 | obj-$(CONFIG_ACPI_PCI) += acpi.o | 11 | obj-$(CONFIG_ACPI) += acpi.o |
12 | obj-y += legacy.o irq.o common.o | 12 | obj-y += legacy.o irq.o common.o |
13 | # mmconfig has a 64bit special | 13 | # mmconfig has a 64bit special |
14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o | 14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o |
diff --git a/arch/x86_64/pci/Makefile-BUS b/arch/x86_64/pci/Makefile-BUS index 291985f0d2e4..4f0c05abd408 100644 --- a/arch/x86_64/pci/Makefile-BUS +++ b/arch/x86_64/pci/Makefile-BUS | |||
@@ -8,7 +8,7 @@ CFLAGS += -I arch/i386/pci | |||
8 | obj-y := i386.o | 8 | obj-y := i386.o |
9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o | 9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o |
10 | obj-y += fixup.o | 10 | obj-y += fixup.o |
11 | obj-$(CONFIG_ACPI_PCI) += acpi.o | 11 | obj-$(CONFIG_ACPI) += acpi.o |
12 | obj-y += legacy.o irq.o common.o | 12 | obj-y += legacy.o irq.o common.o |
13 | # mmconfig has a 64bit special | 13 | # mmconfig has a 64bit special |
14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o | 14 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o |