diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/apic.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 7c724ffa08bb..496a2c9909fe 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -559,14 +559,20 @@ void __devinit setup_local_APIC(void) | |||
559 | * If Linux enabled the LAPIC against the BIOS default | 559 | * If Linux enabled the LAPIC against the BIOS default |
560 | * disable it down before re-entering the BIOS on shutdown. | 560 | * disable it down before re-entering the BIOS on shutdown. |
561 | * Otherwise the BIOS may get confused and not power-off. | 561 | * Otherwise the BIOS may get confused and not power-off. |
562 | * Additionally clear all LVT entries before disable_local_APIC | ||
563 | * for the case where Linux didn't enable the LAPIC. | ||
562 | */ | 564 | */ |
563 | void lapic_shutdown(void) | 565 | void lapic_shutdown(void) |
564 | { | 566 | { |
565 | if (!cpu_has_apic || !enabled_via_apicbase) | 567 | if (!cpu_has_apic) |
566 | return; | 568 | return; |
567 | 569 | ||
568 | local_irq_disable(); | 570 | local_irq_disable(); |
569 | disable_local_APIC(); | 571 | clear_local_APIC(); |
572 | |||
573 | if (enabled_via_apicbase) | ||
574 | disable_local_APIC(); | ||
575 | |||
570 | local_irq_enable(); | 576 | local_irq_enable(); |
571 | } | 577 | } |
572 | 578 | ||