ia64/xen-unstable
changeset 2024:fbe39cb544f3
bitkeeper revision 1.1108.33.25 (410e1b24EMQQ4BsfrAi2l7sC54aOJw)
Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xeno.bk-26dom0
Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xeno.bk-26dom0
author | cl349@freefall.cl.cam.ac.uk |
---|---|
date | Mon Aug 02 10:44:52 2004 +0000 (2004-08-02) |
parents | 01ddb3c0f57e 7500d808bee1 |
children | eaeb569cef15 ca38a9608848 |
files | linux-2.4.26-xen-sparse/arch/xen/kernel/time.c linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.7-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c xen/common/schedule.c |
line diff
1.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/time.c Mon Aug 02 10:30:38 2004 +0000 1.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/kernel/time.c Mon Aug 02 10:44:52 2004 +0000 1.3 @@ -391,7 +391,8 @@ static inline void do_timer_interrupt(in 1.4 1.5 __get_time_values_from_xen(); 1.6 1.7 - if ( (delta = (s64)(shadow_system_time - processed_system_time)) < 0 ) 1.8 + if ( (delta = (s64)(shadow_system_time + __get_time_delta_usecs() * 1000 - 1.9 + processed_system_time)) < 0 ) 1.10 { 1.11 printk("Timer ISR: Time went backwards: %lld\n", delta); 1.12 return;
2.1 --- a/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c Mon Aug 02 10:30:38 2004 +0000 2.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c Mon Aug 02 10:44:52 2004 +0000 2.3 @@ -88,6 +88,7 @@ EXPORT_SYMBOL(i8253_lock); 2.4 struct timer_opts *cur_timer = &timer_none; 2.5 2.6 extern u64 shadow_system_time; 2.7 +extern u32 shadow_time_delta_usecs; 2.8 extern void __get_time_values_from_xen(void); 2.9 2.10 /* Keep track of last time we did processing/updating of jiffies and xtime. */ 2.11 @@ -300,7 +301,9 @@ irqreturn_t timer_interrupt(int irq, voi 2.12 2.13 __get_time_values_from_xen(); 2.14 2.15 - delta = (s64)(shadow_system_time - processed_system_time); 2.16 + shadow_time_delta_usecs = cur_timer->get_offset() * NSEC_PER_USEC; 2.17 + delta = (s64)(shadow_system_time + shadow_time_delta_usecs - 2.18 + processed_system_time); 2.19 if (delta < 0) { 2.20 printk("Timer ISR: Time went backwards: %lld\n", delta); 2.21 goto out;
3.1 --- a/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c Mon Aug 02 10:30:38 2004 +0000 3.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c Mon Aug 02 10:44:52 2004 +0000 3.3 @@ -85,6 +85,7 @@ static u32 shadow_tsc_stamp; 3.4 u64 shadow_system_time; 3.5 static u32 shadow_time_version; 3.6 static struct timeval shadow_tv; 3.7 +u32 shadow_time_delta_usecs; 3.8 static unsigned int rdtsc_bitshift; 3.9 extern u64 processed_system_time; 3.10 3.11 @@ -192,7 +193,8 @@ static void mark_offset_tsc(void) 3.12 3.13 write_seqlock(&monotonic_lock); 3.14 3.15 - delta = (s64)(shadow_system_time - processed_system_time); 3.16 + delta = (s64)(shadow_system_time + shadow_time_delta_usecs - 3.17 + processed_system_time); 3.18 3.19 /* Process elapsed jiffies since last call. */ 3.20 while (delta >= NS_PER_TICK) {
4.1 --- a/xen/common/schedule.c Mon Aug 02 10:30:38 2004 +0000 4.2 +++ b/xen/common/schedule.c Mon Aug 02 10:44:52 2004 +0000 4.3 @@ -444,8 +444,10 @@ static void t_timer_fn(unsigned long unu 4.4 4.5 TRACE_0D(TRC_SCHED_T_TIMER_FN); 4.6 4.7 - if ( !is_idle_task(p) ) 4.8 + if ( !is_idle_task(p) ) { 4.9 + update_dom_time(p->shared_info); 4.10 send_guest_virq(p, VIRQ_TIMER); 4.11 + } 4.12 4.13 t_timer[p->processor].expires = NOW() + MILLISECS(10); 4.14 add_ac_timer(&t_timer[p->processor]); 4.15 @@ -456,6 +458,7 @@ static void dom_timer_fn(unsigned long d 4.16 { 4.17 struct domain *p = (struct domain *)data; 4.18 TRACE_0D(TRC_SCHED_DOM_TIMER_FN); 4.19 + update_dom_time(p->shared_info); 4.20 send_guest_virq(p, VIRQ_TIMER); 4.21 } 4.22