diff options
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 766332e45592..c26468da4295 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -44,9 +44,6 @@ ACPI_MODULE_NAME("acpi_bus") | |||
44 | extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); | 44 | extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | struct fadt_descriptor acpi_fadt; | ||
48 | EXPORT_SYMBOL(acpi_fadt); | ||
49 | |||
50 | struct acpi_device *acpi_root; | 47 | struct acpi_device *acpi_root; |
51 | struct proc_dir_entry *acpi_root_dir; | 48 | struct proc_dir_entry *acpi_root_dir; |
52 | EXPORT_SYMBOL(acpi_root_dir); | 49 | EXPORT_SYMBOL(acpi_root_dir); |
@@ -195,7 +192,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) | |||
195 | 192 | ||
196 | if (!device->flags.power_manageable) { | 193 | if (!device->flags.power_manageable) { |
197 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n", | 194 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n", |
198 | device->kobj.name)); | 195 | device->dev.kobj.name)); |
199 | return -ENODEV; | 196 | return -ENODEV; |
200 | } | 197 | } |
201 | /* | 198 | /* |
@@ -582,11 +579,12 @@ static int __init acpi_bus_init_irq(void) | |||
582 | return 0; | 579 | return 0; |
583 | } | 580 | } |
584 | 581 | ||
582 | acpi_native_uint acpi_gbl_permanent_mmap; | ||
583 | |||
584 | |||
585 | void __init acpi_early_init(void) | 585 | void __init acpi_early_init(void) |
586 | { | 586 | { |
587 | acpi_status status = AE_OK; | 587 | acpi_status status = AE_OK; |
588 | struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt }; | ||
589 | |||
590 | 588 | ||
591 | if (acpi_disabled) | 589 | if (acpi_disabled) |
592 | return; | 590 | return; |
@@ -597,6 +595,15 @@ void __init acpi_early_init(void) | |||
597 | if (!acpi_strict) | 595 | if (!acpi_strict) |
598 | acpi_gbl_enable_interpreter_slack = TRUE; | 596 | acpi_gbl_enable_interpreter_slack = TRUE; |
599 | 597 | ||
598 | acpi_gbl_permanent_mmap = 1; | ||
599 | |||
600 | status = acpi_reallocate_root_table(); | ||
601 | if (ACPI_FAILURE(status)) { | ||
602 | printk(KERN_ERR PREFIX | ||
603 | "Unable to reallocate ACPI tables\n"); | ||
604 | goto error0; | ||
605 | } | ||
606 | |||
600 | status = acpi_initialize_subsystem(); | 607 | status = acpi_initialize_subsystem(); |
601 | if (ACPI_FAILURE(status)) { | 608 | if (ACPI_FAILURE(status)) { |
602 | printk(KERN_ERR PREFIX | 609 | printk(KERN_ERR PREFIX |
@@ -611,32 +618,25 @@ void __init acpi_early_init(void) | |||
611 | goto error0; | 618 | goto error0; |
612 | } | 619 | } |
613 | 620 | ||
614 | /* | ||
615 | * Get a separate copy of the FADT for use by other drivers. | ||
616 | */ | ||
617 | status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &buffer); | ||
618 | if (ACPI_FAILURE(status)) { | ||
619 | printk(KERN_ERR PREFIX "Unable to get the FADT\n"); | ||
620 | goto error0; | ||
621 | } | ||
622 | #ifdef CONFIG_X86 | 621 | #ifdef CONFIG_X86 |
623 | if (!acpi_ioapic) { | 622 | if (!acpi_ioapic) { |
624 | extern acpi_interrupt_flags acpi_sci_flags; | 623 | extern u8 acpi_sci_flags; |
625 | 624 | ||
626 | /* compatible (0) means level (3) */ | 625 | /* compatible (0) means level (3) */ |
627 | if (acpi_sci_flags.trigger == 0) | 626 | if (!(acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)) { |
628 | acpi_sci_flags.trigger = 3; | 627 | acpi_sci_flags &= ~ACPI_MADT_TRIGGER_MASK; |
629 | 628 | acpi_sci_flags |= ACPI_MADT_TRIGGER_LEVEL; | |
629 | } | ||
630 | /* Set PIC-mode SCI trigger type */ | 630 | /* Set PIC-mode SCI trigger type */ |
631 | acpi_pic_sci_set_trigger(acpi_fadt.sci_int, | 631 | acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt, |
632 | acpi_sci_flags.trigger); | 632 | (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2); |
633 | } else { | 633 | } else { |
634 | extern int acpi_sci_override_gsi; | 634 | extern int acpi_sci_override_gsi; |
635 | /* | 635 | /* |
636 | * now that acpi_fadt is initialized, | 636 | * now that acpi_gbl_FADT is initialized, |
637 | * update it with result from INT_SRC_OVR parsing | 637 | * update it with result from INT_SRC_OVR parsing |
638 | */ | 638 | */ |
639 | acpi_fadt.sci_int = acpi_sci_override_gsi; | 639 | acpi_gbl_FADT.sci_interrupt = acpi_sci_override_gsi; |
640 | } | 640 | } |
641 | #endif | 641 | #endif |
642 | 642 | ||