diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/kernel/apic_32.c | 9 | ||||
| -rw-r--r-- | arch/x86/kernel/apic_64.c | 14 |
2 files changed, 19 insertions, 4 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 13c4b79441da..d4efe86adc72 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
| @@ -838,10 +838,13 @@ void lapic_shutdown(void) | |||
| 838 | 838 | ||
| 839 | local_irq_save(flags); | 839 | local_irq_save(flags); |
| 840 | 840 | ||
| 841 | if (enabled_via_apicbase) | 841 | #ifdef CONFIG_X86_32 |
| 842 | disable_local_APIC(); | 842 | if (!enabled_via_apicbase) |
| 843 | else | ||
| 844 | clear_local_APIC(); | 843 | clear_local_APIC(); |
| 844 | else | ||
| 845 | #endif | ||
| 846 | disable_local_APIC(); | ||
| 847 | |||
| 845 | 848 | ||
| 846 | local_irq_restore(flags); | 849 | local_irq_restore(flags); |
| 847 | } | 850 | } |
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 | } |
