summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2023-12-21 10:02:48 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2024-02-02 10:21:25 -0800
commit79d9f965ecfd765b7e2aaf198516d011cfcaa57e (patch)
treee9c2b5c660db8e501903385b4774afee613f8f11
parent315df9c476c587af26467f10c6f27414572f3938 (diff)
downloadlinux-stable-79d9f965ecfd765b7e2aaf198516d011cfcaa57e.tar.gz
linux-stable-79d9f965ecfd765b7e2aaf198516d011cfcaa57e.tar.bz2
linux-stable-79d9f965ecfd765b7e2aaf198516d011cfcaa57e.zip
powerpc: Simplify strict_kernel_rwx_enabled()
Now that rodata_enabled is always declared, remove #ifdef and define a single version of strict_kernel_rwx_enabled(). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
-rw-r--r--arch/powerpc/include/asm/mmu.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index d8b7e246a32f..24241995f740 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -330,17 +330,10 @@ static __always_inline bool early_radix_enabled(void)
return early_mmu_has_feature(MMU_FTR_TYPE_RADIX);
}
-#ifdef CONFIG_STRICT_KERNEL_RWX
static inline bool strict_kernel_rwx_enabled(void)
{
- return rodata_enabled;
+ return IS_ENABLED(CONFIG_STRICT_KERNEL_RWX) && rodata_enabled;
}
-#else
-static inline bool strict_kernel_rwx_enabled(void)
-{
- return false;
-}
-#endif
static inline bool strict_module_rwx_enabled(void)
{