tlbflush.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _CRIS_TLBFLUSH_H
  2. #define _CRIS_TLBFLUSH_H
  3. #include <linux/mm.h>
  4. #include <asm/processor.h>
  5. #include <asm/pgtable.h>
  6. #include <asm/pgalloc.h>
  7. /*
  8. * TLB flushing (implemented in arch/cris/mm/tlb.c):
  9. *
  10. * - flush_tlb() flushes the current mm struct TLBs
  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(mm, start, end) flushes a range of pages
  15. *
  16. */
  17. extern void __flush_tlb_all(void);
  18. extern void __flush_tlb_mm(struct mm_struct *mm);
  19. extern void __flush_tlb_page(struct vm_area_struct *vma,
  20. unsigned long addr);
  21. #define flush_tlb_all __flush_tlb_all
  22. #define flush_tlb_mm __flush_tlb_mm
  23. #define flush_tlb_page __flush_tlb_page
  24. static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long start, unsigned long end)
  25. {
  26. flush_tlb_mm(vma->vm_mm);
  27. }
  28. static inline void flush_tlb(void)
  29. {
  30. flush_tlb_mm(current->mm);
  31. }
  32. #define flush_tlb_kernel_range(start, end) flush_tlb_all()
  33. #endif /* _CRIS_TLBFLUSH_H */