mm: Make memory hotplug aware of memmap holes

This patch prevents memory hotplug from marking pages of the memmap that
only reference holes in the physical address space as private. Some
architectures (including ARM) attempt to free these unneeded parts of the
memmap, and attempting to free a private page will throw bad_page warnings
and tie up the memory indefinitely.

This patch also allows early_pfn_valid to be architecture specific and
defines it for ARM. The definition for ARM takes into account memory banks
and the holes in physical memory.

CRs-Fixed: 247010

Change-Id: Iad88d427b1b923a808b026c22d2899fa0483cb9e
Signed-off-by: jesset@codeaurora.org
Add missing helper functions to reserve and unreserve hotplug pages

The PMEM driver needs to reserve large contiguous blocks of physical
memory from the hotplugged memory before it is added to the general
kernel page pool, and unreserve this memory before memory hotremove is
done.

Change-Id: Ia6e8737a03a748c88ce7e4c5b844c664ecad73d0
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
mm: add support for putting memory in a low-power state

The file /sys/devices/system/memory/low_power now exists.

Writing a physical address into this file will put this
section of memory into a low power state (retaining contents)
if the architecture and platform supports it.

Change-Id: I70592d37f1091a1b533f2374546ba67b50ea7d30
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>

Conflicts:
	include/linux/memory_hotplug.h
msm: Add low power mode for dynamic memory managment.

Add Low Power mode TAG.
Add new API's for mem lowpower modes.
Create new sys file for mem low power modes.
Set SECTION_SIZE_BITS to 28.
Change NPA_MEMORY_NODE_NAME to "/mem/apps/ddr_dpd".
Fix NPA node create function to do atomic_inc()
in atomic_dec_and_test() failure case.

Change-Id: Ia5cb18b99338c43165d5401e619c773cd8d6b3f6
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>

Conflicts:
	drivers/base/memory.c
	include/linux/memory_hotplug.h