ia64/xen-unstable

changeset 2652:756c16a98f27

bitkeeper revision 1.1159.113.3 (41723f7fO8wKQjhPjoowbDHAwaKf-g)

Always check shadow time values are up to date in time interrupt.
author kaf24@freefall.cl.cam.ac.uk
date Sun Oct 17 09:46:39 2004 +0000 (2004-10-17)
parents 11aa3dfa5e00
children 6ca032e0b814 995b4f827a8b cb94a45f41fb
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	Sat Oct 16 23:31:39 2004 +0000
     1.2 +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c	Sun Oct 17 09:46:39 2004 +0000
     1.3 @@ -393,14 +393,17 @@ static inline void do_timer_interrupt(in
     1.4      unsigned long ticks = 0;
     1.5      long sec_diff;
     1.6  
     1.7 - retry:
     1.8 -    __get_time_values_from_xen();
     1.9 +    do {
    1.10 +        __get_time_values_from_xen();
    1.11 +        
    1.12 +        delta = (s64)(shadow_system_time + 
    1.13 +                      (__get_time_delta_usecs() * 1000) -
    1.14 +                      processed_system_time);
    1.15 +    }
    1.16 +    while ( !TIME_VALUES_UP_TO_DATE );
    1.17  
    1.18 -    if ( (delta = (s64)(shadow_system_time + __get_time_delta_usecs() * 1000 -
    1.19 -						processed_system_time)) < 0 )
    1.20 +    if ( unlikely(delta < 0) )
    1.21      {
    1.22 -		if (!TIME_VALUES_UP_TO_DATE)
    1.23 -			goto retry;
    1.24          printk("Timer ISR: Time went backwards: %lld\n", delta);
    1.25          return;
    1.26      }
     2.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c	Sat Oct 16 23:31:39 2004 +0000
     2.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c	Sun Oct 17 09:46:39 2004 +0000
     2.3 @@ -367,15 +367,16 @@ static inline void do_timer_interrupt(in
     2.4  	s64 delta, nsec;
     2.5  	long sec_diff, wtm_nsec;
     2.6  
     2.7 - retry:
     2.8 -	__get_time_values_from_xen();
     2.9 +	do {
    2.10 +		__get_time_values_from_xen();
    2.11  
    2.12 -	delta = (s64)(shadow_system_time +
    2.13 -		      (cur_timer->get_offset() * NSEC_PER_USEC) -
    2.14 -		      processed_system_time);
    2.15 -	if (delta < 0) {
    2.16 -		if (!TIME_VALUES_UP_TO_DATE)
    2.17 -			goto retry;
    2.18 +		delta = (s64)(shadow_system_time +
    2.19 +			      (cur_timer->get_offset() * NSEC_PER_USEC) -
    2.20 +			      processed_system_time);
    2.21 +	}
    2.22 +	while (!TIME_VALUES_UP_TO_DATE);
    2.23 +
    2.24 +	if (unlikely(delta < 0)) {
    2.25  		printk("Timer ISR: Time went backwards: %lld %lld %ld %lld\n",
    2.26  		       delta, shadow_system_time,
    2.27  		       (cur_timer->get_offset() * NSEC_PER_USEC),