aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/hugetlbpage.c
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2017-08-22 11:42:47 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2017-08-22 17:47:11 +0100
commita8d623eefd780288c0299f517da0845da687fbfc (patch)
treec4d91aa65923ab908f4e56459816ebee2607a9a5 /arch/arm64/mm/hugetlbpage.c
parentarm64: hugetlb: Override huge_pte_clear() to support contiguous hugepages (diff)
downloadlinux-dev-a8d623eefd780288c0299f517da0845da687fbfc.tar.xz
linux-dev-a8d623eefd780288c0299f517da0845da687fbfc.zip
arm64: hugetlb: Override set_huge_swap_pte_at() to support contiguous hugepages
The default implementation of set_huge_swap_pte_at() does not support hugepages consisting of contiguous ptes. Override it to add support for contiguous hugepages. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Cc: David Woods <dwoods@mellanox.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm/hugetlbpage.c')
-rw-r--r--arch/arm64/mm/hugetlbpage.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 035c121c675b..76915b736b17 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -188,6 +188,18 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
}
}
+void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr,
+ pte_t *ptep, pte_t pte, unsigned long sz)
+{
+ int i, ncontig;
+ size_t pgsize;
+
+ ncontig = num_contig_ptes(sz, &pgsize);
+
+ for (i = 0; i < ncontig; i++, ptep++)
+ set_pte(ptep, pte);
+}
+
pte_t *huge_pte_alloc(struct mm_struct *mm,
unsigned long addr, unsigned long sz)
{