cns3xxx PCIe domain support

Arnd Bergmann arnd at kernel.org
Mon Jan 4 18:54:36 EST 2021


On Mon, Jan 4, 2021 at 4:36 PM Lorenzo Pieralisi
<lorenzo.pieralisi at arm.com> wrote:
> On Mon, Jan 04, 2021 at 02:48:20PM +0100, Arnd Bergmann wrote:
> > On Mon, Jan 4, 2021 at 12:34 PM Lorenzo Pieralisi
> > > Happy New Year !! I don't think there is anything you are missing, I
> > > think that's an issue. A possible solution would consist in selecting
> > > PCI_DOMAINS_GENERIC (the OF code should fall back to using a counter for
> > > PCI domains - which should do the trick), I'd rather avoid adding back
> > > an arch/arm hook to set-up the domain number
> >
> > Actually on this platform, CONFIG_PCI_DOMAINS_GENERIC is
> > already enabled, however it still uses board files instead of
> > devicetree, so the automatic assignment can not work.
>
> It should work, pci_bus_find_domain_nr() falls back to a counter in
> of_pci_bus_find_domain_nr() if no DT is present.

Ah, I see. I completely missed that part, as I assumed that
of_pci_bus_find_domain_nr() did not attempt to  do the right
thing on non-DT platforms. This part of the code is probably correct
then, as I have no reason to believe there is something wrong with
it, even if the rest of the platform has other problems.

It does raise a different issue though, which is that on
orion/mv78xx0/dove, the same code should trigger now that
they use CONFIG_ARCH_MULTIPLATFORM but no DT, and the
logic to assign distinct bus numbers for each host bridge is
rather pointless.

I don't think it's broken, but it does appear to be an inadvertent
change in behavior, as the platforms would have used only PCI
domain zero before the multiplatform conversion.

> Are you in a position to test it ?

No.

> > For the cns3xxx case, I wonder if anyone actually cares. If
> > there are still users, the treewide change would make it trivial
> > to set it up right, while backporting would be harder. I noticed
> > that openwrt removed cns3xxx support in August with the
> > explanation that the platform is not used much anymore,
> > and I suspect that any users outside of openwrt stopped updating
> > their kernels long ago.
>
> Can you check please whether CONFIG_PCI_DOMAINS_GENERIC still assigns
> separate domain numbers even with no DT support at all ?

>From inspection, I'd say the code still works as designed.

      Arnd



More information about the linux-arm-kernel mailing list