PCI resource allocation hell, PCI_PROBE_ONLY, PCI_REASSIGN_ALL_BUS etc...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux