msm: memory: backport updates from CAF msm-3.4 kernel
____________
msm: memory: Use standard cache routines

Convert custom clean, flush, and invalidate cache routines to use
standard ARM cache routines.

Change-Id: Ida0c539b89e1b6c98542221f847a9bcd7fc32a2e
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
_________________

msm: memory: Use phys_addr_t for memory reservation code

When reserving memory, the reserved regions may be placed above
a 32-bit address on LPAE based systems. Adjust the reservation code to
account for this.

Change-Id: If7e1775352d2557106cca0b50caec3d5134e0174
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

_________________

msm: memory: Use phys_addr_t as the return type for ebi functions

On LPAE systems, ebi allocations may be greater than 32-bits.
Use phys_addr_t as the return type for these allocations.

Change-Id: I35a4f66d2c322869f2619253f99f339b6de7464a
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
________________

msm: Remove alloc bootmem aligned

This function has no more callers and should never be used again.
Remove it.

Change-Id: I3006c03ba2294c7dfb49539dff92b21b6670b4be
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
________________

msm: Completely remove memory from the memblock allocator

memblock_remove may not be sufficient to prevent placing
regions on top of each other. Call memblock_reserve and
memblock_free as well to completely remove the memory
from the allocator.

Change-Id: Iec481d7ce7a51c243e43a2d9be2fbfbf7b2717ed
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
______________________

msm: remove obsolete DMM code and config options

DMM is no longer supported, but there were still fragments
of the DMM support dependent on the obsolete config options
CONFIG_ENABLE_DMM and CONFIG_FIX_MOVABLE_ZONE present.
Remove these config options and the associated code.

Change-Id: I01c715c8d9c65eebc7ff123a8a0878166b606e0c
CRs-fixed: 460735
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
______________________

msm: memory: use memblock instead of meminfo

msm currently uses meminfo (not memblock) in memory.c for several
purposes (mainly the placement of the memory pool(s)).  When the code
was written originally, memblock didn't exist yet.

Now that memblock exists, this is not strictly correct, but works as
long as nobody calls memblock_remove() besides this code (if that
occurs then the meminfo data no longer reflect reality and will likely
cause overlap problems).

To avoid problems meminfo usage should be replaced with memblock.

Also, since memblock regions of the same type can't be contiguous, the
total_size function, which calculated the aggregate size of contiguous
meminfo banks, can be removed.

Change-Id: I34054c4fe367986f472bdaae65be67cd8fbf273a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
____________________

msm: memory: remove obsolete stable_size function

The notion of `stable' memory is going away (i.e. all memory is now
treated as `stable'). Remove the stable_size function. Remove the
notion of stability from the total_stable_size function and rename it
to total_size.

Change-Id: I8fd08a36b4948d57f430aea9113a0c704b8a00d0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>