summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/pgtable.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2018-05-29 19:58:40 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-06-03 20:40:34 +1000
commite4c1112c3fc503fc78379fa61450bfda3f0717fe (patch)
tree09f61eb153a47682832fadd78a6fd4e9b265d123 /arch/powerpc/mm/pgtable.c
parent044003b52a78bcbda7103633c351da16505096cf (diff)
downloadlwn-e4c1112c3fc503fc78379fa61450bfda3f0717fe.tar.gz
lwn-e4c1112c3fc503fc78379fa61450bfda3f0717fe.zip
powerpc/mm: Change function prototype
In later patch, we use the vma and psize to do tlb flush. Do the prototype update in separate patch to make the review easy. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/pgtable.c')
-rw-r--r--arch/powerpc/mm/pgtable.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index e70af9939379..20cacd33e5be 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -222,7 +222,8 @@ int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address,
changed = !pte_same(*(ptep), entry);
if (changed) {
assert_pte_locked(vma->vm_mm, address);
- __ptep_set_access_flags(vma->vm_mm, ptep, entry, address);
+ __ptep_set_access_flags(vma, ptep, entry,
+ address, mmu_virtual_psize);
flush_tlb_page(vma, address);
}
return changed;
@@ -242,15 +243,26 @@ extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
ptep_set_access_flags(vma, addr, ptep, pte, dirty);
return 1;
#else
- int changed;
+ int changed, psize;
pte = set_access_flags_filter(pte, vma, dirty);
changed = !pte_same(*(ptep), pte);
if (changed) {
+
+#ifdef CONFIG_PPC_BOOK3S_64
+ struct hstate *hstate = hstate_file(vma->vm_file);
+ psize = hstate_get_psize(hstate);
+#else
+ /*
+ * Not used on non book3s64 platforms. But 8xx
+ * can possibly use tsize derived from hstate.
+ */
+ psize = 0;
+#endif
#ifdef CONFIG_DEBUG_VM
assert_spin_locked(&vma->vm_mm->page_table_lock);
#endif
- __ptep_set_access_flags(vma->vm_mm, ptep, pte, addr);
+ __ptep_set_access_flags(vma, ptep, pte, addr, psize);
flush_hugetlb_page(vma, addr);
}
return changed;