All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Maulik Shah <mkshah@codeaurora.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	Evan Green <evgreen@chromium.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Andy Gross <agross@kernel.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Lina Iyer <ilina@codeaurora.org>,
	lsrao@codeaurora.org, "Raju P.L.S.S.S.N" <rplsssn@codeaurora.org>
Subject: Re: [PATCH v15 6/7] soc: qcom: rpmh-rsc: Clear active mode configuration for wake TCS
Date: Mon, 6 Apr 2020 08:33:58 -0700	[thread overview]
Message-ID: <CAD=FV=Wi1bbc-Q2PYq3+tohYcx+hguFJ8A8FyuQCzgUYjEJOHw@mail.gmail.com> (raw)
In-Reply-To: <855bb87e-6c5c-8fee-e237-f48f9d95e2ac@codeaurora.org>

Hi,

On Sun, Apr 5, 2020 at 10:08 PM Maulik Shah <mkshah@codeaurora.org> wrote:
>
> Hi,
>
> On 4/3/2020 1:44 AM, Doug Anderson wrote:
> > Hi,
> >
> > On Tue, Mar 31, 2020 at 6:21 AM Maulik Shah <mkshah@codeaurora.org> wrote:
> >> @@ -243,6 +279,14 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
> >>                  }
> >>
> >>                  trace_rpmh_tx_done(drv, i, req, err);
> >> +
> >> +               /*
> >> +                * If wake tcs was re-purposed for sending active
> >> +                * votes, clear AMC trigger & enable modes and
> >> +                * disable interrupt for this TCS
> >> +                */
> >> +               if (!drv->tcs[ACTIVE_TCS].num_tcs)
> >> +                       __tcs_set_trigger(drv, i, false);
> > Still seems weird that we have to do the untrigger in the IRQ routine
> > here and also weird that we _don't_ do it in the IRQ routine for
> > non-borrowed TCSes.  I guess it's not the end of the world, though.
> >
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
>
> Thanks Doug for the review.
>
> IRQ is only needed to be enabled for TCSes used as ACTIVE_TCS.
>
> When we have dedicated ACTIVE_TCS, we leave IRQ always enabled from
> probe (one time configuration), since the TCS won't be used for anything
> other than to send ACTIVE transaction.
>
> When we don't have dedicated ACTIVE_TCS, we enable it when borrowed TCS
> is used for ACTIVE transaction and then once its done using it, we
> disable it again to leave it in its original configuration.

Sure, I get the concept.  ...but:

* It seems like it would be ideal to not call __tcs_set_trigger() from
the IRQ handler.  It uses write_tcs_reg_sync() which has a wait loop
in it.  That's not something you normally want in an IRQ handler.

* It seems like it would be a common case for the WAKE_TCS to be
borrowed several times in-between actually using it as a WAKE_TCS.

To make both of the above things better, it seems like you could just
leave the WAKE_TCS configured for active-mode transfers and just
switch all that stuff off when you actually need it as a WAKE_TCS.  To
some extent we could conceptually re-envision this and think of this
as being the ACTIVE_TCS that is occasionally borrowed to make up for
not having a WAKE_TCS.


In any case, I think the patch you have right now is good enough and
it feels like it's overdue to land this series.  I'd suggest against
spinning at this point.  Maybe we can try to improve this in a future
patch after your series lands.

-Doug

  reply	other threads:[~2020-04-06 15:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 13:19 [PATCH v15 0/7] Invoke rpmh_flush for non OSI targets Maulik Shah
2020-03-31 13:19 ` [PATCH v15 1/7] arm64: dts: qcom: sc7180: Add cpuidle low power states Maulik Shah
2020-03-31 13:19 ` [PATCH v15 2/7] soc: qcom: rpmh: Update dirty flag only when data changes Maulik Shah
2020-03-31 13:19 ` [PATCH v15 3/7] soc: qcom: rpmh: Invalidate SLEEP and WAKE TCSes before flushing new data Maulik Shah
2020-03-31 13:19 ` [PATCH v15 4/7] soc: qcom: rpmh-rsc: Save base address of drv Maulik Shah
2020-04-02 17:00   ` Doug Anderson
2020-04-06  4:49     ` Maulik Shah
2020-03-31 13:19 ` [PATCH v15 5/7] soc: qcom: rpmh: Invoke rpmh_flush() for dirty caches Maulik Shah
2020-04-02 20:13   ` Doug Anderson
2020-04-06  4:51     ` Maulik Shah
2020-03-31 13:19 ` [PATCH v15 6/7] soc: qcom: rpmh-rsc: Clear active mode configuration for wake TCS Maulik Shah
2020-04-02 20:14   ` Doug Anderson
2020-04-06  5:08     ` Maulik Shah
2020-04-06 15:33       ` Doug Anderson [this message]
2020-03-31 13:19 ` [PATCH v15 7/7] soc: qcom: rpmh-rsc: Allow using free WAKE TCS for active request Maulik Shah
2020-04-02 20:13   ` Doug Anderson
2020-04-06  5:12     ` Maulik Shah

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='CAD=FV=Wi1bbc-Q2PYq3+tohYcx+hguFJ8A8FyuQCzgUYjEJOHw@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=evgreen@chromium.org \
    --cc=ilina@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsrao@codeaurora.org \
    --cc=mka@chromium.org \
    --cc=mkshah@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=rplsssn@codeaurora.org \
    --cc=swboyd@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.