msm: adsprpc: no debug info if ioctl wait for pdup
If pd is down, new device ioctls wait for pdup before copying ioctl params and saving ctx information. Shift logic to check pdup from device_ioctl to after context creation and before invoke send to allow current ioctl information to be store in pending ctx. Change-Id: Ia9747394020fd35b02f4074a82edecace72f87db Signed-off-by: nishant chaubey <quic_chaubey@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
ed0b528087
commit
4d19368b34
@@ -1870,6 +1870,7 @@ static int context_alloc(struct fastrpc_file *fl, uint32_t kernel,
|
|||||||
err = -ENOKEY;
|
err = -ENOKEY;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
ctx->xo_time_in_us_created = CONVERT_CNT_TO_US(__arch_counter_get_cntvct());
|
||||||
spin_lock(&fl->hlock);
|
spin_lock(&fl->hlock);
|
||||||
hlist_add_head(&ctx->hn, &clst->pending);
|
hlist_add_head(&ctx->hn, &clst->pending);
|
||||||
clst->num_active_ctxs++;
|
clst->num_active_ctxs++;
|
||||||
@@ -3114,6 +3115,8 @@ static void fastrpc_update_invoke_count(uint32_t handle, uint64_t *perf_counter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int fastrpc_check_pd_status(struct fastrpc_file *fl, char *sloc_name);
|
||||||
|
|
||||||
int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
|
int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
|
||||||
uint32_t kernel,
|
uint32_t kernel,
|
||||||
struct fastrpc_ioctl_invoke_async *inv)
|
struct fastrpc_ioctl_invoke_async *inv)
|
||||||
@@ -3174,6 +3177,18 @@ int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
|
|||||||
trace_fastrpc_msg("context_alloc: end");
|
trace_fastrpc_msg("context_alloc: end");
|
||||||
if (err)
|
if (err)
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
|
if (fl->servloc_name) {
|
||||||
|
err = fastrpc_check_pd_status(fl,
|
||||||
|
AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME);
|
||||||
|
err |= fastrpc_check_pd_status(fl,
|
||||||
|
SENSORS_PDR_ADSP_SERVICE_LOCATION_CLIENT_NAME);
|
||||||
|
err |= fastrpc_check_pd_status(fl,
|
||||||
|
SENSORS_PDR_SLPI_SERVICE_LOCATION_CLIENT_NAME);
|
||||||
|
if (err)
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
|
|
||||||
isasyncinvoke = (ctx->asyncjob.isasyncjob ? true : false);
|
isasyncinvoke = (ctx->asyncjob.isasyncjob ? true : false);
|
||||||
if (fl->profile)
|
if (fl->profile)
|
||||||
perf_counter = (uint64_t *)ctx->perf + PERF_COUNT;
|
perf_counter = (uint64_t *)ctx->perf + PERF_COUNT;
|
||||||
@@ -6892,17 +6907,6 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num,
|
|||||||
p.inv.perf_dsp = NULL;
|
p.inv.perf_dsp = NULL;
|
||||||
p.inv.job = NULL;
|
p.inv.job = NULL;
|
||||||
|
|
||||||
if (fl->servloc_name) {
|
|
||||||
err = fastrpc_check_pd_status(fl,
|
|
||||||
AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME);
|
|
||||||
err |= fastrpc_check_pd_status(fl,
|
|
||||||
SENSORS_PDR_ADSP_SERVICE_LOCATION_CLIENT_NAME);
|
|
||||||
err |= fastrpc_check_pd_status(fl,
|
|
||||||
SENSORS_PDR_SLPI_SERVICE_LOCATION_CLIENT_NAME);
|
|
||||||
if (err)
|
|
||||||
goto bail;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock(&fl->hlock);
|
spin_lock(&fl->hlock);
|
||||||
if (fl->file_close >= FASTRPC_PROCESS_EXIT_START) {
|
if (fl->file_close >= FASTRPC_PROCESS_EXIT_START) {
|
||||||
err = -ESHUTDOWN;
|
err = -ESHUTDOWN;
|
||||||
|
@@ -832,6 +832,7 @@ struct smq_invoke_ctx {
|
|||||||
uint32_t sc_interrupted;
|
uint32_t sc_interrupted;
|
||||||
struct fastrpc_file *fl_interrupted;
|
struct fastrpc_file *fl_interrupted;
|
||||||
uint32_t handle_interrupted;
|
uint32_t handle_interrupted;
|
||||||
|
uint64_t xo_time_in_us_created; /* XO Timestamp (in us) of ctx creation */
|
||||||
uint64_t xo_time_in_us_interrupted; /* XO Timestamp (in us) of interrupted ctx */
|
uint64_t xo_time_in_us_interrupted; /* XO Timestamp (in us) of interrupted ctx */
|
||||||
uint64_t xo_time_in_us_restored; /* XO Timestamp (in us) of restored ctx */
|
uint64_t xo_time_in_us_restored; /* XO Timestamp (in us) of restored ctx */
|
||||||
int tx_index; /* index of current ctx in channel gmsg_log array */
|
int tx_index; /* index of current ctx in channel gmsg_log array */
|
||||||
|
Reference in New Issue
Block a user