From: Guru Das Srinagesh <quic_gurus@quicinc.com>
To: Sibi Sankar <quic_sibis@quicinc.com>
Cc: <andersson@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<robh+dt@kernel.org>, <agross@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <konrad.dybcio@somainline.org>,
<robimarko@gmail.com>, <quic_rjendra@quicinc.com>
Subject: Re: [PATCH V4 2/2] firmware: qcom: scm: Add wait-queue handling logic
Date: Wed, 16 Nov 2022 14:55:18 -0800 [thread overview]
Message-ID: <20221116225518.GA14011@quicinc.com> (raw)
In-Reply-To: <1b462f1a-327b-4a8f-8de7-909dbad0ddf8@quicinc.com>
On Nov 16 2022 12:11, Sibi Sankar wrote:
> Hey Guru,
>
> Thanks for taking time to review the series.
>
> On 11/15/22 11:03, Guru Das Srinagesh wrote:
> >On Nov 14 2022 13:56, Sibi Sankar wrote:
> >
> >(snip)
> >
> >>+static irqreturn_t qcom_scm_irq_handler(int irq, void *data)
> >>+{
> >>+ int ret;
> >>+ struct qcom_scm *scm = data;
> >>+ struct completion *wq_to_wake;
> >>+ u32 wq_ctx, flags, more_pending = 0;
> >>+
> >>+ do {
> >>+ ret = scm_get_wq_ctx(&wq_ctx, &flags, &more_pending);
> >>+ if (ret) {
> >>+ dev_err(scm->dev, "GET_WQ_CTX SMC call failed: %d\n", ret);
> >>+ goto out;
> >>+ }
> >>+
> >>+ wq_to_wake = qcom_scm_lookup_wq(scm, wq_ctx);
> >>+ if (IS_ERR_OR_NULL(wq_to_wake)) {
> >>+ dev_err(scm->dev, "No waitqueue found for wq_ctx %d: %ld\n",
> >>+ wq_ctx, PTR_ERR(wq_to_wake));
> >>+ goto out;
> >>+ }
> >>+
> >>+ if (flags != QCOM_SMC_WAITQ_FLAG_WAKE_ONE &&
> >>+ flags != QCOM_SMC_WAITQ_FLAG_WAKE_ALL) {
> >>+ dev_err(scm->dev, "Invalid Flags found for wq_ctx: %u\n", flags);
> >>+ goto out;
> >>+ }
> >>+
> >>+ complete(wq_to_wake);
> >
> >Need to call complete() or complete_all() based on the flags.
>
> with the current implementation we should get away with
> just complete for now but I can add them back in the way
> Bjorn wanted i.e. with the bool wake_all in the next
> re-spin.
Sounds good, let's consume the flags according to their intended purpose.
Thank you.
Guru Das.
prev parent reply other threads:[~2022-11-16 22:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 8:26 [PATCH V4 0/2] SCM: Add support for wait-queue aware firmware Sibi Sankar
2022-11-14 8:26 ` [PATCH V4 1/2] dt-bindings: firmware: qcom-scm: Add optional interrupt Sibi Sankar
2022-11-14 9:42 ` Krzysztof Kozlowski
2022-11-14 8:26 ` [PATCH V4 2/2] firmware: qcom: scm: Add wait-queue handling logic Sibi Sankar
2022-11-15 5:33 ` Guru Das Srinagesh
2022-11-16 6:41 ` Sibi Sankar
2022-11-16 22:55 ` Guru Das Srinagesh [this message]
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=20221116225518.GA14011@quicinc.com \
--to=quic_gurus@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_rjendra@quicinc.com \
--cc=quic_sibis@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=robimarko@gmail.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;
as well as URLs for NNTP newsgroup(s).