[PATCH 0/2] do_div() with constant divisor simplification

Nicolas Pitre posted 2 patches 1 year, 7 months ago
There is a newer version of this series
arch/arm/include/asm/div64.h |  52 -----------------
include/asm-generic/div64.h  | 105 +++++++++++------------------------
2 files changed, 31 insertions(+), 126 deletions(-)
[PATCH 0/2] do_div() with constant divisor simplification
Posted by Nicolas Pitre 1 year, 7 months ago
While working on mul_u64_u64_div_u64() improvements I realized that there
is a better way to perform a 64x64->128 bits multiplication that doesn't
involve any conditionals to handle overflows. It even produces equivalent
or better code than the provided ARM assembly alternative.

And the best part is:

 arch/arm/include/asm/div64.h |  52 -----------------
 include/asm-generic/div64.h  | 105 +++++++++++------------------------
 2 files changed, 31 insertions(+), 126 deletions(-)