Author: gber Date: Fri Feb 1 11:39:03 2013 New Revision: 246205 URL: http://svnweb.freebsd.org/changeset/base/246205
Log: Get time of next event from other cores only if SMP is already started. Reviewed by: mav Obtained from: Semihalf Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Fri Feb 1 10:26:31 2013 (r246204) +++ head/sys/kern/kern_clocksource.c Fri Feb 1 11:39:03 2013 (r246205) @@ -317,14 +317,16 @@ getnextevent(struct bintime *event) nonidle = !state->idle; if ((timer->et_flags & ET_FLAGS_PERCPU) == 0) { #ifdef SMP - CPU_FOREACH(cpu) { - if (curcpu == cpu) - continue; - state = DPCPU_ID_PTR(cpu, timerstate); - nonidle += !state->idle; - if (bintime_cmp(event, &state->nextevent, >)) { - *event = state->nextevent; - c = cpu; + if (smp_started) { + CPU_FOREACH(cpu) { + if (curcpu == cpu) + continue; + state = DPCPU_ID_PTR(cpu, timerstate); + nonidle += !state->idle; + if (bintime_cmp(event, &state->nextevent, >)) { + *event = state->nextevent; + c = cpu; + } } } #endif _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"