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