From patchwork Sun Feb 9 01:49:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Heinrich Kiwi X-Patchwork-Id: 1235405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48FX6j3hzVz9s3x for ; Sun, 9 Feb 2020 12:50:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48FX6j2WwNzDqWJ for ; Sun, 9 Feb 2020 12:50:21 +1100 (AEDT) X-Original-To: Skiboot@lists.ozlabs.org Delivered-To: Skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=klaus@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48FX6Y30pGzDqTQ; Sun, 9 Feb 2020 12:50:13 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0191nOlh141180; Sat, 8 Feb 2020 20:50:10 -0500 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1u1gk1jx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 08 Feb 2020 20:50:10 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 0191j8uj011961; Sun, 9 Feb 2020 01:50:10 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma02dal.us.ibm.com with ESMTP id 2y1mm68cd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 09 Feb 2020 01:50:10 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0191o84849152348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 9 Feb 2020 01:50:08 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D63CBE069; Sun, 9 Feb 2020 01:50:08 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A233BE051; Sun, 9 Feb 2020 01:50:07 +0000 (GMT) Received: from klaus-virtual-ubuntu.mshome.net (unknown [9.85.175.191]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Sun, 9 Feb 2020 01:50:07 +0000 (GMT) From: Klaus Heinrich Kiwi To: Skiboot@lists.ozlabs.org Date: Sat, 8 Feb 2020 22:49:46 -0300 Message-Id: <20200209014946.30280-1-klaus@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-02-08_08:2020-02-07, 2020-02-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=1 impostorscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002090013 Subject: [Skiboot] [PATCH] core/pci: Fix FSP platforms to favor slot-location-codes over labels X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Skiboot-stable@lists.ozlabs.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 --- 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);