gpu: ion: Restrict access to CP heap
On certain targets, the CP heap should only be used
for secure allocations. Add a check to determine which
targets are allowed to make non-secure allocations from
the CP heap type. Targets with this restriction will
fall back to an alternate heap.
Change-Id: Ieaa9e76cbf2dc3ea1da6f4e75a4de903c39a3077
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
diff --git a/include/linux/msm_ion.h b/include/linux/msm_ion.h
index db3a989..09c584b 100644
--- a/include/linux/msm_ion.h
+++ b/include/linux/msm_ion.h
@@ -127,6 +127,7 @@
* goes from 1 -> 0
* @setup_region: function to be called upon ion registration
* @memory_type:Memory type used for the heap
+ * @no_nonsecure_alloc: don't allow non-secure allocations from this heap
*
*/
struct ion_cp_heap_pdata {
@@ -145,6 +146,7 @@
int (*release_region)(void *);
void *(*setup_region)(void);
enum ion_memory_types memory_type;
+ int no_nonsecure_alloc;
};
/**