Skip to content

Commit

Permalink
mm: introduce include/linux/pgtable.h
Browse files Browse the repository at this point in the history
The include/linux/pgtable.h is going to be the home of generic page table
manipulation functions.

Start with moving asm-generic/pgtable.h to include/linux/pgtable.h and
make the latter include asm/pgtable.h.

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 e31cf2f commit ca5999f
Show file tree
Hide file tree
Showing 335 changed files with 313 additions and 364 deletions.
2 changes: 0 additions & 2 deletions arch/alpha/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)

extern void paging_init(void);

#include <asm-generic/pgtable.h>

/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
#define HAVE_ARCH_UNMAPPED_AREA

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>

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

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

Expand Down
2 changes: 0 additions & 2 deletions arch/arc/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
#include <asm/hugepage.h>
#endif

#include <asm-generic/pgtable.h>

/* to cope with aliasing VIPT cache */
#define HAVE_ARCH_UNMAPPED_AREA

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 @@ -7,7 +7,7 @@
#include <linux/export.h>
#include <linux/highmem.h>
#include <asm/processor.h>
#include <asm/pgtable.h>
#include <linux/pgtable.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 @@ -35,7 +35,7 @@
#include <linux/linkage.h>
#include <asm/entry.h>
#include <asm/mmu.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
#include <asm/processor.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <asm/highmem.h>
#include <asm/mach/map.h>
#include <asm/mmu_context.h>
#include <asm/pgtable.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 @@ -7,7 +7,7 @@
#define FIXADDR_TOP (FIXADDR_END - PAGE_SIZE)

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

enum fixed_addresses {
FIX_EARLYCON_MEM_BASE,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/idmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __ASM_IDMAP_H

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

/* Tag a function as requiring to be executed via an identity mapping. */
#define __idmap __section(.idmap.text) noinline notrace
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/pgtable-nommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ extern unsigned int kobjsize(const void *objp);

#define FIRST_USER_ADDRESS 0UL

#include <asm-generic/pgtable.h>

#else

/*
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
/* FIXME: this is not correct */
#define kern_addr_valid(addr) (1)

#include <asm-generic/pgtable.h>

/*
* We provide our own arch_get_unmapped_area to cope with VIPT caches.
*/
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 @@ -18,7 +18,7 @@
#include <asm/asm-offsets.h>
#include <asm/memory.h>
#include <asm/thread_info.h>
#include <asm/pgtable.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 @@ -7,7 +7,7 @@
#include <asm/cacheflush.h>
#include <asm/idmap.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.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 @@ -14,7 +14,7 @@
#include <asm/memory.h>
#include <asm/mpu.h>
#include <asm/page.h>
#include <asm/pgtable.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 @@ -24,7 +24,7 @@

#include <asm/mach-types.h>
#include <asm/mach/time.h>
#include <asm/pgtable.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 @@ -16,7 +16,7 @@
#include <asm/smp_plat.h>
#include <asm/prom.h>
#include <asm/tlbflush.h>
#include <asm/pgtable.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 @@ -26,7 +26,7 @@
#include <asm/mach-types.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgtable.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-tegra/iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef __MACH_TEGRA_IOMAP_H
#define __MACH_TEGRA_IOMAP_H

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

#define TEGRA_IRAM_BASE 0x40000000
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 @@ -30,7 +30,7 @@
#include <asm/mach/time.h>
#include <asm/mach-types.h>
#include <asm/page.h>
#include <asm/pgtable.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 @@ -8,7 +8,7 @@
#include <asm/idmap.h>
#include <asm/hwcap.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>
#include <asm/sections.h>
#include <asm/system_info.h>

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

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

/* the upper-most page table pointer */
extern pmd_t *top_pmd;
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 @@ -15,7 +15,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -15,7 +15,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -15,7 +15,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -15,7 +15,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -24,7 +24,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -10,7 +10,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -10,7 +10,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -16,7 +16,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -17,7 +17,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -40,7 +40,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -16,7 +16,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -9,7 +9,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -11,7 +11,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -10,7 +10,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -14,7 +14,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -11,7 +11,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -12,7 +12,7 @@
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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 @@ -17,7 +17,7 @@
#include <asm/hwcap.h>
#include <mach/hardware.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.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-sa1100.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <asm/hwcap.h>
#include <mach/hardware.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>

#include "proc-macros.S"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-v6.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>

#include "proc-macros.S"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <asm/asm-offsets.h>
#include <asm/hwcap.h>
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>
#include <asm/memory.h>

#include "proc-macros.S"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-xsc3.S
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>
#include <asm/pgtable-hwdef.h>
#include <asm/page.h>
#include <asm/ptrace.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/proc-xscale.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/init.h>
#include <asm/assembler.h>
#include <asm/hwcap.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>
#include <asm/pgtable-hwdef.h>
#include <asm/page.h>
#include <asm/ptrace.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/pv-fixup-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <asm/asm-offsets.h>
#include <asm/cp15.h>
#include <asm/memory.h>
#include <asm/pgtable.h>
#include <linux/pgtable.h>

.section ".idmap.text", "ax"

Expand Down
Loading

0 comments on commit ca5999f

Please sign in to comment.