Get time of next event from other cores only if SMP is already started.
Reviewed by: mav Obtained from: Semihalf
This commit is contained in:
parent
1211375f6e
commit
2d7d16429c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246205
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user