aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-11-23 15:07:20 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-11-24 22:09:59 -0500
commit68568add2ca70153cca3dd1858eaa0776821cf75 (patch)
treef266b059287789cb4b88f185b2abb7867ecd172c /arch/powerpc/kernel
parent11b8633ada8633991e584951d0027f2741162201 (diff)
powerpc/time: Remove unnecessary sanity check of decrementer expiration
The clockevents code uses max_delta_ns to avoid calling a clockevent with too large a value. Remove the redundant version of this in the timer_interrupt code. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/time.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index d204b726a185..2eaaa242c2e6 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -572,7 +572,6 @@ void timer_interrupt(struct pt_regs * regs)
572 struct pt_regs *old_regs; 572 struct pt_regs *old_regs;
573 struct decrementer_clock *decrementer = &__get_cpu_var(decrementers); 573 struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
574 struct clock_event_device *evt = &decrementer->event; 574 struct clock_event_device *evt = &decrementer->event;
575 u64 now;
576 575
577 /* Ensure a positive value is written to the decrementer, or else 576 /* Ensure a positive value is written to the decrementer, or else
578 * some CPUs will continue to take decrementer exceptions. 577 * some CPUs will continue to take decrementer exceptions.
@@ -607,16 +606,9 @@ void timer_interrupt(struct pt_regs * regs)
607 get_lppaca()->int_dword.fields.decr_int = 0; 606 get_lppaca()->int_dword.fields.decr_int = 0;
608#endif 607#endif
609 608
610 now = get_tb_or_rtc(); 609 decrementer->next_tb = ~(u64)0;
611 if (now >= decrementer->next_tb) { 610 if (evt->event_handler)
612 decrementer->next_tb = ~(u64)0; 611 evt->event_handler(evt);
613 if (evt->event_handler)
614 evt->event_handler(evt);
615 } else {
616 now = decrementer->next_tb - now;
617 if (now <= DECREMENTER_MAX)
618 set_dec((int)now);
619 }
620 612
621#ifdef CONFIG_PPC_ISERIES 613#ifdef CONFIG_PPC_ISERIES
622 if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) 614 if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())