linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: tegra: Convert to MSI domains
Date: Fri, 4 Sep 2020 14:28:27 +0200	[thread overview]
Message-ID: <20200904122827.GA591744@ulmo> (raw)
In-Reply-To: <20200904114501.GO1152540@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

On Fri, Sep 04, 2020 at 08:45:01AM -0300, Jason Gunthorpe wrote:
> On Fri, Sep 04, 2020 at 12:56:13PM +0200, Thierry Reding wrote:
> > +static void tegra_msi_irq_mask(struct irq_data *d)
> > +{
> > +	struct tegra_msi *msi = irq_data_get_irq_chip_data(d);
> > +	struct tegra_pcie *pcie = msi_to_pcie(msi);
> > +	unsigned int index = d->hwirq / 32;
> > +	u32 value;
> > +
> > +	value = afi_readl(pcie, AFI_MSI_EN_VEC(index));
> > +	value &= ~BIT(d->hwirq % 32);
> > +	afi_writel(pcie, value, AFI_MSI_EN_VEC(index));
> > +}
> 
> Do these need a flushing write? The Mask operation should be synchronous?

Did you mean a flushing read? We typically flush out writes by reading
from the same register. Another write wouldn't guarantee that both
writes are actually flushed to hardware, would it?

Yes, that sounds like a good idea. It seems to work fine without, but
that may just be a coincidence.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-09-04 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 10:56 [PATCH] PCI: tegra: Convert to MSI domains Thierry Reding
2020-09-04 11:45 ` Jason Gunthorpe
2020-09-04 12:28   ` Thierry Reding [this message]
2020-09-04 12:30     ` Jason Gunthorpe
2020-09-04 15:48 ` Marc Zyngier

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=20200904122827.GA591744@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=jgg@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=maz@kernel.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).