ion: tracing: add ftrace events for ion allocations

Add ftrace events for ion allocations to make it easier to profile
their performance.

Change-Id: I9f32e076cd50d7d3a145353dfcef74f0f6cdf8a0
Signed-off-by: Liam Mark <lmark@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>
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: Use already defined MT_MEMORY_SO type

MT_MEMORY_SO is now defined in the kernel so replace the old
usage of the MT_DEVICE_STRONGLY_ORDERED type which is no
longer defined in the latest kernel revisions.

Change-Id: Ie942520b78b682f8006510f08892f161e6bc7812
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
msm: memory: Enable map_page_strongly_ordered API for 7627a

Enable map_page_strongly_ordered() API for 7627a, since it
is required for the memory barrier implementation, like 7627.
Use iotable_init API to initialize the strongly ordered page
mapping since create_mapping() used in the older implementation
is no longer available outside mm/mmu.c implementation.

Change-Id: Ib1a9a261186921a25be7ff8900109b3b1718dfba
Signed-off-by: Trilok Soni <tsoni@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: 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>
gpu: ion: Disallow non-secure allocations from the CP heap

Currently, the CP heap supports non-secure allocations as long as the
no_nonsecure_alloc flag is not set in the device tree or platform data
for the heap. Since allowing non-secure allocations from secure heaps
is actually the exception rather than the rule, remove this flag and
replace it with a flag that can be set to accomplish the inverse
(i.e. override the policy of disallowing non-secure allocations from
secure heaps).

Change-Id: I1d03991a895c3cf2dea67f79d6af0d4244fb5a75
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
d2: Align memory configuration with upstream

 * Remove PMEM-related code
 * Add CMA support (currently broken on 2GB devices)
 * Remove deprecated FMEM support
 * Remove DMM cruft

Change-Id: Ieca91db1f780663b253c8cb229426da8393a74bb
d2: SPARSEMEM is no longer a requirement

 * Remove the hardcoded requirement on SPARSEMEM. It's no longer
   required and just adds extra overhead.

Change-Id: Ieafa83b5aa8c1f03ae598550defab8d8d18f0f49