svn commit: r242376 - projects/amd64_xen_pv/sys/amd64/xen

Cherry G. Mathew cherry at FreeBSD.org
Tue Oct 30 21:04:16 UTC 2012


Author: cherry
Date: Tue Oct 30 21:04:16 2012
New Revision: 242376
URL: http://svn.freebsd.org/changeset/base/242376

Log:
  - Add a temporary MI shim for do_div(). This is suboptimal but functions and
  allows boot to proceed.
  - While processing system time, update timestamp from local vcpu instead of vcpu0
  
  Approved by: gibbs (implicit)

Modified:
  projects/amd64_xen_pv/sys/amd64/xen/clock.c

Modified: projects/amd64_xen_pv/sys/amd64/xen/clock.c
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/xen/clock.c	Tue Oct 30 21:04:12 2012	(r242375)
+++ projects/amd64_xen_pv/sys/amd64/xen/clock.c	Tue Oct 30 21:04:16 2012	(r242376)
@@ -160,7 +160,7 @@ SYSCTL_INT(_machdep, OID_AUTO, xen_disab
     __asm__ __volatile__("rdtsc" : "=A" (val))
 
 #else /* !__amd64__ */
-#define do_div(n,base) do {} while(0); /* XXX: TODO */
+#define do_div(n,base) (n) = (n)/(base) /* XXX: TODO - assembler optimise */
 #define NS_PER_TICK (1000000000ULL/hz)
 #endif /* !__amd64__ */
 
@@ -516,7 +516,7 @@ startrtclock()
 
 	/* initialize xen values */
 	__get_time_values_from_xen();
-	processed_system_time = per_cpu(shadow_time, 0).system_timestamp;
+	processed_system_time = per_cpu(shadow_time, smp_processor_id()).system_timestamp;
 
 	__cpu_khz = 1000000ULL << 32;
 	info = &HYPERVISOR_shared_info->vcpu_info[0].time;


More information about the svn-src-projects mailing list