summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authordmick <none@none>2006-10-30 19:52:43 -0800
committerdmick <none@none>2006-10-30 19:52:43 -0800
commit24a74e8643becb09ded63dca3be07d7aec202cbc (patch)
tree762acc69875d6f16af69a02ea5152746b240d023 /usr/src
parent7544909da5f7d5b467625910225a72e142c4b6b7 (diff)
downloadillumos-joyent-24a74e8643becb09ded63dca3be07d7aec202cbc.tar.gz
6446729 "cpu 1 failed to start" when TSC counters are not in sync
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/i86pc/os/mp_startup.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/usr/src/uts/i86pc/os/mp_startup.c b/usr/src/uts/i86pc/os/mp_startup.c
index edde7c74b3..77e14330de 100644
--- a/usr/src/uts/i86pc/os/mp_startup.c
+++ b/usr/src/uts/i86pc/os/mp_startup.c
@@ -1094,6 +1094,19 @@ mp_startup(void)
uint_t new_x86_feature;
/*
+ * We need to get TSC on this proc synced (i.e., any delta
+ * from cpu0 accounted for) as soon as we can, because many
+ * many things use gethrtime/pc_gethrestime, including
+ * interrupts, cmn_err, etc.
+ */
+
+ /* Let cpu0 continue into tsc_sync_master() */
+ CPUSET_ATOMIC_ADD(procset, cp->cpu_id);
+
+ if (tsc_gethrtime_enable)
+ tsc_sync_slave();
+
+ /*
* Once this was done from assembly, but it's safer here; if
* it blocks, we need to be able to swtch() to and from, and
* since we get here by calling t_pc, we need to do that call
@@ -1156,11 +1169,6 @@ mp_startup(void)
init_cpu_info(cp);
- CPUSET_ATOMIC_ADD(procset, cp->cpu_id);
-
- if (tsc_gethrtime_enable)
- tsc_sync_slave();
-
mutex_enter(&cpu_lock);
/*
* It's unfortunate that chip_cpu_init() has to be called here.