[RFC] remove linux/hardirq.h from asm-generic/local.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Russell King
Date: Sunday, December 14, 2008 - 6:39 am

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.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h
index 33d7d04..43c0b81 100644
--- a/include/asm-generic/local.h
+++ b/include/asm-generic/local.h
@@ -2,7 +2,6 @@
 #define _ASM_GENERIC_LOCAL_H
 
 #include <linux/percpu.h>
-#include <linux/hardirq.h>
 #include <asm/atomic.h>
 #include <asm/types.h>
 

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] remove linux/hardirq.h from asm-generic/local.h, Russell King, (Sun Dec 14, 6:39 am)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Andrew Morton, (Sun Dec 14, 10:58 am)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Russell King, (Sun Dec 14, 12:51 pm)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Geert Uytterhoeven, (Sun Dec 14, 12:53 pm)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Alexey Dobriyan, (Tue Dec 16, 11:47 am)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Stephen Rothwell, (Tue Dec 16, 6:42 pm)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Andrew Morton, (Tue Dec 16, 7:35 pm)
Re: [RFC] remove linux/hardirq.h from asm-generic/local.h, Sam Ravnborg, (Tue Dec 16, 10:45 pm)