[PATCH v2 1/2] powerpc/pci: Add config option for using OF 'reg' for PCI domain
Michael Ellerman
mpe at ellerman.id.au
Wed Jul 27 22:33:32 AEST 2022
Pali Rohár <pali at kernel.org> writes:
> Since commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on
> device-tree properties"), powerpc kernel always fallback to PCI domain
> assignment from OF / Device Tree 'reg' property of the PCI controller.
>
> In most cases 'reg' property is not zero and therefore there it cause that
> PCI domain zero is not present in system anymore.
>
> PCI code for other Linux architectures use increasing assignment of the PCI
> domain for individual controllers (assign the first free number), like it
> was also for powerpc prior mentioned commit. Also it starts numbering
> domains from zero.
>
> Upgrading powerpc kernels from LTS 4.4 version (which does not contain
> mentioned commit) to new LTS versions brings a change in domain assignment.
>
> It can be problematic for embedded machines with single PCIe controller
> where it is expected that PCIe card is connected on the domain zero.
> Also it can be problematic as that commit changes PCIe domains in
> multi-controller setup with fixed number of controller (without hotplug
> support).
>
> Originally that change was intended for powernv and pservers and specially
> server machines with more PCI domains or hot plug support.
>
> Fix this issue and introduce a new option CONFIG_PPC_PCI_DOMAIN_FROM_OF_REG.
As I said in my previous reply, I don't want a config option for this.
Adding an option now would revert the behaviour back to the way it was,
which has the potential to break things, as you described.
Maybe we shouldn't have changed the numbering to begin with, but it's
been 6 years, so it's too late to change it back.
cheers
More information about the Linuxppc-dev
mailing list