From patchwork Tue Sep 29 11:57:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Madhavan Srinivasan X-Patchwork-Id: 1373336 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 4C0ybL5bDWz9sTC for ; Tue, 29 Sep 2020 21:58:54 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.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=PDxhfHUl; 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 4C0ybL36r8zDqYB for ; Tue, 29 Sep 2020 21:58:54 +1000 (AEST) 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=maddy@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.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=PDxhfHUl; dkim-atps=neutral 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 4C0yZC16HDzDqY7; Tue, 29 Sep 2020 21:57:54 +1000 (AEST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08TBhQEY092228; Tue, 29 Sep 2020 07:57:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=rh0OFOw4euW7e4oC9LqkwlccGxvw/+yRXkwcCgAnNno=; b=PDxhfHUl5r+Z3YISxPY5EhU/hJRnI+1tdgRLboPV5M/7dskwT2XlLN0NSJTFlwXFQD1z roUX3px5VfMiKtcZsb5tOhh0BCBdP6qPq0PRgdDkEAh9QaGaMVWXtbRhzQrPQ4+L/EYY Eax4IHSpTWkJxwFieUqWisaq1TC09RaRD8vHrTRIoJx997xaYxcZSInZ65yh1+axQsdN PqGf5lpPhjUPeSB512Jv1aZqIFk+uoa/Glvw/j9+JAIoIfWKsoRkn62+OmXuZPHQTapv xkVuoEAX2j0YOuL2SDxFvNsYgzlAZsVwNZkwuCHB5DT3atekLxKhCmZ6rftrOBjmc5tU vw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 33v49x0cyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 07:57:52 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08TBi8Xw093374; Tue, 29 Sep 2020 07:57:52 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 33v49x0cxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 07:57:51 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08TBul9s001578; Tue, 29 Sep 2020 11:57:50 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04ams.nl.ibm.com with ESMTP id 33sw97u8jj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 11:57:50 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08TBvmtb31850866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2020 11:57:48 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18824AE045; Tue, 29 Sep 2020 11:57:48 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BF03AE04D; Tue, 29 Sep 2020 11:57:46 +0000 (GMT) Received: from localhost.name (unknown [9.85.86.6]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 29 Sep 2020 11:57:46 +0000 (GMT) From: Madhavan Srinivasan To: oohall@gmail.com Date: Tue, 29 Sep 2020 17:27:13 +0530 Message-Id: <20200929115713.1082952-2-maddy@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200929115713.1082952-1-maddy@linux.ibm.com> References: <20200929115713.1082952-1-maddy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-29_03:2020-09-29, 2020-09-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 suspectscore=3 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009290098 Subject: [Skiboot] [PATCH 2/2] hw/imc: Disable only nest_imc devices if pause_microcode() fails 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: skiboot@lists.ozlabs.org, skiboot-stable@lists.ozlabs.org, Madhavan Srinivasan Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" During opal boot, in imc_init(), 24x7/IMC microcode state is checked and if it is not in running or pause state, currently all the imc devices are removed from device tree. Instead, remove only the nest imc devices. Core/Thread/Trace imc devices are not related to 24x7 microcode. Patch adds a function to remove specific imc device type and the same is used, when pause_microcode() fails, to remove nest imc device types from the device tree. Signed-off-by: Madhavan Srinivasan --- hw/imc.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/imc.c b/hw/imc.c index 63488b9b..c186da04 100644 --- a/hw/imc.c +++ b/hw/imc.c @@ -411,6 +411,20 @@ static void disable_unavailable_units(struct dt_node *dev) return; } +static void disable_imc_type_from_dt(struct dt_node *dev, int imc_type) +{ + struct dt_node *node; + + dt_for_each_compatible(dev, node, "ibm,imc-counters") { + if (get_imc_device_type(node) == imc_type) { + dt_free(node); + node = NULL; + } + } + + return; +} + /* * Function to queue the loading of imc catalog data * from the IMC pnor partition. @@ -606,8 +620,8 @@ imc_mambo: * undesirable values. Hence pause the ucode if it is already running. */ if (pause_microcode_at_boot()) { - prerror("IMC: Pausing ucode failed\n"); - goto err; + prerror("IMC: Pausing ucode failed, disabling nest imc\n"); + disable_imc_type_from_dt(dev, IMC_COUNTER_CHIP); } /*