aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index b8e4dce80a74..03ea1378c43b 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1620,9 +1620,11 @@ static void migrate_hrtimers(int cpu)
1620 new_base = &get_cpu_var(hrtimer_bases); 1620 new_base = &get_cpu_var(hrtimer_bases);
1621 1621
1622 tick_cancel_sched_timer(cpu); 1622 tick_cancel_sched_timer(cpu);
1623 1623 /*
1624 local_irq_disable(); 1624 * The caller is globally serialized and nobody else
1625 spin_lock(&new_base->lock); 1625 * takes two locks at once, deadlock is not possible.
1626 */
1627 spin_lock_irq(&new_base->lock);
1626 spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); 1628 spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);
1627 1629
1628 for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { 1630 for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
@@ -1631,8 +1633,7 @@ static void migrate_hrtimers(int cpu)
1631 } 1633 }
1632 1634
1633 spin_unlock(&old_base->lock); 1635 spin_unlock(&old_base->lock);
1634 spin_unlock(&new_base->lock); 1636 spin_unlock_irq(&new_base->lock);
1635 local_irq_enable();
1636 put_cpu_var(hrtimer_bases); 1637 put_cpu_var(hrtimer_bases);
1637} 1638}
1638#endif /* CONFIG_HOTPLUG_CPU */ 1639#endif /* CONFIG_HOTPLUG_CPU */