mm/devm_memremap_pages: enable sub-section remap

Teach devm_memremap_pages() about the new sub-section capabilities of
arch_{add,remove}_memory().  Effectively, just replace all usage of
align_start, align_end, and align_size with res->start, res->end, and
resource_size(res).  The existing sanity check will still make sure that
the two separate remap attempts do not collide within a sub-section (2MB
on x86).

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