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>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Guowen Shan" <gshan@redhat.com>,
"Tyrel Datwyler" <tyreld@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] powerpc/pci: Add config option for using OF 'reg' for PCI domain
Date: Wed, 27 Jul 2022 22:33:32 +1000 [thread overview]
Message-ID: <87pmhqag6b.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220706102148.5060-1-pali@kernel.org>
Pali Rohár <pali@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
WARNING: multiple messages have this Message-ID (diff)
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>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Guowen Shan" <gshan@redhat.com>,
"Tyrel Datwyler" <tyreld@linux.ibm.com>
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] powerpc/pci: Add config option for using OF 'reg' for PCI domain
Date: Wed, 27 Jul 2022 22:33:32 +1000 [thread overview]
Message-ID: <87pmhqag6b.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220706102148.5060-1-pali@kernel.org>
Pali Rohár <pali@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
next prev parent reply other threads:[~2022-07-27 12:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 10:21 [PATCH v2 1/2] powerpc/pci: Add config option for using OF 'reg' for PCI domain Pali Rohár
2022-07-06 10:21 ` Pali Rohár
2022-07-06 10:21 ` [PATCH v2 2/2] powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias Pali Rohár
2022-07-06 10:21 ` Pali Rohár
2022-08-13 13:57 ` Guenter Roeck
2022-08-13 13:57 ` Guenter Roeck
2022-08-15 5:46 ` Michael Ellerman
2022-08-15 5:46 ` Michael Ellerman
2022-09-23 3:21 ` Benjamin Herrenschmidt
2022-09-23 3:21 ` Benjamin Herrenschmidt
2022-07-15 14:55 ` [PATCH v2 1/2] powerpc/pci: Add config option for using OF 'reg' for PCI domain Guilherme G. Piccoli
2022-07-15 14:55 ` Guilherme G. Piccoli
2022-07-15 17:11 ` Pali Rohár
2022-07-15 17:11 ` Pali Rohár
2022-07-15 18:32 ` Guilherme G. Piccoli
2022-07-15 18:32 ` Guilherme G. Piccoli
2022-07-16 11:35 ` Pali Rohár
2022-07-16 11:35 ` Pali Rohár
2022-07-27 12:33 ` Michael Ellerman [this message]
2022-07-27 12:33 ` Michael Ellerman
2022-07-29 13:02 ` Michael Ellerman
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=87pmhqag6b.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=gpiccoli@igalia.com \
--cc=gshan@redhat.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pali@kernel.org \
--cc=paulus@samba.org \
--cc=tyreld@linux.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.