devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Maulik Shah <quic_mkshah@quicinc.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Loic Poulain <loic.poulain@linaro.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] irqchip: Add Qualcomm MPM controller driver
Date: Tue, 30 Nov 2021 08:52:45 +0000	[thread overview]
Message-ID: <87ilwam3du.wl-maz@kernel.org> (raw)
In-Reply-To: <20211130083143.GF10105@dragon>

On Tue, 30 Nov 2021 08:31:44 +0000,
Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> On Tue, Nov 30, 2021 at 01:19:48PM +0530, Maulik Shah wrote:
> >    Hi Shawn,
> > 
> >    On 11/30/2021 8:01 AM, Shawn Guo wrote:
> > 
> > +       do {
> > +               r_val = readl(priv->base + offset);
> > +               udelay(5);
> > +       } while (r_val != val);
> > 
> > What? Is this waiting for a bit to clear? Why isn't this one of the
> > read*_poll_timeout*() function instead? Surely you can't wait forever
> > here.
> > 
> > This is taken from downstream, and it seems to double check the written
> > value by reading it back.  But to be honest, I'm not really this is
> > necessary.  I will do some testing with the read-back check dropped.
> > 
> > How about asking for specs instead? There are QC people on Cc, and
> > many more reading the list. Hopefully they can explain what this is
> > all about.
> > 
> > Maulik,
> > 
> > If you have some information about this, that would be great.
> > 
> >    This can be converted to read poll_timeout(). This was introduced in
> >    place of wmb() to make sure writes are completed.
> 
> Hmm, in this case, writel() will just do the right thing, as it wraps
> wmb() there.  Or am I missing something?

writel() places the wmb() *before* the MMIO access. This is use for
ordering with RAM access if the device is DMA capable, for example. I
seriously doubt this is the case.

My understanding of Maulik's comment is that there is a requirement
for the MMIO access to complete. And for that, a barrier *after* the
write is the right tool for the job.

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2021-11-30  8:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26  9:35 [PATCH v2 0/2] Add Qualcomm MPM irqchip driver support Shawn Guo
2021-11-26  9:35 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: Add Qualcomm MPM support Shawn Guo
2021-12-01 23:02   ` Rob Herring
2021-11-26  9:35 ` [PATCH v2 2/2] irqchip: Add Qualcomm MPM controller driver Shawn Guo
2021-11-26 15:13   ` Marc Zyngier
2021-11-26 19:19   ` Marc Zyngier
2021-11-29 13:33     ` Shawn Guo
2021-11-29 15:24       ` Marc Zyngier
2021-11-30  2:31         ` Shawn Guo
2021-11-30  8:42           ` Marc Zyngier
2021-11-30  9:17             ` Shawn Guo
2021-11-30 10:44               ` Marc Zyngier
2021-12-01  7:36                 ` Shawn Guo
     [not found]           ` <2e821841-a921-3fda-9ee6-3d5127653033@quicinc.com>
2021-11-30  8:31             ` Shawn Guo
2021-11-30  8:52               ` Marc Zyngier [this message]
2021-11-30  8:54               ` Maulik Shah
2021-11-30  8:47             ` Marc Zyngier
2021-11-27  7:49   ` kernel test robot
2021-11-29  7:23   ` Maulik Shah
2021-11-29 13:45     ` Shawn Guo
2021-11-30  8:26       ` Maulik Shah
2021-11-30  8:44         ` Shawn Guo
2021-11-30  9:04           ` Maulik Shah
2021-11-30  9:26             ` Shawn Guo

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=87ilwam3du.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=quic_mkshah@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=tglx@linutronix.de \
    /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).