Commit 78ff18a412da24a4b79c6a97000ef5e467e813da

Authored by Russell King
Committed by Russell King
1 parent 9d4f13e531

[ARM] Cleanup ARM includes

arch/arm/kernel/entry-armv.S has contained a comment suggesting
that asm/hardware.h and asm/arch/irqs.h should be moved into the
asm/arch/entry-macro.S include.  So move the includes to these
two files as required.

Add missing includes (asm/hardware.h, asm/io.h) to asm/arch/system.h
includes which use those facilities, and remove asm/io.h from
kernel/process.c.

Remove other unnecessary includes from arch/arm/kernel, arch/arm/mm
and arch/arm/mach-footbridge.

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

Showing 28 changed files with 31 additions and 22 deletions Side-by-side Diff

arch/arm/kernel/dma.c
... ... @@ -12,8 +12,6 @@
12 12 * DMA facilities.
13 13 */
14 14 #include <linux/module.h>
15   -#include <linux/slab.h>
16   -#include <linux/mman.h>
17 15 #include <linux/init.h>
18 16 #include <linux/spinlock.h>
19 17 #include <linux/errno.h>
arch/arm/kernel/entry-armv.S
... ... @@ -18,8 +18,6 @@
18 18 #include <asm/memory.h>
19 19 #include <asm/glue.h>
20 20 #include <asm/vfpmacros.h>
21   -#include <asm/hardware.h> /* should be moved into entry-macro.S */
22   -#include <asm/arch/irqs.h> /* should be moved into entry-macro.S */
23 21 #include <asm/arch/entry-macro.S>
24 22  
25 23 #include "entry-header.S"
arch/arm/kernel/process.c
... ... @@ -28,10 +28,9 @@
28 28 #include <linux/init.h>
29 29 #include <linux/cpu.h>
30 30  
31   -#include <asm/system.h>
32   -#include <asm/io.h>
33 31 #include <asm/leds.h>
34 32 #include <asm/processor.h>
  33 +#include <asm/system.h>
35 34 #include <asm/uaccess.h>
36 35 #include <asm/mach/time.h>
37 36  
arch/arm/kernel/setup.c
... ... @@ -26,8 +26,6 @@
26 26  
27 27 #include <asm/cpu.h>
28 28 #include <asm/elf.h>
29   -#include <asm/hardware.h>
30   -#include <asm/io.h>
31 29 #include <asm/procinfo.h>
32 30 #include <asm/setup.h>
33 31 #include <asm/mach-types.h>
arch/arm/kernel/time.c
... ... @@ -29,9 +29,6 @@
29 29 #include <linux/sysdev.h>
30 30 #include <linux/timer.h>
31 31  
32   -#include <asm/hardware.h>
33   -#include <asm/io.h>
34   -#include <asm/irq.h>
35 32 #include <asm/leds.h>
36 33 #include <asm/thread_info.h>
37 34 #include <asm/mach/time.h>
arch/arm/kernel/traps.c
... ... @@ -23,7 +23,6 @@
23 23  
24 24 #include <asm/atomic.h>
25 25 #include <asm/cacheflush.h>
26   -#include <asm/io.h>
27 26 #include <asm/system.h>
28 27 #include <asm/uaccess.h>
29 28 #include <asm/unistd.h>
arch/arm/mach-footbridge/dma.c
... ... @@ -15,6 +15,7 @@
15 15  
16 16 #include <asm/dma.h>
17 17 #include <asm/io.h>
  18 +#include <asm/scatterlist.h>
18 19  
19 20 #include <asm/mach/dma.h>
20 21 #include <asm/hardware/dec21285.h>
arch/arm/mm/consistent.c
... ... @@ -19,7 +19,6 @@
19 19 #include <linux/dma-mapping.h>
20 20  
21 21 #include <asm/cacheflush.h>
22   -#include <asm/io.h>
23 22 #include <asm/tlbflush.h>
24 23  
25 24 #define CONSISTENT_BASE (0xffc00000)
arch/arm/mm/discontig.c
... ... @@ -9,10 +9,8 @@
9 9 * it under the terms of the GNU General Public License version 2 as
10 10 * published by the Free Software Foundation.
11 11 */
12   -
13 12 #include <linux/module.h>
14   -#include <linux/mm.h>
15   -#include <linux/init.h>
  13 +#include <linux/mmzone.h>
