blob: 3487328570edc1b5e86886ec29de371a72055136 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC64_TLBFLUSH_H
2#define _SPARC64_TLBFLUSH_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <linux/mm.h>
5#include <asm/mmu_context.h>
6
David S. Miller74bf4312006-01-31 18:29:18 -08007/* TSB flush operations. */
8struct mmu_gather;
9extern void flush_tsb_kernel_range(unsigned long start, unsigned long end);
10extern void flush_tsb_user(struct mmu_gather *mp);
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012/* TLB flush operations. */
13
14extern void flush_tlb_pending(void);
15
16#define flush_tlb_range(vma,start,end) \
17 do { (void)(start); flush_tlb_pending(); } while (0)
18#define flush_tlb_page(vma,addr) flush_tlb_pending()
19#define flush_tlb_mm(mm) flush_tlb_pending()
20
David S. Miller74bf4312006-01-31 18:29:18 -080021/* Local cpu only. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022extern void __flush_tlb_all(void);
David S. Miller74bf4312006-01-31 18:29:18 -080023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
25
26#ifndef CONFIG_SMP
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#define flush_tlb_kernel_range(start,end) \
David S. Miller74bf4312006-01-31 18:29:18 -080029do { flush_tsb_kernel_range(start,end); \
30 __flush_tlb_kernel_range(start,end); \
31} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
33#else /* CONFIG_SMP */
34
Linus Torvalds1da177e2005-04-16 15:20:36 -070035extern void smp_flush_tlb_kernel_range(unsigned long start, unsigned long end);
36
Linus Torvalds1da177e2005-04-16 15:20:36 -070037#define flush_tlb_kernel_range(start, end) \
David S. Miller74bf4312006-01-31 18:29:18 -080038do { flush_tsb_kernel_range(start,end); \
39 smp_flush_tlb_kernel_range(start, end); \
40} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
42#endif /* ! CONFIG_SMP */
43
David S. Miller74bf4312006-01-31 18:29:18 -080044static inline void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)
45{
46 /* We don't use virtual page tables for TLB miss processing
47 * any more. Nowadays we use the TSB.
48 */
49}
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51#endif /* _SPARC64_TLBFLUSH_H */