Commit 79d9f965 authored by Christophe Leroy's avatar Christophe Leroy Committed by Luis Chamberlain

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: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent 315df9c4
...@@ -330,17 +330,10 @@ static __always_inline bool early_radix_enabled(void) ...@@ -330,17 +330,10 @@ static __always_inline bool early_radix_enabled(void)
return early_mmu_has_feature(MMU_FTR_TYPE_RADIX); return early_mmu_has_feature(MMU_FTR_TYPE_RADIX);
} }
#ifdef CONFIG_STRICT_KERNEL_RWX
static inline bool strict_kernel_rwx_enabled(void) 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) static inline bool strict_module_rwx_enabled(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment