Skip to contentSkip to conversation

powerpc/64s: Fix ps3 build error due to tlbiel_all()

PATCH Applied Michael Ellerman 2 participants 2 messages Jan 19, 2018 – Jan 22, 2018 PowerPC

lore
Share & tools
lore

Michael Ellerman

author reviewer
#0 lore raw

PATCH 1/1 powerpc/64s: Fix ps3 build error due to tlbiel_all()

The recent changes to TLB handling broke the PS3 build:

arch/powerpc/include/asm/book3s/64/tlbflush.h:30: undefined reference to `.hash__tlbiel_all'

Fix it by adding an fallback version of tlbiel_all() for non-native builds. It should never be called, due to checks in callers so it calls BUG(). We should probably clean it up further but this will suffice for now.

Fixes d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")
---
 arch/powerpc/include/asm/book3s/64/tlbflush.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/powerpc/include/asm/book3s/64/tlbflush.h +4 -0
index 9befb4df235c..0cac17253513 100644
@@ -14,6 +14,7 @@ enum {
 	TLB_INVAL_SCOPE_LPID = 1,	/* invalidate TLBs for current LPID */
 };
 
+#ifdef CONFIG_PPC_NATIVE
 static inline void tlbiel_all(void)
 {
 	/*
@@ -29,6 +30,9 @@ static inline void tlbiel_all(void)
 	else
 		hash__tlbiel_all(TLB_INVAL_SCOPE_GLOBAL);
 }
+#else
+static inline void tlbiel_all(void) { BUG(); };
+#endif
 
 static inline void tlbiel_all_lpid(bool radix)
 {
Signature · 1 line
2.14.3
#1 lore raw
Quoted 11 lines · Michael Ellerman

The recent changes to TLB handling broke the PS3 build:

arch/powerpc/include/asm/book3s/64/tlbflush.h:30: undefined reference to `.hash__tlbiel_all'

Fix it by adding an fallback version of tlbiel_all() for non-native builds. It should never be called, due to checks in callers so it calls BUG(). We should probably clean it up further but this will suffice for now.

Fixes d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")

Applied to powerpc next.

https://git.kernel.org/powerpc/c/7a074fc08389f43b448ebef74bf56b

cheers