From patchwork Wed Nov 14 17:02:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Barrat X-Patchwork-Id: 997833 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42w9mW6QHQz9rxp for ; Thu, 15 Nov 2018 04:03:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42w9mW3w61zF3bf for ; Thu, 15 Nov 2018 04:03:07 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=fbarrat@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.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 42w9mN2vydzF3Wh for ; Thu, 15 Nov 2018 04:02:59 +1100 (AEDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAEGwax6057775 for ; Wed, 14 Nov 2018 12:02:57 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nrq52syv0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Nov 2018 12:02:56 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Nov 2018 17:02:53 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 14 Nov 2018 17:02:51 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAEH2ono59375658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Nov 2018 17:02:50 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 194A6A4055; Wed, 14 Nov 2018 17:02:50 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9C76A404D; Wed, 14 Nov 2018 17:02:49 +0000 (GMT) Received: from borneo.home (unknown [9.145.145.105]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 14 Nov 2018 17:02:49 +0000 (GMT) From: Frederic Barrat To: andrew.donnellan@au1.ibm.com, stewart@linux.ibm.com, skiboot@lists.ozlabs.org Date: Wed, 14 Nov 2018 18:02:48 +0100 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 18111417-0028-0000-0000-00000319EAC8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111417-0029-0000-0000-000023D65713 Message-Id: <20181114170249.19966-1-fbarrat@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-14_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811140153 Subject: [Skiboot] [PATCH 1/2] platform/witherspoon: Avoid harmless error message 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: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The I2C read to find out if a device on the GPU slot is an opencapi adapter or nvidia card is reporting an "arbitration loss" error if no device is connected on the GPU slot. That I2C read is actually useless if we already know there's no device connected, so let's skip it. It will avoid logging an harmless error. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan --- platforms/astbmc/witherspoon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index f45f739f..772a7199 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -271,6 +271,13 @@ static void witherspoon_npu2_device_detect(struct npu2 *npu) prlog(PR_DEBUG, "PLAT: Chip %d GPU#1 slot present\n", chip->id); } + /* + * The following I2C ops generate errors if no device is + * present on any SXM2 slot. Since it's useless, let's skip it + */ + if (!gpu0_present && !gpu1_present) + return; + /* Set pins to input */ state = 0xff; rc = i2c_request_send(i2c_port_id, From patchwork Wed Nov 14 17:02:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Barrat X-Patchwork-Id: 997834 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42w9mp1pMlz9rxp for ; Thu, 15 Nov 2018 04:03:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42w9mp0Lh4zF3ck for ; Thu, 15 Nov 2018 04:03:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=fbarrat@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.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 42w9mP2TmKzF3Wh for ; Thu, 15 Nov 2018 04:03:01 +1100 (AEDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAEGwdnW081824 for ; Wed, 14 Nov 2018 12:02:57 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nrn96fxj2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Nov 2018 12:02:56 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Nov 2018 17:02:54 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 14 Nov 2018 17:02:53 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAEH2ppc9634110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Nov 2018 17:02:51 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67565A404D; Wed, 14 Nov 2018 17:02:51 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2BD24A4051; Wed, 14 Nov 2018 17:02:51 +0000 (GMT) Received: from borneo.home (unknown [9.145.145.105]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 14 Nov 2018 17:02:51 +0000 (GMT) From: Frederic Barrat To: andrew.donnellan@au1.ibm.com, stewart@linux.ibm.com, skiboot@lists.ozlabs.org Date: Wed, 14 Nov 2018 18:02:49 +0100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114170249.19966-1-fbarrat@linux.ibm.com> References: <20181114170249.19966-1-fbarrat@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18111417-4275-0000-0000-000002E0F9C4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111417-4276-0000-0000-000037EE0EA5 Message-Id: <20181114170249.19966-2-fbarrat@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-14_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811140153 Subject: [Skiboot] [PATCH 2/2] platform/witherspoon: Fix opencapi lane-mask used on GPU0 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: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" When an opencapi device is used via the Acorn adapter, the link used is connected to the "middle" group of lanes of the obus. We were using the wrong set of lanes. The link was somehow still training, likely because the default settings at power-on were good enough, but it's still wrong. Signed-off-by: Frederic Barrat --- ajd: this is actually easy to test. During the PHY reset, we can leave the lanes in reset, which will fail link training. So we know we're using the correct lanes. platforms/astbmc/witherspoon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index 772a7199..fe138991 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -300,11 +300,11 @@ static void witherspoon_npu2_device_detect(struct npu2 *npu) chip->id); /* * On witherspoon, bricks 2 and 3 are connected to - * the lanes matching links 1 and 0 in OpenCAPI mode. + * the lanes matching links 0 and 1 in OpenCAPI mode. */ - set_link_details(npu, 0, 3, NPU2_DEV_TYPE_OPENCAPI); + set_link_details(npu, 1, 3, NPU2_DEV_TYPE_OPENCAPI); /* We current don't support using the second link */ - set_link_details(npu, 1, 2, NPU2_DEV_TYPE_UNKNOWN); + set_link_details(npu, 0, 2, NPU2_DEV_TYPE_UNKNOWN); } else { prlog(PR_DEBUG, "PLAT: Chip %d GPU#0 is NVLink\n", chip->id);