Lines Matching full:divisor

16  * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
18 * @divisor: unsigned 32bit divisor
21 * Return: sets ``*remainder``, then returns dividend / divisor
26 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
28 *remainder = dividend % divisor; in div_u64_rem()
29 return dividend / divisor; in div_u64_rem()
33 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
35 * @divisor: signed 32bit divisor
38 * Return: sets ``*remainder``, then returns dividend / divisor
40 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
42 *remainder = dividend % divisor; in div_s64_rem()
43 return dividend / divisor; in div_s64_rem()
47 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
49 * @divisor: unsigned 64bit divisor
52 * Return: sets ``*remainder``, then returns dividend / divisor
54 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
56 *remainder = dividend % divisor; in div64_u64_rem()
57 return dividend / divisor; in div64_u64_rem()
61 * div64_u64 - unsigned 64bit divide with 64bit divisor
63 * @divisor: unsigned 64bit divisor
65 * Return: dividend / divisor
67 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
69 return dividend / divisor; in div64_u64()
73 * div64_s64 - signed 64bit divide with 64bit divisor
75 * @divisor: signed 64bit divisor
77 * Return: dividend / divisor
79 static inline s64 div64_s64(s64 dividend, s64 divisor) in div64_s64() argument
81 return dividend / divisor; in div64_s64()
90 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
92 *remainder = do_div(dividend, divisor); in div_u64_rem()
98 extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
102 extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder);
106 extern u64 div64_u64(u64 dividend, u64 divisor);
110 extern s64 div64_s64(s64 dividend, s64 divisor);
116 * div_u64 - unsigned 64bit divide with 32bit divisor
118 * @divisor: unsigned 32bit divisor
124 * Return: dividend / divisor
127 static inline u64 div_u64(u64 dividend, u32 divisor) in div_u64() argument
130 return div_u64_rem(dividend, divisor, &remainder); in div_u64()
135 * div_s64 - signed 64bit divide with 32bit divisor
137 * @divisor: signed 32bit divisor
139 * Return: dividend / divisor
142 static inline s64 div_s64(s64 dividend, s32 divisor) in div_s64() argument
145 return div_s64_rem(dividend, divisor, &remainder); in div_s64()
149 u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
257 static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor) in mul_u64_u32_div() argument
275 rl.l.high = do_div(rh.ll, divisor); in mul_u64_u32_div()
278 do_div(rl.ll, divisor); in mul_u64_u32_div()
288 * DIV64_U64_ROUND_UP - unsigned 64bit divide with 64bit divisor rounded up
290 * @d: unsigned 64bit divisor
292 * Divide unsigned 64bit dividend by unsigned 64bit divisor
295 * Return: dividend / divisor rounded up
301 * DIV_U64_ROUND_UP - unsigned 64bit divide with 32bit divisor rounded up
303 * @d: unsigned 32bit divisor
305 * Divide unsigned 64bit dividend by unsigned 32bit divisor
308 * Return: dividend / divisor rounded up
314 * DIV64_U64_ROUND_CLOSEST - unsigned 64bit divide with 64bit divisor rounded to nearest integer
316 * @divisor: unsigned 64bit divisor
318 * Divide unsigned 64bit dividend by unsigned 64bit divisor
321 * Return: dividend / divisor rounded to nearest integer
323 #define DIV64_U64_ROUND_CLOSEST(dividend, divisor) \ argument
324 ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); })
327 * DIV_U64_ROUND_CLOSEST - unsigned 64bit divide with 32bit divisor rounded to nearest integer
329 * @divisor: unsigned 32bit divisor
331 * Divide unsigned 64bit dividend by unsigned 32bit divisor
334 * Return: dividend / divisor rounded to nearest integer
336 #define DIV_U64_ROUND_CLOSEST(dividend, divisor) \ argument
337 ({ u32 _tmp = (divisor); div_u64((u64)(dividend) + _tmp / 2, _tmp); })
340 * DIV_S64_ROUND_CLOSEST - signed 64bit divide with 32bit divisor rounded to nearest integer
342 * @divisor: signed 32bit divisor
344 * Divide signed 64bit dividend by signed 32bit divisor
347 * Return: dividend / divisor rounded to nearest integer
349 #define DIV_S64_ROUND_CLOSEST(dividend, divisor)( \ argument
352 s32 __d = (divisor); \