[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1OGZsGmwGTHaVWBjpr_G4aDvO1mfUGU3o8XyLLgHqXpw@mail.gmail.com>
Date: Sat, 20 Mar 2021 14:03:13 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Marc Zyngier <maz@...nel.org>
Cc: Bjorn Helgaas <helgaas@...nel.org>,
Boqun Feng <boqun.feng@...il.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux on Hyper-V List <linux-hyperv@...r.kernel.org>,
linux-pci <linux-pci@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>, Clint Sbisa <csbisa@...zon.com>,
Ard Biesheuvel <ardb@...nel.org>,
Sunil Muthuswamy <sunilmut@...rosoft.com>
Subject: Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata
On Sat, Mar 20, 2021 at 1:54 PM Marc Zyngier <maz@...nel.org> wrote:
> On Fri, 19 Mar 2021 21:12:46 +0000,
> >
> > Ugh. pci_root_bus_fwnode() is another callback to find the
> > irq_domain. Only one call, from pci_host_bridge_msi_domain(), which
> > itself is only called from pci_set_bus_msi_domain(). This feels like
> > another case where we could simplify things by having the host bridge
> > driver figure out the irq_domain explicitly when it creates the
> > pci_host_bridge. It seems like that's where we have the most
> > information about how to find the irq_domain.
>
> Urgh. This is a perfect copy paste of the x86 horror, warts and all.
> I can't say I'm thrilled (another way to say "Gawd, Noes! Never!").
>
> One thing I am sure of is that I do not want to add more custom
> indirection to build the MSI topology. We barely got rid of the
> msi_controller structure, and this is the same thing by another
> name. Probably worse, actually.
>
> In this case, I don't see the point in going via a fwnode indirection
> given that there is no firmware tables the first place.
>
> As for finding the irq domain from the host bridge, that's not doable
> in most cases on arm64, as it is pretty likely that the host bridge
> knows nothing about MSIs when they are implemented in the GIC (see my
> recent msi_controller removal series that has a few patches about
> that).
>
> Having an optional callback to host bridges to obtain the MSI domain
> may be possible in some cases though (there might be a chicken/egg
> problem for some drivers though...).
I would expect that the host bridge driver can find the MSI domain
at probe time and just add a pointer into the pci_host_bridge
structure.
Arnd
Powered by blists - more mailing lists