aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/smpboot.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-23 01:07:10 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-23 01:07:10 -0400
commit1410b0a7ad3178968c120bad726976fb48ab336b (patch)
tree1a2178acfeca2b9a33091e562f84f53bbcec9186 /arch/x86_64/kernel/smpboot.c
parente4deec6304cbd5fd08bf573eccc68787945071c2 (diff)
parentf6fdd7d9c273bb2a20ab467cb57067494f932fa3 (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/x86_64/kernel/smpboot.c')
-rw-r--r--arch/x86_64/kernel/smpboot.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index 6e4807d64d4..fa25e39fe54 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -334,7 +334,7 @@ static void __cpuinit tsc_sync_wait(void)
{
if (notscsync || !cpu_has_tsc)
return;
- sync_tsc(boot_cpu_id);
+ sync_tsc(0);
}
static __init int notscsync_setup(char *s)
@@ -492,6 +492,14 @@ void __cpuinit start_secondary(void)
*/
set_cpu_sibling_map(smp_processor_id());
+ /*
+ * 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.
+ */
+ tsc_sync_wait();
+
/*
* 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;
unlock_ipi_call_lock();
- mb();
-
- /* Wait for TSC sync to not schedule things before.
- We still process interrupts, which could see an inconsistent
- time in that window unfortunately. */
- tsc_sync_wait();
-
cpu_idle();
}