Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-29 Thread Arnd Bergmann
On Mon, Mar 29, 2021 at 4:32 PM Boqun Feng wrote: > > Hi Arnd, > > On Sat, Mar 20, 2021 at 05:09:10PM +0100, Arnd Bergmann wrote: > > On Sat, Mar 20, 2021 at 1:54 PM Arnd Bergmann wrote: > > > I actually still have a (not really tested) patch series to clean up > > > the pci host bridge

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-29 Thread Boqun Feng
Hi Arnd, On Sat, Mar 20, 2021 at 05:09:10PM +0100, Arnd Bergmann wrote: > On Sat, Mar 20, 2021 at 1:54 PM Arnd Bergmann wrote: > > I actually still have a (not really tested) patch series to clean up > > the pci host bridge registration, and this should make this a lot easier > > to add on

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Marc Zyngier
On Sat, 20 Mar 2021 14:24:06 +, Arnd Bergmann wrote: > > On Sat, Mar 20, 2021 at 2:23 PM Marc Zyngier wrote: > > > > On Sat, 20 Mar 2021 13:03:13 +, > > Arnd Bergmann wrote: > > > > > > On Sat, Mar 20, 2021 at 1:54 PM Marc Zyngier wrote: > > > > On Fri, 19 Mar 2021 21:12:46 +, > >

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Arnd Bergmann
On Sat, Mar 20, 2021 at 1:54 PM Arnd Bergmann wrote: > I actually still have a (not really tested) patch series to clean up > the pci host bridge registration, and this should make this a lot easier > to add on top. > > I should dig that out of my backlog and post for review. I've uploaded

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Arnd Bergmann
On Sat, Mar 20, 2021 at 2:23 PM Marc Zyngier wrote: > > On Sat, 20 Mar 2021 13:03:13 +, > Arnd Bergmann wrote: > > > > On Sat, Mar 20, 2021 at 1:54 PM Marc Zyngier wrote: > > > On Fri, 19 Mar 2021 21:12:46 +, > > > > > > Having an optional callback to host bridges to obtain the MSI

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Marc Zyngier
On Sat, 20 Mar 2021 13:03:13 +, Arnd Bergmann wrote: > > On Sat, Mar 20, 2021 at 1:54 PM Marc Zyngier wrote: > > On Fri, 19 Mar 2021 21:12:46 +, > > > > > > > Ugh. pci_root_bus_fwnode() is another callback to find the > > > irq_domain. Only one call, from

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Arnd Bergmann
On Sat, Mar 20, 2021 at 1:54 PM Marc Zyngier wrote: > On Fri, 19 Mar 2021 21:12:46 +, > > > > 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

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Arnd Bergmann
On Fri, Mar 19, 2021 at 10:14 PM Bjorn Helgaas wrote: > > However, for a virtualized PCI bus, there might be no enough data in of > > or acpi table to create a pci_config_window. This is similar to the case > > where CONFIG_PCI_DOMAINS_GENERIC=n, IOW, architectures use their own > > structure for

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Marc Zyngier
Thanks Bjorn for looping me in. On Fri, 19 Mar 2021 21:12:46 +, Bjorn Helgaas wrote: > > [+cc Arnd (author of 37d6a0a6f470 ("PCI: Add > pci_register_host_bridge() interface"), which I think would make my > idea below possible), Marc (IRQ domains maintainer)] > > On Sat, Mar 20, 2021 at

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-20 Thread Arnd Bergmann
On Fri, Mar 19, 2021 at 5:22 PM Boqun Feng wrote: > > Currently, if an architecture selects CONFIG_PCI_DOMAINS_GENERIC, the > ->sysdata in bus and bridge will be treated as struct pci_config_window, > which is created by generic ECAM using the data from acpi. > > However, for a virtualized PCI

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-19 Thread Bjorn Helgaas
[+cc Arnd (author of 37d6a0a6f470 ("PCI: Add pci_register_host_bridge() interface"), which I think would make my idea below possible), Marc (IRQ domains maintainer)] On Sat, Mar 20, 2021 at 12:19:55AM +0800, Boqun Feng wrote: > Currently, if an architecture selects CONFIG_PCI_DOMAINS_GENERIC, the

[RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-19 Thread Boqun Feng
Currently, if an architecture selects CONFIG_PCI_DOMAINS_GENERIC, the ->sysdata in bus and bridge will be treated as struct pci_config_window, which is created by generic ECAM using the data from acpi. However, for a virtualized PCI bus, there might be no enough data in of or acpi table to create