1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

only call hardclock on cpu0

pointed out by: Scott Long
This commit is contained in:
Kip Macy 2008-10-25 20:42:10 +00:00
parent 53cb00a92b
commit e67fc8f258
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184266

View File

@ -315,7 +315,10 @@ clkintr(void *arg)
processed_system_time += (delta / NS_PER_TICK) * NS_PER_TICK;
per_cpu(processed_system_time, cpu) += (delta_cpu / NS_PER_TICK) * NS_PER_TICK;
}
hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
if (PCPU_GET(cpuid) == 0)
hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
else
hardclock_cpu(TRAPF_USERMODE(frame));
/*
* Take synchronised time from Xen once a minute if we're not