mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
mem-buf: Replace *_TRUSTED_UI with *_TRUSTED_VM
Trusted UI is simply a use-case that runs within the trusted VM. The VM can have multiple usecases, and as such, tying a usecase name to the VMID identifiers for the VM is not appropriate. Synchronize with the rest of the kernel, which refers to the trusted VM as TRUSTED_VM. Change-Id: Ia54c3d4f36e8022f639164084a612b35e445209f Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
61f3d66986
commit
5a2d1abc8b
4 changed files with 6 additions and 6 deletions
|
|
@ -1079,7 +1079,7 @@ static int mem_buf_remove_mem(struct mem_buf_desc *membuf)
|
|||
static bool is_valid_mem_buf_vmid(u32 mem_buf_vmid)
|
||||
{
|
||||
if ((mem_buf_vmid == MEM_BUF_VMID_PRIMARY_VM) ||
|
||||
(mem_buf_vmid == MEM_BUF_VMID_TRUSTED_UI))
|
||||
(mem_buf_vmid == MEM_BUF_VMID_TRUSTED_VM))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
@ -1098,7 +1098,7 @@ static int mem_buf_vmid_to_vmid(u32 mem_buf_vmid)
|
|||
|
||||
if (mem_buf_vmid == MEM_BUF_VMID_PRIMARY_VM)
|
||||
vm_name = HH_PRIMARY_VM;
|
||||
else if (mem_buf_vmid == MEM_BUF_VMID_TRUSTED_UI)
|
||||
else if (mem_buf_vmid == MEM_BUF_VMID_TRUSTED_VM)
|
||||
vm_name = HH_TRUSTED_VM;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ int get_secure_vmid(unsigned long flags)
|
|||
return VMID_CP_SPSS_HLOS_SHARED;
|
||||
if (flags & ION_FLAG_CP_CDSP)
|
||||
return VMID_CP_CDSP;
|
||||
if (flags & ION_FLAG_CP_TRUSTED_UI) {
|
||||
if (flags & ION_FLAG_CP_TRUSTED_VM) {
|
||||
ret = hh_rm_get_vmid(HH_TRUSTED_VM, &vmid);
|
||||
if (!ret)
|
||||
return vmid;
|
||||
|
|
@ -103,7 +103,7 @@ int get_ion_flags(u32 vmid)
|
|||
|
||||
ret = hh_rm_get_vmid(HH_TRUSTED_VM, &trusted_vm_vmid);
|
||||
if (!ret && vmid == trusted_vm_vmid)
|
||||
return ION_FLAG_CP_TRUSTED_UI;
|
||||
return ION_FLAG_CP_TRUSTED_VM;
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(get_ion_flags);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ enum mem_buf_mem_type {
|
|||
|
||||
/* The mem-buf values that represent VMIDs for an ACL. */
|
||||
#define MEM_BUF_VMID_PRIMARY_VM 0
|
||||
#define MEM_BUF_VMID_TRUSTED_UI 1
|
||||
#define MEM_BUF_VMID_TRUSTED_VM 1
|
||||
|
||||
#define MEM_BUF_PERM_FLAG_READ (1U << 0)
|
||||
#define MEM_BUF_PERM_FLAG_WRITE (1U << 1)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ enum msm_ion_heap_types {
|
|||
* Flags to be used when allocating from the secure heap for
|
||||
* content protection
|
||||
*/
|
||||
#define ION_FLAG_CP_TRUSTED_UI ION_BIT(15)
|
||||
#define ION_FLAG_CP_TRUSTED_VM ION_BIT(15)
|
||||
/* ION_FLAG_POOL_FORCE_ALLOC uses ION_BIT(16) */
|
||||
#define ION_FLAG_CP_TOUCH ION_BIT(17)
|
||||
#define ION_FLAG_CP_BITSTREAM ION_BIT(18)
|
||||
|
|
|
|||
Loading…
Reference in a new issue