From patchwork Thu Oct 1 17:33:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gautham R Shenoy X-Patchwork-Id: 1375328 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C2KxF55yrz9sSf for ; Fri, 2 Oct 2020 03:34:09 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=KhyiqRZh; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C2KxC5DJmzDqZH for ; Fri, 2 Oct 2020 03:34:07 +1000 (AEST) 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=mx0b-001b2d01.pphosted.com; envelope-from=ego@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=KhyiqRZh; dkim-atps=neutral Received: from mx0b-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 4C2Kx50MmbzDqW5 for ; Fri, 2 Oct 2020 03:34:00 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091HWW0x173654 for ; Thu, 1 Oct 2020 13:33:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=Rp/FLtyWVF+vexhx/M8tkZgbE6fYtv4+2cY8ZW1Vz0A=; b=KhyiqRZhlScF+teXMEkXkx0/KwNoDBorH+LYMiBLWWWmz32vXUc3+xpInWZw+Tvqcvif 91yO49zXaMzM78HF03GKTwrKkcVPhGF1mtefUyMRBwJ1X70ybryx3T6aZVL8h61GT4rJ vi6QRLpIyEicTm9jqV2NDGJtCAeashjMvVy1P4/MZzenWTrbV2p543Bi2Js9M3B9jGE0 6nyB1cBwvrJr6Og+dcRyn6IBdCh3JBx26Ug33LryV02jG1D/QkWXW/+leFoER/Ldbxc+ +F1XR+qjx/zZukcxZ79Lj75Lhjzxjlz/Nie7W77H0Kg1Lz2KXJAjtxDL2lkbxfD9NSZP jw== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 33wkjdg37v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Oct 2020 13:33:57 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091HVvRo019017 for ; Thu, 1 Oct 2020 17:33:56 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma04dal.us.ibm.com with ESMTP id 33sw99vbk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Oct 2020 17:33:56 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HXtqZ43319784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:33:55 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D02C3124053; Thu, 1 Oct 2020 17:33:55 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DF27124052; Thu, 1 Oct 2020 17:33:55 +0000 (GMT) Received: from sofia.ibm.com (unknown [9.79.216.129]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:33:55 +0000 (GMT) Received: by sofia.ibm.com (Postfix, from userid 1000) id 88D922E4682; Thu, 1 Oct 2020 23:03:49 +0530 (IST) From: "Gautham R. Shenoy" To: skiboot@lists.ozlabs.org Date: Thu, 1 Oct 2020 23:03:47 +0530 Message-Id: <1601573627-31054-1-git-send-email-ego@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_06:2020-10-01, 2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxlogscore=772 mlxscore=0 adultscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 suspectscore=1 clxscore=1011 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010144 Subject: [Skiboot] [PATCH] xscom: Fix xscom error logging caused due to xscom OPAL call 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: "Gautham R. Shenoy" MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: "Gautham R. Shenoy" Commit 80fd2e963bd4 ("xscom: Don't log xscom errors caused by OPAL calls") ensured that xscom errors caused due to XSCOM read/write OPAL calls aren't logged in the error-log since the caller of the OPAL call is expected to handle it. However we are continuing to print the prerror() in the OPAL log regarding the same. This patch ensures that we do not log these errors in the OPAL-log as well. Tested-by: Pavaman Subramaniyam Signed-off-by: Gautham R. Shenoy --- hw/xscom.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/xscom.c b/hw/xscom.c index 0eda567..518a415 100644 --- a/hw/xscom.c +++ b/hw/xscom.c @@ -373,7 +373,14 @@ static int __xscom_read(uint32_t gcid, uint32_t pcb_addr, uint64_t *val) if (proc_gen == proc_gen_p9 && ret == OPAL_XSCOM_CHIPLET_OFF) return ret; - prerror("XSCOM: Read failed, ret = %lld\n", ret); + /* + * If we're in an XSCOM opal call then opal-prd will handle + * logging the error. If not, log it. + */ + if (this_cpu()->current_token != OPAL_XSCOM_READ && + this_cpu()->current_token != OPAL_XSCOM_WRITE) + prerror("XSCOM: Read failed, ret = %lld\n", ret); + return ret; }