16 14 #include <linux/bootmem.h>
17 15  
18 16 #if MAX_NUMNODES != 4 && MAX_NUMNODES != 16
arch/arm/mm/mm-armv.c
... ... @@ -19,7 +19,6 @@
19 19  
20 20 #include <asm/pgalloc.h>
21 21 #include <asm/page.h>
22   -#include <asm/io.h>
23 22 #include <asm/setup.h>
24 23 #include <asm/tlbflush.h>
25 24  
include/asm-arm/arch-cl7500/entry-macro.S
1   -
  1 +#include <asm/hardware.h>
2 2 #include <asm/hardware/entry-macro-iomd.S>
include/asm-arm/arch-clps711x/entry-macro.S
... ... @@ -7,6 +7,7 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
10 11 #include <asm/hardware/clps7111.h>
11 12  
12 13 .macro disable_fiq
include/asm-arm/arch-clps711x/system.h
... ... @@ -20,7 +20,9 @@
20 20 #ifndef __ASM_ARCH_SYSTEM_H
21 21 #define __ASM_ARCH_SYSTEM_H
22 22  
  23 +#include <asm/hardware.h>
23 24 #include <asm/hardware/clps7111.h>
  25 +#include <asm/io.h>
24 26  
25 27 static inline void arch_idle(void)
26 28 {
include/asm-arm/arch-ebsa285/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +#include <asm/arch/irqs.h>
10 12 #include <asm/hardware/dec21285.h>
11 13  
12 14 .macro disable_fiq
include/asm-arm/arch-imx/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +
10 12 .macro disable_fiq
11 13 .endm
12 14 #define AITC_NIVECSR 0x40
include/asm-arm/arch-integrator/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +#include <asm/arch/irqs.h>
10 12  
11 13 .macro disable_fiq
12 14 .endm
include/asm-arm/arch-iop3xx/entry-macro.S
... ... @@ -7,6 +7,7 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/arch/irqs.h>
10 11  
11 12 #if defined(CONFIG_ARCH_IOP321)
12 13 .macro disable_fiq
include/asm-arm/arch-ixp2000/entry-macro.S
... ... @@ -7,6 +7,7 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/arch/irqs.h>
10 11  
11 12 .macro disable_fiq
12 13 .endm
include/asm-arm/arch-ixp4xx/entry-macro.S
... ... @@ -7,6 +7,7 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
10 11  
11 12 .macro disable_fiq
12 13 .endm
include/asm-arm/arch-l7200/system.h
... ... @@ -12,6 +12,8 @@
12 12 #ifndef __ASM_ARCH_SYSTEM_H
13 13 #define __ASM_ARCH_SYSTEM_H
14 14  
  15 +#include <asm/hardware.h>
  16 +
15 17 static inline void arch_idle(void)
16 18 {
17 19 *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */
include/asm-arm/arch-lh7a40x/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +#include <asm/arch/irqs.h>
10 12  
11 13 # if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
12 14 # error "LH7A400 and LH7A404 are mutually exclusive"
include/asm-arm/arch-omap/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +#include <asm/arch/irqs.h>
10 12  
11 13 #if defined(CONFIG_ARCH_OMAP1)
12 14  
include/asm-arm/arch-pxa/entry-macro.S
... ... @@ -7,6 +7,8 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
  10 +#include <asm/hardware.h>
  11 +#include <asm/arch/irqs.h>
10 12  
11 13 .macro disable_fiq
12 14 .endm
include/asm-arm/arch-realview/entry-macro.S
... ... @@ -7,7 +7,7 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
10   -
  10 +#include <asm/hardware.h>
11 11 #include <asm/hardware/gic.h>
12 12  
13 13 .macro disable_fiq
include/asm-arm/arch-rpc/entry-macro.S
1   -
  1 +#include <asm/hardware.h>
2 2 #include <asm/hardware/entry-macro-iomd.S>
include/asm-arm/arch-s3c2410/entry-macro.S
... ... @@ -10,6 +10,8 @@
10 10 * Modifications:
11 11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
12 12 */
  13 +#include <asm/hardware.h>
  14 +#include <asm/arch/irqs.h>
13 15  
14 16  
15 17 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
include/asm-arm/arch-versatile/entry-macro.S
... ... @@ -7,7 +7,9 @@
7 7 * License version 2. This program is licensed "as is" without any
8 8 * warranty of any kind, whether express or implied.
9 9 */
10   - .macro disable_fiq
  10 +#include <asm/hardware.h>
  11 +
  12 + .macro disable_fiq
11 13 .endm
12 14  
13 15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
include/asm-arm/cacheflush.h
... ... @@ -14,7 +14,6 @@
14 14 #include <linux/sched.h>
15 15 #include <linux/mm.h>
16 16  
17   -#include <asm/mman.h>
18 17 #include <asm/glue.h>
19 18 #include <asm/shmparam.h>
20 19