Commit c4f509d8 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Make TICK comparisons wrap-around safe by using jiffies macros.

parent e2f6f58d
......@@ -18,6 +18,7 @@
#include <linux/fs.h>
#include <linux/seq_file.h>
#include <linux/cache.h>
#include <linux/jiffies.h>
#include <asm/head.h>
#include <asm/ptrace.h>
......@@ -1086,7 +1087,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
__asm__ __volatile__("wrpr %0, 0x0, %%pstate"
: /* no outputs */
: "r" (pstate));
} while (tick >= compare);
} while (time_after_eq(tick, compare));
}
static void __init smp_setup_percpu_timer(void)
......
......@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/profile.h>
#include <linux/bcd.h>
#include <linux/jiffies.h>
#include <asm/oplib.h>
#include <asm/mostek.h>
......@@ -485,7 +486,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
__asm__ __volatile__("wrpr %0, 0x0, %%pstate"
: /* no outputs */
: "r" (pstate));
} while (ticks >= timer_tick_compare);
} while (time_after_eq(ticks, timer_tick_compare));
timer_check_rtc();
......
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