search for: cd0063629357

Displaying 1 result from an estimated 1 matches for "cd0063629357".

2019 May 23
2
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
..._stack_trace() dump_stack() -static inline uint64_t roundup_64(uint64_t x, uint32_t y) -{ - x += y - 1; - do_div(x, y); - return x * y; -} - static inline uint64_t howmany_64(uint64_t x, uint32_t y) { x += y - 1; diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 74b1ee9027f5..cd0063629357 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -115,6 +115,20 @@ (((x) + (__y - 1)) / __y) * __y; \ } \ ) + +#if BITS_PER_LONG == 32 +# define roundup_64(x, y) ( \ +{ \ + typeof(y) __y = y; \ + typeof(x) __x = (x) + (__y - 1); \ + do_div(__x, __y); \...