diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 14:06:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 14:08:05 -0400 |
commit | 250f972d85effad5b6e10da4bbd877e6a4b503b6 (patch) | |
tree | 007393a6fc6439af7e0121dd99a6f9f9fb8405bc /kernel/time/tick-broadcast.c | |
parent | 7372b0b122af0f6675f3ab65bfd91c8a438e0480 (diff) | |
parent | bbe7b8bef48c567f5ff3f6041c1fb011292e8f12 (diff) |
Merge branch 'timers/urgent' into timers/core
Reason: Get upstream fixes and kfree_rcu which is necessary for a
follow up patch.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/tick-broadcast.c')
-rw-r--r-- | kernel/time/tick-broadcast.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 827e0f862da4..c7218d132738 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -524,10 +524,11 @@ static void tick_broadcast_init_next_event(struct cpumask *mask, | |||
524 | */ | 524 | */ |
525 | void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | 525 | void tick_broadcast_setup_oneshot(struct clock_event_device *bc) |
526 | { | 526 | { |
527 | int cpu = smp_processor_id(); | ||
528 | |||
527 | /* Set it up only once ! */ | 529 | /* Set it up only once ! */ |
528 | if (bc->event_handler != tick_handle_oneshot_broadcast) { | 530 | if (bc->event_handler != tick_handle_oneshot_broadcast) { |
529 | int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC; | 531 | int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC; |
530 | int cpu = smp_processor_id(); | ||
531 | 532 | ||
532 | bc->event_handler = tick_handle_oneshot_broadcast; | 533 | bc->event_handler = tick_handle_oneshot_broadcast; |
533 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | 534 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); |
@@ -553,6 +554,15 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) | |||
553 | tick_broadcast_set_event(tick_next_period, 1); | 554 | tick_broadcast_set_event(tick_next_period, 1); |
554 | } else | 555 | } else |
555 | bc->next_event.tv64 = KTIME_MAX; | 556 | bc->next_event.tv64 = KTIME_MAX; |
557 | } else { | ||
558 | /* | ||
559 | * The first cpu which switches to oneshot mode sets | ||
560 | * the bit for all other cpus which are in the general | ||
561 | * (periodic) broadcast mask. So the bit is set and | ||
562 | * would prevent the first broadcast enter after this | ||
563 | * to program the bc device. | ||
564 | */ | ||
565 | tick_broadcast_clear_oneshot(cpu); | ||
556 | } | 566 | } |
557 | } | 567 | } |
558 | 568 | ||