| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _SPARC_TLBFLUSH_H | 
|  | 2 | #define _SPARC_TLBFLUSH_H | 
|  | 3 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #include <linux/mm.h> | 
|  | 5 | // #include <asm/processor.h> | 
|  | 6 |  | 
|  | 7 | /* | 
|  | 8 | * TLB flushing: | 
|  | 9 | * | 
|  | 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 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | */ | 
|  | 17 |  | 
|  | 18 | #ifdef CONFIG_SMP | 
|  | 19 |  | 
|  | 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) | 
|  | 24 |  | 
|  | 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) | 
|  | 29 |  | 
|  | 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); | 
|  | 36 |  | 
|  | 37 | #endif /* CONFIG_SMP */ | 
|  | 38 |  | 
|  | 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) | 
|  | 43 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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) | 
|  | 48 |  | 
|  | 49 | // #define flush_tlb() flush_tlb_mm(current->active_mm)	/* XXX Sure? */ | 
|  | 50 |  | 
|  | 51 | /* | 
|  | 52 | * This is a kludge, until I know better. --zaitcev XXX | 
|  | 53 | */ | 
| David S. Miller | 17a82e93 | 2007-08-25 15:21:51 -0700 | [diff] [blame] | 54 | static inline void flush_tlb_kernel_range(unsigned long start, | 
|  | 55 | unsigned long end) | 
|  | 56 | { | 
|  | 57 | flush_tlb_all(); | 
|  | 58 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 |  | 
|  | 60 | #endif /* _SPARC_TLBFLUSH_H */ |