Message ID | 20240611-get_wq_ctx_atomic-v1-1-9189a0a7d1ba@quicinc.com |
---|---|
State | New |
Headers | show |
Series | firmware: qcom_scm: Mark get_wq_ctx() as atomic call | expand |
On 6/11/24 20:27, Unnathi Chalicheemala via B4 Relay wrote: > From: Murali Nalajala <quic_mnalajal@quicinc.com> > > Currently get_wq_ctx() is wrongly configured as a standard call. > Here get_wq_ctx() must be an atomic call and can't be a standard > SMC call because get_wq_ctx() should not sleep again. This > situation lead to a deadlock. Hence mark get_wq_ctx() as > atomic call. That's quite a word salad.. could you try to make it clearer what you're trying to achieve? Konrad
diff --git a/drivers/firmware/qcom/qcom_scm-smc.c b/drivers/firmware/qcom/qcom_scm-smc.c index 16cf88acfa8e..0a2a2c794d0e 100644 --- a/drivers/firmware/qcom/qcom_scm-smc.c +++ b/drivers/firmware/qcom/qcom_scm-smc.c @@ -71,7 +71,7 @@ int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending) struct arm_smccc_res get_wq_res; struct arm_smccc_args get_wq_ctx = {0}; - get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, + get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, ARM_SMCCC_OWNER_SIP, SCM_SMC_FNID(QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_WQ_CTX));