Re: [PATCH v6 2/3] firmware: qcom_scm: Support multiple waitq contexts

From: Pavan Kondeti
Date: Fri May 09 2025 - 05:49:13 EST


On Fri, Apr 25, 2025 at 04:48:02PM -0700, Unnathi Chalicheemala wrote:
>
> +static int qcom_scm_query_waitq_count(struct qcom_scm *scm)
> +{
> + int ret;
> + struct qcom_scm_desc desc = {
> + .svc = QCOM_SCM_SVC_WAITQ,
> + .cmd = QCOM_SCM_WAITQ_GET_INFO,
> + .owner = ARM_SMCCC_OWNER_SIP
> + };
> + struct qcom_scm_res res;
> +
> + if (!__qcom_scm_is_call_available(scm->dev, QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_INFO)) {
> + dev_info(scm->dev, "Multi-waitqueue support unavailable\n");
> + return 1;
> + }

I am testing this patch on SM8750 and found that we are returning from
here, do you know why it is happening? The first patch in this series
does not check if scm call is available or not and I see scm returns the
hwirq properly. I have commented out this block and able to see waitq
count as 2, which is inline with what would be overlayed in the device
tree.

> +
> + ret = qcom_scm_call_atomic(scm->dev, &desc, &res);
> + if (ret)
> + return ret;
> +
> + return res.result[0] & GENMASK(7, 0);
> +}
> +

Thanks,
Pavan