Mercurial > illumos > illumos-gate
changeset 3021:900097ae20cf onnv_52
6446729 "cpu 1 failed to start" when TSC counters are not in sync
author | dmick |
---|---|
date | Mon, 30 Oct 2006 19:52:43 -0800 |
parents | 79d475d7c10a |
children | 710f1f5e80c5 |
files | usr/src/uts/i86pc/os/mp_startup.c |
diffstat | 1 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/os/mp_startup.c Mon Oct 30 19:51:56 2006 -0800 +++ b/usr/src/uts/i86pc/os/mp_startup.c Mon Oct 30 19:52:43 2006 -0800 @@ -1094,6 +1094,19 @@ 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 @@ 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.