Lines Matching refs:mm
18 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
20 extern void destroy_context(struct mm_struct *mm);
25 extern bool mm_iommu_preregistered(struct mm_struct *mm);
26 extern long mm_iommu_new(struct mm_struct *mm,
29 extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua,
32 extern long mm_iommu_put(struct mm_struct *mm,
34 extern void mm_iommu_init(struct mm_struct *mm);
35 extern void mm_iommu_cleanup(struct mm_struct *mm);
36 extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm,
39 struct mm_struct *mm, unsigned long ua, unsigned long size);
40 extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm,
46 extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua);
47 extern bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
52 static inline bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa, in mm_iommu_is_devmem() argument
57 static inline void mm_iommu_init(struct mm_struct *mm) { } in mm_iommu_init() argument
59 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
78 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
89 VM_WARN_ON(mm->context.extended_id[index]); in alloc_extended_context()
90 mm->context.extended_id[index] = context_id; in alloc_extended_context()
94 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
98 context_id = get_user_context(&mm->context, ea); in need_extra_context()
110 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
118 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
125 extern int use_cop(unsigned long acop, struct mm_struct *mm);
126 extern void drop_cop(unsigned long acop, struct mm_struct *mm);
129 static inline void inc_mm_active_cpus(struct mm_struct *mm) in inc_mm_active_cpus() argument
131 atomic_inc(&mm->context.active_cpus); in inc_mm_active_cpus()
134 static inline void dec_mm_active_cpus(struct mm_struct *mm) in dec_mm_active_cpus() argument
136 atomic_dec(&mm->context.active_cpus); in dec_mm_active_cpus()
139 static inline void mm_context_add_copro(struct mm_struct *mm) in mm_context_add_copro() argument
146 if (atomic_inc_return(&mm->context.copros) == 1) in mm_context_add_copro()
147 inc_mm_active_cpus(mm); in mm_context_add_copro()
150 static inline void mm_context_remove_copro(struct mm_struct *mm) in mm_context_remove_copro() argument
173 flush_all_mm(mm); in mm_context_remove_copro()
175 c = atomic_dec_if_positive(&mm->context.copros); in mm_context_remove_copro()
180 dec_mm_active_cpus(mm); in mm_context_remove_copro()
195 static inline void mm_context_add_vas_window(struct mm_struct *mm) in mm_context_add_vas_window() argument
197 atomic_inc(&mm->context.vas_windows); in mm_context_add_vas_window()
198 mm_context_add_copro(mm); in mm_context_add_vas_window()
201 static inline void mm_context_remove_vas_window(struct mm_struct *mm) in mm_context_remove_vas_window() argument
205 mm_context_remove_copro(mm); in mm_context_remove_vas_window()
206 v = atomic_dec_if_positive(&mm->context.vas_windows); in mm_context_remove_vas_window()
212 static inline void inc_mm_active_cpus(struct mm_struct *mm) { } in inc_mm_active_cpus() argument
213 static inline void dec_mm_active_cpus(struct mm_struct *mm) { } in dec_mm_active_cpus() argument
214 static inline void mm_context_add_copro(struct mm_struct *mm) { } in mm_context_add_copro() argument
215 static inline void mm_context_remove_copro(struct mm_struct *mm) { } in mm_context_remove_copro() argument
258 static inline void enter_lazy_tlb(struct mm_struct *mm, in enter_lazy_tlb() argument
266 extern void arch_exit_mmap(struct mm_struct *mm);
268 static inline void arch_unmap(struct mm_struct *mm, in arch_unmap() argument
271 unsigned long vdso_base = (unsigned long)mm->context.vdso; in arch_unmap()
274 mm->context.vdso = NULL; in arch_unmap()
280 void arch_dup_pkeys(struct mm_struct *oldmm, struct mm_struct *mm);
289 #define pkey_mm_init(mm) argument
290 #define arch_dup_pkeys(oldmm, mm) argument
300 struct mm_struct *mm) in arch_dup_mmap() argument
302 arch_dup_pkeys(oldmm, mm); in arch_dup_mmap()