[RFC PATCH 12/12] arm64: hugetlb: use set_pte_at() not set_pte() to provide mm pointer
Ard Biesheuvel
ardb at kernel.org
Wed Jan 26 09:30:11 PST 2022
Switch to set_pte_at() so we can provide the mm pointer to the code that
performs the page table update.
Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
---
arch/arm64/mm/hugetlbpage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index ffb9c229610a..099b28b00f4c 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -252,8 +252,8 @@ void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr,
ncontig = num_contig_ptes(sz, &pgsize);
- for (i = 0; i < ncontig; i++, ptep++)
- set_pte(ptep, pte);
+ for (i = 0; i < ncontig; i++, ptep++, addr += pgsize)
+ set_pte_at(mm, addr, ptep, pte);
}
pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
--
2.30.2
More information about the linux-arm-kernel
mailing list