svn commit: r184266 - head/sys/i386/xen

Kip Macy kmacy at FreeBSD.org
Sat Oct 25 13:42:11 PDT 2008


Author: kmacy
Date: Sat Oct 25 20:42:10 2008
New Revision: 184266
URL: http://svn.freebsd.org/changeset/base/184266

Log:
  only call hardclock on cpu0
  
  pointed out by: Scott Long

Modified:
  head/sys/i386/xen/clock.c

Modified: head/sys/i386/xen/clock.c
==============================================================================
--- head/sys/i386/xen/clock.c	Sat Oct 25 18:45:40 2008	(r184265)
+++ head/sys/i386/xen/clock.c	Sat Oct 25 20:42:10 2008	(r184266)
@@ -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


More information about the svn-src-all mailing list