summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRohit Vaswani <rvaswani@codeaurora.org>2015-12-09 15:40:46 -0800
committerPatrick Daly <pdaly@codeaurora.org>2016-03-30 15:46:12 -0700
commitc0fe3bde2a0cb060a9f42d17d670449503934361 (patch)
tree14af4615dab760033ea66e51cd5f6a39978b9bae /include
parenteee392370f17589075f6855594bae4217b8f0167 (diff)
Ion: Add page pooling to Ion System Secure Heap
Optimize the Ion System Secure Heap by adding per VMID based page pooling. The secure/assigned pages are pooled. This essentially uses the same pooling functionality as the system heap, but adds the VMID component to each pool. Change-Id: Ib65b3f490ab1bb299b57227edba88b876924ff2b Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org> Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/soc/qcom/secure_buffer.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/include/soc/qcom/secure_buffer.h b/include/soc/qcom/secure_buffer.h
index 24dd2b0069f3..ffa65569ce18 100644
--- a/include/soc/qcom/secure_buffer.h
+++ b/include/soc/qcom/secure_buffer.h
@@ -17,24 +17,29 @@
#include <linux/scatterlist.h>
-#define VMID_HLOS 0x3
-#define VMID_CP_TOUCH 0x8
-#define VMID_CP_BITSTREAM 0x9
-#define VMID_CP_PIXEL 0xA
-#define VMID_CP_NON_PIXEL 0xB
-#define VMID_CP_CAMERA 0xD
-#define VMID_HLOS_FREE 0xE
-#define VMID_MSS_MSA 0xF
-#define VMID_MSS_NONMSA 0x10
-#define VMID_CP_SEC_DISPLAY 0x11
-#define VMID_CP_APP 0x12
-#define VMID_WLAN 0x18
-#define VMID_WLAN_CE 0x19
-#define VMID_INVAL -1
/*
* if you add a secure VMID here make sure you update
- * msm_secure_vmid_to_string
+ * msm_secure_vmid_to_string.
+ * Make sure to keep the VMID_LAST as the last entry in the enum.
+ * This is needed in ion to create a list and it's sized using VMID_LAST.
*/
+enum vmid {
+ VMID_HLOS = 0x3,
+ VMID_CP_TOUCH = 0x8,
+ VMID_CP_BITSTREAM = 0x9,
+ VMID_CP_PIXEL = 0xA,
+ VMID_CP_NON_PIXEL = 0xB,
+ VMID_CP_CAMERA = 0xD,
+ VMID_HLOS_FREE = 0xE,
+ VMID_MSS_MSA = 0xF,
+ VMID_MSS_NONMSA = 0x10,
+ VMID_CP_SEC_DISPLAY = 0x11,
+ VMID_CP_APP = 0x12,
+ VMID_WLAN = 0x18,
+ VMID_WLAN_CE = 0x19,
+ VMID_LAST,
+ VMID_INVAL = -1
+};
#define PERM_READ 0x4
#define PERM_WRITE 0x2