diff mbox series

powerpc/mm/radix: Fix build error when RADIX_MMU=n

Message ID 20180131141310.4938-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 015eb1b89e959c9349f0a01803fb8ed1ced36f09
Headers show
Series powerpc/mm/radix: Fix build error when RADIX_MMU=n | expand

Commit Message

Michael Ellerman Jan. 31, 2018, 2:13 p.m. UTC
The recent TLB flush rework broke the build when the Radix MMU is
disabled at build time, eg:

  (.text+0x264): undefined reference to `.radix__tlbiel_all'

We could add an empty version, but if we ever called it by accident
that would indicate a bad bug, so add a stub that just WARNs if we do.

Fixes: d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/book3s/64/tlbflush-radix.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michael Ellerman Feb. 1, 2018, 1:17 p.m. UTC | #1
On Wed, 2018-01-31 at 14:13:10 UTC, Michael Ellerman wrote:
> The recent TLB flush rework broke the build when the Radix MMU is
> disabled at build time, eg:
> 
>   (.text+0x264): undefined reference to `.radix__tlbiel_all'
> 
> We could add an empty version, but if we ever called it by accident
> that would indicate a bad bug, so add a stub that just WARNs if we do.
> 
> Fixes: d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/015eb1b89e959c9349f0a01803fb8e

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
index b8f9ad587087..8eea90f80e45 100644
--- a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
+++ b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
@@ -11,7 +11,11 @@  static inline int mmu_get_ap(int psize)
 	return mmu_psize_defs[psize].ap;
 }
 
+#ifdef CONFIG_PPC_RADIX_MMU
 extern void radix__tlbiel_all(unsigned int action);
+#else
+static inline void radix__tlbiel_all(unsigned int action) { WARN_ON(1); };
+#endif
 
 extern void radix__flush_hugetlb_tlb_range(struct vm_area_struct *vma,
 					   unsigned long start, unsigned long end);