diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2007-02-02 11:48:22 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:29 -0500 |
commit | 5f3b1a8b6737b09ce5df4ec9fad4ad271aecb5fb (patch) | |
tree | 5b3e343ab0c4c963f681afc2bfbba815b26e045b /arch/i386/kernel | |
parent | ad363f80c386bc4701b1bc2cdf08ca9b96a9337b (diff) |
ACPICA: Remove duplicate table definitions (non-conflicting)
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 156 |
1 files changed, 74 insertions, 82 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 389a8a56d2b4..5fafbacdd4cb 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -66,7 +66,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return | |||
66 | 66 | ||
67 | #define BAD_MADT_ENTRY(entry, end) ( \ | 67 | #define BAD_MADT_ENTRY(entry, end) ( \ |
68 | (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ | 68 | (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ |
69 | ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) | 69 | ((struct acpi_subtable_header *)entry)->length < sizeof(*entry)) |
70 | 70 | ||
71 | #define PREFIX "ACPI: " | 71 | #define PREFIX "ACPI: " |
72 | 72 | ||
@@ -79,7 +79,7 @@ int acpi_ioapic; | |||
79 | int acpi_strict; | 79 | int acpi_strict; |
80 | EXPORT_SYMBOL(acpi_strict); | 80 | EXPORT_SYMBOL(acpi_strict); |
81 | 81 | ||
82 | acpi_interrupt_flags acpi_sci_flags __initdata; | 82 | u8 acpi_sci_flags __initdata; |
83 | int acpi_sci_override_gsi __initdata; | 83 | int acpi_sci_override_gsi __initdata; |
84 | int acpi_skip_timer_override __initdata; | 84 | int acpi_skip_timer_override __initdata; |
85 | int acpi_use_timer_override __initdata; | 85 | int acpi_use_timer_override __initdata; |
@@ -246,11 +246,11 @@ static int __init acpi_parse_madt(struct acpi_table_header *header) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | static int __init | 248 | static int __init |
249 | acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | 249 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) |
250 | { | 250 | { |
251 | struct acpi_table_lapic *processor = NULL; | 251 | struct acpi_madt_local_apic *processor = NULL; |
252 | 252 | ||
253 | processor = (struct acpi_table_lapic *)header; | 253 | processor = (struct acpi_madt_local_apic *)header; |
254 | 254 | ||
255 | if (BAD_MADT_ENTRY(processor, end)) | 255 | if (BAD_MADT_ENTRY(processor, end)) |
256 | return -EINVAL; | 256 | return -EINVAL; |
@@ -258,8 +258,8 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | |||
258 | acpi_table_print_madt_entry(header); | 258 | acpi_table_print_madt_entry(header); |
259 | 259 | ||
260 | /* Record local apic id only when enabled */ | 260 | /* Record local apic id only when enabled */ |
261 | if (processor->flags.enabled) | 261 | if (processor->lapic_flags & ACPI_MADT_ENABLED) |
262 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; | 262 | x86_acpiid_to_apicid[processor->processor_id] = processor->id; |
263 | 263 | ||
264 | /* | 264 | /* |
265 | * We need to register disabled CPU as well to permit | 265 | * We need to register disabled CPU as well to permit |
@@ -269,18 +269,18 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | |||
269 | * when we use CPU hotplug. | 269 | * when we use CPU hotplug. |
270 | */ | 270 | */ |
271 | mp_register_lapic(processor->id, /* APIC ID */ | 271 | mp_register_lapic(processor->id, /* APIC ID */ |
272 | processor->flags.enabled); /* Enabled? */ | 272 | processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */ |
273 | 273 | ||
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | 276 | ||
277 | static int __init | 277 | static int __init |
278 | acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, | 278 | acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, |
279 | const unsigned long end) | 279 | const unsigned long end) |
280 | { | 280 | { |
281 | struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL; | 281 | struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL; |
282 | 282 | ||
283 | lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header; | 283 | lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header; |
284 | 284 | ||
285 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) | 285 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) |
286 | return -EINVAL; | 286 | return -EINVAL; |
@@ -291,11 +291,11 @@ acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, | |||
291 | } | 291 | } |
292 | 292 | ||
293 | static int __init | 293 | static int __init |
294 | acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) | 294 | acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end) |
295 | { | 295 | { |
296 | struct acpi_table_lapic_nmi *lapic_nmi = NULL; | 296 | struct acpi_madt_local_apic_nmi *lapic_nmi = NULL; |
297 | 297 | ||
298 | lapic_nmi = (struct acpi_table_lapic_nmi *)header; | 298 | lapic_nmi = (struct acpi_madt_local_apic_nmi *)header; |
299 | 299 | ||
300 | if (BAD_MADT_ENTRY(lapic_nmi, end)) | 300 | if (BAD_MADT_ENTRY(lapic_nmi, end)) |
301 | return -EINVAL; | 301 | return -EINVAL; |
@@ -313,11 +313,11 @@ acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) | |||
313 | #ifdef CONFIG_X86_IO_APIC | 313 | #ifdef CONFIG_X86_IO_APIC |
314 | 314 | ||
315 | static int __init | 315 | static int __init |
316 | acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end) | 316 | acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) |
317 | { | 317 | { |
318 | struct acpi_table_ioapic *ioapic = NULL; | 318 | struct acpi_madt_io_apic *ioapic = NULL; |
319 | 319 | ||
320 | ioapic = (struct acpi_table_ioapic *)header; | 320 | ioapic = (struct acpi_madt_io_apic *)header; |
321 | 321 | ||
322 | if (BAD_MADT_ENTRY(ioapic, end)) | 322 | if (BAD_MADT_ENTRY(ioapic, end)) |
323 | return -EINVAL; | 323 | return -EINVAL; |
@@ -342,11 +342,11 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | |||
342 | polarity = 3; | 342 | polarity = 3; |
343 | 343 | ||
344 | /* Command-line over-ride via acpi_sci= */ | 344 | /* Command-line over-ride via acpi_sci= */ |
345 | if (acpi_sci_flags.trigger) | 345 | if (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) |
346 | trigger = acpi_sci_flags.trigger; | 346 | trigger = (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2; |
347 | 347 | ||
348 | if (acpi_sci_flags.polarity) | 348 | if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK) |
349 | polarity = acpi_sci_flags.polarity; | 349 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; |
350 | 350 | ||
351 | /* | 351 | /* |
352 | * mp_config_acpi_legacy_irqs() already setup IRQs < 16 | 352 | * mp_config_acpi_legacy_irqs() already setup IRQs < 16 |
@@ -364,44 +364,45 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | |||
364 | } | 364 | } |
365 | 365 | ||
366 | static int __init | 366 | static int __init |
367 | acpi_parse_int_src_ovr(acpi_table_entry_header * header, | 367 | acpi_parse_int_src_ovr(struct acpi_subtable_header * header, |
368 | const unsigned long end) | 368 | const unsigned long end) |
369 | { | 369 | { |
370 | struct acpi_table_int_src_ovr *intsrc = NULL; | 370 | struct acpi_madt_interrupt_override *intsrc = NULL; |
371 | 371 | ||
372 | intsrc = (struct acpi_table_int_src_ovr *)header; | 372 | intsrc = (struct acpi_madt_interrupt_override *)header; |
373 | 373 | ||
374 | if (BAD_MADT_ENTRY(intsrc, end)) | 374 | if (BAD_MADT_ENTRY(intsrc, end)) |
375 | return -EINVAL; | 375 | return -EINVAL; |
376 | 376 | ||
377 | acpi_table_print_madt_entry(header); | 377 | acpi_table_print_madt_entry(header); |
378 | 378 | ||
379 | if (intsrc->bus_irq == acpi_gbl_FADT.sci_interrupt) { | 379 | if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { |
380 | acpi_sci_ioapic_setup(intsrc->global_irq, | 380 | acpi_sci_ioapic_setup(intsrc->global_irq, |
381 | intsrc->flags.polarity, | 381 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, |
382 | intsrc->flags.trigger); | 382 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2); |
383 | return 0; | 383 | return 0; |
384 | } | 384 | } |
385 | 385 | ||
386 | if (acpi_skip_timer_override && | 386 | if (acpi_skip_timer_override && |
387 | intsrc->bus_irq == 0 && intsrc->global_irq == 2) { | 387 | intsrc->source_irq == 0 && intsrc->global_irq == 2) { |
388 | printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); | 388 | printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); |
389 | return 0; | 389 | return 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | mp_override_legacy_irq(intsrc->bus_irq, | 392 | mp_override_legacy_irq(intsrc->source_irq, |
393 | intsrc->flags.polarity, | 393 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, |
394 | intsrc->flags.trigger, intsrc->global_irq); | 394 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, |
395 | intsrc->global_irq); | ||
395 | 396 | ||
396 | return 0; | 397 | return 0; |
397 | } | 398 | } |
398 | 399 | ||
399 | static int __init | 400 | static int __init |
400 | acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) | 401 | acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end) |
401 | { | 402 | { |
402 | struct acpi_table_nmi_src *nmi_src = NULL; | 403 | struct acpi_madt_nmi_source *nmi_src = NULL; |
403 | 404 | ||
404 | nmi_src = (struct acpi_table_nmi_src *)header; | 405 | nmi_src = (struct acpi_madt_nmi_source *)header; |
405 | 406 | ||
406 | if (BAD_MADT_ENTRY(nmi_src, end)) | 407 | if (BAD_MADT_ENTRY(nmi_src, end)) |
407 | return -EINVAL; | 408 | return -EINVAL; |
@@ -417,7 +418,7 @@ acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) | |||
417 | 418 | ||
418 | /* | 419 | /* |
419 | * acpi_pic_sci_set_trigger() | 420 | * acpi_pic_sci_set_trigger() |
420 | * | 421 | * |
421 | * use ELCR to set PIC-mode trigger type for SCI | 422 | * use ELCR to set PIC-mode trigger type for SCI |
422 | * | 423 | * |
423 | * If a PIC-mode SCI is not recognized or gives spurious IRQ7's | 424 | * If a PIC-mode SCI is not recognized or gives spurious IRQ7's |
@@ -511,7 +512,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
511 | { | 512 | { |
512 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 513 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
513 | union acpi_object *obj; | 514 | union acpi_object *obj; |
514 | struct acpi_table_lapic *lapic; | 515 | struct acpi_madt_local_apic *lapic; |
515 | cpumask_t tmp_map, new_map; | 516 | cpumask_t tmp_map, new_map; |
516 | u8 physid; | 517 | u8 physid; |
517 | int cpu; | 518 | int cpu; |
@@ -529,10 +530,10 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
529 | return -EINVAL; | 530 | return -EINVAL; |
530 | } | 531 | } |
531 | 532 | ||
532 | lapic = (struct acpi_table_lapic *)obj->buffer.pointer; | 533 | lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer; |
533 | 534 | ||
534 | if ((lapic->header.type != ACPI_MADT_LAPIC) || | 535 | if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC || |
535 | (!lapic->flags.enabled)) { | 536 | !(lapic->lapic_flags & ACPI_MADT_ENABLED)) { |
536 | kfree(buffer.pointer); | 537 | kfree(buffer.pointer); |
537 | return -EINVAL; | 538 | return -EINVAL; |
538 | } | 539 | } |
@@ -544,7 +545,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
544 | buffer.pointer = NULL; | 545 | buffer.pointer = NULL; |
545 | 546 | ||
546 | tmp_map = cpu_present_map; | 547 | tmp_map = cpu_present_map; |
547 | mp_register_lapic(physid, lapic->flags.enabled); | 548 | mp_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED); |
548 | 549 | ||
549 | /* | 550 | /* |
550 | * If mp_register_lapic successfully generates a new logical cpu | 551 | * If mp_register_lapic successfully generates a new logical cpu |
@@ -619,36 +620,30 @@ acpi_scan_rsdp(unsigned long start, unsigned long length) | |||
619 | return 0; | 620 | return 0; |
620 | } | 621 | } |
621 | 622 | ||
622 | static int __init acpi_parse_sbf(struct acpi_table_header *header) | 623 | static int __init acpi_parse_sbf(struct acpi_table_header *table) |
623 | { | 624 | { |
624 | struct acpi_table_sbf *sb; | 625 | struct acpi_table_boot *sb; |
625 | |||
626 | if (!header) | ||
627 | return -EINVAL; | ||
628 | 626 | ||
629 | sb = (struct acpi_table_sbf *)header; | 627 | sb = (struct acpi_table_boot *)table; |
630 | if (!sb) { | 628 | if (!sb) { |
631 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); | 629 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); |
632 | return -ENODEV; | 630 | return -ENODEV; |
633 | } | 631 | } |
634 | 632 | ||
635 | sbf_port = sb->sbf_cmos; /* Save CMOS port */ | 633 | sbf_port = sb->cmos_index; /* Save CMOS port */ |
636 | 634 | ||
637 | return 0; | 635 | return 0; |
638 | } | 636 | } |
639 | 637 | ||
640 | #ifdef CONFIG_HPET_TIMER | 638 | #ifdef CONFIG_HPET_TIMER |
641 | 639 | ||
642 | static int __init acpi_parse_hpet(struct acpi_table_header *header) | 640 | static int __init acpi_parse_hpet(struct acpi_table_header *table) |
643 | { | 641 | { |
644 | struct acpi_table_hpet *hpet_tbl; | 642 | struct acpi_table_hpet *hpet_tbl; |
645 | struct resource *hpet_res; | 643 | struct resource *hpet_res; |
646 | resource_size_t res_start; | 644 | resource_size_t res_start; |
647 | 645 | ||
648 | if (!header) | 646 | hpet_tbl = (struct acpi_table_hpet *)table; |
649 | return -EINVAL; | ||
650 | |||
651 | hpet_tbl = (struct acpi_table_hpet *)header; | ||
652 | if (!hpet_tbl) { | 647 | if (!hpet_tbl) { |
653 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); | 648 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); |
654 | return -ENODEV; | 649 | return -ENODEV; |
@@ -706,35 +701,28 @@ static int __init acpi_parse_hpet(struct acpi_table_header *header) | |||
706 | extern u32 pmtmr_ioport; | 701 | extern u32 pmtmr_ioport; |
707 | #endif | 702 | #endif |
708 | 703 | ||
709 | static int __init acpi_parse_fadt(struct acpi_table_header *header) | 704 | static int __init acpi_parse_fadt(struct acpi_table_header *table) |
710 | { | 705 | { |
711 | struct acpi_table_fadt *fadt = NULL; | ||
712 | |||
713 | fadt = (struct acpi_table_fadt *)header; | ||
714 | if (!fadt) { | ||
715 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); | ||
716 | return 0; | ||
717 | } | ||
718 | 706 | ||
719 | #ifdef CONFIG_X86_PM_TIMER | 707 | #ifdef CONFIG_X86_PM_TIMER |
720 | /* detect the location of the ACPI PM Timer */ | 708 | /* detect the location of the ACPI PM Timer */ |
721 | if (fadt->header.revision >= FADT2_REVISION_ID) { | 709 | if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) { |
722 | /* FADT rev. 2 */ | 710 | /* FADT rev. 2 */ |
723 | if (fadt->xpm_timer_block.space_id != | 711 | if (acpi_gbl_FADT.xpm_timer_block.space_id != |
724 | ACPI_ADR_SPACE_SYSTEM_IO) | 712 | ACPI_ADR_SPACE_SYSTEM_IO) |
725 | return 0; | 713 | return 0; |
726 | 714 | ||
727 | pmtmr_ioport = fadt->xpm_timer_block.address; | 715 | pmtmr_ioport = acpi_gbl_FADT.xpm_timer_block.address; |
728 | /* | 716 | /* |
729 | * "X" fields are optional extensions to the original V1.0 | 717 | * "X" fields are optional extensions to the original V1.0 |
730 | * fields, so we must selectively expand V1.0 fields if the | 718 | * fields, so we must selectively expand V1.0 fields if the |
731 | * corresponding X field is zero. | 719 | * corresponding X field is zero. |
732 | */ | 720 | */ |
733 | if (!pmtmr_ioport) | 721 | if (!pmtmr_ioport) |
734 | pmtmr_ioport = fadt->pm_timer_block; | 722 | pmtmr_ioport = acpi_gbl_FADT.pm_timer_block; |
735 | } else { | 723 | } else { |
736 | /* FADT rev. 1 */ | 724 | /* FADT rev. 1 */ |
737 | pmtmr_ioport = fadt->pm_timer_block; | 725 | pmtmr_ioport = acpi_gbl_FADT.pm_timer_block; |
738 | } | 726 | } |
739 | if (pmtmr_ioport) | 727 | if (pmtmr_ioport) |
740 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", | 728 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", |
@@ -776,13 +764,13 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
776 | if (!cpu_has_apic) | 764 | if (!cpu_has_apic) |
777 | return -ENODEV; | 765 | return -ENODEV; |
778 | 766 | ||
779 | /* | 767 | /* |
780 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | 768 | * Note that the LAPIC address is obtained from the MADT (32-bit value) |
781 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | 769 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). |
782 | */ | 770 | */ |
783 | 771 | ||
784 | count = | 772 | count = |
785 | acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, | 773 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, |
786 | acpi_parse_lapic_addr_ovr, 0); | 774 | acpi_parse_lapic_addr_ovr, 0); |
787 | if (count < 0) { | 775 | if (count < 0) { |
788 | printk(KERN_ERR PREFIX | 776 | printk(KERN_ERR PREFIX |
@@ -792,7 +780,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
792 | 780 | ||
793 | mp_register_lapic_address(acpi_lapic_addr); | 781 | mp_register_lapic_address(acpi_lapic_addr); |
794 | 782 | ||
795 | count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic, | 783 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic, |
796 | MAX_APICS); | 784 | MAX_APICS); |
797 | if (!count) { | 785 | if (!count) { |
798 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); | 786 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); |
@@ -805,7 +793,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
805 | } | 793 | } |
806 | 794 | ||
807 | count = | 795 | count = |
808 | acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0); | 796 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); |
809 | if (count < 0) { | 797 | if (count < 0) { |
810 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 798 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
811 | /* TBD: Cleanup to allow fallback to MPS */ | 799 | /* TBD: Cleanup to allow fallback to MPS */ |
@@ -834,7 +822,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
834 | return -ENODEV; | 822 | return -ENODEV; |
835 | } | 823 | } |
836 | 824 | ||
837 | if (!cpu_has_apic) | 825 | if (!cpu_has_apic) |
838 | return -ENODEV; | 826 | return -ENODEV; |
839 | 827 | ||
840 | /* | 828 | /* |
@@ -847,7 +835,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
847 | } | 835 | } |
848 | 836 | ||
849 | count = | 837 | count = |
850 | acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, | 838 | acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic, |
851 | MAX_IO_APICS); | 839 | MAX_IO_APICS); |
852 | if (!count) { | 840 | if (!count) { |
853 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); | 841 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); |
@@ -858,7 +846,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
858 | } | 846 | } |
859 | 847 | ||
860 | count = | 848 | count = |
861 | acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, | 849 | acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr, |
862 | NR_IRQ_VECTORS); | 850 | NR_IRQ_VECTORS); |
863 | if (count < 0) { | 851 | if (count < 0) { |
864 | printk(KERN_ERR PREFIX | 852 | printk(KERN_ERR PREFIX |
@@ -878,7 +866,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
878 | mp_config_acpi_legacy_irqs(); | 866 | mp_config_acpi_legacy_irqs(); |
879 | 867 | ||
880 | count = | 868 | count = |
881 | acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, | 869 | acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src, |
882 | NR_IRQ_VECTORS); | 870 | NR_IRQ_VECTORS); |
883 | if (count < 0) { | 871 | if (count < 0) { |
884 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); | 872 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); |
@@ -900,7 +888,7 @@ static void __init acpi_process_madt(void) | |||
900 | #ifdef CONFIG_X86_LOCAL_APIC | 888 | #ifdef CONFIG_X86_LOCAL_APIC |
901 | int count, error; | 889 | int count, error; |
902 | 890 | ||
903 | count = acpi_table_parse("APIC", acpi_parse_madt); | 891 | count = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt); |
904 | if (count >= 1) { | 892 | if (count >= 1) { |
905 | 893 | ||
906 | /* | 894 | /* |
@@ -1187,7 +1175,7 @@ int __init acpi_boot_table_init(void) | |||
1187 | if (acpi_disabled && !acpi_ht) | 1175 | if (acpi_disabled && !acpi_ht) |
1188 | return 1; | 1176 | return 1; |
1189 | 1177 | ||
1190 | /* | 1178 | /* |
1191 | * Initialize the ACPI boot-time table parser. | 1179 | * Initialize the ACPI boot-time table parser. |
1192 | */ | 1180 | */ |
1193 | error = acpi_table_init(); | 1181 | error = acpi_table_init(); |
@@ -1196,7 +1184,7 @@ int __init acpi_boot_table_init(void) | |||
1196 | return error; | 1184 | return error; |
1197 | } | 1185 | } |
1198 | 1186 | ||
1199 | acpi_table_parse("BOOT", acpi_parse_sbf); | 1187 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); |
1200 | 1188 | ||
1201 | /* | 1189 | /* |
1202 | * blacklist may disable ACPI entirely | 1190 | * blacklist may disable ACPI entirely |
@@ -1224,7 +1212,7 @@ int __init acpi_boot_init(void) | |||
1224 | if (acpi_disabled && !acpi_ht) | 1212 | if (acpi_disabled && !acpi_ht) |
1225 | return 1; | 1213 | return 1; |
1226 | 1214 | ||
1227 | acpi_table_parse("BOOT", acpi_parse_sbf); | 1215 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); |
1228 | 1216 | ||
1229 | /* | 1217 | /* |
1230 | * set sci_int and PM timer address | 1218 | * set sci_int and PM timer address |
@@ -1236,7 +1224,7 @@ int __init acpi_boot_init(void) | |||
1236 | */ | 1224 | */ |
1237 | acpi_process_madt(); | 1225 | acpi_process_madt(); |
1238 | 1226 | ||
1239 | acpi_table_parse("HPET", acpi_parse_hpet); | 1227 | acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet); |
1240 | 1228 | ||
1241 | return 0; | 1229 | return 0; |
1242 | } | 1230 | } |
@@ -1307,13 +1295,17 @@ static int __init setup_acpi_sci(char *s) | |||
1307 | if (!s) | 1295 | if (!s) |
1308 | return -EINVAL; | 1296 | return -EINVAL; |
1309 | if (!strcmp(s, "edge")) | 1297 | if (!strcmp(s, "edge")) |
1310 | acpi_sci_flags.trigger = 1; | 1298 | acpi_sci_flags = ACPI_MADT_TRIGGER_EDGE | |
1299 | (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); | ||
1311 | else if (!strcmp(s, "level")) | 1300 | else if (!strcmp(s, "level")) |
1312 | acpi_sci_flags.trigger = 3; | 1301 | acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL | |
1302 | (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); | ||
1313 | else if (!strcmp(s, "high")) | 1303 | else if (!strcmp(s, "high")) |
1314 | acpi_sci_flags.polarity = 1; | 1304 | acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH | |
1305 | (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); | ||
1315 | else if (!strcmp(s, "low")) | 1306 | else if (!strcmp(s, "low")) |
1316 | acpi_sci_flags.polarity = 3; | 1307 | acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW | |
1308 | (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); | ||
1317 | else | 1309 | else |
1318 | return -EINVAL; | 1310 | return -EINVAL; |
1319 | return 0; | 1311 | return 0; |