mm/hmm: only define hmm_vma_walk_pud if needed
authorChristoph Hellwig <hch@lst.de>
Tue, 6 Aug 2019 16:05:48 +0000 (19:05 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 7 Aug 2019 17:58:06 +0000 (14:58 -0300)
commitf0b3c45c8931fd7448a638557752f2743f76f51a
tree9ab822626de13f51b504527850cb1bf668697b8c
parent309f9a4f5e1a233d5df2101b9394ee689d9e463f
mm/hmm: only define hmm_vma_walk_pud if needed

We only need the special pud_entry walker if PUD-sized hugepages and pte
mappings are supported, else the common pagewalk code will take care of
the iteration.  Not implementing this callback reduced the amount of code
compiled for non-x86 platforms, and also fixes compile failures with other
architectures when helpers like pud_pfn are not implemented.

Link: https://lore.kernel.org/r/20190806160554.14046-11-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
mm/hmm.c