From f869afab8f36c5f8561557f74b4b9846719092da Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Thu, 22 Jun 2006 10:30:53 +0100 Subject: [ARM] 3616/1: fix timer handler wrap logic for a number of platforms Patch from Lennert Buytenhek A couple of platforms aren't using the right comparison type in their timer interrupt handlers (as we're comparing two wrapping timestamps, we need a bmi/bpl-type comparison, not an unsigned comparison) -- this patch fixes them up. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King --- arch/arm/mach-ixp2000/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-ixp2000') diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 6e8d504aca55..186f632035b8 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -211,7 +211,8 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* clear timer 1 */ ixp2000_reg_wrb(IXP2000_T1_CLR, 1); - while ((next_jiffy_time - *missing_jiffy_timer_csr) > ticks_per_jiffy) { + while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) + >= ticks_per_jiffy) { timer_tick(regs); next_jiffy_time -= ticks_per_jiffy; } -- cgit v1.2.3-59-g8ed1b