[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070306194632.GA28949@linux-mips.org>
Date: Tue, 6 Mar 2007 19:46:32 +0000
From: Ralf Baechle <ralf@...ux-mips.org>
To: akpm@...ux-foundation.org
Cc: davem@...emloft.net, netdev@...r.kernel.org,
shemminger@...ux-foundation.org, chris@...kel.net,
geert@...ux-m68k.org, jdike@...toit.com, rmk@....linux.org.uk,
zippel@...ux-m68k.org
Subject: Re: [patch 2/2] div64_64: common code
On Tue, Mar 06, 2007 at 02:42:28AM -0800, akpm@...ux-foundation.org wrote:
> Implement div64_64(): 64-bit by 64-bit division. Needed by networking (at
> least).
Your patch only implements div64_64() for 32-bit MIPS. Below patch adds
the trivial 64-bit bits.
Ralf
Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>
include/asm-mips/div64.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: linux-mips/include/asm-mips/div64.h
===================================================================
--- linux-mips.orig/include/asm-mips/div64.h
+++ linux-mips/include/asm-mips/div64.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000, 2004 Maciej W. Rozycki
- * Copyright (C) 2003 Ralf Baechle
+ * Copyright (C) 2003, 07 Ralf Baechle (ralf@...ux-mips.org)
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -105,6 +105,11 @@ extern uint64_t div64_64(uint64_t divide
(n) = __quot; \
__mod; })
+static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+{
+ return dividend / divisor;
+}
+
#endif /* (_MIPS_SZLONG == 64) */
#endif /* _ASM_DIV64_H */
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists