mm: consolidate pgtable_cache_init() and pgd_cache_init()
authorMike Rapoport <rppt@linux.ibm.com>
Mon, 23 Sep 2019 22:35:31 +0000 (15:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2019 22:54:09 +0000 (15:54 -0700)
commit782de70c42930baae55234f3df0dc90774924447
tree3381e20d3c3a51631eb0f8fac3d6bfe87a61d894
parent1b9a9d8564cbc49e1e5529460ca70bf7353aa4d1
mm: consolidate pgtable_cache_init() and pgd_cache_init()

Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem
cache for page table allocations on several architectures that do not use
PAGE_SIZE tables for one or more levels of the page table hierarchy.

Most architectures do not implement these functions and use __weak default
NOP implementation of pgd_cache_init().  Since there is no such default
for pgtable_cache_init(), its empty stub is duplicated among most
architectures.

Rename the definitions of pgd_cache_init() to pgtable_cache_init() and
drop empty stubs of pgtable_cache_init().

Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Will Deacon <will@kernel.org> [arm64]
Acked-by: Thomas Gleixner <tglx@linutronix.de> [x86]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
36 files changed:
arch/alpha/include/asm/pgtable.h
arch/arc/include/asm/pgtable.h
arch/arm/include/asm/pgtable-nommu.h
arch/arm/include/asm/pgtable.h
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/pgd.c
arch/c6x/include/asm/pgtable.h
arch/csky/include/asm/pgtable.h
arch/h8300/include/asm/pgtable.h
arch/hexagon/include/asm/pgtable.h
arch/hexagon/mm/Makefile
arch/hexagon/mm/pgalloc.c [deleted file]
arch/ia64/include/asm/pgtable.h
arch/m68k/include/asm/pgtable_mm.h
arch/m68k/include/asm/pgtable_no.h
arch/microblaze/include/asm/pgtable.h
arch/mips/include/asm/pgtable.h
arch/nds32/include/asm/pgtable.h
arch/nios2/include/asm/pgtable.h
arch/openrisc/include/asm/pgtable.h
arch/parisc/include/asm/pgtable.h
arch/powerpc/include/asm/pgtable.h
arch/riscv/include/asm/pgtable.h
arch/s390/include/asm/pgtable.h
arch/sh/include/asm/pgtable.h
arch/sh/mm/nommu.c
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/pgtable_64.h
arch/um/include/asm/pgtable.h
arch/unicore32/include/asm/pgtable.h
arch/x86/include/asm/pgtable_32.h
arch/x86/include/asm/pgtable_64.h
arch/x86/mm/pgtable.c
arch/xtensa/include/asm/pgtable.h
include/asm-generic/pgtable.h
init/main.c