diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-04-23 17:56:07 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-04-29 16:13:03 +1000 |
commit | b50406ba487827ca464504d8b240d355856535c4 (patch) | |
tree | 0c7101ac5b314e0a485e595a9d3fe9a1a9206930 | |
parent | 2e2157121aa1366a9a9756dfe889352e0c531609 (diff) | |
download | skiboot-b50406ba487827ca464504d8b240d355856535c4.zip skiboot-b50406ba487827ca464504d8b240d355856535c4.tar.gz skiboot-b50406ba487827ca464504d8b240d355856535c4.tar.bz2 |
core/pci: Use PHB io-base-location by default for PHB slots
On witherspoon only the GPU slots and the three pluggable PCI slots
(SLOT0, 1, 2) have platform defined slot names. For builtin devices such
as the SATA controller or the PLX switch that fans out to the GPU slots
we have no location codes which some people consider an issue.
This patch address the problem by making the ibm,slot-location-code for
the root port device default to the ibm,io-base-location-code which is
typically the location code for the system itself.
e.g.
pciex@600c3c0100000/ibm,loc-code
"UOPWR.0000000-Node0-Proc0"
pciex@600c3c0100000/pci@0/ibm,loc-code
"UOPWR.0000000-Node0-Proc0"
pciex@600c3c0100000/pci@0/usb-xhci@0/ibm,loc-code
"UOPWR.0000000-Node0"
The PHB node, and the root complex nodes have a loc code of the
processor they are attached to, while the usb-xhci device under the
root port has a location code of the system itself.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | core/pci.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1611,6 +1611,15 @@ static void __noinline pci_add_one_device_node(struct phb *phb, if (pd->slot) pci_slot_add_dt_properties(pd->slot, np); + /* + * Use the phb base location code for root ports if the platform + * doesn't provide one via slot->add_properties() operation. + */ + if (pd->dev_type == PCIE_TYPE_ROOT_PORT && phb->base_loc_code && + !dt_has_node_property(np, "ibm,slot-location-code", NULL)) + dt_add_property_string(np, "ibm,slot-location-code", + phb->base_loc_code); + /* Make up location code */ pci_add_loc_code(np, pd); |