tlb.h 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 r:1;
  15. unsigned int w:1;
  16. unsigned int x:1;
  17. int fd;
  18. __u64 offset;
  19. } mmap;
  20. struct {
  21. unsigned long addr;
  22. unsigned long len;
  23. } munmap;
  24. struct {
  25. unsigned long addr;
  26. unsigned long len;
  27. unsigned int r:1;
  28. unsigned int w:1;
  29. unsigned int x:1;
  30. } mprotect;
  31. } u;
  32. };
  33. extern void force_flush_all(void);
  34. extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
  35. unsigned long end_addr, int force,
  36. int (*do_ops)(union mm_context *,
  37. struct host_vm_op *, int, int,
  38. void **));
  39. extern int flush_tlb_kernel_range_common(unsigned long start,
  40. unsigned long end);
  41. #endif