Skip to content

Commit

Permalink
mm: reorder includes after introduction of linux/pgtable.h
Browse files Browse the repository at this point in the history
The replacement of <asm/pgrable.h> with <linux/pgtable.h> made the include
of the latter in the middle of asm includes.  Fix this up with the aid of
the below script and manual adjustments here and there.

	import sys
	import re

	if len(sys.argv) is not 3:
	    print "USAGE: %s <file> <header>" % (sys.argv[0])
	    sys.exit(1)

	hdr_to_move="#include <linux/%s>" % sys.argv[2]
	moved = False
	in_hdrs = False

	with open(sys.argv[1], "r") as f:
	    lines = f.readlines()
	    for _line in lines:
		line = _line.rstrip('
')
		if line == hdr_to_move:
		    continue
		if line.startswith("#include <linux/"):
		    in_hdrs = True
		elif not moved and in_hdrs:
		    moved = True
		    print hdr_to_move
		print line

Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Cain <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Greentime Hu <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Guo Ren <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nick Hu <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: Russell King <[email protected]>
Cc: Stafford Horne <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Vincent Chen <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rppt authored and torvalds committed Jun 9, 2020
1 parent ca5999f commit 65fddcf
Show file tree
Hide file tree
Showing 265 changed files with 255 additions and 268 deletions.
2 changes: 0 additions & 2 deletions arch/alpha/kernel/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#include <linux/interrupt.h>
#include <linux/io.h>

#include <linux/pgtable.h>

/* Prototypes of functions used across modules here in this directory. */

#define vucp volatile unsigned char *
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <linux/memblock.h>
#include <linux/export.h>
#include <linux/highmem.h>
#include <asm/processor.h>
#include <linux/pgtable.h>
#include <asm/processor.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arc/mm/tlbex.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
*/

#include <linux/linkage.h>
#include <linux/pgtable.h>
#include <asm/entry.h>
#include <asm/mmu.h>
#include <linux/pgtable.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
#include <asm/processor.h>
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <asm/highmem.h>
#include <asm/mach/map.h>
#include <asm/mmu_context.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#ifdef CONFIG_EFI
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define FIXADDR_END 0xfff00000UL
#define FIXADDR_TOP (FIXADDR_END - PAGE_SIZE)

#include <asm/kmap_types.h>
#include <linux/pgtable.h>
#include <asm/kmap_types.h>

enum fixed_addresses {
FIX_EARLYCON_MEM_BASE,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>

#include <asm/assembler.h>
#include <asm/cp15.h>
Expand All @@ -18,7 +19,6 @@
#include <asm/asm-offsets.h>
#include <asm/memory.h>
#include <asm/thread_info.h>
#include <linux/pgtable.h>

#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_SEMIHOSTING)
#include CONFIG_DEBUG_LL_INCLUDE
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <linux/pgtable.h>

#include <asm/bugs.h>
#include <asm/cacheflush.h>
#include <asm/idmap.h>
#include <asm/pgalloc.h>
#include <linux/pgtable.h>
#include <asm/memory.h>
#include <asm/smp_plat.h>
#include <asm/suspend.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include "vmlinux-xip.lds.S"
#else

#include <linux/pgtable.h>
#include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h>
#include <asm/thread_info.h>
#include <asm/memory.h>
#include <asm/mpu.h>
#include <asm/page.h>
#include <linux/pgtable.h>

#include "vmlinux.lds.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-integrator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <linux/stat.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/pgtable.h>

#include <asm/mach-types.h>
#include <asm/mach/time.h>
#include <linux/pgtable.h>

#include "hardware.h"
#include "cm.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-keystone/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/io.h>
#include <linux/pgtable.h>

#include <asm/smp_plat.h>
#include <asm/prom.h>
#include <asm/tlbflush.h>
#include <linux/pgtable.h>

#include "keystone.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-sa1100/hackkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/pgtable.h>

#include <asm/mach-types.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <linux/pgtable.h>

#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-zynq/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
#include <linux/irqchip/arm-gic.h>
#include <linux/slab.h>
#include <linux/sys_soc.h>
#include <linux/pgtable.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/mach-types.h>
#include <asm/page.h>
#include <linux/pgtable.h>
#include <asm/smp_scu.h>
#include <asm/system_info.h>
#include <asm/hardware/cache-l2x0.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm_types.h>
#include <linux/pgtable.h>

#include <asm/cputype.h>
#include <asm/idmap.h>
#include <asm/hwcap.h>
#include <asm/pgalloc.h>
#include <linux/pgtable.h>
#include <asm/sections.h>
#include <asm/system_info.h>

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mm/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#ifdef CONFIG_MMU
#include <linux/list.h>
#include <linux/vmalloc.h>

#include <linux/pgtable.h>

/* the upper-most page table pointer */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm1020.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm1020e.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm1022.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm1026.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm720.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm740.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm7tdmi.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm920.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm922.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm925.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm926.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm940.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>
#include "proc-macros.S"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm946.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>
#include "proc-macros.S"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-arm9tdmi.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-fa526.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-feroceon.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-mohawk.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-sa110.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/pgtable.h>
#include <asm/assembler.h>
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <mach/hardware.h>
#include <asm/pgtable-hwdef.h>
#include <linux/pgtable.h>
#include <asm/ptrace.h>

#include "proc-macros.S"
Expand Down
Loading

0 comments on commit 65fddcf

Please sign in to comment.