diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-04-22 10:37:24 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-04-22 10:37:24 +0100 |
commit | ac9595600a2a517d2ae3e8eba2ca7bece020acb8 (patch) | |
tree | 35e65750dd4c66af1210938e1c545b28a033487c /xen/common/timer.c | |
parent | de4294617e8be76e4b7c3d4cae10e8a653cb3b84 (diff) | |
download | xen-ac9595600a2a517d2ae3e8eba2ca7bece020acb8.tar.gz xen-ac9595600a2a517d2ae3e8eba2ca7bece020acb8.tar.bz2 xen-ac9595600a2a517d2ae3e8eba2ca7bece020acb8.zip |
Avoid spurious timer activations in migrate_timer().
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/timer.c')
-rw-r--r-- | xen/common/timer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xen/common/timer.c b/xen/common/timer.c index e62a74ee23..10985fdd8b 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -251,12 +251,15 @@ void migrate_timer(struct timer *timer, unsigned int new_cpu) } if ( active_timer(timer) ) + { __stop_timer(timer); - - timer->cpu = new_cpu; - - if ( likely(!timer->killed) ) + timer->cpu = new_cpu; __add_timer(timer); + } + else + { + timer->cpu = new_cpu; + } spin_unlock(&timers[old_cpu].lock); spin_unlock_irqrestore(&timers[new_cpu].lock, flags); |