mm/sparsemem: convert kmalloc_section_memmap() to populate_section_memmap()

Allow sub-section sized ranges to be added to the memmap.

populate_section_memmap() takes an explict pfn range rather than
assuming a full section, and those parameters are plumbed all the way
through to vmmemap_populate().  There should be no sub-section usage in
current deployments.  New warnings are added to clarify which memmap
allocation paths are sub-section capable.

Signed-off-by: Dan Williams <>
Reviewed-by: Pavel Tatashin <>
Tested-by: Aneesh Kumar K.V <>	[ppc64]
Reviewed-by: Oscar Salvador <>
Cc: Michal Hocko <>
Cc: David Hildenbrand <>
Cc: Logan Gunthorpe <>
Cc: Jane Chu <>
Cc: Jeff Moyer <>
Cc: Jérôme Glisse <>
Cc: Jonathan Corbet <>
Cc: Mike Rapoport <>
Cc: Toshi Kani <>
Cc: Vlastimil Babka <>
Cc: Wei Yang <>
Cc: Jason Gunthorpe <>
Cc: Christoph Hellwig <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 files changed