summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/init_32.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-02-21 22:08:45 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-02-23 13:04:32 +0300
commit28ea38b9cba68eec55cf550acd6b36b6f507cd17 (patch)
tree186162e391d432a3533eef89d52bde400593236f /arch/powerpc/mm/init_32.c
parent02d5d13b4544dff5fc0c0aa0179085ed52b72ecd (diff)
downloadlinux-28ea38b9cba68eec55cf550acd6b36b6f507cd17.tar.xz
powerpc/mmu: add is_strict_kernel_rwx() helper
Add a helper to know whether STRICT_KERNEL_RWX is enabled. This is based on rodata_enabled flag which is defined only when CONFIG_STRICT_KERNEL_RWX is selected. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/init_32.c')
-rw-r--r--arch/powerpc/mm/init_32.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 3e59e5d64b01..ee5a430b9a18 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -108,12 +108,10 @@ static void __init MMU_setup(void)
__map_without_bats = 1;
__map_without_ltlbs = 1;
}
-#ifdef CONFIG_STRICT_KERNEL_RWX
- if (rodata_enabled) {
+ if (strict_kernel_rwx_enabled()) {
__map_without_bats = 1;
__map_without_ltlbs = 1;
}
-#endif
}
/*