Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 21:04:16 +0000 (UTC)
From:      "Cherry G. Mathew" <cherry@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r242376 - projects/amd64_xen_pv/sys/amd64/xen
Message-ID:  <201210302104.q9UL4Gi6075593@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210302104.q9UL4Gi6075593>