diff options
Diffstat (limited to 'kernel/time/tick-broadcast.c')
-rw-r--r-- | kernel/time/tick-broadcast.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index db8e0f3d409b..0962e0577660 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -383,11 +383,7 @@ static int tick_broadcast_set_event(ktime_t expires, int force) | |||
383 | int tick_resume_broadcast_oneshot(struct clock_event_device *bc) | 383 | int tick_resume_broadcast_oneshot(struct clock_event_device *bc) |
384 | { | 384 | { |
385 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | 385 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); |
386 | 386 | return 0; | |
387 | if(!cpus_empty(tick_broadcast_oneshot_mask)) | ||
388 | tick_broadcast_set_event(ktime_get(), 1); | ||
389 | |||
390 | return cpu_isset(smp_processor_id(), tick_broadcast_oneshot_mask); | ||
391 | } | 387 | } |
392 | 388 | ||
393 | /* | 389 | /* |
@@ -549,20 +545,17 @@ void tick_broadcast_switch_to_oneshot(void) | |||
549 | */ | 545 | */ |
550 | void tick_shutdown_broadcast_oneshot(unsigned int *cpup) | 546 | void tick_shutdown_broadcast_oneshot(unsigned int *cpup) |
551 | { | 547 | { |
552 | struct clock_event_device *bc; | ||
553 | unsigned long flags; | 548 | unsigned long flags; |
554 | unsigned int cpu = *cpup; | 549 | unsigned int cpu = *cpup; |
555 | 550 | ||
556 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 551 | spin_lock_irqsave(&tick_broadcast_lock, flags); |
557 | 552 | ||
558 | bc = tick_broadcast_device.evtdev; | 553 | /* |
554 | * Clear the broadcast mask flag for the dead cpu, but do not | ||
555 | * stop the broadcast device! | ||
556 | */ | ||
559 | cpu_clear(cpu, tick_broadcast_oneshot_mask); | 557 | cpu_clear(cpu, tick_broadcast_oneshot_mask); |
560 | 558 | ||
561 | if (tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT) { | ||
562 | if (bc && cpus_empty(tick_broadcast_oneshot_mask)) | ||
563 | clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN); | ||
564 | } | ||
565 | |||
566 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 559 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
567 | } | 560 | } |
568 | 561 | ||