[PATCH for-4.8 04/12] powerpc/mm: Compile out radix related functions if RADIX_MMU is disabled

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Wed Jul 13 19:35:23 AEST 2016

Currently we depend on mmu_has_feature to evalute to zero based on
MMU_FTRS_POSSIBLE mask. In a later patch, we want to update
radix_enabled() to runtime update the conditional operation to a jump
instruction. This implies we cannot depend on MMU_FTRS_POSSIBLE mask.
Instead define radix_enabled to return 0 if RADIX_MMU is not enabled.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
 arch/powerpc/include/asm/book3s/64/mmu.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 5854263d4d6e..d4eda6420523 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -23,7 +23,12 @@ struct mmu_psize_def {
 extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
 #define radix_enabled() mmu_has_feature(MMU_FTR_RADIX)
+#define radix_enabled() (0)
 #endif /* __ASSEMBLY__ */

More information about the Linuxppc-dev mailing list