diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-01-06 17:41:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:59:13 -0500 |
commit | ba84be2338d3a2b6020d39279335bb06fcd332e1 (patch) | |
tree | ea41e8d58b208332945808380f9643a8267f7ad5 | |
parent | 08adefd4791772d8b3fe23cc9d2554123e21dfa3 (diff) |
remove linux/hardirq.h from asm-generic/local.h
While looking at reducing the amount of architecture namespace pollution
in the generic kernel, I found that asm/irq.h is included in the vast
majority of compilations on ARM (around 650 files.)
Since asm/irq.h includes a sub-architecture include file on ARM, this
causes a negative impact on the ccache's ability to re-use the build
results from other sub-architectures, so we have a desire to reduce the
dependencies on asm/irq.h.
It turns out that a major cause of this is the needless include of
linux/hardirq.h into asm-generic/local.h. The patch below removes this
include, resulting in some 250 to 300 files (around half) of the kernel
then omitting asm/irq.h.
My test builds still succeed, provided two ARM files are fixed
(arch/arm/kernel/traps.c and arch/arm/mm/fault.c) - so there may be
negative impacts for this on other architectures.
Note that x86 does not include asm/irq.h nor linux/hardirq.h in its
asm/local.h, so this patch can be viewed as bringing the generic version
into line with the x86 version.
[kosaki.motohiro@jp.fujitsu.com: add #include <linux/irqflags.h> to acpi/processor_idle.c]
[adobriyan@gmail.com: fix sparc64]
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/avr32/kernel/traps.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/traps_32.c | 1 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 1 | ||||
-rw-r--r-- | include/asm-generic/local.h | 1 |
4 files changed, 3 insertions, 1 deletions
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 0d987373bc01..d547c8df157d 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/bug.h> | 9 | #include <linux/bug.h> |
10 | #include <linux/hardirq.h> | ||
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
11 | #include <linux/kallsyms.h> | 12 | #include <linux/kallsyms.h> |
12 | #include <linux/kdebug.h> | 13 | #include <linux/kdebug.h> |
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index 88807a2aacc3..c0aa3d83ec0e 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/ptrace.h> | 15 | #include <linux/ptrace.h> |
16 | #include <linux/hardirq.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 38aca048e951..66a9d8145562 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/pm_qos_params.h> | 41 | #include <linux/pm_qos_params.h> |
42 | #include <linux/clockchips.h> | 42 | #include <linux/clockchips.h> |
43 | #include <linux/cpuidle.h> | 43 | #include <linux/cpuidle.h> |
44 | #include <linux/irqflags.h> | ||
44 | 45 | ||
45 | /* | 46 | /* |
46 | * Include the apic definitions for x86 to have the APIC timer related defines | 47 | * Include the apic definitions for x86 to have the APIC timer related defines |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index 33d7d04e4119..dbd6150763e9 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_GENERIC_LOCAL_H | 2 | #define _ASM_GENERIC_LOCAL_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <linux/hardirq.h> | ||
6 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
7 | #include <asm/types.h> | 6 | #include <asm/types.h> |
8 | 7 | ||