From: Ryan Cumming Signed-off-by: Andrew Morton --- 25-akpm/include/linux/kernel.h | 5 +++++ 1 files changed, 5 insertions(+) diff -puN include/linux/kernel.h~roundup-pow-two include/linux/kernel.h --- 25/include/linux/kernel.h~roundup-pow-two Mon Sep 20 14:37:27 2004 +++ 25-akpm/include/linux/kernel.h Mon Sep 20 14:37:27 2004 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -111,6 +112,10 @@ static inline int __attribute_pure__ lon return r; } +static inline unsigned long __attribute_const__ roundup_pow_of_two(unsigned long x) +{ + return (1UL << fls(x - 1)); +} extern int printk_ratelimit(void); extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); _