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
Showing the changes to include/linux (4 of 265 files). Show all
Unified · Split
| @@ -5,6 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | #include <linux/kexec.h> |
| 6 | 6 | #include <linux/proc_fs.h> |
| 7 | 7 | #include <linux/elf.h> |
| 8 | +#include <linux/pgtable.h> | |
| 8 | 9 | #include <uapi/linux/vmcore.h> |
| 9 | 10 | |
| 10 | 11 | #include <linux/pgtable.h> /* for pgprot_t */ |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | #include <linux/slab.h> |
| 11 | 11 | #include <linux/bug.h> |
| 12 | 12 | #include <linux/io.h> |
| 13 | +#include <linux/pgtable.h> | |
| 13 | 14 | #include <asm/page.h> |
| 14 | 15 | |
| 15 | 16 | /* |
| @@ -99,7 +100,6 @@ io_mapping_unmap(void __iomem *vaddr) · 83 unmodified lines | ||
| 99 | 100 | #else |
| 100 | 101 | |
| 101 | 102 | #include <linux/uaccess.h> |
| 102 | −#include <linux/pgtable.h> | |
| 103 | 103 | |
| 104 | 104 | /* Create the io_mapping object*/ |
| 105 | 105 | static inline struct io_mapping * |
| @@ -11,8 +11,8 @@ struct task_struct; · 10 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | #ifdef CONFIG_KASAN |
| 13 | 13 | |
| 14 | −#include <asm/kasan.h> | |
| 15 | 14 | #include <linux/pgtable.h> |
| 15 | +#include <asm/kasan.h> | |
| 16 | 16 | |
| 17 | 17 | extern unsigned char kasan_early_shadow_page[PAGE_SIZE]; |
| 18 | 18 | extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE]; |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | #include <linux/overflow.h> |
| 29 | 29 | #include <linux/sizes.h> |
| 30 | 30 | #include <linux/sched.h> |
| 31 | +#include <linux/pgtable.h> | |
| 31 | 32 | |
| 32 | 33 | struct mempolicy; |
| 33 | 34 | struct anon_vma; |
| @@ -92,7 +93,6 @@ extern int mmap_rnd_compat_bits __read_mostly; · 58 unmodified lines | ||
| 92 | 93 | #endif |
| 93 | 94 | |
| 94 | 95 | #include <asm/page.h> |
| 95 | −#include <linux/pgtable.h> | |
| 96 | 96 | #include <asm/processor.h> |
| 97 | 97 | |
| 98 | 98 | /* |