diff options
Diffstat (limited to 'arch/alpha/kernel/traps.c')
-rw-r--r-- | arch/alpha/kernel/traps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index 2dc7f9fed213..dc57790250d2 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * This file initializes the trap entry points | 8 | * This file initializes the trap entry points |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/jiffies.h> | ||
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
13 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
@@ -770,7 +771,7 @@ do_entUnaUser(void __user * va, unsigned long opcode, | |||
770 | unsigned long reg, struct pt_regs *regs) | 771 | unsigned long reg, struct pt_regs *regs) |
771 | { | 772 | { |
772 | static int cnt = 0; | 773 | static int cnt = 0; |
773 | static long last_time = 0; | 774 | static unsigned long last_time; |
774 | 775 | ||
775 | unsigned long tmp1, tmp2, tmp3, tmp4; | 776 | unsigned long tmp1, tmp2, tmp3, tmp4; |
776 | unsigned long fake_reg, *reg_addr = &fake_reg; | 777 | unsigned long fake_reg, *reg_addr = &fake_reg; |
@@ -781,7 +782,7 @@ do_entUnaUser(void __user * va, unsigned long opcode, | |||
781 | with the unaliged access. */ | 782 | with the unaliged access. */ |
782 | 783 | ||
783 | if (!test_thread_flag (TIF_UAC_NOPRINT)) { | 784 | if (!test_thread_flag (TIF_UAC_NOPRINT)) { |
784 | if (cnt >= 5 && jiffies - last_time > 5*HZ) { | 785 | if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) { |
785 | cnt = 0; | 786 | cnt = 0; |
786 | } | 787 | } |
787 | if (++cnt < 5) { | 788 | if (++cnt < 5) { |