Skip to contentSkip to conversation

xen: use s_time_t for periodic timer deadlines

PATCH New Tim Deegan 1 participant 1 message Jul 7, 2010

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 xen: use s_time_t for periodic timer deadlines

xen: use s_time_t for periodic timer deadlines.
Otherwise vcpu_periodic_timer_work() can think the next timer is in the future (and re-issue it unchanged) while timer_softirq_action() thinks it's in the past (and fires it immediately), leading to livelock.

xen/common/schedule.c +1 -1
diff -r e316ad18de3c xen/common/schedule.c
@@ -992,7 +992,7 @@
 static void vcpu_periodic_timer_work(struct vcpu *v)
 {
     s_time_t now = NOW();
-    uint64_t periodic_next_event;
+    s_time_t periodic_next_event;
 
     if ( v->periodic_period == 0 )
         return;
xen/include/xen/sched.h +2 -2
diff -r e316ad18de3c xen/include/xen/sched.h
@@ -89,8 +89,8 @@
 
     struct vcpu     *next_in_list;
 
-    uint64_t         periodic_period;
-    uint64_t         periodic_last_event;
+    s_time_t         periodic_period;
+    s_time_t         periodic_last_event;
     struct timer     periodic_timer;
     struct timer     singleshot_timer;