Lines Matching full:mm
28 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument
32 if (mm->context != NO_CONTEXT) in get_mmu_context()
45 mm->context = ctx; in get_mmu_context()
46 context_mm[ctx] = mm; in get_mmu_context()
52 #define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0) argument
58 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument
60 if (mm->context != NO_CONTEXT) { in destroy_context()
61 clear_bit(mm->context, context_map); in destroy_context()
62 mm->context = NO_CONTEXT; in destroy_context()
75 get_mmu_context(tsk->mm); in switch_mm()
76 set_context(tsk->mm->context, next->pgd); in switch_mm()
80 * After we have set current->mm to a new value, this activates
81 * the context for the new mm so we see the new mappings.
85 struct mm_struct *mm) in activate_mm() argument
87 get_mmu_context(mm); in activate_mm()
88 set_context(mm->context, mm->pgd); in activate_mm()
96 struct mm_struct *mm; in load_ksp_mmu() local
115 mm = &init_mm; in load_ksp_mmu()
117 pr_info("load_ksp_mmu: non-kernel mm found: 0x%p\n", task->mm); in load_ksp_mmu()
118 mm = task->mm; in load_ksp_mmu()
121 if (!mm) in load_ksp_mmu()
124 pgd = pgd_offset(mm, mmuar); in load_ksp_mmu()
146 asid = mm->context & 0xff; in load_ksp_mmu()
162 pr_info("ksp load failed: mm=0x%p ksp=0x08%lx\n", mm, mmuar); in load_ksp_mmu()
173 extern unsigned long get_free_context(struct mm_struct *mm);
179 struct mm_struct *mm) in init_new_context() argument
181 mm->context = SUN3_INVALID_CONTEXT; in init_new_context()
187 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument
189 if (mm->context == SUN3_INVALID_CONTEXT) in get_mmu_context()
190 mm->context = get_free_context(mm); in get_mmu_context()
195 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument
197 if (mm->context != SUN3_INVALID_CONTEXT) in destroy_context()
198 clear_context(mm->context); in destroy_context()
201 static inline void activate_context(struct mm_struct *mm) in activate_context() argument
203 get_mmu_context(mm); in activate_context()
204 sun3_put_context(mm->context); in activate_context()
210 activate_context(tsk->mm); in switch_mm()
228 struct mm_struct *mm) in init_new_context() argument
230 mm->context = virt_to_phys(mm->pgd); in init_new_context()
234 static inline void switch_mm_0230(struct mm_struct *mm) in switch_mm_0230() argument
237 0x80000000 | _PAGE_TABLE, mm->context in switch_mm_0230()
267 static inline void switch_mm_0460(struct mm_struct *mm) in switch_mm_0460() argument
275 asm volatile ("movec %0,%%urp" : : "r" (mm->context)); in switch_mm_0460()