linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Pali Rohár" <pali@kernel.org>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Nick Child" <nick.child@ibm.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] powerpc/pci: Add config option for using all 256 PCI buses
Date: Tue, 26 Jul 2022 21:02:22 +1000	[thread overview]
Message-ID: <875yjkb0ht.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220721222145.rzgthbwoselx2l43@pali>

Pali Rohár <pali@kernel.org> writes:
> On Wednesday 06 July 2022 12:43:08 Pali Rohár wrote:
>> By default on PPC32 are PCI bus numbers unique across all PCI domains.
>> So system could have only 256 PCI buses independently of available
>> PCI domains.
>>
>> This is due to filling DT property pci-OF-bus-map which does not reflect
>> multi-domain setup.
>>
>> On all powerpc platforms except chrp and powermac there is no DT property
>> pci-OF-bus-map anymore and therefore it is possible on non-chrp/powermac
>> platforms to avoid this limitation of maximal number of 256 PCI buses in
>> system even on multi-domain setup.
>>
>> But avoiding this limitation would mean that all PCI and PCIe devices would
>> be present on completely different BDF addresses as every PCI domain starts
>> numbering PCI bueses from zero (instead of the last bus number of previous
>> enumerated PCI domain). Such change could break existing software which
>> expects fixed PCI bus numbers.
>>
>> So add a new config option CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT which
>> enables this change. By default it is disabled. It cause that initial value
>> of hose->first_busno is zero.
>>
>> Signed-off-by: Pali Rohár <pali@kernel.org>
>> ---
>>  arch/powerpc/Kconfig         | 11 +++++++++++
>>  arch/powerpc/kernel/pci_32.c |  6 ++++++
>>  2 files changed, 17 insertions(+)
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index be68c1f02b79..f66084bc1dfe 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -370,6 +370,17 @@ config PPC_DCR
>>  	depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
>>  	default y
>>
>> +config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
>> +	depends on PPC32
>> +	depends on !PPC_PMAC && !PPC_CHRP
>> +	bool "Assign PCI bus numbers from zero individually for each PCI domain"
>> +	help
>> +	  By default on PPC32 were PCI bus numbers unique across all PCI domains.
>> +	  So system could have only 256 PCI buses independently of available
>> +	  PCI domains. When this option is enabled then PCI bus numbers are
>> +	  PCI domain dependent and each PCI controller on own domain can have
>> +	  256 PCI buses, like it is on other Linux architectures.
>> +
>
> What do you think, would it be possible to set default value of this
> option to enabled?

My preference would be to not have the option at all, just make it the
default behaviour. Every new CONFIG option adds more combinations that
need testing, or more likely don't get well tested.

But I don't have a good feel for what could break if we turn it on, so
honestly I don't really know.

Also I do most of my 32-bit testing on pmacs, which are not affected by
the change.

So I'll probably take the series as-is, and then we can do some more
widespread testing and possibly flip the default to enabled, and then
maybe remove the option entirely in future.

cheers

  reply	other threads:[~2022-07-26 11:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 10:43 [PATCH 0/5] powerpc/pci: Cleanup unused code and enable 256 PCI buses Pali Rohár
2022-07-06 10:43 ` [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code Pali Rohár
2022-07-11 22:35   ` Bjorn Helgaas
2022-07-06 10:43 ` [PATCH 2/5] powerpc/pci: Make pcibios_make_OF_bus_map() static Pali Rohár
2022-07-06 10:43 ` [PATCH 3/5] powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code Pali Rohár
2022-07-06 10:43 ` [PATCH 4/5] powerpc/pci: Disable filling pci-OF-bus-map for non-chrp/powermac Pali Rohár
2022-07-06 10:43 ` [PATCH 5/5] powerpc/pci: Add config option for using all 256 PCI buses Pali Rohár
2022-07-21 22:21   ` Pali Rohár
2022-07-26 11:02     ` Michael Ellerman [this message]
2022-07-26 11:10       ` Pali Rohár
2022-08-17 16:42         ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yjkb0ht.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=clg@kaod.org \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nick.child@ibm.com \
    --cc=pali@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).