diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-22 10:18:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-22 10:18:09 -0400 |
commit | 3fff4c42bd0a89869a0eb1e7874cc06ffa4aa0f5 (patch) | |
tree | 67c476b8aa52a2f5d17dc9b94da360e10d373bd5 | |
parent | edaac8e3167501cda336231d00611bf59c164346 (diff) |
printk: Remove ratelimit.h from kernel.h
Decouple kernel.h from ratelimit.h: the global declaration of
printk's ratelimit_state is not needed, and it leads to messy
circular dependencies due to ratelimit.h's (new) adding of a
spinlock_types.h include.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David S. Miller <davem@davemloft.net>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | include/linux/net.h | 1 | ||||
-rw-r--r-- | kernel/printk.c | 1 | ||||
-rw-r--r-- | kernel/sysctl.c | 3 | ||||
-rw-r--r-- | lib/ratelimit.c | 2 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 2 | ||||
-rw-r--r-- | net/core/utils.c | 2 |
7 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2b5b1e0899a8..3305f33201be 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
18 | #include <linux/ratelimit.h> | ||
19 | #include <linux/dynamic_debug.h> | 18 | #include <linux/dynamic_debug.h> |
20 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
21 | #include <asm/bug.h> | 20 | #include <asm/bug.h> |
@@ -241,7 +240,6 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
241 | asmlinkage int printk(const char * fmt, ...) | 240 | asmlinkage int printk(const char * fmt, ...) |
242 | __attribute__ ((format (printf, 1, 2))) __cold; | 241 | __attribute__ ((format (printf, 1, 2))) __cold; |
243 | 242 | ||
244 | extern struct ratelimit_state printk_ratelimit_state; | ||
245 | extern int printk_ratelimit(void); | 243 | extern int printk_ratelimit(void); |
246 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 244 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
247 | unsigned int interval_msec); | 245 | unsigned int interval_msec); |
diff --git a/include/linux/net.h b/include/linux/net.h index 9040a10584f7..df20f680f455 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -358,6 +358,7 @@ static const struct proto_ops name##_ops = { \ | |||
358 | 358 | ||
359 | #ifdef CONFIG_SYSCTL | 359 | #ifdef CONFIG_SYSCTL |
360 | #include <linux/sysctl.h> | 360 | #include <linux/sysctl.h> |
361 | #include <linux/ratelimit.h> | ||
361 | extern struct ratelimit_state net_ratelimit_state; | 362 | extern struct ratelimit_state net_ratelimit_state; |
362 | #endif | 363 | #endif |
363 | 364 | ||
diff --git a/kernel/printk.c b/kernel/printk.c index 602033acd6c7..b997c893cdcf 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/bootmem.h> | 33 | #include <linux/bootmem.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/kexec.h> | 35 | #include <linux/kexec.h> |
36 | #include <linux/ratelimit.h> | ||
36 | 37 | ||
37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
38 | 39 | ||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 1a631ba684a4..6c37048b9db9 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/sysrq.h> | 37 | #include <linux/sysrq.h> |
38 | #include <linux/highuid.h> | 38 | #include <linux/highuid.h> |
39 | #include <linux/writeback.h> | 39 | #include <linux/writeback.h> |
40 | #include <linux/ratelimit.h> | ||
40 | #include <linux/hugetlb.h> | 41 | #include <linux/hugetlb.h> |
41 | #include <linux/initrd.h> | 42 | #include <linux/initrd.h> |
42 | #include <linux/key.h> | 43 | #include <linux/key.h> |
@@ -155,6 +156,8 @@ extern int no_unaligned_warning; | |||
155 | extern int unaligned_dump_stack; | 156 | extern int unaligned_dump_stack; |
156 | #endif | 157 | #endif |
157 | 158 | ||
159 | extern struct ratelimit_state printk_ratelimit_state; | ||
160 | |||
158 | #ifdef CONFIG_RT_MUTEXES | 161 | #ifdef CONFIG_RT_MUTEXES |
159 | extern int max_lock_depth; | 162 | extern int max_lock_depth; |
160 | #endif | 163 | #endif |
diff --git a/lib/ratelimit.c b/lib/ratelimit.c index 69bfcacda16d..5551731ae1d4 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * This file is released under the GPLv2. | 9 | * This file is released under the GPLv2. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/ratelimit.h> |
13 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | 15 | ||
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 7db1de0497c6..887c03c4e3c6 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -10,7 +10,9 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/ratelimit.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | |||
14 | #include <net/ip.h> | 16 | #include <net/ip.h> |
15 | #include <net/sock.h> | 17 | #include <net/sock.h> |
16 | 18 | ||
diff --git a/net/core/utils.c b/net/core/utils.c index 83221aee7084..838250241d26 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/percpu.h> | 25 | #include <linux/percpu.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/ratelimit.h> | ||
28 | |||
27 | #include <net/sock.h> | 29 | #include <net/sock.h> |
28 | 30 | ||
29 | #include <asm/byteorder.h> | 31 | #include <asm/byteorder.h> |