Re: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params

From: Linus Torvalds (
Date: Wed Jul 02 2003 - 00:12:48 EST

On Wed, 2 Jul 2003, Bernardo Innocenti wrote:
> Wait! It's not documented at all that do_div() really does a
> 64bit/32bit division with 32bit remainder.

Oh, it's documented all right. It's even documented by the architectures
that do it wrong (ie chris/arm26 say "we're not 64-bit but..")

> What's worse, it has different semantics on different archictecures:

only because some architectures on purpose get it wrong, because they
don't care.

> i386 64/32 -> 64q + 32r (inline asm + C for 64bit case)

This is the only version that has ever been valid.

It's a 64/32->64+32. No excuses, no nothing. There is no question about


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:15 EST