[RFC PATCH v2 2/7] mm: Implement for_each_valid_pfn() for CONFIG_FLATMEM

David Woodhouse dwmw2 at infradead.org
Mon Apr 7 00:56:40 PDT 2025


On Mon, 2025-04-07 at 09:54 +0300, Mike Rapoport wrote:
> el.h b/include/asm-generic/memory_model.h
> > index a3b5029aebbd..044536da3390 100644
> > --- a/include/asm-generic/memory_model.h
> > +++ b/include/asm-generic/memory_model.h
> > @@ -30,7 +30,31 @@ static inline int pfn_valid(unsigned long pfn)
> >   	return pfn >= pfn_offset && (pfn - pfn_offset) <
> > max_mapnr;
> >   }
> >   #define pfn_valid pfn_valid
> > -#endif
> > +
> > +static inline bool first_valid_pfn(unsigned long *pfn)
> 
> This is now different from SPARSEMEM version. Do we need it at all?

Er, no. I think it's left over from the first implementation, before I
realised I could put it all into the loop and didn't need a helper at
all. I'll remove it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5069 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250407/c1eac6f5/attachment.p7s>


More information about the linux-arm-kernel mailing list