Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[pv_ops_mirror.git] / include / asm-sparc / tlbflush.h
blobb957e29d2ae186510f627094e69699ea3ec41f18
1 #ifndef _SPARC_TLBFLUSH_H
2 #define _SPARC_TLBFLUSH_H
4 #include <linux/mm.h>
5 // #include <asm/processor.h>
7 /*
8 * TLB flushing:
10 * - flush_tlb() flushes the current mm struct TLBs XXX Exists?
11 * - flush_tlb_all() flushes all processes TLBs
12 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
13 * - flush_tlb_page(vma, vmaddr) flushes one page
14 * - flush_tlb_range(vma, start, end) flushes a range of pages
15 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
18 #ifdef CONFIG_SMP
20 BTFIXUPDEF_CALL(void, local_flush_tlb_all, void)
21 BTFIXUPDEF_CALL(void, local_flush_tlb_mm, struct mm_struct *)
22 BTFIXUPDEF_CALL(void, local_flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
23 BTFIXUPDEF_CALL(void, local_flush_tlb_page, struct vm_area_struct *, unsigned long)
25 #define local_flush_tlb_all() BTFIXUP_CALL(local_flush_tlb_all)()
26 #define local_flush_tlb_mm(mm) BTFIXUP_CALL(local_flush_tlb_mm)(mm)
27 #define local_flush_tlb_range(vma,start,end) BTFIXUP_CALL(local_flush_tlb_range)(vma,start,end)
28 #define local_flush_tlb_page(vma,addr) BTFIXUP_CALL(local_flush_tlb_page)(vma,addr)
30 extern void smp_flush_tlb_all(void);
31 extern void smp_flush_tlb_mm(struct mm_struct *mm);
32 extern void smp_flush_tlb_range(struct vm_area_struct *vma,
33 unsigned long start,
34 unsigned long end);
35 extern void smp_flush_tlb_page(struct vm_area_struct *mm, unsigned long page);
37 #endif /* CONFIG_SMP */
39 BTFIXUPDEF_CALL(void, flush_tlb_all, void)
40 BTFIXUPDEF_CALL(void, flush_tlb_mm, struct mm_struct *)
41 BTFIXUPDEF_CALL(void, flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
42 BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long)
44 #define flush_tlb_all() BTFIXUP_CALL(flush_tlb_all)()
45 #define flush_tlb_mm(mm) BTFIXUP_CALL(flush_tlb_mm)(mm)
46 #define flush_tlb_range(vma,start,end) BTFIXUP_CALL(flush_tlb_range)(vma,start,end)
47 #define flush_tlb_page(vma,addr) BTFIXUP_CALL(flush_tlb_page)(vma,addr)
49 // #define flush_tlb() flush_tlb_mm(current->active_mm) /* XXX Sure? */
52 * This is a kludge, until I know better. --zaitcev XXX
54 static inline void flush_tlb_kernel_range(unsigned long start,
55 unsigned long end)
57 flush_tlb_all();
60 #endif /* _SPARC_TLBFLUSH_H */