From patchwork Tue Oct 22 21:22:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Arbab X-Patchwork-Id: 1181683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 46yRLB5QVWz9sPL for ; Wed, 23 Oct 2019 08:22:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46yRLB4KxHzDqNp for ; Wed, 23 Oct 2019 08:22:42 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=arbab@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 46yRL33vtCzDqHv for ; Wed, 23 Oct 2019 08:22:31 +1100 (AEDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9MLJQqJ036224 for ; Tue, 22 Oct 2019 17:22:28 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vt9d8ggbp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 Oct 2019 17:22:28 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9MLK74N018429 for ; Tue, 22 Oct 2019 21:22:27 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04dal.us.ibm.com with ESMTP id 2vqt47agtk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 Oct 2019 21:22:27 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9MLMQwT65798634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 22 Oct 2019 21:22:26 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF9F1BE053 for ; Tue, 22 Oct 2019 21:22:25 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8973BE04F for ; Tue, 22 Oct 2019 21:22:25 +0000 (GMT) Received: from arbab-laptop.localdomain (unknown [9.53.179.210]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 21:22:25 +0000 (GMT) Received: by arbab-laptop.localdomain (Postfix, from userid 152845) id 0CC744654A3; Tue, 22 Oct 2019 16:22:25 -0500 (CDT) From: Reza Arbab To: skiboot@lists.ozlabs.org Date: Tue, 22 Oct 2019 16:22:23 -0500 Message-Id: <1571779344-28464-4-git-send-email-arbab@linux.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1571779344-28464-1-git-send-email-arbab@linux.ibm.com> References: <1571779344-28464-1-git-send-email-arbab@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-10-22_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=958 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910220182 Subject: [Skiboot] [PATCH 3/4] npu3: Improve SALT log output 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" Add a log line for when the PPE indicates it's not in the ready state, and make all the SALT lines start with a capital to look nicer. Signed-off-by: Reza Arbab --- hw/npu3-nvlink.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/npu3-nvlink.c b/hw/npu3-nvlink.c index 0a185a1780be..3457b7314c35 100644 --- a/hw/npu3-nvlink.c +++ b/hw/npu3-nvlink.c @@ -1223,8 +1223,10 @@ static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf, /* Check for another command in progress */ val = npu3_dev_ppe_sram_read(dev, OB_PPE_SALT_CMD); - if (GETFIELD(OB_PPE_SALT_CMD_READY, val)) + if (GETFIELD(OB_PPE_SALT_CMD_READY, val)) { + NPU3DEVINF(dev, "SALT_CMD 0x%x: Not ready\n", cmd_reg); return OPAL_BUSY; + } val = OB_PPE_SALT_CMD_READY; val = SETFIELD(OB_PPE_SALT_CMD_RW, val, write); @@ -1240,7 +1242,7 @@ static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf, while (GETFIELD(OB_PPE_SALT_CMD_READY, val)) { if (tb_compare(mftb(), timeout) == TB_AAFTERB) { - NPU3DEVINF(dev, "SALT_CMD 0x%x: timeout\n", cmd_reg); + NPU3DEVINF(dev, "SALT_CMD 0x%x: Timeout\n", cmd_reg); return OPAL_BUSY; } @@ -1248,7 +1250,7 @@ static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf, } if (GETFIELD(OB_PPE_SALT_CMD_ERR, val)) - NPU3DEVINF(dev, "SALT_CMD 0x%x: error\n", cmd_reg); + NPU3DEVINF(dev, "SALT_CMD 0x%x: Error\n", cmd_reg); if (!write) *data = GETFIELD(OB_PPE_SALT_CMD_DATA, val);