direct-io.hg
changeset 7276:8f7ee9ab31ac
Fix cpu hotplug issue with SMP guests (including save/restore).
Was a nasty one - worth ensuring we cast to u64 whenever playing
with Xen time values.
Signed-off-by: Steven Hand <steven@xensource.com>
Was a nasty one - worth ensuring we cast to u64 whenever playing
with Xen time values.
Signed-off-by: Steven Hand <steven@xensource.com>
author | smh22@firebug.cl.cam.ac.uk |
---|---|
date | Sun Oct 09 16:26:08 2005 +0100 (2005-10-09) |
parents | fe4c1d44e899 |
children | ab93a9a46bd4 |
files | linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c 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/smpboot.c Sun Oct 09 12:20:12 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c Sun Oct 09 16:26:08 2005 +0100 1.3 @@ -1578,7 +1578,7 @@ void smp_suspend(void) 1.4 void smp_resume(void) 1.5 { 1.6 smp_intr_init(); 1.7 - local_setup_timer_irq(); 1.8 + local_setup_timer(); 1.9 } 1.10 1.11 void vcpu_prepare(int vcpu)
2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Sun Oct 09 12:20:12 2005 +0100 2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Sun Oct 09 16:26:08 2005 +0100 2.3 @@ -122,7 +122,7 @@ static u32 shadow_tv_version; 2.4 static u64 processed_system_time; /* System time (ns) at last processing. */ 2.5 static DEFINE_PER_CPU(u64, processed_system_time); 2.6 2.7 -#define NS_PER_TICK (1000000000L/HZ) 2.8 +#define NS_PER_TICK (1000000000ULL/HZ) 2.9 2.10 static inline void __normalize_time(time_t *sec, s64 *nsec) 2.11 { 2.12 @@ -800,9 +800,9 @@ static inline u64 jiffies_to_st(unsigned 2.13 delta = j - jiffies; 2.14 /* NB. The next check can trigger in some wrap-around cases, 2.15 * but that's ok: we'll just end up with a shorter timeout. */ 2.16 - if (delta < 1) 2.17 + if (delta < 1) 2.18 delta = 1; 2.19 - st = processed_system_time + (delta * NS_PER_TICK); 2.20 + st = processed_system_time + ((u64)delta * NS_PER_TICK); 2.21 } while (read_seqretry(&xtime_lock, seq)); 2.22 2.23 return st; 2.24 @@ -816,7 +816,7 @@ void stop_hz_timer(void) 2.25 { 2.26 unsigned int cpu = smp_processor_id(); 2.27 unsigned long j; 2.28 - 2.29 + 2.30 /* s390 does this /before/ checking rcu_pending(). We copy them. */ 2.31 cpu_set(cpu, nohz_cpu_mask); 2.32