]> git.hungrycats.org Git - linux/commit
[PATCH] fix __div64_32 to do division properly
authorRandolph Chung <tausq@debian.org>
Sun, 26 Oct 2003 06:27:04 +0000 (22:27 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 26 Oct 2003 06:27:04 +0000 (22:27 -0800)
commitc2988baf02a8a29f0224115b10e575b826d5abcd
tree6031754a717ee916b41238a271a6a6007135365a
parentd33648efb3b41924dd0dd750650de9923bb5724e
[PATCH] fix __div64_32 to do division properly

This fixes the generic __div64_32() to correctly handle divisions by
large 32-bit values (as used by nanosleep() and friends, for example).

It's a simple bit-at-a-time implementation with a reduction of the high
32-bits handled manually.  Architectures that can do 64/32-bit divisions
in hardware should implement their own more efficient versions.
lib/div64.c