Lines Matching refs:mm
398 static inline int mm_has_pgste(struct mm_struct *mm) in mm_has_pgste() argument
401 if (unlikely(mm->context.has_pgste)) in mm_has_pgste()
407 static inline int mm_alloc_pgste(struct mm_struct *mm) in mm_alloc_pgste() argument
410 if (unlikely(mm->context.alloc_pgste)) in mm_alloc_pgste()
421 static inline int mm_use_skey(struct mm_struct *mm) in mm_use_skey() argument
424 if (mm->context.use_skey) in mm_use_skey()
691 struct mm_struct *mm) in pgste_update_all() argument
696 if (!mm_use_skey(mm) || pte_val(*ptep) & _PAGE_INVALID) in pgste_update_all()
712 struct mm_struct *mm) in pgste_set_key() argument
718 if (!mm_use_skey(mm) || pte_val(entry) & _PAGE_INVALID) in pgste_set_key()
768 struct mm_struct *mm; member
788 struct gmap *gmap_alloc(struct mm_struct *mm, unsigned long limit);
809 static inline pgste_t pgste_ipte_notify(struct mm_struct *mm, in pgste_ipte_notify() argument
816 gmap_do_ipte_notify(mm, addr, ptep); in pgste_ipte_notify()
827 static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, in set_pte_at() argument
832 if (mm_has_pgste(mm)) { in set_pte_at()
835 pgste_set_key(ptep, pgste, entry, mm); in set_pte_at()
889 static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) in pte_clear() argument
1008 static inline void ptep_flush_direct(struct mm_struct *mm, in ptep_flush_direct() argument
1015 active = (mm == current->active_mm) ? 1 : 0; in ptep_flush_direct()
1016 count = atomic_add_return(0x10000, &mm->context.attach_count); in ptep_flush_direct()
1018 cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) in ptep_flush_direct()
1022 atomic_sub(0x10000, &mm->context.attach_count); in ptep_flush_direct()
1025 static inline void ptep_flush_lazy(struct mm_struct *mm, in ptep_flush_lazy() argument
1032 active = (mm == current->active_mm) ? 1 : 0; in ptep_flush_lazy()
1033 count = atomic_add_return(0x10000, &mm->context.attach_count); in ptep_flush_lazy()
1036 mm->context.flush_mm = 1; in ptep_flush_lazy()
1039 atomic_sub(0x10000, &mm->context.attach_count); in ptep_flush_lazy()
1045 static inline int ptep_test_and_clear_user_dirty(struct mm_struct *mm, in ptep_test_and_clear_user_dirty() argument
1053 if (!mm_has_pgste(mm)) in ptep_test_and_clear_user_dirty()
1060 pgste = pgste_ipte_notify(mm, addr, ptep, pgste); in ptep_test_and_clear_user_dirty()
1121 static inline pte_t ptep_get_and_clear(struct mm_struct *mm, in ptep_get_and_clear() argument
1127 if (mm_has_pgste(mm)) { in ptep_get_and_clear()
1129 pgste = pgste_ipte_notify(mm, address, ptep, pgste); in ptep_get_and_clear()
1133 ptep_flush_lazy(mm, address, ptep); in ptep_get_and_clear()
1136 if (mm_has_pgste(mm)) { in ptep_get_and_clear()
1137 pgste = pgste_update_all(&pte, pgste, mm); in ptep_get_and_clear()
1144 static inline pte_t ptep_modify_prot_start(struct mm_struct *mm, in ptep_modify_prot_start() argument
1151 if (mm_has_pgste(mm)) { in ptep_modify_prot_start()
1153 pgste_ipte_notify(mm, address, ptep, pgste); in ptep_modify_prot_start()
1157 ptep_flush_lazy(mm, address, ptep); in ptep_modify_prot_start()
1159 if (mm_has_pgste(mm)) { in ptep_modify_prot_start()
1160 pgste = pgste_update_all(&pte, pgste, mm); in ptep_modify_prot_start()
1166 static inline void ptep_modify_prot_commit(struct mm_struct *mm, in ptep_modify_prot_commit() argument
1172 if (mm_has_pgste(mm)) { in ptep_modify_prot_commit()
1174 pgste_set_key(ptep, pgste, pte, mm); in ptep_modify_prot_commit()
1215 static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, in ptep_get_and_clear_full() argument
1222 if (!full && mm_has_pgste(mm)) { in ptep_get_and_clear_full()
1224 pgste = pgste_ipte_notify(mm, address, ptep, pgste); in ptep_get_and_clear_full()
1229 ptep_flush_lazy(mm, address, ptep); in ptep_get_and_clear_full()
1232 if (!full && mm_has_pgste(mm)) { in ptep_get_and_clear_full()
1233 pgste = pgste_update_all(&pte, pgste, mm); in ptep_get_and_clear_full()
1240 static inline pte_t ptep_set_wrprotect(struct mm_struct *mm, in ptep_set_wrprotect() argument
1247 if (mm_has_pgste(mm)) { in ptep_set_wrprotect()
1249 pgste = pgste_ipte_notify(mm, address, ptep, pgste); in ptep_set_wrprotect()
1252 ptep_flush_lazy(mm, address, ptep); in ptep_set_wrprotect()
1255 if (mm_has_pgste(mm)) { in ptep_set_wrprotect()
1318 #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) argument
1487 static inline void pmdp_flush_direct(struct mm_struct *mm, in pmdp_flush_direct() argument
1498 active = (mm == current->active_mm) ? 1 : 0; in pmdp_flush_direct()
1499 count = atomic_add_return(0x10000, &mm->context.attach_count); in pmdp_flush_direct()
1501 cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) in pmdp_flush_direct()
1505 atomic_sub(0x10000, &mm->context.attach_count); in pmdp_flush_direct()
1508 static inline void pmdp_flush_lazy(struct mm_struct *mm, in pmdp_flush_lazy() argument
1515 active = (mm == current->active_mm) ? 1 : 0; in pmdp_flush_lazy()
1516 count = atomic_add_return(0x10000, &mm->context.attach_count); in pmdp_flush_lazy()
1519 mm->context.flush_mm = 1; in pmdp_flush_lazy()
1524 atomic_sub(0x10000, &mm->context.attach_count); in pmdp_flush_lazy()
1530 extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
1534 extern pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp);
1542 static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, in set_pmd_at() argument
1569 static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, in pmdp_huge_get_and_clear() argument
1574 pmdp_flush_direct(mm, address, pmdp); in pmdp_huge_get_and_clear()
1580 static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm, in pmdp_huge_get_and_clear_full() argument
1587 pmdp_flush_lazy(mm, address, pmdp); in pmdp_huge_get_and_clear_full()
1607 static inline void pmdp_set_wrprotect(struct mm_struct *mm, in pmdp_set_wrprotect() argument
1613 pmdp_flush_direct(mm, address, pmdp); in pmdp_set_wrprotect()
1614 set_pmd_at(mm, address, pmdp, pmd_wrprotect(pmd)); in pmdp_set_wrprotect()
1698 extern void s390_reset_cmma(struct mm_struct *mm);