]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/i386/kernel/apic.c
[PATCH] x86: missing printk newline in apic boot option parser
[karo-tx-linux.git] / arch / i386 / kernel / apic.c
index 5546ddebec33dc994c93b5f3f604867da4e94413..d8f94e78de8ab293465a32ebeb6af15a7e0d1554 100644 (file)
@@ -559,14 +559,20 @@ void __devinit setup_local_APIC(void)
  * If Linux enabled the LAPIC against the BIOS default
  * disable it down before re-entering the BIOS on shutdown.
  * Otherwise the BIOS may get confused and not power-off.
+ * Additionally clear all LVT entries before disable_local_APIC
+ * for the case where Linux didn't enable the LAPIC.
  */
 void lapic_shutdown(void)
 {
-       if (!cpu_has_apic || !enabled_via_apicbase)
+       if (!cpu_has_apic)
                return;
 
        local_irq_disable();
-       disable_local_APIC();
+       clear_local_APIC();
+
+       if (enabled_via_apicbase)
+               disable_local_APIC();
+
        local_irq_enable();
 }
 
@@ -715,7 +721,7 @@ static int __init apic_set_verbosity(char *str)
                apic_verbosity = APIC_VERBOSE;
        else
                printk(KERN_WARNING "APIC Verbosity level %s not recognised"
-                               " use apic=verbose or apic=debug", str);
+                               " use apic=verbose or apic=debug\n", str);
 
        return 0;
 }
@@ -1046,10 +1052,11 @@ static unsigned int calibration_result;
 
 void __init setup_boot_APIC_clock(void)
 {
+       unsigned long flags;
        apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n");
        using_apic_timer = 1;
 
-       local_irq_disable();
+       local_irq_save(flags);
 
        calibration_result = calibrate_APIC_clock();
        /*
@@ -1057,7 +1064,7 @@ void __init setup_boot_APIC_clock(void)
         */
        setup_APIC_timer(calibration_result);
 
-       local_irq_enable();
+       local_irq_restore(flags);
 }
 
 void __devinit setup_secondary_APIC_clock(void)