mmu_context_32.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __SPARC_MMU_CONTEXT_H
  2. #define __SPARC_MMU_CONTEXT_H
  3. #include <asm/btfixup.h>
  4. #ifndef __ASSEMBLY__
  5. #include <asm-generic/mm_hooks.h>
  6. static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
  7. {
  8. }
  9. /*
  10. * Initialize a new mmu context. This is invoked when a new
  11. * address space instance (unique or shared) is instantiated.
  12. */
  13. #define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0)
  14. /*
  15. * Destroy a dead context. This occurs when mmput drops the
  16. * mm_users count to zero, the mmaps have been released, and
  17. * all the page tables have been flushed. Our job is to destroy
  18. * any remaining processor-specific state.
  19. */
  20. BTFIXUPDEF_CALL(void, destroy_context, struct mm_struct *)
  21. #define destroy_context(mm) BTFIXUP_CALL(destroy_context)(mm)
  22. /* Switch the current MM context. */
  23. BTFIXUPDEF_CALL(void, switch_mm, struct mm_struct *, struct mm_struct *, struct task_struct *)
  24. #define switch_mm(old_mm, mm, tsk) BTFIXUP_CALL(switch_mm)(old_mm, mm, tsk)
  25. #define deactivate_mm(tsk,mm) do { } while (0)
  26. /* Activate a new MM instance for the current task. */
  27. #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL)
  28. #endif /* !(__ASSEMBLY__) */
  29. #endif /* !(__SPARC_MMU_CONTEXT_H) */