diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-08-18 12:45:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-18 20:07:13 -0400 |
commit | fe4024dcb0c01e5399394d2807406a2c13fb1eb7 (patch) | |
tree | b8d80e4c79b2b7fa058c788fb895f0414255ce87 /arch/x86/kernel/apic_64.c | |
parent | 990b183e58cb513a62492b6218987750e106cbfb (diff) |
x86: apic - unify lapic_shutdown
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 | } |