1 #ifndef _SPARC64_TLBFLUSH_H
2 #define _SPARC64_TLBFLUSH_H
4 #include <asm/mmu_context.h>
6 /* TSB flush operations. */
8 #define TLB_BATCH_NR 192
14 unsigned long vaddrs[TLB_BATCH_NR];
17 void flush_tsb_kernel_range(unsigned long start, unsigned long end);
18 void flush_tsb_user(struct tlb_batch *tb);
19 void flush_tsb_user_page(struct mm_struct *mm, unsigned long vaddr);
21 /* TLB flush operations. */
23 static inline void flush_tlb_mm(struct mm_struct *mm)
27 static inline void flush_tlb_page(struct vm_area_struct *vma,
32 static inline void flush_tlb_range(struct vm_area_struct *vma,
33 unsigned long start, unsigned long end)
37 void flush_tlb_kernel_range(unsigned long start, unsigned long end);
39 #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
41 void flush_tlb_pending(void);
42 void arch_enter_lazy_mmu_mode(void);
43 void arch_leave_lazy_mmu_mode(void);
44 #define arch_flush_lazy_mmu_mode() do {} while (0)
47 void __flush_tlb_all(void);
48 void __flush_tlb_page(unsigned long context, unsigned long vaddr);
49 void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
53 static inline void global_flush_tlb_page(struct mm_struct *mm, unsigned long vaddr)
55 __flush_tlb_page(CTX_HWBITS(mm->context), vaddr);
58 #else /* CONFIG_SMP */
60 void smp_flush_tlb_kernel_range(unsigned long start, unsigned long end);
61 void smp_flush_tlb_page(struct mm_struct *mm, unsigned long vaddr);
63 #define global_flush_tlb_page(mm, vaddr) \
64 smp_flush_tlb_page(mm, vaddr)
66 #endif /* ! CONFIG_SMP */
68 #endif /* _SPARC64_TLBFLUSH_H */