From patchwork Fri Nov 27 06:51:29 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: 1407008 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 4Cj4zx5SfLz9sSf for ; Fri, 27 Nov 2020 17:51:57 +1100 (AEDT) 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=YP0WPZWj; 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 4Cj4zx2pj8zDrfh for ; Fri, 27 Nov 2020 17:51:57 +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.156.1; helo=mx0a-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=YP0WPZWj; dkim-atps=neutral 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 4Cj4zl5gMGzDrPl for ; Fri, 27 Nov 2020 17:51:46 +1100 (AEDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AR6WYRl030960 for ; Fri, 27 Nov 2020 01:51:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=pO7l6gUG3I12do+jTSSOi3uD23HV1JRs2H3y/rPocu8=; b=YP0WPZWjXMWaJ03j+mgggRE5yA3DVp2P35kmZLhSzW85t8HPa4eb/FDYiwBNQgbWaimV LfCufc8nyHSjiw6djoiwUg8rpsKA7z2BiMXO80cXF5WQ3hCXILT9cnZYcpD/c1yfT0ui efEZEdLhJadutIXbeJKIqi3fnZGa908ewQd4dvBPc7CvOFzIaslOK6wD4QmZovuSzDOa gVr0GZIK5NHd3CShrK0UjLuUGcgKuy4lwcrjOQC/svYhOgAKBsXTtKe7rR6Pqdf04I3K 6x7gouRZtD6T2aYco+SjLLIbSmraN+dD/+rkOKXdxGWvNjuDAS3Ld9vQNgyC0rDJL2vS HA== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 352urr11ux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Nov 2020 01:51:43 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AR6lnkC013111 for ; Fri, 27 Nov 2020 06:51:42 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma01dal.us.ibm.com with ESMTP id 34xth9yydd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Nov 2020 06:51:42 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AR6pf8v9503460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Nov 2020 06:51:41 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A34F12405B; Fri, 27 Nov 2020 06:51:41 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20D10124053; Fri, 27 Nov 2020 06:51:41 +0000 (GMT) Received: from sofia.ibm.com (unknown [9.199.53.28]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 27 Nov 2020 06:51:41 +0000 (GMT) Received: by sofia.ibm.com (Postfix, from userid 1000) id B313D2E328C; Fri, 27 Nov 2020 12:21:33 +0530 (IST) From: "Gautham R. Shenoy" To: Vasant Hegde , skiboot@lists.ozlabs.org Date: Fri, 27 Nov 2020 12:21:29 +0530 Message-Id: <1606459889-15428-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.312, 18.0.737 definitions=2020-11-27_01:2020-11-26, 2020-11-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011270035 Subject: [Skiboot] [PATCH v3] 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: Pavaman Subramaniyam , "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 reduces the severity of the log from PR_ERROR to PR_INFO for the xscom read and write made via OPAL calls. Tested-by: Pavaman Subramaniyam Signed-off-by: Gautham R. Shenoy Print info only for xscom read/writes made via opal calls Signed-off-by: Gautham R. Shenoy --- hw/xscom.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/hw/xscom.c b/hw/xscom.c index 0eda567..c97740a 100644 --- a/hw/xscom.c +++ b/hw/xscom.c @@ -373,7 +373,16 @@ 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 an OPAL call XSCOM read fails, then the OPAL-PRD will + * handle logging the error. Hence just print an + * informational message here. + */ + if (this_cpu()->current_token == OPAL_XSCOM_READ) + prlog(PR_INFO, "XSCOM: Read failed, ret = %lld\n", ret); + else + prerror("XSCOM: Read failed, ret = %lld\n", ret); + return ret; } @@ -424,8 +433,16 @@ static int __xscom_write(uint32_t gcid, uint32_t pcb_addr, uint64_t val) */ if (proc_gen == proc_gen_p9 && ret == OPAL_XSCOM_CHIPLET_OFF) return ret; + /* + * If an OPAL call XSCOM write fails, then the OPAL-PRD will + * handle logging the error. Hence just print an + * informational message here. + */ + if (this_cpu()->current_token == OPAL_XSCOM_WRITE) + prlog(PR_INFO, "XSCOM: Write failed, ret = %lld\n", ret); + else + prerror("XSCOM: Write failed, ret = %lld\n", ret); - prerror("XSCOM: Write failed, ret = %lld\n", ret); return ret; }