]> git.ipfire.org Git - people/ms/linux.git/commit
[PATCH] x86_64: Fixing smpboot timing problem
authorAndi Kleen <ak@suse.de>
Wed, 10 Aug 2005 01:40:42 +0000 (03:40 +0200)
committerChris Wright <chrisw@osdl.org>
Mon, 15 Aug 2005 00:20:08 +0000 (17:20 -0700)
commit8f5a9b18ec1b8af04a8d9e1fcce04cf8dbb08019
treef81039ea497e3594f9968155eeb692a1a642fb6f
parent4491f6fe1c32fc8de79ceb3b57e90647aaca8cdb
[PATCH] x86_64: Fixing smpboot timing problem

This patch fixes the SMP boot timing problem that hit various people and was
introduced in 2.6.12. Please apply to stable.

>From Eric Biederman

sync_tsc was using smp_call_function to ask the boot processor
to report it's tsc value.  smp_call_function performs an IPI_send_allbutself
which is a broadcast ipi.  There is a window during processor startup during
which the target cpu has started and before it has initialized it's interrupt
vectors so it can properly process an interrupt.  Receveing an interrupt
during that window will triple fault the cpu and do other nasty things.

Why cli does not protect us from that is beyond me.

The simple fix is to match ia64 and provide a smp_call_function_single.
Which avoids the broadcast and is more efficient.

This certainly fixes the problem of getting stuck on boot which was
very easy to trigger on my SMP Hyperthreaded Xeon, and I think
it fixes it for the right reasons.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86_64/kernel/smp.c
arch/x86_64/kernel/smpboot.c
include/asm-x86_64/smp.h