mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
s390/mm: Fix cmma unused transfer from pgste into pte
commit0d6da872d3upstream. The last pgtable rework silently disabled the CMMA unused state by setting a local pte variable (a parameter) instead of propagating it back into the caller. Fix it. Fixes:ebde765c0e("s390/mm: uninline ptep_xxx functions from pgtable.h") Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
97a2e39b7a
commit
62d7f2123f
@@ -202,7 +202,7 @@ static inline pgste_t ptep_xchg_start(struct mm_struct *mm,
|
|||||||
return pgste;
|
return pgste;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ptep_xchg_commit(struct mm_struct *mm,
|
static inline pte_t ptep_xchg_commit(struct mm_struct *mm,
|
||||||
unsigned long addr, pte_t *ptep,
|
unsigned long addr, pte_t *ptep,
|
||||||
pgste_t pgste, pte_t old, pte_t new)
|
pgste_t pgste, pte_t old, pte_t new)
|
||||||
{
|
{
|
||||||
@@ -220,6 +220,7 @@ static inline void ptep_xchg_commit(struct mm_struct *mm,
|
|||||||
} else {
|
} else {
|
||||||
*ptep = new;
|
*ptep = new;
|
||||||
}
|
}
|
||||||
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr,
|
pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr,
|
||||||
@@ -231,7 +232,7 @@ pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr,
|
|||||||
preempt_disable();
|
preempt_disable();
|
||||||
pgste = ptep_xchg_start(mm, addr, ptep);
|
pgste = ptep_xchg_start(mm, addr, ptep);
|
||||||
old = ptep_flush_direct(mm, addr, ptep);
|
old = ptep_flush_direct(mm, addr, ptep);
|
||||||
ptep_xchg_commit(mm, addr, ptep, pgste, old, new);
|
old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new);
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
@@ -246,7 +247,7 @@ pte_t ptep_xchg_lazy(struct mm_struct *mm, unsigned long addr,
|
|||||||
preempt_disable();
|
preempt_disable();
|
||||||
pgste = ptep_xchg_start(mm, addr, ptep);
|
pgste = ptep_xchg_start(mm, addr, ptep);
|
||||||
old = ptep_flush_lazy(mm, addr, ptep);
|
old = ptep_flush_lazy(mm, addr, ptep);
|
||||||
ptep_xchg_commit(mm, addr, ptep, pgste, old, new);
|
old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new);
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user