@@ -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,
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(); Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> --- arch/riscv/include/asm/tlbflush.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)