* [merged mm-stable] mm-implement-for_each_valid_pfn-for-config_flatmem.patch removed from -mm tree
@ 2025-05-13 6:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-13 6:54 UTC (permalink / raw)
To: mm-commits, will, rppt, maz, mark.rutland, lrh2000,
lorenzo.stoakes, david, catalin.marinas, ardb, anshuman.khandual,
dwmw, akpm
The quilt patch titled
Subject: mm: implement for_each_valid_pfn() for CONFIG_FLATMEM
has been removed from the -mm tree. Its filename was
mm-implement-for_each_valid_pfn-for-config_flatmem.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: David Woodhouse <dwmw@amazon.co.uk>
Subject: mm: implement for_each_valid_pfn() for CONFIG_FLATMEM
Date: Wed, 23 Apr 2025 14:33:38 +0100
In the FLATMEM case, the default pfn_valid() just checks that the PFN is
within the range [ ARCH_PFN_OFFSET .. ARCH_PFN_OFFSET + max_mapnr ).
The for_each_valid_pfn() function can therefore be a simple for() loop
using those as min/max respectively.
Link: https://lkml.kernel.org/r/20250423133821.789413-3-dwmw2@infradead.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Ruihan Li <lrh2000@pku.edu.cn>
Cc: Will Deacon <will@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/asm-generic/memory_model.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/include/asm-generic/memory_model.h~mm-implement-for_each_valid_pfn-for-config_flatmem
+++ a/include/asm-generic/memory_model.h
@@ -30,7 +30,15 @@ static inline int pfn_valid(unsigned lon
return pfn >= pfn_offset && (pfn - pfn_offset) < max_mapnr;
}
#define pfn_valid pfn_valid
-#endif
+
+#ifndef for_each_valid_pfn
+#define for_each_valid_pfn(pfn, start_pfn, end_pfn) \
+ for ((pfn) = max_t(unsigned long, (start_pfn), ARCH_PFN_OFFSET); \
+ (pfn) < min_t(unsigned long, (end_pfn), \
+ ARCH_PFN_OFFSET + max_mapnr); \
+ (pfn)++)
+#endif /* for_each_valid_pfn */
+#endif /* valid_pfn */
#elif defined(CONFIG_SPARSEMEM_VMEMMAP)
_
Patches currently in -mm which might be from dwmw@amazon.co.uk are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-13 6:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 6:54 [merged mm-stable] mm-implement-for_each_valid_pfn-for-config_flatmem.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.