aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-09-05 00:59:34 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-09-05 00:59:34 -0700
commitaf867cd12320a3b55402879ac5e93d06e1329dec (patch)
tree13024673592612f54c787bf8a755aa6bf58daf73
parent11e3641f4a499e06839a57d766882632b8814dc1 (diff)
parent8a29b75f7de41fab5e205aa53d91d2fc593d26e6 (diff)
Merge "adsprpc: Fix glink receive function not to be called in IRQ context" into LE.UM.3.2.2.r1.1LE.UM.3.2.2.r1-01900-sdm845.0
-rw-r--r--drivers/char/adsprpc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index dea48e16f193..dba81f9977fa 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -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,