mmu_context_32.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __SPARC_MMU_CONTEXT_H
  3. #define __SPARC_MMU_CONTEXT_H
  4. #ifndef __ASSEMBLY__
  5. #include <asm-generic/mm_hooks.h>
  6. /* Initialize a new mmu context. This is invoked when a new
  7. * address space instance (unique or shared) is instantiated.
  8. */
  9. #define init_new_context init_new_context
  10. int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
  11. /* Destroy a dead context. This occurs when mmput drops the
  12. * mm_users count to zero, the mmaps have been released, and
  13. * all the page tables have been flushed. Our job is to destroy
  14. * any remaining processor-specific state.
  15. */
  16. #define destroy_context destroy_context
  17. void destroy_context(struct mm_struct *mm);
  18. /* Switch the current MM context. */
  19. void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm,
  20. struct task_struct *tsk);
  21. /* Activate a new MM instance for the current task. */
  22. #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL)
  23. #include <asm-generic/mmu_context.h>
  24. #endif /* !(__ASSEMBLY__) */
  25. #endif /* !(__SPARC_MMU_CONTEXT_H) */