[SRU][N:gke][PATCH 010/106] powerpc/mm: use pte_next_pfn() in set_ptes()
Tim Whisonant
tim.whisonant at canonical.com
Mon Jul 21 16:20:53 UTC 2025
From: David Hildenbrand <david at redhat.com>
BugLink: https://bugs.launchpad.net/bugs/2059316
BugLink: https://bugs.launchpad.net/bugs/2117098
Let's use our handy new helper. Note that the implementation is slightly
different, but shouldn't really make a difference in practice.
Link: https://lkml.kernel.org/r/20240129124649.189745-11-david@redhat.com
Signed-off-by: David Hildenbrand <david at redhat.com>
Reviewed-by: Christophe Leroy <christophe.leroy at csgroup.eu>
Tested-by: Ryan Roberts <ryan.roberts at arm.com>
Reviewed-by: Mike Rapoport (IBM) <rppt at kernel.org>
Cc: Albert Ou <aou at eecs.berkeley.edu>
Cc: Alexander Gordeev <agordeev at linux.ibm.com>
Cc: Alexandre Ghiti <alexghiti at rivosinc.com>
Cc: Aneesh Kumar K.V <aneesh.kumar at kernel.org>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Christian Borntraeger <borntraeger at linux.ibm.com>
Cc: David S. Miller <davem at davemloft.net>
Cc: Dinh Nguyen <dinguyen at kernel.org>
Cc: Gerald Schaefer <gerald.schaefer at linux.ibm.com>
Cc: Heiko Carstens <hca at linux.ibm.com>
Cc: Matthew Wilcox <willy at infradead.org>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Naveen N. Rao <naveen.n.rao at linux.ibm.com>
Cc: Nicholas Piggin <npiggin at gmail.com>
Cc: Palmer Dabbelt <palmer at dabbelt.com>
Cc: Paul Walmsley <paul.walmsley at sifive.com>
Cc: Russell King (Oracle) <linux at armlinux.org.uk>
Cc: Sven Schnelle <svens at linux.ibm.com>
Cc: Vasily Gorbik <gor at linux.ibm.com>
Cc: Will Deacon <will at kernel.org>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
(cherry picked from commit 802cc2ab33b0d8a013c216ca7f4caa9034bfc257)
Signed-off-by: dann frazier <dann.frazier at canonical.com>
Acked-by: Brad Figg <bfigg at nvidia.com>
Acked-by: Noah Wager <noah.wager at canonical.com>
Acked-by: Jacob Martin <jacob.martin at canonical.com>
Signed-off-by: Brad Figg <bfigg at nvidia.com>
Signed-off-by: Tim Whisonant <tim.whisonant at canonical.com>
---
arch/powerpc/mm/pgtable.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index a04ae4449a025..549a440ed7f65 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -220,10 +220,7 @@ void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
break;
ptep++;
addr += PAGE_SIZE;
- /*
- * increment the pfn.
- */
- pte = pfn_pte(pte_pfn(pte) + 1, pte_pgprot((pte)));
+ pte = pte_next_pfn(pte);
}
}
--
2.43.0
More information about the kernel-team
mailing list