- arch-alpha-kernel-trapsc-use-time_-macros.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     arch/alpha/kernel/traps.c: use time_* macros
has been removed from the -mm tree.  Its filename was
     arch-alpha-kernel-trapsc-use-time_-macros.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: arch/alpha/kernel/traps.c: use time_* macros
From: S.Caglar Onur <caglar@xxxxxxxxxxxxx>

The functions time_before, time_before_eq, time_after, and time_after_eq are
more robust for comparing jiffies against other values.

So implement usage of the time_after() macro, defined in linux/jiffies.h,
which deals with wrapping correctly

[akpm@xxxxxxxxxxxxxxxxxxxx: fix warning]
Signed-off-by: S.Caglar Onur <caglar@xxxxxxxxxxxxx>
Cc: Richard Henderson <rth@xxxxxxxxxxx>
Cc: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/alpha/kernel/traps.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN arch/alpha/kernel/traps.c~arch-alpha-kernel-trapsc-use-time_-macros arch/alpha/kernel/traps.c
--- a/arch/alpha/kernel/traps.c~arch-alpha-kernel-trapsc-use-time_-macros
+++ a/arch/alpha/kernel/traps.c
@@ -8,6 +8,7 @@
  * This file initializes the trap entry points
  */
 
+#include <linux/jiffies.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/tty.h>
@@ -770,7 +771,7 @@ do_entUnaUser(void __user * va, unsigned
 	      unsigned long reg, struct pt_regs *regs)
 {
 	static int cnt = 0;
-	static long last_time = 0;
+	static unsigned long last_time;
 
 	unsigned long tmp1, tmp2, tmp3, tmp4;
 	unsigned long fake_reg, *reg_addr = &fake_reg;
@@ -781,7 +782,7 @@ do_entUnaUser(void __user * va, unsigned
 	   with the unaliged access.  */
 
 	if (!test_thread_flag (TIF_UAC_NOPRINT)) {
-		if (cnt >= 5 && jiffies - last_time > 5*HZ) {
+		if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) {
 			cnt = 0;
 		}
 		if (++cnt < 5) {
_

Patches currently in -mm which might be from caglar@xxxxxxxxxxxxx are

origin.patch
arch-parisc-kernel-unalignedc-use-time_-macros.patch
fs-binfmt_aoutc-use-printk_ratelimit.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux