xref: /linux/arch/sparc/include/asm/tlb_64.h (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SPARC64_TLB_H
3 #define _SPARC64_TLB_H
4 
5 #include <linux/swap.h>
6 #include <linux/pagemap.h>
7 #include <asm/tlbflush.h>
8 #include <asm/mmu_context.h>
9 
10 #ifdef CONFIG_SMP
11 void smp_flush_tlb_pending(struct mm_struct *,
12 				  unsigned long, unsigned long *);
13 #endif
14 
15 #ifdef CONFIG_SMP
16 void smp_flush_tlb_mm(struct mm_struct *mm);
17 #define do_flush_tlb_mm(mm) smp_flush_tlb_mm(mm)
18 #else
19 #define do_flush_tlb_mm(mm) __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT)
20 #endif
21 
22 void __flush_tlb_pending(unsigned long, unsigned long, unsigned long *);
23 void flush_tlb_pending(void);
24 
25 #define tlb_flush(tlb)	flush_tlb_pending()
26 
27 /*
28  * SPARC64's hardware TLB fill does not use the Linux page-tables
29  * and therefore we don't need a TLBI when freeing page-table pages.
30  */
31 
32 #ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE
33 #define tlb_needs_table_invalidate()	(false)
34 #endif
35 
36 #include <asm-generic/tlb.h>
37 
38 #endif /* _SPARC64_TLB_H */
39