[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241203223920.GA2969750@bhelgaas>
Date: Tue, 3 Dec 2024 16:39:20 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Richard Zhu <hongxing.zhu@....com>,
Lucas Stach <l.stach@...gutronix.de>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Rob Herring <robh@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
imx@...ts.linux.dev, alyssa@...enzweig.io, bpf@...r.kernel.org,
broonie@...nel.org, jgg@...pe.ca, joro@...tes.org,
lgirdwood@...il.com, maz@...nel.org, p.zabel@...gutronix.de,
robin.murphy@....com, will@...nel.org
Subject: Re: [PATCH v5 1/2] PCI: Add enable_device() and disable_device()
callbacks for bridges
On Tue, Dec 03, 2024 at 03:42:32PM -0500, Frank Li wrote:
> On Mon, Nov 04, 2024 at 02:22:59PM -0500, Frank Li wrote:
> > Some PCIe host bridges require special handling when enabling or disabling
> > PCIe Endpoints. For example, the i.MX95 platform has a lookup table to map
> > Requester IDs to StreamIDs, which are used by the SMMU and MSI controller
> > to identify the source of DMA accesses.
> >
> > Without this mapping, DMA accesses may target unintended memory, which
> > would corrupt memory or read the wrong data.
> >
> > Add a host bridge .enable_device() hook the imx6 driver can use to
> > configure the Requester ID to StreamID mapping. The hardware table isn't
> > big enough to map all possible Requester IDs, so this hook may fail if no
> > table space is available. In that case, return failure from
> > pci_enable_device().
> >
> > It might make more sense to make pci_set_master() decline to enable bus
> > mastering and return failure, but it currently doesn't have a way to return
> > failure.
> >
> > Signed-off-by: Frank Li <Frank.Li@....com>
> > ---
>
> Bjorn Helgaas:
>
> Can I keep your acked tag? Compared V4, just use static helper
> functions.
Can you rebase this to pci/main (v6.13-rc1)? This would go via the
PCI tree, so it will need to be rebased anyway, and then I can ack
that.
Bjorn
Powered by blists - more mailing lists