secure_buffer: Deprecate downstream API hyp_assign_phys

Depricate the downstream hyp_assign_phys API and move to upstream API
qcom_scm_assign_mem.

Change-Id: I06d54fa7b2615a646f3cd811af97443fcfe2170e
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
This commit is contained in:
Gokul krishna Krishnakumar 2023-01-19 15:57:49 -08:00 committed by Gerrit - the friendly Code Review server
parent 6ce4f3c8b3
commit 5d1da34ce5
2 changed files with 0 additions and 41 deletions

View File

@ -484,37 +484,6 @@ int hyp_assign_table(struct sg_table *table,
}
EXPORT_SYMBOL(hyp_assign_table);
int hyp_assign_phys(phys_addr_t addr, u64 size, u32 *source_vm_list,
int source_nelems, int *dest_vmids,
int *dest_perms, int dest_nelems)
{
struct qcom_scm_vmperm *newvm = NULL;
u64 source_vm = 0;
int i, ret;
if (!qcom_secure_buffer_dev)
return -EPROBE_DEFER;
if (dest_nelems <= 0 || !source_nelems)
return -EINVAL;
newvm = kcalloc(dest_nelems, sizeof(struct qcom_scm_vmperm),
GFP_KERNEL);
if (!newvm)
return -ENOMEM;
for (i = 0; i < source_nelems; i++)
source_vm |= BIT(*(source_vm_list + i));
for (i = 0; i < dest_nelems; i++) {
newvm[i].vmid = *(dest_vmids + i);
newvm[i].perm = *(dest_perms + i);
}
ret = qcom_scm_assign_mem(addr, size, &source_vm, newvm, dest_nelems);
kfree(newvm);
return ret;
}
EXPORT_SYMBOL(hyp_assign_phys);
const char *msm_secure_vmid_to_string(int secure_vmid)
{
switch (secure_vmid) {

View File

@ -53,9 +53,6 @@ int hyp_assign_table(struct sg_table *table,
u32 *source_vm_list, int source_nelems,
int *dest_vmids, int *dest_perms,
int dest_nelems);
int hyp_assign_phys(phys_addr_t addr, u64 size,
u32 *source_vmlist, int source_nelems,
int *dest_vmids, int *dest_perms, int dest_nelems);
const char *msm_secure_vmid_to_string(int secure_vmid);
u32 msm_secure_get_vmid_perms(u32 vmid);
int page_accessible(unsigned long pfn);
@ -68,13 +65,6 @@ static inline int hyp_assign_table(struct sg_table *table,
return -EINVAL;
}
static inline int hyp_assign_phys(phys_addr_t addr, u64 size,
u32 *source_vmlist, int source_nelems,
int *dest_vmids, int *dest_perms, int dest_nelems)
{
return -EINVAL;
}
static inline const char *msm_secure_vmid_to_string(int secure_vmid)
{
return "N/A";