Lines Matching refs:mm

6 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)  in enter_lazy_tlb()  argument
30 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument
34 if (mm->context != NO_CONTEXT) in get_mmu_context()
47 mm->context = ctx; in get_mmu_context()
48 context_mm[ctx] = mm; in get_mmu_context()
54 #define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0) argument
59 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument
61 if (mm->context != NO_CONTEXT) { in destroy_context()
62 clear_bit(mm->context, context_map); in destroy_context()
63 mm->context = NO_CONTEXT; in destroy_context()
76 get_mmu_context(tsk->mm); in switch_mm()
77 set_context(tsk->mm->context, next->pgd); in switch_mm()
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()
91 #define deactivate_mm(tsk, mm) do { } while (0) argument
99 struct mm_struct *mm; in load_ksp_mmu() local
116 mm = &init_mm; in load_ksp_mmu()
118 pr_info("load_ksp_mmu: non-kernel mm found: 0x%p\n", task->mm); in load_ksp_mmu()
119 mm = task->mm; in load_ksp_mmu()
122 if (!mm) in load_ksp_mmu()
125 pgd = pgd_offset(mm, mmuar); in load_ksp_mmu()
139 asid = mm->context & 0xff; in load_ksp_mmu()
155 pr_info("ksp load failed: mm=0x%p ksp=0x08%lx\n", mm, mmuar); in load_ksp_mmu()
164 extern unsigned long get_free_context(struct mm_struct *mm);
169 struct mm_struct *mm) in init_new_context() argument
171 mm->context = SUN3_INVALID_CONTEXT; in init_new_context()
177 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument
179 if (mm->context == SUN3_INVALID_CONTEXT) in get_mmu_context()
180 mm->context = get_free_context(mm); in get_mmu_context()
184 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument
186 if (mm->context != SUN3_INVALID_CONTEXT) in destroy_context()
187 clear_context(mm->context); in destroy_context()
190 static inline void activate_context(struct mm_struct *mm) in activate_context() argument
192 get_mmu_context(mm); in activate_context()
193 sun3_put_context(mm->context); in activate_context()
199 activate_context(tsk->mm); in switch_mm()
202 #define deactivate_mm(tsk, mm) do { } while (0) argument
217 struct mm_struct *mm) in init_new_context() argument
219 mm->context = virt_to_phys(mm->pgd); in init_new_context()
223 #define destroy_context(mm) do { } while(0) argument
225 static inline void switch_mm_0230(struct mm_struct *mm) in switch_mm_0230() argument
228 0x80000000 | _PAGE_TABLE, mm->context in switch_mm_0230()
258 static inline void switch_mm_0460(struct mm_struct *mm) in switch_mm_0460() argument
266 asm volatile ("movec %0,%%urp" : : "r" (mm->context)); in switch_mm_0460()
292 #define deactivate_mm(tsk,mm) do { } while (0) argument
309 static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument
319 #define destroy_context(mm) do { } while (0) argument
320 #define deactivate_mm(tsk,mm) do { } while (0) argument