diff options
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r-- | arch/x86/kernel/apic_64.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 4fb903b2fc39..48806546d49f 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -707,6 +707,12 @@ void disable_local_APIC(void) | |||
707 | #endif | 707 | #endif |
708 | } | 708 | } |
709 | 709 | ||
710 | /* | ||
711 | * If Linux enabled the LAPIC against the BIOS default disable it down before | ||
712 | * re-entering the BIOS on shutdown. Otherwise the BIOS may get confused and | ||
713 | * not power-off. Additionally clear all LVT entries before disable_local_APIC | ||
714 | * for the case where Linux didn't enable the LAPIC. | ||
715 | */ | ||
710 | void lapic_shutdown(void) | 716 | void lapic_shutdown(void) |
711 | { | 717 | { |
712 | unsigned long flags; | 718 | unsigned long flags; |
@@ -716,7 +722,13 @@ void lapic_shutdown(void) | |||
716 | 722 | ||
717 | local_irq_save(flags); | 723 | local_irq_save(flags); |
718 | 724 | ||
719 | disable_local_APIC(); | 725 | #ifdef CONFIG_X86_32 |
726 | if (!enabled_via_apicbase) | ||
727 | clear_local_APIC(); | ||
728 | else | ||
729 | #endif | ||
730 | disable_local_APIC(); | ||
731 | |||
720 | 732 | ||
721 | local_irq_restore(flags); | 733 | local_irq_restore(flags); |
722 | } | 734 | } |