[PATCH 11/13] mm/treewide: Replace pXd_huge() with pXd_leaf()

Jason Gunthorpe jgg at nvidia.com
Mon Mar 18 09:16:23 PDT 2024


On Thu, Mar 14, 2024 at 08:59:22AM -0400, Peter Xu wrote:

> > > --- a/mm/hmm.c
> > > +++ b/mm/hmm.c
> > > @@ -429,7 +429,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
> > >   		return hmm_vma_walk_hole(start, end, -1, walk);
> > >   	}
> > >   
> > > -	if (pud_huge(pud) && pud_devmap(pud)) {
> > > +	if (pud_leaf(pud) && pud_devmap(pud)) {
> > 
> > Didn't previous patch say devmap implies leaf ? Or is it only for GUP ?
> 
> This is an extra safety check that I didn't remove.  Devmap used separate
> bits even though I'm not clear on why.  It should still imply a leaf though.

Yes, something is very wrong if devmap is true on non-leaf..

Jason



More information about the linux-arm-kernel mailing list