From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sergey Miroshnichenko <s.miroshnichenko@yadro.com>,
linuxppc-dev@lists.ozlabs.org
Cc: linux@yadro.com
Subject: Re: [PATCH 4/5] powerpc/powernv/pci: Enable reassigning the bus numbers
Date: Wed, 12 Sep 2018 12:35:44 +0200 [thread overview]
Message-ID: <84ca69bb04ccbdb4c0ae04ef7e272b11ad8fcf01.camel@kernel.crashing.org> (raw)
In-Reply-To: <20180905154008.11130-5-s.miroshnichenko@yadro.com>
On Wed, 2018-09-05 at 18:40 +0300, Sergey Miroshnichenko wrote:
> PowerNV doesn't depend on PCIe topology info from DT anymore, and now
> it is able to enumerate the fabric and assign the bus numbers.
No it's not, at least unless we drop P7 support.
P7 has constraints on the bus ranges being aligned power-of-two for the
PE assignment to work, which is why we have to honor the firmware
provided numbers.
Additionally, this breaks the mapping between the firmware idea of the
bus numbers and Linux idea. This will probably break all of the SR-IOV
stuff.
Now we should probably fix it all by removing the FW bits completely
and doing it all from Linux, though we really need to better handle how
we deal with the segmented MMIO space.
I would also be weary of what other parts of the code depends on that
matching between the FW bdfn and the Linux bdfn.
Cheers,
Ben.
> Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko@yadro.com>
> ---
> arch/powerpc/platforms/powernv/pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
> index 6d4280086a08..f6eaca3123cd 100644
> --- a/arch/powerpc/platforms/powernv/pci.c
> +++ b/arch/powerpc/platforms/powernv/pci.c
> @@ -1104,6 +1104,7 @@ void __init pnv_pci_init(void)
> struct device_node *np;
>
> pci_add_flags(PCI_CAN_SKIP_ISA_ALIGN);
> + pci_add_flags(PCI_REASSIGN_ALL_BUS);
>
> /* If we don't have OPAL, eg. in sim, just skip PCI probe */
> if (!firmware_has_feature(FW_FEATURE_OPAL))
next prev parent reply other threads:[~2018-09-12 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 15:40 [PATCH 0/5] powerpc/pci/hotplug: Discover surprise-hotplugged PCIe devices during rescan Sergey Miroshnichenko
2018-09-05 15:40 ` [PATCH 1/5] powerpc/pci: Access PCI config space directly w/o pci_dn Sergey Miroshnichenko
2018-09-05 15:40 ` [PATCH 2/5] powerpc/pci: Create pci_dn on demand Sergey Miroshnichenko
2018-09-12 10:33 ` Benjamin Herrenschmidt
2018-09-05 15:40 ` [PATCH 3/5] powerpc/pci: Use DT to create pci_dn for root bridges only Sergey Miroshnichenko
2018-09-05 15:40 ` [PATCH 4/5] powerpc/powernv/pci: Enable reassigning the bus numbers Sergey Miroshnichenko
2018-09-12 10:35 ` Benjamin Herrenschmidt [this message]
2018-09-14 20:54 ` Sergey Miroshnichenko
2018-09-05 15:40 ` [PATCH 5/5] PCI/powerpc/eeh: Add pcibios hooks for preparing to rescan Sergey Miroshnichenko
2018-09-12 10:37 ` Benjamin Herrenschmidt
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=84ca69bb04ccbdb4c0ae04ef7e272b11ad8fcf01.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linux@yadro.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=s.miroshnichenko@yadro.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 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).