Lines Matching full:mm

7 #include <linux/mm.h>
18 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
20 extern void destroy_context(struct mm_struct *mm);
24 extern bool mm_iommu_preregistered(struct mm_struct *mm);
25 extern long mm_iommu_new(struct mm_struct *mm,
28 extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua,
31 extern long mm_iommu_put(struct mm_struct *mm,
33 extern void mm_iommu_init(struct mm_struct *mm);
34 extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm,
36 extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm,
40 extern bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
45 static inline bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa, in mm_iommu_is_devmem() argument
50 static inline void mm_iommu_init(struct mm_struct *mm) { } in mm_iommu_init() argument
52 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
72 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
83 VM_WARN_ON(mm->context.extended_id[index]); in alloc_extended_context()
84 mm->context.extended_id[index] = context_id; in alloc_extended_context()
88 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
92 context_id = get_user_context(&mm->context, ea); in need_extra_context()
105 static inline int alloc_extended_context(struct mm_struct *mm, in alloc_extended_context() argument
113 static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea) in need_extra_context() argument
120 static inline void inc_mm_active_cpus(struct mm_struct *mm) in inc_mm_active_cpus() argument
122 atomic_inc(&mm->context.active_cpus); in inc_mm_active_cpus()
125 static inline void dec_mm_active_cpus(struct mm_struct *mm) in dec_mm_active_cpus() argument
127 VM_WARN_ON_ONCE(atomic_read(&mm->context.active_cpus) <= 0); in dec_mm_active_cpus()
128 atomic_dec(&mm->context.active_cpus); in dec_mm_active_cpus()
131 static inline void mm_context_add_copro(struct mm_struct *mm) in mm_context_add_copro() argument
138 if (atomic_inc_return(&mm->context.copros) == 1) in mm_context_add_copro()
139 inc_mm_active_cpus(mm); in mm_context_add_copro()
142 static inline void mm_context_remove_copro(struct mm_struct *mm) in mm_context_remove_copro() argument
148 * flush of the full mm, as the next TLBI may be local and the in mm_context_remove_copro()
165 radix__flush_all_mm(mm); in mm_context_remove_copro()
167 c = atomic_dec_if_positive(&mm->context.copros); in mm_context_remove_copro()
172 dec_mm_active_cpus(mm); in mm_context_remove_copro()
177 * vas_windows counter shows number of open windows in the mm
187 static inline void mm_context_add_vas_window(struct mm_struct *mm) in mm_context_add_vas_window() argument
189 atomic_inc(&mm->context.vas_windows); in mm_context_add_vas_window()
190 mm_context_add_copro(mm); in mm_context_add_vas_window()
193 static inline void mm_context_remove_vas_window(struct mm_struct *mm) in mm_context_remove_vas_window() argument
197 mm_context_remove_copro(mm); in mm_context_remove_vas_window()
198 v = atomic_dec_if_positive(&mm->context.vas_windows); in mm_context_remove_vas_window()
204 static inline void inc_mm_active_cpus(struct mm_struct *mm) { } in inc_mm_active_cpus() argument
205 static inline void dec_mm_active_cpus(struct mm_struct *mm) { } in dec_mm_active_cpus() argument
206 static inline void mm_context_add_copro(struct mm_struct *mm) { } in mm_context_add_copro() argument
207 static inline void mm_context_remove_copro(struct mm_struct *mm) { } in mm_context_remove_copro() argument
238 * After we have set current->mm to a new value, this activates
239 * the context for the new mm so we see the new mappings.
250 static inline void enter_lazy_tlb(struct mm_struct *mm, in enter_lazy_tlb() argument
258 extern void arch_exit_mmap(struct mm_struct *mm);
263 void arch_dup_pkeys(struct mm_struct *oldmm, struct mm_struct *mm);
272 #define pkey_mm_init(mm) argument
273 #define arch_dup_pkeys(oldmm, mm) argument
283 struct mm_struct *mm) in arch_dup_mmap() argument
285 arch_dup_pkeys(oldmm, mm); in arch_dup_mmap()