diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-01-31 19:18:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-31 20:18:38 -0500 |
commit | 9c4563f11fcd5c65efcd64db2b974bd9b1728eef (patch) | |
tree | 353e50503e2a9a0a99dd0a8535de3f1c1679d5fd | |
parent | 8cc931e03339eebbdbaa2ac1998d25a8a90b77d4 (diff) |
s390/mm: modify pmdp_invalidate to return old value.
It's required to avoid losing dirty and accessed bits.
Link: http://lkml.kernel.org/r/20171213105756.69879-8-kirill.shutemov@linux.intel.com
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 0a6b0286c32e..2d24d33bf188 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1505,12 +1505,12 @@ static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma, | |||
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | #define __HAVE_ARCH_PMDP_INVALIDATE | 1507 | #define __HAVE_ARCH_PMDP_INVALIDATE |
1508 | static inline void pmdp_invalidate(struct vm_area_struct *vma, | 1508 | static inline pmd_t pmdp_invalidate(struct vm_area_struct *vma, |
1509 | unsigned long addr, pmd_t *pmdp) | 1509 | unsigned long addr, pmd_t *pmdp) |
1510 | { | 1510 | { |
1511 | pmd_t pmd = __pmd(pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID); | 1511 | pmd_t pmd = __pmd(pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID); |
1512 | 1512 | ||
1513 | pmdp_xchg_direct(vma->vm_mm, addr, pmdp, pmd); | 1513 | return pmdp_xchg_direct(vma->vm_mm, addr, pmdp, pmd); |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT | 1516 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT |