From 08c205a57bf7c1825d70ab5e9f48e77a8c6f3f6d Mon Sep 17 00:00:00 2001 From: Mohammed Nayeem Ur Rahman Date: Thu, 26 Mar 2020 00:28:33 +0530 Subject: [PATCH] msm: adsprpc: Add support for recover session on DSP Added new case in FASTRPC_IOCTL_CONTROL which makes call to DSP and clean the process. Change-Id: I5603ec4414d1fa5b3aa9d286e2bab3a28203b1c4 Acked-by: Tadakamalla Krishnaiah Signed-off-by: Mohammed Nayeem Ur Rahman --- drivers/char/adsprpc.c | 3 +++ drivers/char/adsprpc_shared.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 1d1f44e44fdb..a2fd4adbace9 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -5236,6 +5236,9 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, fl->ws_timeout = cp->pm.timeout; fastrpc_pm_awake(fl, gcinfo[fl->cid].secure); break; + case FASTRPC_CONTROL_DSPPROCESS_CLEAN: + (void)fastrpc_release_current_dsp_process(fl); + break; default: err = -EBADRQC; break; diff --git a/drivers/char/adsprpc_shared.h b/drivers/char/adsprpc_shared.h index 0082655d8a76..eff83c5bf60b 100644 --- a/drivers/char/adsprpc_shared.h +++ b/drivers/char/adsprpc_shared.h @@ -394,6 +394,8 @@ enum fastrpc_control_type { FASTRPC_CONTROL_KALLOC = 3, FASTRPC_CONTROL_WAKELOCK = 4, FASTRPC_CONTROL_PM = 5, +/* Clean process on DSP */ + FASTRPC_CONTROL_DSPPROCESS_CLEAN = 6, }; struct fastrpc_ctrl_latency {