* pci-hyperv.c and pci_bus_assign_resources()
@ 2019-06-24 3:48 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2019-06-24 3:48 UTC (permalink / raw)
To: Dexuan Cui, Maya Nakamura
Cc: K. Y. Srinivasan, Haiyang Zhang, Lorenzo Pieralisi, linux-pci,
Sasha Levin
Hi Folks !
As part of my consolidation of the PCI resource survey, pci-hyperv is
getting a bit in the way, I need help understanding what exactly it
needs here when it calls pci_bus_assign_resources().
As you can see at:
https://git.kernel.org/pub/scm/linux/kernel/git/benh/pci.git/
I have removed all call sites of pci_bus_assign_resources() except that
one.
So far, as far as I understand and provided I didn't screw up, they
were all either part of a pair doing:
pci_bus_size_bridges(bus);
pci_bus_assign_resources(bus);
or trying to assign a single added device, or buggy controller code who
did pci_bus_assign_resources() without doing pci_bus_size_bridges()
first.
pci-hyperv is a bit of a mystery however. The call to
pci_bus_assign_resources() alone will try to assign resources to
devices but will not assign anything to bridges. So any bridge will be
left as-is. Now on x86, pcibios_fixup_bus() will call
pci_read_bridge_bases(), so any such bridge will at least get its
resources read from the hw, but not allocated (parent won't be set).
So it all a bit odd ...
What is the context here ? What may be hanging off that bus when it's
added ? Should it be calling pci_assign_unassigned_bridge_resources()
instead like other hotplug drivers do ? Something else ?
Thanks !
Cheers,
Ben.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-24 3:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 3:48 pci-hyperv.c and pci_bus_assign_resources() 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).