powerpc: Refactor __kernel_map_pages()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 16 Feb 2024 10:17:33 +0000 (11:17 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Mar 2024 11:18:45 +0000 (22:18 +1100)
commit3c8016e681c5e0f5f3ad15edb4569727cd32eaff
treedbd10b3c23926fd8b905cc9899ed3df22a7d1e99
parentf7f18e30b468458b2611ca65d745b50edcda9f43
powerpc: Refactor __kernel_map_pages()

__kernel_map_pages() is almost identical for PPC32 and RADIX.

Refactor it.

On PPC32 it is not needed for KFENCE, but to keep it simple
just make it similar to PPC64.

Move the prototype of hash__kernel_map_pages() into mmu_decl.h to allow
IS_ENABLED() to work on 32-bit.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/3656d47c53bff577739dac536dbae31fff52f6d8.1708078640.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/book3s/64/radix.h
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/pageattr.c
arch/powerpc/mm/pgtable_32.c