blob: 3ef9909ac3ac28110ca0b9c62c26397baff41402 [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
8/* TLB flush operations. */
9
10extern void flush_tlb_pending(void);
11
12#define flush_tlb_range(vma,start,end) \
13 do { (void)(start); flush_tlb_pending(); } while (0)
14#define flush_tlb_page(vma,addr) flush_tlb_pending()
15#define flush_tlb_mm(mm) flush_tlb_pending()
16
17extern void __flush_tlb_all(void);
18extern void __flush_tlb_page(unsigned long context, unsigned long page, unsigned long r);
19
20extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
21
22#ifndef CONFIG_SMP
23
24#define flush_tlb_all() __flush_tlb_all()
25#define flush_tlb_kernel_range(start,end) \
26 __flush_tlb_kernel_range(start,end)
27
28#else /* CONFIG_SMP */
29
30extern void smp_flush_tlb_all(void);
31extern void smp_flush_tlb_kernel_range(unsigned long start, unsigned long end);
32
33#define flush_tlb_all() smp_flush_tlb_all()
34#define flush_tlb_kernel_range(start, end) \
35 smp_flush_tlb_kernel_range(start, end)
36
37#endif /* ! CONFIG_SMP */
38
39extern void flush_tlb_pgtables(struct mm_struct *, unsigned long, unsigned long);
40
41#endif /* _SPARC64_TLBFLUSH_H */