tlbflush.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __ASM_TLBFLUSH_H
  2. #define __ASM_TLBFLUSH_H
  3. #include <linux/mm.h>
  4. /*
  5. * TLB flushing:
  6. *
  7. * - flush_tlb_all() flushes all processes TLB entries
  8. * - flush_tlb_mm(mm) flushes the specified mm context TLB entries
  9. * - flush_tlb_page(vma, vmaddr) flushes one page
  10. * - flush_tlb_range(vma, start, end) flushes a range of pages
  11. * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
  12. */
  13. extern void local_flush_tlb_all(void);
  14. extern void local_flush_tlb_mm(struct mm_struct *mm);
  15. extern void local_flush_tlb_range(struct vm_area_struct *vma,
  16. unsigned long start, unsigned long end);
  17. extern void local_flush_tlb_kernel_range(unsigned long start,
  18. unsigned long end);
  19. extern void local_flush_tlb_page(struct vm_area_struct *vma,
  20. unsigned long page);
  21. extern void local_flush_tlb_one(unsigned long vaddr);
  22. #ifdef CONFIG_SMP
  23. extern void flush_tlb_all(void);
  24. extern void flush_tlb_mm(struct mm_struct *);
  25. extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long,
  26. unsigned long);
  27. extern void flush_tlb_kernel_range(unsigned long, unsigned long);
  28. extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
  29. extern void flush_tlb_one(unsigned long vaddr);
  30. #else /* CONFIG_SMP */
  31. #define flush_tlb_all() local_flush_tlb_all()
  32. #define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
  33. #define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, end)
  34. #define flush_tlb_kernel_range(vmaddr,end) \
  35. local_flush_tlb_kernel_range(vmaddr, end)
  36. #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page)
  37. #define flush_tlb_one(vaddr) local_flush_tlb_one(vaddr)
  38. #endif /* CONFIG_SMP */
  39. #endif /* __ASM_TLBFLUSH_H */