[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix wallclock initialisation in domain0.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 49671266459c22862ce878a0cb4386905ebac607
# Parent  4fa90e2a32578379e196bc7d856cf09b87a53277
Fix wallclock initialisation in domain0.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 4fa90e2a3257 -r 49671266459c 
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Wed Aug 10 14:11:40 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Wed Aug 10 15:14:50 2005
@@ -144,8 +144,6 @@
        return 1;
 }
 __setup("independent_wallclock", __independent_wallclock);
-#define INDEPENDENT_WALLCLOCK() \
-    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
 
 int tsc_disable __initdata = 0;
 
@@ -247,10 +245,7 @@
        }
        while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
 
-       if (INDEPENDENT_WALLCLOCK())
-               return;
-
-       if ((time_status & STA_UNSYNC) != 0)
+       if (independent_wallclock)
                return;
 
        /* Adjust wall-clock time base based on wall_jiffies ticks. */
@@ -425,7 +420,7 @@
        if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
                return -EINVAL;
 
-       if (!INDEPENDENT_WALLCLOCK())
+       if (!independent_wallclock && !(xen_start_info.flags & SIF_INITDOMAIN))
                return 0; /* Silent failure? */
 
        cpu = get_cpu();
@@ -471,7 +466,8 @@
        time_esterror = NTP_PHASE_LIMIT;
 
 #ifdef CONFIG_XEN_PRIVILEGED_GUEST
-       if (xen_start_info.flags & SIF_INITDOMAIN) {
+       if ((xen_start_info.flags & SIF_INITDOMAIN) &&
+           !independent_wallclock) {
                dom0_op_t op;
                op.cmd = DOM0_SETTIME;
                op.u.settime.secs        = xentime.tv_sec;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.