vmacache.h 722 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __LINUX_VMACACHE_H
  3. #define __LINUX_VMACACHE_H
  4. #include <linux/sched.h>
  5. #include <linux/mm.h>
  6. static inline void vmacache_flush(struct task_struct *tsk)
  7. {
  8. memset(tsk->vmacache.vmas, 0, sizeof(tsk->vmacache.vmas));
  9. }
  10. extern void vmacache_update(unsigned long addr, struct vm_area_struct *newvma);
  11. extern struct vm_area_struct *vmacache_find(struct mm_struct *mm,
  12. unsigned long addr);
  13. #ifndef CONFIG_MMU
  14. extern struct vm_area_struct *vmacache_find_exact(struct mm_struct *mm,
  15. unsigned long start,
  16. unsigned long end);
  17. #endif
  18. static inline void vmacache_invalidate(struct mm_struct *mm)
  19. {
  20. mm->vmacache_seqnum++;
  21. }
  22. #endif /* __LINUX_VMACACHE_H */