Lines Matching full:mm
7 #include <linux/mm.h>
17 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
18 extern void destroy_context(struct mm_struct *mm);
23 extern bool mm_iommu_preregistered(struct mm_struct *mm);
24 extern long mm_iommu_new(struct mm_struct *mm,
27 extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua,
30 extern long mm_iommu_put(struct mm_struct *mm,
32 extern void mm_iommu_init(struct mm_struct *mm);
33 extern void mm_iommu_cleanup(struct mm_struct *mm);
34 extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm,
37 struct mm_struct *mm, unsigned long ua, unsigned long size);
38 extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm,
44 extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua);
45 extern bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
50 static inline bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa, in mm_iommu_is_devmem() argument
55 static inline void mm_iommu_init(struct mm_struct *mm) { } in mm_iommu_init() argument
57 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
77 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
88 VM_WARN_ON(mm->context.extended_id[index]); in alloc_extended_context()
89 mm->context.extended_id[index] = context_id; in alloc_extended_context()
93 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
97 context_id = get_user_context(&mm->context, ea); in need_extra_context()
109 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
117 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
124 extern void radix_kvm_prefetch_workaround(struct mm_struct *mm);
126 static inline void radix_kvm_prefetch_workaround(struct mm_struct *mm) { } in radix_kvm_prefetch_workaround() argument
130 extern int use_cop(unsigned long acop, struct mm_struct *mm);
131 extern void drop_cop(unsigned long acop, struct mm_struct *mm);
134 static inline void inc_mm_active_cpus(struct mm_struct *mm) in inc_mm_active_cpus() argument
136 atomic_inc(&mm->context.active_cpus); in inc_mm_active_cpus()
139 static inline void dec_mm_active_cpus(struct mm_struct *mm) in dec_mm_active_cpus() argument
141 atomic_dec(&mm->context.active_cpus); in dec_mm_active_cpus()
144 static inline void mm_context_add_copro(struct mm_struct *mm) in mm_context_add_copro() argument
151 if (atomic_inc_return(&mm->context.copros) == 1) in mm_context_add_copro()
152 inc_mm_active_cpus(mm); in mm_context_add_copro()
155 static inline void mm_context_remove_copro(struct mm_struct *mm) in mm_context_remove_copro() argument
161 * flush of the full mm, as the next TLBI may be local and the in mm_context_remove_copro()
178 flush_all_mm(mm); in mm_context_remove_copro()
180 c = atomic_dec_if_positive(&mm->context.copros); in mm_context_remove_copro()
185 dec_mm_active_cpus(mm); in mm_context_remove_copro()
190 * vas_windows counter shows number of open windows in the mm
200 static inline void mm_context_add_vas_window(struct mm_struct *mm) in mm_context_add_vas_window() argument
202 atomic_inc(&mm->context.vas_windows); in mm_context_add_vas_window()
203 mm_context_add_copro(mm); in mm_context_add_vas_window()
206 static inline void mm_context_remove_vas_window(struct mm_struct *mm) in mm_context_remove_vas_window() argument
210 mm_context_remove_copro(mm); in mm_context_remove_vas_window()
211 v = atomic_dec_if_positive(&mm->context.vas_windows); in mm_context_remove_vas_window()
217 static inline void inc_mm_active_cpus(struct mm_struct *mm) { } in inc_mm_active_cpus() argument
218 static inline void dec_mm_active_cpus(struct mm_struct *mm) { } in dec_mm_active_cpus() argument
219 static inline void mm_context_add_copro(struct mm_struct *mm) { } in mm_context_add_copro() argument
220 static inline void mm_context_remove_copro(struct mm_struct *mm) { } in mm_context_remove_copro() argument
239 #define deactivate_mm(tsk,mm) do { } while (0) argument
242 * After we have set current->mm to a new value, this activates
243 * the context for the new mm so we see the new mappings.
251 static inline void enter_lazy_tlb(struct mm_struct *mm, in enter_lazy_tlb() argument
260 extern void arch_exit_mmap(struct mm_struct *mm);
262 static inline void arch_unmap(struct mm_struct *mm, in arch_unmap() argument
265 if (start <= mm->context.vdso_base && mm->context.vdso_base < end) in arch_unmap()
266 mm->context.vdso_base = 0; in arch_unmap()
272 void arch_dup_pkeys(struct mm_struct *oldmm, struct mm_struct *mm);
281 #define pkey_mm_init(mm) argument
285 #define arch_dup_pkeys(oldmm, mm) argument
295 struct mm_struct *mm) in arch_dup_mmap() argument
297 arch_dup_pkeys(oldmm, mm); in arch_dup_mmap()