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

Commit 32ba95de authored by Mohammed Nayeem Ur Rahman's avatar Mohammed Nayeem Ur Rahman Committed by wya
Browse files

adsprpc: Fix glink receive function not to be called in IRQ context



glink receive acknowledge function was called from IRQ context
This function can sleep and since function that can sleep cannot
be called from Interrupt context, moved this.

Change-Id: I838dffae2011e016ff3a7ac90e3556eeb4689220
Signed-off-by: default avatarMohammed Nayeem Ur Rahman <mohara@codeaurora.org>
parent 79457f10
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -240,6 +240,8 @@ struct smq_invoke_ctx {
	unsigned int *attrs;
	uint32_t *crc;
	uint64_t ctxid;
	void *handle;
	const void *ptr;
};

struct fastrpc_ctx_lst {
@@ -2044,7 +2046,8 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
		if (err)
			goto bail;
	}

	if (ctx->handle)
		glink_rx_done(ctx->handle, ctx->ptr, true);
	PERF(fl->profile, GET_COUNTER(perf_counter, PERF_INVARGS),
	if (!fl->sctx->smmu.coherent)
		inv_args(ctx);
@@ -2883,11 +2886,13 @@ static void fastrpc_glink_notify_rx(void *handle, const void *priv,
	if (err)
		goto bail;

	me->ctxtable[index]->handle = handle;
	me->ctxtable[index]->ptr = ptr;

	context_notify_user(me->ctxtable[index], rsp->retval);
bail:
	if (err)
		pr_err("adsprpc: invalid response or context\n");
	glink_rx_done(handle, ptr, true);
}

static void fastrpc_glink_notify_state(void *handle, const void *priv,