ia64/xen-unstable

changeset 2564:0a062a592e97

bitkeeper revision 1.1159.1.189 (41583f85F6e-ZiwZL5lxbc3U6KIkeQ)

DOM0 never picks up wallclock time from Xen after initial boot.
author kaf24@freefall.cl.cam.ac.uk
date Mon Sep 27 16:27:49 2004 +0000 (2004-09-27)
parents b68e751add47
children 3f0a9708178b
files linux-2.4.27-xen-sparse/arch/xen/kernel/time.c linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c
line diff
     1.1 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c	Mon Sep 27 13:12:49 2004 +0000
     1.2 +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c	Mon Sep 27 16:27:49 2004 +0000
     1.3 @@ -127,7 +127,8 @@ static int __init __independent_wallcloc
     1.4      return 1;
     1.5  }
     1.6  __setup("independent_wallclock", __independent_wallclock);
     1.7 -
     1.8 +#define INDEPENDENT_WALLCLOCK() \
     1.9 +    (independent_wallclock || (start_info.flags & SIF_INITDOMAIN))
    1.10  
    1.11  #ifdef CONFIG_XEN_PRIVILEGED_GUEST
    1.12  /*
    1.13 @@ -302,7 +303,7 @@ void do_settimeofday(struct timeval *tv)
    1.14      struct timeval newtv;
    1.15      suseconds_t usec;
    1.16      
    1.17 -    if ( !independent_wallclock && !(start_info.flags & SIF_INITDOMAIN) )
    1.18 +    if ( !INDEPENDENT_WALLCLOCK() )
    1.19          return;
    1.20      
    1.21      write_lock_irq(&xtime_lock);
    1.22 @@ -424,7 +425,7 @@ static inline void do_timer_interrupt(in
    1.23       * synchronised ourselves, and we haven't chosen to keep an independent
    1.24       * time base.
    1.25       */
    1.26 -    if ( !independent_wallclock && 
    1.27 +    if ( !INDEPENDENT_WALLCLOCK() &&
    1.28           ((time_status & STA_UNSYNC) != 0) &&
    1.29           (xtime.tv_sec > (last_update_from_xen + 60)) )
    1.30      {
     2.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c	Mon Sep 27 13:12:49 2004 +0000
     2.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c	Mon Sep 27 16:27:49 2004 +0000
     2.3 @@ -146,6 +146,8 @@ static int __init __independent_wallcloc
     2.4  	return 1;
     2.5  }
     2.6  __setup("independent_wallclock", __independent_wallclock);
     2.7 +#define INDEPENDENT_WALLCLOCK() \
     2.8 +    (independent_wallclock || (start_info.flags & SIF_INITDOMAIN))
     2.9  
    2.10  /*
    2.11   * Reads a consistent set of time-base values from Xen, into a shadow data
    2.12 @@ -260,7 +262,7 @@ int do_settimeofday(struct timespec *tv)
    2.13  	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
    2.14  		return -EINVAL;
    2.15  
    2.16 -	if (!independent_wallclock && !(start_info.flags & SIF_INITDOMAIN))
    2.17 +	if (!INDEPENDENT_WALLCLOCK())
    2.18  		return 0; /* Silent failure? */
    2.19  
    2.20  	write_seqlock_irq(&xtime_lock);
    2.21 @@ -392,7 +394,7 @@ static inline void do_timer_interrupt(in
    2.22  	 * synchronised ourselves, and we haven't chosen to keep an independent
    2.23  	 * time base.
    2.24  	 */
    2.25 -	if (!independent_wallclock && 
    2.26 +	if (!INDEPENDENT_WALLCLOCK() &&
    2.27  	    ((time_status & STA_UNSYNC) != 0) &&
    2.28  	    (xtime.tv_sec > (last_update_from_xen + 60))) {
    2.29  		/* Adjust shadow for jiffies that haven't updated xtime yet. */