From owner-svn-src-projects@FreeBSD.ORG Tue Oct 30 21:04:16 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9928D0D; Tue, 30 Oct 2012 21:04:16 +0000 (UTC) (envelope-from cherry@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9238F8FC17; Tue, 30 Oct 2012 21:04:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UL4GGC075595; Tue, 30 Oct 2012 21:04:16 GMT (envelope-from cherry@svn.freebsd.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UL4Gi6075593; Tue, 30 Oct 2012 21:04:16 GMT (envelope-from cherry@svn.freebsd.org) Message-Id: <201210302104.q9UL4Gi6075593@svn.freebsd.org> From: "Cherry G. Mathew" Date: Tue, 30 Oct 2012 21:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r242376 - projects/amd64_xen_pv/sys/amd64/xen X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 21:04:16 -0000 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;