mm: fix mixed zone detection in devm_memremap_pages
authorDan Williams <[email protected]>
Wed, 9 Mar 2016 22:08:13 +0000 (14:08 -0800)
committerLinus Torvalds <[email protected]>
Wed, 9 Mar 2016 23:43:42 +0000 (15:43 -0800)
commit5f29a77cd95771edebbf41e5800fdd557c69302a
tree9358ffafdb0863e77d19166ca09b78cb76803287
parentd77a117e6871ff78a06def46583d23752593de60
mm: fix mixed zone detection in devm_memremap_pages

The check for whether we overlap "System RAM" needs to be done at
section granularity.  For example a system with the following mapping:

    100000000-37bffffff : System RAM
    37c000000-837ffffff : Persistent Memory

...is unable to use devm_memremap_pages() as it would result in two
zones colliding within a given section.

Signed-off-by: Dan Williams <[email protected]>
Cc: Ross Zwisler <[email protected]>
Reviewed-by: Toshi Kani <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/memremap.c