diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-03-31 03:08:13 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-03-31 03:08:13 -0400 |
| commit | c5e77f5216abdd1d98e6d14d9a3eb4e88d80011a (patch) | |
| tree | a542b5bb7d96a8f37c4d5e3319086064448ed67b /kernel/time | |
| parent | de81e64b250d3865a75d221a80b4311e3273670a (diff) | |
| parent | e42391cd048809d903291d07f86ed3934ce138e9 (diff) | |
Merge tag 'v4.0-rc6' into timers/core, before applying new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time')
| -rw-r--r-- | kernel/time/tick-broadcast-hrtimer.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c index eb682d5c697c..6aac4beedbbe 100644 --- a/kernel/time/tick-broadcast-hrtimer.c +++ b/kernel/time/tick-broadcast-hrtimer.c | |||
| @@ -49,6 +49,7 @@ static void bc_set_mode(enum clock_event_mode mode, | |||
| 49 | */ | 49 | */ |
| 50 | static int bc_set_next(ktime_t expires, struct clock_event_device *bc) | 50 | static int bc_set_next(ktime_t expires, struct clock_event_device *bc) |
| 51 | { | 51 | { |
| 52 | int bc_moved; | ||
| 52 | /* | 53 | /* |
| 53 | * We try to cancel the timer first. If the callback is on | 54 | * We try to cancel the timer first. If the callback is on |
| 54 | * flight on some other cpu then we let it handle it. If we | 55 | * flight on some other cpu then we let it handle it. If we |
| @@ -60,9 +61,15 @@ static int bc_set_next(ktime_t expires, struct clock_event_device *bc) | |||
| 60 | * restart the timer because we are in the callback, but we | 61 | * restart the timer because we are in the callback, but we |
| 61 | * can set the expiry time and let the callback return | 62 | * can set the expiry time and let the callback return |
| 62 | * HRTIMER_RESTART. | 63 | * HRTIMER_RESTART. |
| 64 | * | ||
| 65 | * Since we are in the idle loop at this point and because | ||
| 66 | * hrtimer_{start/cancel} functions call into tracing, | ||
| 67 | * calls to these functions must be bound within RCU_NONIDLE. | ||
| 63 | */ | 68 | */ |
| 64 | if (hrtimer_try_to_cancel(&bctimer) >= 0) { | 69 | RCU_NONIDLE(bc_moved = (hrtimer_try_to_cancel(&bctimer) >= 0) ? |
| 65 | hrtimer_start(&bctimer, expires, HRTIMER_MODE_ABS_PINNED); | 70 | !hrtimer_start(&bctimer, expires, HRTIMER_MODE_ABS_PINNED) : |
| 71 | 0); | ||
| 72 | if (bc_moved) { | ||
| 66 | /* Bind the "device" to the cpu */ | 73 | /* Bind the "device" to the cpu */ |
| 67 | bc->bound_on = smp_processor_id(); | 74 | bc->bound_on = smp_processor_id(); |
| 68 | } else if (bc->bound_on == smp_processor_id()) { | 75 | } else if (bc->bound_on == smp_processor_id()) { |
