Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19dc7791 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: adsprpc: Fix for hyp_assign_phys double call"

parents f50e5662 905c96e5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3091,7 +3091,7 @@ static int fastrpc_unmap_on_dsp(struct fastrpc_file *fl,

static int fastrpc_mmap_on_dsp(struct fastrpc_file *fl, uint32_t flags,
					uintptr_t va, uint64_t phys,
					size_t size, uintptr_t *raddr)
					size_t size, int refs, uintptr_t *raddr)
{
	struct fastrpc_ioctl_invoke_crc ioctl;
	struct fastrpc_apps *me = &gfa;
@@ -3153,7 +3153,7 @@ static int fastrpc_mmap_on_dsp(struct fastrpc_file *fl, uint32_t flags,
		}
	}
	if (flags == ADSP_MMAP_REMOTE_HEAP_ADDR
				&& me->channel[cid].rhvm.vmid) {
				&& me->channel[cid].rhvm.vmid && refs == 1) {
		err = hyp_assign_phys(phys, (uint64_t)size,
				hlosvm, 1, me->channel[cid].rhvm.vmid,
				me->channel[cid].rhvm.vmperm,
@@ -3527,7 +3527,7 @@ static int fastrpc_internal_mmap(struct fastrpc_file *fl,
		if (err)
			goto bail;
		err = fastrpc_mmap_on_dsp(fl, ud->flags, 0,
				rbuf->phys, rbuf->size, &raddr);
				rbuf->phys, rbuf->size, 0, &raddr);
		if (err)
			goto bail;
		rbuf->raddr = raddr;
@@ -3548,7 +3548,7 @@ static int fastrpc_internal_mmap(struct fastrpc_file *fl,
		else
			va_to_dsp = (uintptr_t)map->va;
		VERIFY(err, 0 == fastrpc_mmap_on_dsp(fl, ud->flags, va_to_dsp,
				map->phys, map->size, &raddr));
				map->phys, map->size, map->refs, &raddr));
		if (err)
			goto bail;
		map->raddr = raddr;