aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-01-17 18:34:51 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-01-17 18:34:51 -0500
commit9cdf083f981b8d37b3212400a359368661385099 (patch)
treeaa15a6a08ad87e650dea40fb59b3180bef0d345b /include/linux/kernel.h
parente499e01d234a31d59679b7b1e1cf628d917ba49a (diff)
parenta8b3485287731978899ced11f24628c927890e78 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index b9b5e4ba16..63fb18dcac 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -13,10 +13,12 @@
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/compiler.h> 14#include <linux/compiler.h>
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <linux/log2.h>
16#include <asm/byteorder.h> 17#include <asm/byteorder.h>
17#include <asm/bug.h> 18#include <asm/bug.h>
18 19
19extern const char linux_banner[]; 20extern const char linux_banner[];
21extern const char linux_proc_banner[];
20 22
21#define INT_MAX ((int)(~0U>>1)) 23#define INT_MAX ((int)(~0U>>1))
22#define INT_MIN (-INT_MAX - 1) 24#define INT_MIN (-INT_MAX - 1)
@@ -65,7 +67,7 @@ struct user;
65 * context (spinlock, irq-handler, ...). 67 * context (spinlock, irq-handler, ...).
66 * 68 *
67 * This is a useful debugging help to be able to catch problems early and not 69 * This is a useful debugging help to be able to catch problems early and not
68 * be biten later when the calling function happens to sleep when it is not 70 * be bitten later when the calling function happens to sleep when it is not
69 * supposed to. 71 * supposed to.
70 */ 72 */
71#ifdef CONFIG_PREEMPT_VOLUNTARY 73#ifdef CONFIG_PREEMPT_VOLUNTARY
@@ -157,20 +159,6 @@ static inline int printk(const char *s, ...) { return 0; }
157 159
158unsigned long int_sqrt(unsigned long); 160unsigned long int_sqrt(unsigned long);
159 161
160static inline int __attribute_pure__ long_log2(unsigned long x)
161{
162 int r = 0;
163 for (x >>= 1; x > 0; x >>= 1)
164 r++;
165 return r;
166}
167
168static inline unsigned long
169__attribute_const__ roundup_pow_of_two(unsigned long x)
170{
171 return 1UL << fls_long(x - 1);
172}
173
174extern int printk_ratelimit(void); 162extern int printk_ratelimit(void);
175extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); 163extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
176extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, 164extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,