tlbflush.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifdef CONFIG_SMP
  22. extern void flush_tlb_all(void);
  23. extern void flush_tlb_mm(struct mm_struct *mm);
  24. extern void flush_tlb_page(struct vm_area_struct *vma,
  25. unsigned long addr);
  26. #else
  27. #define flush_tlb_all __flush_tlb_all
  28. #define flush_tlb_mm __flush_tlb_mm
  29. #define flush_tlb_page __flush_tlb_page
  30. #endif
  31. static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long start, unsigned long end)
  32. {
  33. flush_tlb_mm(vma->vm_mm);
  34. }
  35. static inline void flush_tlb(void)
  36. {
  37. flush_tlb_mm(current->mm);
  38. }
  39. #define flush_tlb_kernel_range(start, end) flush_tlb_all()
  40. #endif /* _CRIS_TLBFLUSH_H */