Lines Matching refs:mm

55 static inline void init_new_context_ldt(struct mm_struct *mm)
57 mm->context.ldt = NULL;
58 init_rwsem(&mm->context.ldt_usr_sem);
60 int ldt_dup_context(struct mm_struct *oldmm, struct mm_struct *mm);
61 void destroy_context_ldt(struct mm_struct *mm);
62 void ldt_arch_exit_mmap(struct mm_struct *mm);
64 static inline void init_new_context_ldt(struct mm_struct *mm) { }
66 struct mm_struct *mm)
70 static inline void destroy_context_ldt(struct mm_struct *mm) { }
71 static inline void ldt_arch_exit_mmap(struct mm_struct *mm) { }
75 extern void load_mm_ldt(struct mm_struct *mm);
78 static inline void load_mm_ldt(struct mm_struct *mm)
89 static inline unsigned long mm_lam_cr3_mask(struct mm_struct *mm)
91 return mm->context.lam_cr3_mask;
94 static inline void dup_lam(struct mm_struct *oldmm, struct mm_struct *mm)
96 mm->context.lam_cr3_mask = oldmm->context.lam_cr3_mask;
97 mm->context.untag_mask = oldmm->context.untag_mask;
101 static inline unsigned long mm_untag_mask(struct mm_struct *mm)
103 return mm->context.untag_mask;
106 static inline void mm_reset_untag_mask(struct mm_struct *mm)
108 mm->context.untag_mask = -1UL;
112 static inline bool arch_pgtable_dma_compat(struct mm_struct *mm)
114 return !mm_lam_cr3_mask(mm) ||
115 test_bit(MM_CONTEXT_FORCE_TAGGED_SVA, &mm->context.flags);
119 static inline unsigned long mm_lam_cr3_mask(struct mm_struct *mm)
124 static inline void dup_lam(struct mm_struct *oldmm, struct mm_struct *mm)
128 static inline void mm_reset_untag_mask(struct mm_struct *mm)
134 extern void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk);
137 * Init a new mm. Used on mm copies, like at fork()
138 * and on mm's that are brand-new, like at execve().
142 struct mm_struct *mm)
144 mutex_init(&mm->context.lock);
146 mm->context.ctx_id = atomic64_inc_return(&last_mm_ctx_id);
147 atomic64_set(&mm->context.tlb_gen, 0);
152 mm->context.pkey_allocation_map = 0x1;
154 mm->context.execute_only_pkey = -1;
157 mm_reset_untag_mask(mm);
158 init_new_context_ldt(mm);
163 static inline void destroy_context(struct mm_struct *mm)
165 destroy_context_ldt(mm);
182 #define deactivate_mm(tsk, mm) \
187 #define deactivate_mm(tsk, mm) \
196 struct mm_struct *mm)
202 /* Duplicate the oldmm pkey state in mm: */
203 mm->context.pkey_allocation_map = oldmm->context.pkey_allocation_map;
204 mm->context.execute_only_pkey = oldmm->context.execute_only_pkey;
208 static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
210 arch_dup_pkeys(oldmm, mm);
211 paravirt_enter_mmap(mm);
212 dup_lam(oldmm, mm);
213 return ldt_dup_context(oldmm, mm);
216 static inline void arch_exit_mmap(struct mm_struct *mm)
218 paravirt_arch_exit_mmap(mm);
219 ldt_arch_exit_mmap(mm);
223 static inline bool is_64bit_mm(struct mm_struct *mm)
226 !test_bit(MM_CONTEXT_UPROBE_IA32, &mm->context.flags);
229 static inline bool is_64bit_mm(struct mm_struct *mm)
235 static inline void arch_unmap(struct mm_struct *mm, unsigned long start,
247 * mm, or if we are in a kernel thread.