[Skiboot] [PATCH] core/pci: Fix FSP platforms to favor slot-location-codes over labels

Klaus Heinrich Kiwi klaus at linux.vnet.ibm.com
Sun Feb 9 12:49:46 AEDT 2020


FSP Systems will favor fully-qualified "ibm,slot-location-codes" (e.g.
"UOPWR.001.XYZ0000-P1-C2" over "ibm,slot-label" (e.g. "C2") for it's
"ibm,loc-code" property on pci devices.

Signed-off-by: Klaus Heinrich Kiwi <klaus at linux.vnet.ibm.com>
---
 core/pci.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 core/pci.c

diff --git a/core/pci.c b/core/pci.c
old mode 100644
new mode 100755
index 8b52fc10..b2703d3b
--- a/core/pci.c
+++ b/core/pci.c
@@ -1393,10 +1393,14 @@ static void pci_add_loc_code(struct dt_node *np, struct pci_device *pd)
 	uint8_t pos, len;
 
 	while (p) {
-		/* if we have a slot label (i.e. openpower) use that */
-		blcode = dt_prop_get_def(p, "ibm,slot-label", NULL);
-		if (blcode)
-			break;
+		/* BMC platforms will favor slot-label, while FSP platforms will
+		 * prefer slot-location-code
+		 */
+		if (platform.bmc) {
+			blcode = dt_prop_get_def(p, "ibm,slot-label", NULL);
+			if (blcode)
+				break;
+		}
 
 		/* otherwise use the fully qualified location code */
 		blcode = dt_prop_get_def(p, "ibm,slot-location-code", NULL);
-- 
2.17.1



More information about the Skiboot mailing list