Commit 68568add authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 11b8633a
...@@ -572,7 +572,6 @@ void timer_interrupt(struct pt_regs * regs) ...@@ -572,7 +572,6 @@ void timer_interrupt(struct pt_regs * regs)
struct pt_regs *old_regs; struct pt_regs *old_regs;
struct decrementer_clock *decrementer = &__get_cpu_var(decrementers); struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
struct clock_event_device *evt = &decrementer->event; struct clock_event_device *evt = &decrementer->event;
u64 now;
/* Ensure a positive value is written to the decrementer, or else /* Ensure a positive value is written to the decrementer, or else
* some CPUs will continue to take decrementer exceptions. * some CPUs will continue to take decrementer exceptions.
...@@ -607,16 +606,9 @@ void timer_interrupt(struct pt_regs * regs) ...@@ -607,16 +606,9 @@ void timer_interrupt(struct pt_regs * regs)
get_lppaca()->int_dword.fields.decr_int = 0; get_lppaca()->int_dword.fields.decr_int = 0;
#endif #endif
now = get_tb_or_rtc();
if (now >= decrementer->next_tb) {
decrementer->next_tb = ~(u64)0; decrementer->next_tb = ~(u64)0;
if (evt->event_handler) if (evt->event_handler)
evt->event_handler(evt); evt->event_handler(evt);
} else {
now = decrementer->next_tb - now;
if (now <= DECREMENTER_MAX)
set_dec((int)now);
}
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment