blob: e3a7c453b5002a4d0b4e1fa5e28c118038eeddf0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC64_TLBFLUSH_H
2#define _SPARC64_TLBFLUSH_H
3
4#include <linux/config.h>
5#include <linux/mm.h>
6#include <asm/mmu_context.h>
7
David S. Miller74bf4312006-01-31 18:29:18 -08008/* TSB flush operations. */
9struct mmu_gather;
10extern void flush_tsb_kernel_range(unsigned long start, unsigned long end);
11extern void flush_tsb_user(struct mmu_gather *mp);
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013/* TLB flush operations. */
14
15extern void flush_tlb_pending(void);
16
17#define flush_tlb_range(vma,start,end) \
18 do { (void)(start); flush_tlb_pending(); } while (0)
19#define flush_tlb_page(vma,addr) flush_tlb_pending()
20#define flush_tlb_mm(mm) flush_tlb_pending()
21
David S. Miller74bf4312006-01-31 18:29:18 -080022/* Local cpu only. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070023extern void __flush_tlb_all(void);
David S. Miller74bf4312006-01-31 18:29:18 -080024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
26
27#ifndef CONFIG_SMP
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#define flush_tlb_kernel_range(start,end) \
David S. Miller74bf4312006-01-31 18:29:18 -080030do { flush_tsb_kernel_range(start,end); \
31 __flush_tlb_kernel_range(start,end); \
32} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34#else /* CONFIG_SMP */
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036extern void smp_flush_tlb_kernel_range(unsigned long start, unsigned long end);
37
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#define flush_tlb_kernel_range(start, end) \
David S. Miller74bf4312006-01-31 18:29:18 -080039do { flush_tsb_kernel_range(start,end); \
40 smp_flush_tlb_kernel_range(start, end); \
41} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
43#endif /* ! CONFIG_SMP */
44
David S. Miller74bf4312006-01-31 18:29:18 -080045static inline void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)
46{
47 /* We don't use virtual page tables for TLB miss processing
48 * any more. Nowadays we use the TSB.
49 */
50}
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
52#endif /* _SPARC64_TLBFLUSH_H */