Skip to contentSkip to conversation

RISC-V: Fix implicit definition of flush_tlb_all()

PATCH New Palmer Dabbelt 1 participant 1 message Oct 26, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: Fix implicit definition of flush_tlb_all()

Without this I get allnoconfig builds failing with

CC arch/riscv/kernel/asm-offsets.s
In file included from /scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/pgtable.h:117,
from /scratch/merges/ko-linux-next/linux/include/linux/pgtable.h:6,
from /scratch/merges/ko-linux-next/linux/include/linux/mm.h:29,
from /scratch/merges/ko-linux-next/linux/arch/riscv/kernel/asm-offsets.c:10:
/scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/tlbflush.h: In function 'flush_tlb_kernel_range':
/scratch/merges/ko-linux-next/linux/arch/riscv/include/asm/tlbflush.h:60:9: error: implicit declaration of function 'flush_tlb_all' [-Werror=implicit-function-declaration]
60 | flush_tlb_all();

---
 arch/riscv/include/asm/tlbflush.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/riscv/include/asm/tlbflush.h +6 -5
index a947ae3afd28..440cf8f176d4 100644
@@ -11,6 +11,12 @@
 #include <asm/smp.h>
 #include <asm/errata_list.h>
 
+#ifdef CONFIG_SMP
+void flush_tlb_all(void);
+#else
+#define flush_tlb_all() local_flush_tlb_all()
+#endif
+
 #ifdef CONFIG_MMU
 static inline void local_flush_tlb_all(void)
 {
@@ -34,11 +40,6 @@ static inline void local_flush_tlb_page_asid(unsigned long addr,
 	ALT_SFENCE_VMA_ADDR_ASID(addr, asid);
 }
 
-#ifdef CONFIG_SMP
-void flush_tlb_all(void);
-#else
-#define flush_tlb_all() local_flush_tlb_all()
-#endif
 void flush_tlb_mm(struct mm_struct *mm);
 void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
 void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
Signature · 7 lines
2.42.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv