From: "Shelton, Ben" <benjamin.h.shelton@intel.com>
To: linux-pci@vger.kernel.org
Subject: Convention for PCI device to handle bridge window change
Date: Thu, 20 Aug 2015 12:00:00 -0500 [thread overview]
Message-ID: <20150820165959.GB14073@bhshelto-vm> (raw)
Hi all,
I'm working on an issue with an x64-based emulation system that has
multiple PCI-accessible FPGAs, each of which sits behind a PCI bridge.
We program the first FPGA and then warm-reboot the CPU. When it comes
back up, there is an additional PCIe device that has been programmed
into the FPGA, and the kernel goes through the remapping process to
figure out how to fit everything. The remapping succeeds by moving
several of the FPGA bridges out of the way. The bridges get set up
properly, but the FPGA resources themselves get released but not
reassigned, and the BAR of the FPGA behind each bridge that got
relocated is still set to the old address. If I add a hack in the boot
process to call pci_assign_resource() for those particular devices if
they have not been assigned, then everything works as expected.
Where is the usual place to handle updating the BAR for a device after
the bridge window of the bridge it's behind has changed?
Is it in the driver? Looking at other drivers, there are a few that
call pci_assign_resource() explicitly if their resource has not been
assigned, e.g. drivers/char/agp/intel-agp.c. There are also a few
drivers that used to do this but no longer do, e.g. ath10k (see commit
a6a2f74e for where it got removed).
Or are resources behind a bridge that was relocated supposed to be
reassigned as part of the remapping process, and that just isn't
happening for some reason in our case?
Thanks,
Ben
next reply other threads:[~2015-08-20 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 17:00 Shelton, Ben [this message]
2015-10-07 19:20 ` Convention for PCI device to handle bridge window change Bjorn Helgaas
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=20150820165959.GB14073@bhshelto-vm \
--to=benjamin.h.shelton@intel.com \
--cc=linux-pci@vger.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