aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2019-03-05 18:46:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-06 00:07:18 -0500
commit04a8645304500be88b3345b65fef7efe58016166 (patch)
treeceb2ef0dd25791e44b236804f32ede418e89f79d /fs/proc
parent0cbe3e26abe0cfe7effb67f620a77d46cce628b2 (diff)
mm: update ptep_modify_prot_commit to take old pte value as arg
Architectures like ppc64 require to do a conditional tlb flush based on the old and new value of pte. Enable that by passing old pte value as the arg. Link: http://lkml.kernel.org/r/20190116085035.29729-3-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 9c2ef731dd5f..beccb0b1d57c 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -948,10 +948,12 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
948 pte_t ptent = *pte; 948 pte_t ptent = *pte;
949 949
950 if (pte_present(ptent)) { 950 if (pte_present(ptent)) {
951 ptent = ptep_modify_prot_start(vma, addr, pte); 951 pte_t old_pte;
952 ptent = pte_wrprotect(ptent); 952
953 old_pte = ptep_modify_prot_start(vma, addr, pte);
954 ptent = pte_wrprotect(old_pte);
953 ptent = pte_clear_soft_dirty(ptent); 955 ptent = pte_clear_soft_dirty(ptent);
954 ptep_modify_prot_commit(vma, addr, pte, ptent); 956 ptep_modify_prot_commit(vma, addr, pte, old_pte, ptent);
955 } else if (is_swap_pte(ptent)) { 957 } else if (is_swap_pte(ptent)) {
956 ptent = pte_swp_clear_soft_dirty(ptent); 958 ptent = pte_swp_clear_soft_dirty(ptent);
957 set_pte_at(vma->vm_mm, addr, pte, ptent); 959 set_pte_at(vma->vm_mm, addr, pte, ptent);