[PATCH] x86: avoid early crash in disable_local_APIC()

From: Jan Beulich
Date: Wed Jan 14 2009 - 07:28:26 EST


E.g. when called due to an early panic.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
arch/x86/kernel/apic.c | 4 ++++
1 file changed, 4 insertions(+)

--- linux-2.6.29-rc1/arch/x86/kernel/apic.c 2009-01-14 11:36:05.000000000 +0100
+++ 2.6.29-rc1-x86-early-disable-lapic/arch/x86/kernel/apic.c 2009-01-06 16:51:35.000000000 +0100
@@ -894,6 +894,10 @@ void disable_local_APIC(void)
{
unsigned int value;

+ /* APIC hasn't been mapped yet */
+ if (!apic_phys)
+ return;
+
clear_local_APIC();

/*



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/