book3s64/radix: Refactoring common kfence related functions
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Fri, 18 Oct 2024 17:29:51 +0000 (22:59 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Oct 2024 07:53:20 +0000 (18:53 +1100)
commitb5fbf7e2c6a403344e83139a14322f0c42911f2d
tree0f443b073fc52062af0e28a698103d9bb7e05189
parent8fec58f503b296af87ffca3898965e3054f2b616
book3s64/radix: Refactoring common kfence related functions

Both radix and hash on book3s requires to detect if kfence
early init is enabled or not. Hash needs to disable kfence
if early init is not enabled because with kfence the linear map is
mapped using PAGE_SIZE rather than 16M mapping.
We don't support multiple page sizes for slb entry used for kernel
linear map in book3s64.

This patch refactors out the common functions required to detect kfence
early init is enabled or not.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/f4a787224fbe5bb787158ace579780c0257f6602.1729271995.git.ritesh.list@gmail.com
arch/powerpc/include/asm/kfence.h
arch/powerpc/mm/book3s64/pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/init-common.c