Lines Matching refs:mm
62 int init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument
74 if (slice_mm_new_context(mm)) in init_new_context()
75 slice_set_user_psize(mm, mmu_virtual_psize); in init_new_context()
76 subpage_prot_init_new_context(mm); in init_new_context()
77 mm->context.id = index; in init_new_context()
79 mm->context.cop_lockp = kmalloc(sizeof(spinlock_t), GFP_KERNEL); in init_new_context()
80 if (!mm->context.cop_lockp) { in init_new_context()
82 subpage_prot_free(mm); in init_new_context()
83 mm->context.id = MMU_NO_CONTEXT; in init_new_context()
86 spin_lock_init(mm->context.cop_lockp); in init_new_context()
90 mm->context.pte_frag = NULL; in init_new_context()
93 mm_iommu_init(&mm->context); in init_new_context()
107 static void destroy_pagetable_page(struct mm_struct *mm) in destroy_pagetable_page() argument
113 pte_frag = mm->context.pte_frag; in destroy_pagetable_page()
129 static inline void destroy_pagetable_page(struct mm_struct *mm) in destroy_pagetable_page() argument
136 void destroy_context(struct mm_struct *mm) in destroy_context() argument
139 mm_iommu_cleanup(&mm->context); in destroy_context()
143 drop_cop(mm->context.acop, mm); in destroy_context()
144 kfree(mm->context.cop_lockp); in destroy_context()
145 mm->context.cop_lockp = NULL; in destroy_context()
148 destroy_pagetable_page(mm); in destroy_context()
149 __destroy_context(mm->context.id); in destroy_context()
150 subpage_prot_free(mm); in destroy_context()
151 mm->context.id = MMU_NO_CONTEXT; in destroy_context()