diff options
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 9eb3284deac4..99ebcd3884d2 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -586,7 +586,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
586 | /* not time for this event yet */ | 586 | /* not time for this event yet */ |
587 | now = per_cpu(decrementer_next_tb, cpu) - now; | 587 | now = per_cpu(decrementer_next_tb, cpu) - now; |
588 | if (now <= DECREMENTER_MAX) | 588 | if (now <= DECREMENTER_MAX) |
589 | set_dec((unsigned int)now - 1); | 589 | set_dec((int)now); |
590 | return; | 590 | return; |
591 | } | 591 | } |
592 | old_regs = set_irq_regs(regs); | 592 | old_regs = set_irq_regs(regs); |
@@ -611,8 +611,6 @@ void timer_interrupt(struct pt_regs * regs) | |||
611 | 611 | ||
612 | if (evt->event_handler) | 612 | if (evt->event_handler) |
613 | evt->event_handler(evt); | 613 | evt->event_handler(evt); |
614 | else | ||
615 | evt->set_next_event(DECREMENTER_MAX, evt); | ||
616 | 614 | ||
617 | #ifdef CONFIG_PPC_ISERIES | 615 | #ifdef CONFIG_PPC_ISERIES |
618 | if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) | 616 | if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) |
@@ -836,9 +834,6 @@ static int decrementer_set_next_event(unsigned long evt, | |||
836 | struct clock_event_device *dev) | 834 | struct clock_event_device *dev) |
837 | { | 835 | { |
838 | __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt; | 836 | __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt; |
839 | /* The decrementer interrupts on the 0 -> -1 transition */ | ||
840 | if (evt) | ||
841 | --evt; | ||
842 | set_dec(evt); | 837 | set_dec(evt); |
843 | return 0; | 838 | return 0; |
844 | } | 839 | } |
@@ -871,7 +866,8 @@ void init_decrementer_clockevent(void) | |||
871 | decrementer_clockevent.shift); | 866 | decrementer_clockevent.shift); |
872 | decrementer_clockevent.max_delta_ns = | 867 | decrementer_clockevent.max_delta_ns = |
873 | clockevent_delta2ns(DECREMENTER_MAX, &decrementer_clockevent); | 868 | clockevent_delta2ns(DECREMENTER_MAX, &decrementer_clockevent); |
874 | decrementer_clockevent.min_delta_ns = 1000; | 869 | decrementer_clockevent.min_delta_ns = |
870 | clockevent_delta2ns(2, &decrementer_clockevent); | ||
875 | 871 | ||
876 | register_decrementer_clockevent(cpu); | 872 | register_decrementer_clockevent(cpu); |
877 | } | 873 | } |