author Andi Kleen <[EMAIL PROTECTED]> Fri, 19 Aug 2005 06:56:40 +0200
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 20 Aug 2005 09:18:47 -0700
[PATCH] x86_64: Fix race in TSC synchronization
Plug a race in TSC synchronization
We need to do tsc_sync_wait() before the CPU is set online to prevent
multiple CPUs from doing it in parallel - which won't work because TSC
sync has global unprotected state.
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
arch/x86_64/kernel/smpboot.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
@@ -492,6 +492,14 @@ void __cpuinit start_secondary(void)
+ * Wait for TSC sync to not schedule things before.
+ * We still process interrupts, which could see an inconsistent
+ * time in that window unfortunately.
+ * Do this here because TSC sync has global unprotected state.
* We need to hold call_lock, so there is no inconsistency
* between the time smp_call_function() determines number of
@@ -509,13 +517,6 @@ void __cpuinit start_secondary(void)
per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
- /* Wait for TSC sync to not schedule things before.
- We still process interrupts, which could see an inconsistent
- time in that window unfortunately. */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html