mm: fix mixed zone detection in devm_memremap_pages
authorDan Williams <dan.j.williams@intel.com>
Wed, 9 Mar 2016 22:08:13 +0000 (14:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
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 <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/memremap.c