From patchwork Thu Mar 19 08:39:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anju T Sudhakar X-Patchwork-Id: 1258038 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 48jgLx6kFFz9sPR for ; Thu, 19 Mar 2020 19:39:37 +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 48jgLx5TCVzDr3p for ; Thu, 19 Mar 2020 19:39:37 +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=anju@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 48jgLn6GcwzDr3T for ; Thu, 19 Mar 2020 19:39:29 +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 02J8XVTd103708 for ; Thu, 19 Mar 2020 04:39:27 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yu862tper-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Mar 2020 04:39:27 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Mar 2020 08:39:25 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) 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) Thu, 19 Mar 2020 08:39:22 -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 02J8dLvA27525156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2020 08:39:21 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18810A404D; Thu, 19 Mar 2020 08:39:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7EFDFA4040; Thu, 19 Mar 2020 08:39:19 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.199.49.12]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 19 Mar 2020 08:39:19 +0000 (GMT) From: Anju T Sudhakar To: skiboot@lists.ozlabs.org Date: Thu, 19 Mar 2020 14:09:15 +0530 X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 20031908-0028-0000-0000-000003E76E44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20031908-0029-0000-0000-000024ACC8BB Message-Id: <20200319083915.18082-1-anju@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-19_01:2020-03-18, 2020-03-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_definite policy=outbound score=100 phishscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 clxscore=1011 impostorscore=0 mlxlogscore=578 mlxscore=0 suspectscore=0 adultscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003190039 Subject: [Skiboot] [PATCH] hw/imc: Add error message on failing cases for imc_init 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: maddy@linux.ibm.com Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Madhavan Srinivasan Add couple of more debug messages to understand possible fail in imc_init(). Currently the only message printed is "IMC Devices not added" which is not very helpful when debugging. Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- hw/imc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/hw/imc.c b/hw/imc.c index 08d94011..927fba0b 100644 --- a/hw/imc.c +++ b/hw/imc.c @@ -544,8 +544,10 @@ void imc_init(void) return; wait_xz_decompress(imc_xz); - if (imc_xz->status != OPAL_SUCCESS) + if (imc_xz->status != OPAL_SUCCESS) { + prerror("IMC: xz_decompress failed\n"); goto err; + } /* * Flow of the data from PNOR to main device tree: @@ -559,8 +561,10 @@ void imc_init(void) /* Create a device tree entry for imc counters */ dev = dt_new_root("imc-counters"); - if (!dev) + if (!dev) { + prerror("IMC: Failed to add an imc-counters root node\n"); goto err; + } /* * Attach the new decompress_buf to the imc-counters node. @@ -568,6 +572,7 @@ void imc_init(void) */ if (dt_expand_node(dev, imc_xz->dst, 0) < 0) { dt_free(dev); + prerror("IMC: dt_expand_node failed\n"); goto err; } @@ -600,8 +605,10 @@ imc_mambo: * then out to band tools will race with ucode and end up getting * undesirable values. Hence pause the ucode if it is already running. */ - if (pause_microcode_at_boot()) + if (pause_microcode_at_boot()) { + prerror("IMC: Pausing ucode failed\n"); goto err; + } /* * If the dt_attach_root() fails, "imc-counters" node will not be @@ -610,6 +617,7 @@ imc_mambo: */ if (!dt_attach_root(dt_root, dev)) { dt_free(dev); + prerror("IMC: Failed to attach imc-counter node to dt root\n"); goto err; }