From patchwork Sun Feb 9 02:01:30 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: 1235406 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48FXMy5qNlz9sP7 for ; Sun, 9 Feb 2020 13:01:50 +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 48FXMy59X2zDqW4 for ; Sun, 9 Feb 2020 13:01:50 +1100 (AEDT) X-Original-To: Skiboot-stable@lists.ozlabs.org Delivered-To: Skiboot-stable@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; 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 (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 48FXMq31x2zDqTx; Sun, 9 Feb 2020 13:01:42 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0192099g081774; Sat, 8 Feb 2020 21:01:39 -0500 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1tn3c4va-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 08 Feb 2020 21:01:39 -0500 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 019203uD006054; Sun, 9 Feb 2020 02:01:38 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma05wdc.us.ibm.com with ESMTP id 2y1mm5xrqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 09 Feb 2020 02:01:38 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01921bA031719872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 9 Feb 2020 02:01:37 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79AE5BE051; Sun, 9 Feb 2020 02:01:37 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 602B7BE059; Sun, 9 Feb 2020 02:01:36 +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 02:01:36 +0000 (GMT) From: Klaus Heinrich Kiwi To: Skiboot@lists.ozlabs.org Date: Sat, 8 Feb 2020 23:01:30 -0300 Message-Id: <20200209020130.31031-1-klaus@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <646ef8af-e126-3392-5d9b-f407f987928d@linux.vnet.ibm.com> References: <646ef8af-e126-3392-5d9b-f407f987928d@linux.vnet.ibm.com> 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 mlxlogscore=999 suspectscore=1 bulkscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002090015 Subject: [Skiboot-stable] [PATCH v2] core/pci: Fix FSP platforms to favor slot-location-codes over labels X-BeenThere: skiboot-stable@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches, review, and discussion for stable releases of skiboot" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Skiboot-stable@lists.ozlabs.org MIME-Version: 1.0 Errors-To: skiboot-stable-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot-stable" 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(-) diff --git a/core/pci.c b/core/pci.c index 8b52fc10..b2703d3b 100644 --- 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);