* [PATCH] x86_64: Fix safe_smp_processor_id after genapic
@ 2004-10-28 23:46 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2004-10-28 23:46 UTC (permalink / raw)
To: torvalds, akpm, linux-kernel, discuss
genapic broke early safe_smp_processor_id(), especially when you
got a WARN_ON or oops early it would loops forever in show_trace.
The reason was that the x86_cpu_to_apicid array wasn't correctly
initialized.
This patch fixes this by just testing for this case.
Orginally from James Cleverdon
Acked-by: Andi Kleen <ak@muc.de>
Please apply ASAP
Index: linux/include/asm-x86_64/smp.h
===================================================================
--- linux.orig/include/asm-x86_64/smp.h 2004-10-28 11:32:15.%N +0200
+++ linux/include/asm-x86_64/smp.h 2004-10-29 01:30:29.%N +0200
@@ -104,6 +104,11 @@
if (x86_cpu_to_apicid[i] == apicid)
return i;
+ /* No entries in x86_cpu_to_apicid? Either no MPS|ACPI,
+ * or called too early. Either way, we must be CPU 0. */
+ if (x86_cpu_to_apicid[0] == BAD_APICID)
+ return 0;
+
return -1;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-28 23:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28 23:46 [PATCH] x86_64: Fix safe_smp_processor_id after genapic Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome