[PATCH 1/3] powerpc/mm: Fix build break due when PPC_NATIVE=n

Michael Ellerman mpe at ellerman.id.au
Mon Jul 25 12:57:49 AEST 2016

The recent commit to rework the hash MMU setup broke the build when
CONFIG_PPC_NATIVE=n. Fix it by providing a fallback implementation of

Fixes: 166dd7d3fbf2 ("powerpc/64: Move MMU backend selection out of platform code")
Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
 arch/powerpc/include/asm/book3s/64/mmu-hash.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index b0f4dffe12ae..45dfa2e4f0d1 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -391,7 +391,15 @@ int htab_remove_mapping(unsigned long vstart, unsigned long vend,
 extern void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages);
 extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
-extern void hpte_init_native(void);
+void hpte_init_native(void);
+static inline void hpte_init_native(void)
+	panic("hpte_init_native: No noative hash table support compiled in!\n");
 extern void hpte_init_lpar(void);
 extern void hpte_init_beat(void);
 extern void hpte_init_beat_v3(void);

More information about the Linuxppc-dev mailing list