mmu_context.h 797 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef ASM_X86__MMU_CONTEXT_H
  2. #define ASM_X86__MMU_CONTEXT_H
  3. #include <asm/desc.h>
  4. #include <asm/atomic.h>
  5. #include <asm/pgalloc.h>
  6. #include <asm/tlbflush.h>
  7. #include <asm/paravirt.h>
  8. #ifndef CONFIG_PARAVIRT
  9. #include <asm-generic/mm_hooks.h>
  10. static inline void paravirt_activate_mm(struct mm_struct *prev,
  11. struct mm_struct *next)
  12. {
  13. }
  14. #endif /* !CONFIG_PARAVIRT */
  15. /*
  16. * Used for LDT copy/destruction.
  17. */
  18. int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
  19. void destroy_context(struct mm_struct *mm);
  20. #ifdef CONFIG_X86_32
  21. # include "mmu_context_32.h"
  22. #else
  23. # include "mmu_context_64.h"
  24. #endif
  25. #define activate_mm(prev, next) \
  26. do { \
  27. paravirt_activate_mm((prev), (next)); \
  28. switch_mm((prev), (next), NULL); \
  29. } while (0);
  30. #endif /* ASM_X86__MMU_CONTEXT_H */