ia64/xen-unstable

changeset 6095:49671266459c

Fix wallclock initialisation in domain0.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Aug 10 15:14:50 2005 +0000 (2005-08-10)
parents 4fa90e2a3257
children 662c9d34b3c7 3d470e8d41f0
files linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Wed Aug 10 14:11:40 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Wed Aug 10 15:14:50 2005 +0000
     1.3 @@ -144,8 +144,6 @@ static int __init __independent_wallcloc
     1.4  	return 1;
     1.5  }
     1.6  __setup("independent_wallclock", __independent_wallclock);
     1.7 -#define INDEPENDENT_WALLCLOCK() \
     1.8 -    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
     1.9  
    1.10  int tsc_disable __initdata = 0;
    1.11  
    1.12 @@ -247,10 +245,7 @@ static void update_wallclock(void)
    1.13  	}
    1.14  	while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version));
    1.15  
    1.16 -	if (INDEPENDENT_WALLCLOCK())
    1.17 -		return;
    1.18 -
    1.19 -	if ((time_status & STA_UNSYNC) != 0)
    1.20 +	if (independent_wallclock)
    1.21  		return;
    1.22  
    1.23  	/* Adjust wall-clock time base based on wall_jiffies ticks. */
    1.24 @@ -425,7 +420,7 @@ int do_settimeofday(struct timespec *tv)
    1.25  	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
    1.26  		return -EINVAL;
    1.27  
    1.28 -	if (!INDEPENDENT_WALLCLOCK())
    1.29 +	if (!independent_wallclock && !(xen_start_info.flags & SIF_INITDOMAIN))
    1.30  		return 0; /* Silent failure? */
    1.31  
    1.32  	cpu = get_cpu();
    1.33 @@ -471,7 +466,8 @@ int do_settimeofday(struct timespec *tv)
    1.34  	time_esterror = NTP_PHASE_LIMIT;
    1.35  
    1.36  #ifdef CONFIG_XEN_PRIVILEGED_GUEST
    1.37 -	if (xen_start_info.flags & SIF_INITDOMAIN) {
    1.38 +	if ((xen_start_info.flags & SIF_INITDOMAIN) &&
    1.39 +	    !independent_wallclock) {
    1.40  		dom0_op_t op;
    1.41  		op.cmd = DOM0_SETTIME;
    1.42  		op.u.settime.secs        = xentime.tv_sec;