aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/pgtable.h')
-rw-r--r--arch/s390/include/asm/pgtable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index b76317c1f3eb..5efb2fe186e7 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1127,7 +1127,7 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
1127 unsigned long addr, pte_t *ptep) 1127 unsigned long addr, pte_t *ptep)
1128{ 1128{
1129 pgste_t pgste; 1129 pgste_t pgste;
1130 pte_t pte; 1130 pte_t pte, oldpte;
1131 int young; 1131 int young;
1132 1132
1133 if (mm_has_pgste(vma->vm_mm)) { 1133 if (mm_has_pgste(vma->vm_mm)) {
@@ -1135,12 +1135,13 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
1135 pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); 1135 pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste);
1136 } 1136 }
1137 1137
1138 pte = *ptep; 1138 oldpte = pte = *ptep;
1139 ptep_flush_direct(vma->vm_mm, addr, ptep); 1139 ptep_flush_direct(vma->vm_mm, addr, ptep);
1140 young = pte_young(pte); 1140 young = pte_young(pte);
1141 pte = pte_mkold(pte); 1141 pte = pte_mkold(pte);
1142 1142
1143 if (mm_has_pgste(vma->vm_mm)) { 1143 if (mm_has_pgste(vma->vm_mm)) {
1144 pgste = pgste_update_all(&oldpte, pgste, vma->vm_mm);
1144 pgste = pgste_set_pte(ptep, pgste, pte); 1145 pgste = pgste_set_pte(ptep, pgste, pte);
1145 pgste_set_unlock(ptep, pgste); 1146 pgste_set_unlock(ptep, pgste);
1146 } else 1147 } else
@@ -1330,6 +1331,7 @@ static inline int ptep_set_access_flags(struct vm_area_struct *vma,
1330 ptep_flush_direct(vma->vm_mm, address, ptep); 1331 ptep_flush_direct(vma->vm_mm, address, ptep);
1331 1332
1332 if (mm_has_pgste(vma->vm_mm)) { 1333 if (mm_has_pgste(vma->vm_mm)) {
1334 pgste_set_key(ptep, pgste, entry, vma->vm_mm);
1333 pgste = pgste_set_pte(ptep, pgste, entry); 1335 pgste = pgste_set_pte(ptep, pgste, entry);
1334 pgste_set_unlock(ptep, pgste); 1336 pgste_set_unlock(ptep, pgste);
1335 } else 1337 } else