Skip to contentSkip to conversation

disable LAPIC completely for offline CPU

PATCH New Shaohua Li 1 participant 1 message Nov 23, 2005

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 disable LAPIC completely for offline CPU

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.

---

 linux-2.6.14-root/arch/i386/kernel/smpboot.c   |    3 +--
 linux-2.6.14-root/arch/x86_64/kernel/smpboot.c |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
arch/x86_64/kernel/smpboot.c renamed from arch/x86_64/kernel/smpboot.c~cpuhp-disable-lapic +1 -1
diff -puN arch/x86_64/kernel/smpboot.c~cpuhp-disable-lapic arch/x86_64/kernel/smpboot.c
@@ -1181,7 +1181,7 @@ int __cpu_disable(void)
 	if (cpu == 0)
 		return -EBUSY;
 
-	disable_APIC_timer();
+	disable_local_APIC();
 
 	/*
 	 * HACK:
arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c~cpuhp-disable-lapic +1 -2
diff -puN arch/i386/kernel/smpboot.c~cpuhp-disable-lapic arch/i386/kernel/smpboot.c
@@ -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();
+	disable_local_APIC();
 	/* Allow any queued timer interrupts to get serviced */
 	local_irq_enable();
 	mdelay(1);

_