mmu.h 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef _ASM_X86_MMU_H
  2. #define _ASM_X86_MMU_H
  3. #include <linux/spinlock.h>
  4. #include <linux/mutex.h>
  5. /*
  6. * The x86 doesn't have a mmu context, but
  7. * we put the segment information here.
  8. */
  9. typedef struct {
  10. #ifdef CONFIG_MODIFY_LDT_SYSCALL
  11. struct ldt_struct *ldt;
  12. #endif
  13. #ifdef CONFIG_X86_64
  14. /* True if mm supports a task running in 32 bit compatibility mode. */
  15. unsigned short ia32_compat;
  16. #endif
  17. struct mutex lock;
  18. void __user *vdso; /* vdso base address */
  19. const struct vdso_image *vdso_image; /* vdso image in use */
  20. atomic_t perf_rdpmc_allowed; /* nonzero if rdpmc is allowed */
  21. #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
  22. /*
  23. * One bit per protection key says whether userspace can
  24. * use it or not. protected by mmap_sem.
  25. */
  26. u16 pkey_allocation_map;
  27. s16 execute_only_pkey;
  28. #endif
  29. } mm_context_t;
  30. #ifdef CONFIG_SMP
  31. void leave_mm(int cpu);
  32. #else
  33. static inline void leave_mm(int cpu)
  34. {
  35. }
  36. #endif
  37. #endif /* _ASM_X86_MMU_H */