]> www.infradead.org Git - users/dwmw2/linux.git/commit
mm: Implement for_each_valid_pfn() for CONFIG_FLATMEM
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 2 Apr 2025 17:23:01 +0000 (18:23 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 4 Apr 2025 13:45:39 +0000 (14:45 +0100)
commit8083d53bffaaf8527b0014a7869bcd246b3717ad
tree42a461ec5bd595caffe5057b28d36e0a0e112063
parentc901e5370dca659cfd99062a1c6323332dd6a95b
mm: Implement for_each_valid_pfn() for CONFIG_FLATMEM

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.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
include/asm-generic/memory_model.h