tlb.h 876 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __TLB_H__
  6. #define __TLB_H__
  7. #include "um_mmu.h"
  8. struct host_vm_op {
  9. enum { NONE, MMAP, MUNMAP, MPROTECT } type;
  10. union {
  11. struct {
  12. unsigned long addr;
  13. unsigned long len;
  14. unsigned int prot;
  15. int fd;
  16. __u64 offset;
  17. } mmap;
  18. struct {
  19. unsigned long addr;
  20. unsigned long len;
  21. } munmap;
  22. struct {
  23. unsigned long addr;
  24. unsigned long len;
  25. unsigned int prot;
  26. } mprotect;
  27. } u;
  28. };
  29. extern void force_flush_all(void);
  30. extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
  31. unsigned long end_addr, int force,
  32. int (*do_ops)(union mm_context *,
  33. struct host_vm_op *, int, int,
  34. void **));
  35. extern int flush_tlb_kernel_range_common(unsigned long start,
  36. unsigned long end);
  37. #endif