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()
104 static void destroy_pagetable_page(struct mm_struct *mm) in destroy_pagetable_page() argument
110 pte_frag = mm->context.pte_frag; in destroy_pagetable_page()
126 static inline void destroy_pagetable_page(struct mm_struct *mm) in destroy_pagetable_page() argument
133 void destroy_context(struct mm_struct *mm) in destroy_context() argument
137 drop_cop(mm->context.acop, mm); in destroy_context()
138 kfree(mm->context.cop_lockp); in destroy_context()
139 mm->context.cop_lockp = NULL; in destroy_context()
142 destroy_pagetable_page(mm); in destroy_context()
143 __destroy_context(mm->context.id); in destroy_context()
144 subpage_prot_free(mm); in destroy_context()
145 mm->context.id = MMU_NO_CONTEXT; in destroy_context()