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

Commit 643e912d authored by Sathish Ambley's avatar Sathish Ambley Committed by AnilKumar Chimata
Browse files

msm: ADSPRPC: Enable session restart with remote heap



Enable session restart when remote heap is allocated to
ADSP.

Change-Id: If4cd477f8c5994445f4a0e951a544afaa33be112
Acked-by: default avatarHimateja Reddy <hmreddy@qti.qualcomm.com>
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent 296d7a30
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ struct fastrpc_channel_ctx {
	int sesscount;
	int ssrcount;
	void *handle;
	int prevssrcount;
	int ramdumpenabled;
	void *remoteheap_ramdump_dev;
};
@@ -1691,8 +1692,13 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
		kref_init(&me->channel[cid].kref);
		pr_info("'opened /dev/%s c %d %d'\n", gcinfo[cid].name,
						MAJOR(me->dev_no), cid);
		if (me->channel[cid].ssrcount !=
				 me->channel[cid].prevssrcount) {
			if (fastrpc_mmap_remove_ssr(fl))
				pr_err("ADSPRPC: SSR: Failed to unmap remote heap\n");
			me->channel[cid].prevssrcount =
						me->channel[cid].ssrcount;
		}
	}
	spin_lock(&me->hlock);
	hlist_add_head(&fl->hn, &me->drivers);
@@ -2090,6 +2096,7 @@ static int __init fastrpc_device_init(void)
		if (err)
			goto device_create_bail;
		me->channel[i].ssrcount = 0;
		me->channel[i].prevssrcount = 0;
		me->channel[i].ramdumpenabled = 0;
		me->channel[i].remoteheap_ramdump_dev = 0;
		me->channel[i].nb.notifier_call = fastrpc_restart_notifier_cb;