From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dexuan Cui <decui@microsoft.com>,
Maya Nakamura <m.maya.nakamura@gmail.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-pci@vger.kernel.org, Sasha Levin <sashal@kernel.org>
Subject: pci-hyperv.c and pci_bus_assign_resources()
Date: Mon, 24 Jun 2019 13:48:40 +1000 [thread overview]
Message-ID: <5e8f3ba58390f0c8df8724eccc68c4ba5b4ebc57.camel@kernel.crashing.org> (raw)
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.
reply other threads:[~2019-06-24 3:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5e8f3ba58390f0c8df8724eccc68c4ba5b4ebc57.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=m.maya.nakamura@gmail.com \
--cc=sashal@kernel.org \
/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).