aboutsummaryrefslogtreecommitdiff
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorGravatar Russell King <rmk@dyn-67.arm.linux.org.uk> 2008-07-10 16:41:50 +0100
committerGravatar Russell King <rmk+kernel@arm.linux.org.uk> 2008-07-10 16:41:50 +0100
commitf0006314d37639714da9658cf4ff3f1f9f420764 (patch)
treeb8a18e014a40f2f8fd5148aab09c869dfaabd7a9 /kernel/hrtimer.c
parentMerge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'o... (diff)
parenti.MX2 family: Add basic mach support (diff)
downloadlinux-f0006314d37639714da9658cf4ff3f1f9f420764.tar.gz
linux-f0006314d37639714da9658cf4ff3f1f9f420764.tar.bz2
linux-f0006314d37639714da9658cf4ff3f1f9f420764.zip
Merge branch 'imx' into devel
Conflicts: arch/arm/mm/Kconfig
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 543d9ca9b4f4..3c00794bc88e 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1003,10 +1003,18 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
*/
raise = timer->state == HRTIMER_STATE_PENDING;
+ /*
+ * We use preempt_disable to prevent this task from migrating after
+ * setting up the softirq and raising it. Otherwise, if me migrate
+ * we will raise the softirq on the wrong CPU.
+ */
+ preempt_disable();
+
unlock_hrtimer_base(timer, &flags);
if (raise)
hrtimer_raise_softirq();
+ preempt_enable();
return ret;
}