netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: akpm@linux-foundation.org
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	shemminger@linux-foundation.org, chris@zankel.net,
	geert@linux-m68k.org, jdike@addtoit.com, rmk@arm.linux.org.uk,
	zippel@linux-m68k.org
Subject: Re: [patch 2/2] div64_64: common code
Date: Tue, 6 Mar 2007 19:46:32 +0000	[thread overview]
Message-ID: <20070306194632.GA28949@linux-mips.org> (raw)
In-Reply-To: <200703061042.l26AgS0U019809@shell0.pdx.osdl.net>

On Tue, Mar 06, 2007 at 02:42:28AM -0800, akpm@linux-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@linux-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@linux-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 */

  parent reply	other threads:[~2007-03-06 19:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 10:42 [patch 2/2] div64_64: common code akpm
2007-03-06 18:11 ` David Miller
2007-03-06 22:32   ` Andrew Morton
2007-03-06 23:21     ` David Miller
2007-03-07  0:04       ` Andrew Morton
2007-03-06 19:46 ` Ralf Baechle [this message]
2007-03-06 21:46   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070306194632.GA28949@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=jdike@addtoit.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=shemminger@linux-foundation.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).