From: Unnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
To: Pavan Kondeti <pavan.kondeti@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@oss.qualcomm.com,
Prasad Sodagudi <prasad.sodagudi@oss.qualcomm.com>,
Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
Trilok Soni <quic_tsoni@quicinc.com>
Subject: Re: [PATCH v6 2/3] firmware: qcom_scm: Support multiple waitq contexts
Date: Wed, 21 May 2025 16:24:21 -0700 [thread overview]
Message-ID: <e061e56c-1b06-48d6-b118-1cc698337df7@oss.qualcomm.com> (raw)
In-Reply-To: <a1aefddb-6914-42b8-9ba9-8eb27a0ce2f4@quicinc.com>
On 5/9/2025 2:48 AM, Pavan Kondeti wrote:
> 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.
>
Thanks for testing it on SM8750, Pavan.
Initially, I wanted to check whether the SCM call was available before invoking it, so we could
distinguish between a failed SCM call and a failure due to the call being unavailable.
However, after some internal discussions, we found that qcom_scm_is_call_available() is handled in TZ,
which doesn’t implement WAITQ_GET_INFO, and therefore always returns 0.
Given this, I’ll be removing the qcom_scm_is_call_available() check and will treat both scenarios -
SCM call failure and call not implemented on the target - as a single case.
>> +
>> + ret = qcom_scm_call_atomic(scm->dev, &desc, &res);
>> + if (ret)
>> + return ret;
>> +
>> + return res.result[0] & GENMASK(7, 0);
>> +}
>> +
>
> Thanks,
> Pavan
next prev parent reply other threads:[~2025-05-21 23:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 23:48 [PATCH v6 0/3] SCM: Support latest version of waitq-aware firmware Unnathi Chalicheemala
2025-04-25 23:48 ` [PATCH v6 1/3] firmware: qcom_scm: Add API to get waitqueue IRQ info Unnathi Chalicheemala
2025-04-25 23:48 ` [PATCH v6 2/3] firmware: qcom_scm: Support multiple waitq contexts Unnathi Chalicheemala
2025-05-09 9:48 ` Pavan Kondeti
2025-05-21 23:24 ` Unnathi Chalicheemala [this message]
2025-04-25 23:48 ` [PATCH v6 3/3] firmware: qcom_scm: Check for waitq state in wait_for_wq_completion() Unnathi Chalicheemala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e061e56c-1b06-48d6-b118-1cc698337df7@oss.qualcomm.com \
--to=unnathi.chalicheemala@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=kernel@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavan.kondeti@oss.qualcomm.com \
--cc=prasad.sodagudi@oss.qualcomm.com \
--cc=quic_satyap@quicinc.com \
--cc=quic_tsoni@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®