[PATCH] i386/x86-64 disable LAPIC completely for offline CPU
authorShaohua Li <shaohua.li@intel.com>
Tue, 13 Dec 2005 06:17:08 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Dec 2005 06:31:16 +0000 (22:31 -0800)
Disabling LAPIC timer isn't sufficient.  In some situations, such as we
enabled NMI watchdog, there is still unexpected interrupt (such as NMI)
invoked in offline CPU.  This also avoids offline CPU receives spurious
interrupt and anything similar.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/smpboot.c
arch/x86_64/kernel/smpboot.c

index d16520da4550e6d1b5d318a56a2f1ba1b852728c..9ed449af8e9fdd350a42ff2c606c0af154dad875 100644 (file)
@@ -1338,8 +1338,7 @@ int __cpu_disable(void)
        if (cpu == 0)
                return -EBUSY;
 
-       /* We enable the timer again on the exit path of the death loop */
-       disable_APIC_timer();
+       clear_local_APIC();
        /* Allow any queued timer interrupts to get serviced */
        local_irq_enable();
        mdelay(1);
index 683c33f7b96753219a2c1043246dcdfac12b999e..ecbd7b83acc1ff7b9024d6de6fd1762ed58320f0 100644 (file)
@@ -1181,7 +1181,7 @@ int __cpu_disable(void)
        if (cpu == 0)
                return -EBUSY;
 
-       disable_APIC_timer();
+       clear_local_APIC();
 
        /*
         * HACK: