From: Greg Kroah-Hartman Date: Wed, 1 Nov 2023 11:31:09 +0000 (+0100) Subject: drop queue-6.5/riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch X-Git-Tag: v6.1.61~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0aa267412b4bff8ddcf9f7e785c27e85220ace7;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-6.5/riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch --- diff --git a/queue-6.5/riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch b/queue-6.5/riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch deleted file mode 100644 index 209c80fdaea..00000000000 --- a/queue-6.5/riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 6b227295b4c6294efce1a5ec1b1a050ebbbb23ac Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Sep 2023 17:18:46 +0200 -Subject: riscv: fix set_huge_pte_at() for NAPOT mappings when a swap entry is - set - -From: Alexandre Ghiti - -[ Upstream commit 1de195dd0e05d9cba43dec16f83d4ee32af94dd2 ] - -We used to determine the number of page table entries to set for a NAPOT -hugepage by using the pte value which actually fails when the pte to set -is a swap entry. - -So take advantage of a recent fix for arm64 reported in [1] which -introduces the size of the mapping as an argument of set_huge_pte_at(): we -can then use this size to compute the number of page table entries to set -for a NAPOT region. - -Link: https://lkml.kernel.org/r/20230928151846.8229-3-alexghiti@rivosinc.com -Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") -Signed-off-by: Alexandre Ghiti -Reported-by: Ryan Roberts -Closes: https://lore.kernel.org/linux-arm-kernel/20230922115804.2043771-1-ryan.roberts@arm.com/ [1] -Reviewed-by: Andrew Jones -Cc: Albert Ou -Cc: Palmer Dabbelt -Cc: Paul Walmsley -Cc: Qinglin Pan -Cc: Conor Dooley -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - arch/riscv/mm/hugetlbpage.c | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/arch/riscv/mm/hugetlbpage.c b/arch/riscv/mm/hugetlbpage.c -index 96225a8533ad8..e92e89461c3bc 100644 ---- a/arch/riscv/mm/hugetlbpage.c -+++ b/arch/riscv/mm/hugetlbpage.c -@@ -182,15 +182,22 @@ void set_huge_pte_at(struct mm_struct *mm, - pte_t *ptep, - pte_t pte) - { -+ unsigned long hugepage_shift; - int i, pte_num; - -- if (!pte_napot(pte)) { -- set_pte_at(mm, addr, ptep, pte); -- return; -- } -+ if (sz >= PGDIR_SIZE) -+ hugepage_shift = PGDIR_SHIFT; -+ else if (sz >= P4D_SIZE) -+ hugepage_shift = P4D_SHIFT; -+ else if (sz >= PUD_SIZE) -+ hugepage_shift = PUD_SHIFT; -+ else if (sz >= PMD_SIZE) -+ hugepage_shift = PMD_SHIFT; -+ else -+ hugepage_shift = PAGE_SHIFT; - -- pte_num = napot_pte_num(napot_cont_order(pte)); -- for (i = 0; i < pte_num; i++, ptep++, addr += PAGE_SIZE) -+ pte_num = sz >> hugepage_shift; -+ for (i = 0; i < pte_num; i++, ptep++, addr += (1 << hugepage_shift)) - set_pte_at(mm, addr, ptep, pte); - } - --- -2.42.0 - diff --git a/queue-6.5/series b/queue-6.5/series index 6b605272a5f..e0225894105 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -1,4 +1,3 @@ -riscv-fix-set_huge_pte_at-for-napot-mappings-when-a-.patch vdpa-mlx5-fix-firmware-error-on-creation-of-1k-vqs.patch smb3-allow-controlling-length-of-time-directory-entr.patch smb3-allow-controlling-maximum-number-of-cached-dire.patch