linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI resource allocation hell, PCI_PROBE_ONLY, PCI_REASSIGN_ALL_BUS etc...
       [not found] <4e734c3aab8802b340e06b56803954b3e550157d.camel@kernel.crashing.org>
@ 2019-06-13  6:07 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2019-06-13  6:07 UTC (permalink / raw)
  To: linux-arm-kernel, linux-pci, linux-mips
  Cc: Lorenzo Pieralisi, Wen Yang, Thomas Petazzoni, Alan Douglas,
	HonghuiZhang

Sooo ... I need some feedback from a bunch of people who know about
their arch/platform PCIe controller code :-)

aardvark, mvebu, cadence-host and mediatek and alpha & mips folks...

[Long story short: trying to cleanup and consolidate resource
allocation/assignment accross archs etc... and finding a bunch of
interesting things that I'll need to address (or at least understand)
to be able to move forward, so I need input from the relevant
authors/maintainers. I've CCed a few.]

Please chime in and let me know what you think the intent is so I can
fix these things up.

So first thing: aardvark, mvebu, cadence-host and mediatek, you call
pci_host_probe() directly instead of pci_host_common_probe(), for good
reasons, but that make you miss these:

	of_pci_check_probe_only();

and
	/* Do not reassign resources if probe only */
	if (!pci_has_flag(PCI_PROBE_ONLY))
		pci_add_flags(PCI_REASSIGN_ALL_BUS);

Now, I think probe only should be a platform thing, so it should be
tested always, don't you agree ?

Also, from what I can tell, because you never have it set, you rely
on the generic code always reassigning all resources. That's also where
mips and alpha come in: those archs seem to also rely on all resources
being reallocated when PCI_PROBE_ONLY is not set (well, not 100% sure
about mips yet but alpha for sure).

However they all miss setting PCI_REASSIGN_ALL_BUS. So you will keep
whatever bus numbers were set by FW. I think the generic code is
somewhat smart enough to reassign them if they are completely bogus but
it's still not great... Is that intentional ?

Should we move the above pieces of code to pci_host_probe() instead ?
(That wont help mips and alpha, those would have to get a copy of the
same).

Cheers,
Ben.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-13 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4e734c3aab8802b340e06b56803954b3e550157d.camel@kernel.crashing.org>
2019-06-13  6:07 ` PCI resource allocation hell, PCI_PROBE_ONLY, PCI_REASSIGN_ALL_BUS etc Benjamin Herrenschmidt

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).