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

Commit 87a248d5 authored by Zhen Kong's avatar Zhen Kong
Browse files

qseecom: invalidate listener buffer cache when get listener request



Invalidate listener buffer cache when getting listener request
from TZ, so HLOS listener thread can read data correctly.

Change-Id: Ie2ddbb1534d7cbd2d9cef949c3819e353eefd892
Signed-off-by: default avatarZhen Kong <zkong@codeaurora.org>
parent f74668f9
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2086,6 +2086,14 @@ static int __qseecom_process_incomplete_cmd(struct qseecom_dev_handle *data,
			if (ptr_svc->svc.listener_id == lstnr) {
				ptr_svc->listener_in_use = true;
				ptr_svc->rcv_req_flag = 1;
				ret = qseecom_dmabuf_cache_operations(
					ptr_svc->dmabuf,
					QSEECOM_CACHE_INVALIDATE);
				if (ret) {
					rc = -EINVAL;
					status = QSEOS_RESULT_FAILURE;
					goto err_resp;
				}
				wake_up_interruptible(&ptr_svc->rcv_req_wq);
				break;
			}
@@ -2421,6 +2429,14 @@ static int __qseecom_reentrancy_process_incomplete_cmd(
			if (ptr_svc->svc.listener_id == lstnr) {
				ptr_svc->listener_in_use = true;
				ptr_svc->rcv_req_flag = 1;
				ret = qseecom_dmabuf_cache_operations(
					ptr_svc->dmabuf,
					QSEECOM_CACHE_INVALIDATE);
				if (ret) {
					rc = -EINVAL;
					status = QSEOS_RESULT_FAILURE;
					goto err_resp;
				}
				wake_up_interruptible(&ptr_svc->rcv_req_wq);
				break;
			}