]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] Fix sync_tsc hang
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 29 Jul 2005 21:03:29 +0000 (14:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Jul 2005 22:01:13 +0000 (15:01 -0700)
commit3d483f47579461a4715db33c68ef8752e5a97a2d
tree6a4c9022074426d3551ff1b47c95f2bfe3f41828
parent94d2ac66c12397e2ca7988dbf59f24a966d275cb
[PATCH] Fix sync_tsc hang

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.

Minor changes by AK

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/smp.c
arch/x86_64/kernel/smpboot.c
include/asm-x86_64/smp.h