mmu.h 505 B

12345678910111213141516171819202122232425262728293031
  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. * cpu_vm_mask is used to optimize ldt flushing.
  10. */
  11. typedef struct {
  12. void *ldt;
  13. #ifdef CONFIG_X86_64
  14. rwlock_t ldtlock;
  15. #endif
  16. int size;
  17. struct mutex lock;
  18. void *vdso;
  19. } mm_context_t;
  20. #ifdef CONFIG_SMP
  21. void leave_mm(int cpu);
  22. #else
  23. static inline void leave_mm(int cpu)
  24. {
  25. }
  26. #endif
  27. #endif /* _ASM_X86_MMU_H */