]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/hrtimer.c
Fix accidental implicit cast in HR-timer conversion
[linux-2.6-omap-h63xx.git] / kernel / hrtimer.c
index 00e6f0a1e7a38a701184dbe06b06f5bc21af99c1..2b465dfde4269b6d4609957999c9eecb0a148a36 100644 (file)
@@ -1394,22 +1394,16 @@ void hrtimer_interrupt(struct clock_event_device *dev)
  */
 void hrtimer_peek_ahead_timers(void)
 {
-       unsigned long flags;
        struct tick_device *td;
-       struct clock_event_device *dev;
+       unsigned long flags;
 
        if (!hrtimer_hres_active())
                return;
 
        local_irq_save(flags);
        td = &__get_cpu_var(tick_cpu_device);
-       if (!td)
-               goto out;
-       dev = td->evtdev;
-       if (!dev)
-               goto out;
-       hrtimer_interrupt(dev);
-out:
+       if (td && td->evtdev)
+               hrtimer_interrupt(td->evtdev);
        local_irq_restore(flags);
 }
 
@@ -1467,9 +1461,7 @@ void hrtimer_run_queues(void)
                if (!base->first)
                        continue;
 
-               if (base->get_softirq_time)
-                       base->softirq_time = base->get_softirq_time();
-               else if (gettime) {
+               if (gettime) {
                        hrtimer_get_softirq_time(cpu_base);
                        gettime = 0;
                }
@@ -1758,9 +1750,11 @@ static void migrate_hrtimers(int cpu)
        new_base = &get_cpu_var(hrtimer_bases);
 
        tick_cancel_sched_timer(cpu);
-
-       local_irq_disable();
-       spin_lock(&new_base->lock);
+       /*
+        * The caller is globally serialized and nobody else
+        * takes two locks at once, deadlock is not possible.
+        */
+       spin_lock_irq(&new_base->lock);
        spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);
 
        for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
@@ -1773,8 +1767,7 @@ static void migrate_hrtimers(int cpu)
                raise = 1;
 
        spin_unlock(&old_base->lock);
-       spin_unlock(&new_base->lock);
-       local_irq_enable();
+       spin_unlock_irq(&new_base->lock);
        put_cpu_var(hrtimer_bases);
 
        if (raise)