[PATCH 5/4] 2.6.25-rc5-mm1 specifc div64_u64 fixes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: zippel
Date: Wednesday, March 12, 2008 - 5:22 pm

Rename a few more div64_u64 which are only in -mm.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---
 arch/x86/kvm/i8254.c |    6 +++---
 kernel/time.c        |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-mm/arch/x86/kvm/i8254.c
===================================================================
--- linux-2.6-mm.orig/arch/x86/kvm/i8254.c
+++ linux-2.6-mm/arch/x86/kvm/i8254.c
@@ -35,7 +35,7 @@
 #include "i8254.h"
 
 #ifndef CONFIG_X86_64
-#define mod_64(x, y) ((x) - (y) * div64_64(x, y))
+#define mod_64(x, y) ((x) - (y) * div64_u64(x, y))
 #else
 #define mod_64(x, y) ((x) % (y))
 #endif
@@ -60,8 +60,8 @@ static u64 muldiv64(u64 a, u32 b, u32 c)
 	rl = (u64)u.l.low * (u64)b;
 	rh = (u64)u.l.high * (u64)b;
 	rh += (rl >> 32);
-	res.l.high = div64_64(rh, c);
-	res.l.low = div64_64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c);
+	res.l.high = div64_u64(rh, c);
+	res.l.low = div64_u64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c);
 	return res.ll;
 }
 
Index: linux-2.6-mm/kernel/time.c
===================================================================
--- linux-2.6-mm.orig/kernel/time.c
+++ linux-2.6-mm/kernel/time.c
@@ -272,7 +272,7 @@ EXPORT_SYMBOL(jiffies_to_usecs);
 
 u64 jiffies_64_to_usecs(const u64 j)
 {
-	return div64_64(j*HZ_TO_USEC_NUM + HZ_TO_USEC_DEN-1, HZ_TO_USEC_DEN);
+	return div64_u64(j*HZ_TO_USEC_NUM + HZ_TO_USEC_DEN-1, HZ_TO_USEC_DEN);
 }
 EXPORT_SYMBOL(jiffies_64_to_usecs);
 

-- 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 5/4] 2.6.25-rc5-mm1 specifc div64_u64 fixes, zippel, (Wed Mar 12, 5:22 pm)