powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU
authorNicholas Piggin <npiggin@gmail.com>
Wed, 1 Dec 2021 14:41:52 +0000 (00:41 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Dec 2021 11:41:13 +0000 (22:41 +1100)
commit387e220a2e5e630794e1f5219ed6f11e56271c21
tree85b04fbab55f104ba90c3c2e688b83fa5ab613e7
parentc28573744b74eb6de19add503d6a986795c4c137
powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU

Compiling out hash support code when CONFIG_PPC_64S_HASH_MMU=n saves
128kB kernel image size (90kB text) on powernv_defconfig minus KVM,
350kB on pseries_defconfig minus KVM, 40kB on a tiny config.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Fixup defined(ARCH_HAS_MEMREMAP_COMPAT_ALIGN), which needs CONFIG.
      Fix radix_enabled() use in setup_initial_memory_limit(). Add some
      stubs to reduce number of ifdefs.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211201144153.2456614-18-npiggin@gmail.com
35 files changed:
arch/powerpc/Kconfig
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
arch/powerpc/include/asm/book3s/pgtable.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/mce.c
arch/powerpc/kernel/mce_power.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/process.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kexec/core_64.c
arch/powerpc/kexec/ranges.c
arch/powerpc/mm/book3s64/Makefile
arch/powerpc/mm/book3s64/hugetlbpage.c
arch/powerpc/mm/book3s64/mmu_context.c
arch/powerpc/mm/book3s64/pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/copro_fault.c
arch/powerpc/mm/ptdump/Makefile
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/lparcfg.c
arch/powerpc/platforms/pseries/mobility.c
arch/powerpc/platforms/pseries/pseries.h
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/xmon/xmon.c
drivers/misc/lkdtm/core.c