[Skiboot] PCI slot table rework
oohall at gmail.com
Tue Aug 1 22:59:55 AEST 2017
This series is a bit of a mish-mash of reworking the existing slot table format,
the PCI code that consumes it, and the logic for binding the NVLink emulated PCI
devices to the actual GPU PCI devices. I would seperate it out into different
series, but some of the changes an interdependent. Anyway, in terms of actual
changes the series:
a) Converts the slot tables into the /ibm,pcie-slots/ device-tree heirachy.
Essentially node contains copy of what the PCI topology *should* look like rather
than what it actually looks like (which can be found under the pciex@<xyz> nodes.
b) Reworks the Binding logic between NPUs and GPUs to use a phandle to a slot node
as a reference point. This isn't a major change, but the actual implementation is
now much more straight forward.
c) Does some cleanup of the slot table format to make it easier to parse. Namely it adds
a macro to handle the top-level PHB table and adds an explicit "switch" slot type rather
than making everyting a builtin device. This is mainly to make it easier to parse into
the new format.
c) Moves some of the generic virtual-phb code back into the generic. Yeah, there's no
reason this patch needs to be in this series, but it's located next to the NPU<->GPU
binding so keeping it here prevents merge conflicts.
Originally this series included a bunch of extra patches for parsing the PCI slot
information that was supposed to be provided by the HDAT. Unfortunately that is
doesn't appear to be ready. In the mean time it wouldn't hurt to move some of this
code into upstream skiboot in preperation for the new stuff.
Lightly tested on garrison, might be broken there. Comments welcome.
More information about the Skiboot