> diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c > index d4d409b..b22c2b6 100644 > --- a/arch/s390/mm/pgtable.c > +++ b/arch/s390/mm/pgtable.c > @@ -196,7 +196,7 @@ static inline pgste_t ptep_xchg_start(struct mm_struct *mm, > { > pgste_t pgste = __pgste(0); > > - if (mm_has_pgste(mm)) { > + if (pgtable_has_pgste(mm, __pa(ptep))) { > pgste = pgste_get_lock(ptep); > pgste = pgste_pte_notify(mm, addr, ptep, pgste); > } > @@ -207,7 +207,7 @@ static inline pte_t ptep_xchg_commit(struct mm_struct *mm, > unsigned long addr, pte_t *ptep, > pgste_t pgste, pte_t old, pte_t new) > { > - if (mm_has_pgste(mm)) { > + if (pgtable_has_pgste(mm, __pa(ptep))) { > if (pte_val(old) & _PAGE_INVALID) > pgste_set_key(ptep, pgste, new, mm); > if (pte_val(new) & _PAGE_INVALID) I think these two checks are wrong. We really have to test here the mapcount bit only (relying on mm_has_pgste(mm) is wrong in case global vm.allocate_pgste ist set). But before I continue working on this, I think it makes sense to clarify if something like that would be acceptable at all. -- Thanks, David