Loading include/asm-arm/div64.h +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #define __ASM_ARM_DIV64 #include <asm/system.h> #include <linux/types.h> /* * The semantics of do_div() are: Loading Loading @@ -223,4 +224,6 @@ #endif extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif include/asm-generic/div64.h +7 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ __rem; \ }) static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) { return dividend / divisor; } #elif BITS_PER_LONG == 32 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); Loading @@ -49,6 +54,8 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); __rem; \ }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #else /* BITS_PER_LONG == ?? */ # error do_div() does not yet support the C64 Loading include/asm-i386/div64.h +4 −0 Original line number Diff line number Diff line #ifndef __I386_DIV64 #define __I386_DIV64 #include <linux/types.h> /* * do_div() is NOT a C function. It wants to return * two values (the quotient and the remainder), but Loading Loading @@ -45,4 +47,6 @@ div_ll_X_l_rem(long long divs, long div, long *rem) return dum2; } extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif include/asm-m68k/div64.h +3 −0 Original line number Diff line number Diff line #ifndef _M68K_DIV64_H #define _M68K_DIV64_H #include <linux/types.h> /* n = n / base; return rem; */ #define do_div(n, base) ({ \ Loading @@ -23,4 +25,5 @@ __rem; \ }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif /* _M68K_DIV64_H */ include/asm-mips/div64.h +10 −1 Original line number Diff line number Diff line /* * 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 Loading @@ -9,6 +9,8 @@ #ifndef _ASM_DIV64_H #define _ASM_DIV64_H #include <linux/types.h> #if (_MIPS_SZLONG == 32) #include <asm/compiler.h> Loading Loading @@ -78,6 +80,8 @@ __quot = __quot << 32 | __low; \ (n) = __quot; \ __mod; }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif /* (_MIPS_SZLONG == 32) */ #if (_MIPS_SZLONG == 64) Loading @@ -101,6 +105,11 @@ (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 */ Loading
include/asm-arm/div64.h +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #define __ASM_ARM_DIV64 #include <asm/system.h> #include <linux/types.h> /* * The semantics of do_div() are: Loading Loading @@ -223,4 +224,6 @@ #endif extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif
include/asm-generic/div64.h +7 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ __rem; \ }) static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) { return dividend / divisor; } #elif BITS_PER_LONG == 32 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); Loading @@ -49,6 +54,8 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); __rem; \ }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #else /* BITS_PER_LONG == ?? */ # error do_div() does not yet support the C64 Loading
include/asm-i386/div64.h +4 −0 Original line number Diff line number Diff line #ifndef __I386_DIV64 #define __I386_DIV64 #include <linux/types.h> /* * do_div() is NOT a C function. It wants to return * two values (the quotient and the remainder), but Loading Loading @@ -45,4 +47,6 @@ div_ll_X_l_rem(long long divs, long div, long *rem) return dum2; } extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif
include/asm-m68k/div64.h +3 −0 Original line number Diff line number Diff line #ifndef _M68K_DIV64_H #define _M68K_DIV64_H #include <linux/types.h> /* n = n / base; return rem; */ #define do_div(n, base) ({ \ Loading @@ -23,4 +25,5 @@ __rem; \ }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif /* _M68K_DIV64_H */
include/asm-mips/div64.h +10 −1 Original line number Diff line number Diff line /* * 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 Loading @@ -9,6 +9,8 @@ #ifndef _ASM_DIV64_H #define _ASM_DIV64_H #include <linux/types.h> #if (_MIPS_SZLONG == 32) #include <asm/compiler.h> Loading Loading @@ -78,6 +80,8 @@ __quot = __quot << 32 | __low; \ (n) = __quot; \ __mod; }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif /* (_MIPS_SZLONG == 32) */ #if (_MIPS_SZLONG == 64) Loading @@ -101,6 +105,11 @@ (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 */