diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2020-05-19 05:49:03 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-05-26 22:22:20 +1000 |
commit | c7fa77016eb6093df38fdabdb7a89bb9617e7185 (patch) | |
tree | 609c4146b1b149f7b0db6fea87d1d4bf71ab11ca /arch/powerpc/include/asm/book3s/32 | |
parent | 1c1bf294882bd12669e39ccd7680c4ce34b7c15c (diff) | |
download | linux-stable-c7fa77016eb6093df38fdabdb7a89bb9617e7185.tar.gz linux-stable-c7fa77016eb6093df38fdabdb7a89bb9617e7185.tar.bz2 linux-stable-c7fa77016eb6093df38fdabdb7a89bb9617e7185.zip |
powerpc/mm: Standardise __ptep_test_and_clear_young() params between PPC32 and PPC64
On PPC32, __ptep_test_and_clear_young() takes the mm->context.id
In preparation of standardising pte_update() params between PPC32 and
PPC64, __ptep_test_and_clear_young() need mm instead of mm->context.id
Replace context param by mm.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0a65470e50a14373b7c2291184514aa982462255.1589866984.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/book3s/32')
-rw-r--r-- | arch/powerpc/include/asm/book3s/32/pgtable.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h index d2fc324cdf07..25c59511fcab 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -288,18 +288,19 @@ static inline pte_basic_t pte_update(pte_t *p, unsigned long clr, unsigned long * for our hash-based implementation, we fix that up here. */ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG -static inline int __ptep_test_and_clear_young(unsigned int context, unsigned long addr, pte_t *ptep) +static inline int __ptep_test_and_clear_young(struct mm_struct *mm, + unsigned long addr, pte_t *ptep) { unsigned long old; old = pte_update(ptep, _PAGE_ACCESSED, 0); if (old & _PAGE_HASHPTE) { unsigned long ptephys = __pa(ptep) & PAGE_MASK; - flush_hash_pages(context, addr, ptephys, 1); + flush_hash_pages(mm->context.id, addr, ptephys, 1); } return (old & _PAGE_ACCESSED) != 0; } #define ptep_test_and_clear_young(__vma, __addr, __ptep) \ - __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep) + __ptep_test_and_clear_young((__vma)->vm_mm, __addr, __ptep) #define __HAVE_ARCH_PTEP_GET_AND_CLEAR static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |