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

Commit 491b41a8 authored by Sathish Ambley's avatar Sathish Ambley
Browse files

msm: ADSPRPC: Fix offset for input and output buffers



The buffers being passed to remote processor did not have
the right offset into the IOMMU VA for cases where the offset
was greater than 4K.

Change-Id: If49d942f88ae9eb0fb30002e9a8f97aacf122b07
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent b9ae0269
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -823,10 +823,16 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
		if (!len)
			continue;
		if (map) {
			uintptr_t offset = buf_page_start(buf) -
					buf_page_start((void *)map->va);
			struct vm_area_struct *vma;
			uintptr_t offset;
			int num = buf_num_pages(buf, len);
			int idx = list[i].pgidx;

			VERIFY(err, NULL != (vma = find_vma(current->mm,
								map->va)));
			if (err)
				goto bail;
			offset = buf_page_start(buf) - vma->vm_start;
			pages[idx].addr = map->phys + offset;
			pages[idx].size = num << PAGE_SHIFT;
		}