ia64/xen-unstable

changeset 5076:d55569f2ac18

bitkeeper revision 1.1505 (428f2c4c-dG46JqogSF24go6sxrccw)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk
date Sat May 21 12:40:44 2005 +0000 (2005-05-21)
parents 07bd52c0f8de 543ffea3fc12
children 8a1faeb0d3c6
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c	Sat May 21 10:42:50 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c	Sat May 21 12:40:44 2005 +0000
     1.3 @@ -692,7 +692,12 @@ void __init time_init(void)
     1.4  /* Convert jiffies to system time. Call with xtime_lock held for reading. */
     1.5  static inline u64 __jiffies_to_st(unsigned long j) 
     1.6  {
     1.7 -	return processed_system_time + ((j - jiffies) * NS_PER_TICK);
     1.8 +	long delta = j - jiffies;
     1.9 +	/* NB. The next check can trigger in some wrap-around cases, but
    1.10 +	 * that's ok -- we'll just end up with a shorter timeout. */
    1.11 +	if (delta < 1)
    1.12 +		delta = 1;
    1.13 +	return processed_system_time + (delta * NS_PER_TICK);
    1.14  }
    1.15  
    1.16  /*
    1.17 @@ -728,8 +733,6 @@ int set_timeout_timer(void)
    1.18  	} while (read_seqretry(&xtime_lock, seq));
    1.19  #else
    1.20  	j = next_timer_interrupt();
    1.21 -	if (j < (jiffies + 1))
    1.22 -		j = jiffies + 1;
    1.23  	alarm = __jiffies_to_st(j);
    1.24  #endif
    1.25