tlbflush_32.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef _SPARC_TLBFLUSH_H
  2. #define _SPARC_TLBFLUSH_H
  3. #include <linux/mm.h>
  4. // #include <asm/processor.h>
  5. /*
  6. * TLB flushing:
  7. *
  8. * - flush_tlb() flushes the current mm struct TLBs XXX Exists?
  9. * - flush_tlb_all() flushes all processes TLBs
  10. * - flush_tlb_mm(mm) flushes the specified mm context TLB's
  11. * - flush_tlb_page(vma, vmaddr) flushes one page
  12. * - flush_tlb_range(vma, start, end) flushes a range of pages
  13. * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
  14. */
  15. #ifdef CONFIG_SMP
  16. BTFIXUPDEF_CALL(void, local_flush_tlb_all, void)
  17. BTFIXUPDEF_CALL(void, local_flush_tlb_mm, struct mm_struct *)
  18. BTFIXUPDEF_CALL(void, local_flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
  19. BTFIXUPDEF_CALL(void, local_flush_tlb_page, struct vm_area_struct *, unsigned long)
  20. #define local_flush_tlb_all() BTFIXUP_CALL(local_flush_tlb_all)()
  21. #define local_flush_tlb_mm(mm) BTFIXUP_CALL(local_flush_tlb_mm)(mm)
  22. #define local_flush_tlb_range(vma,start,end) BTFIXUP_CALL(local_flush_tlb_range)(vma,start,end)
  23. #define local_flush_tlb_page(vma,addr) BTFIXUP_CALL(local_flush_tlb_page)(vma,addr)
  24. extern void smp_flush_tlb_all(void);
  25. extern void smp_flush_tlb_mm(struct mm_struct *mm);
  26. extern void smp_flush_tlb_range(struct vm_area_struct *vma,
  27. unsigned long start,
  28. unsigned long end);
  29. extern void smp_flush_tlb_page(struct vm_area_struct *mm, unsigned long page);
  30. #endif /* CONFIG_SMP */
  31. BTFIXUPDEF_CALL(void, flush_tlb_all, void)
  32. BTFIXUPDEF_CALL(void, flush_tlb_mm, struct mm_struct *)
  33. BTFIXUPDEF_CALL(void, flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
  34. BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long)
  35. #define flush_tlb_all() BTFIXUP_CALL(flush_tlb_all)()
  36. #define flush_tlb_mm(mm) BTFIXUP_CALL(flush_tlb_mm)(mm)
  37. #define flush_tlb_range(vma,start,end) BTFIXUP_CALL(flush_tlb_range)(vma,start,end)
  38. #define flush_tlb_page(vma,addr) BTFIXUP_CALL(flush_tlb_page)(vma,addr)
  39. // #define flush_tlb() flush_tlb_mm(current->active_mm) /* XXX Sure? */
  40. /*
  41. * This is a kludge, until I know better. --zaitcev XXX
  42. */
  43. static inline void flush_tlb_kernel_range(unsigned long start,
  44. unsigned long end)
  45. {
  46. flush_tlb_all();
  47. }
  48. #endif /* _SPARC_TLBFLUSH_H */