From patchwork Tue Sep 29 11:57:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Madhavan Srinivasan X-Patchwork-Id: 1373335 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 4C0yZf2p1Hz9sRR for ; Tue, 29 Sep 2020 21:58:18 +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=gmze72uL; 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 4C0yZf1ql6zDqYP for ; Tue, 29 Sep 2020 21:58:18 +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=mx0b-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=gmze72uL; 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 4C0yZ93nC7zDqLn; Tue, 29 Sep 2020 21:57:51 +1000 (AEST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08TBW8fY160089; Tue, 29 Sep 2020 07:57:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=uxNb7AQrHI9CCfxvpDgnBxgsv+7LZ3h5R+fPsQyQLgE=; b=gmze72uLGKRZOYYf7/6fz6vybZhoZepc9Nq42rWDVIBmo+QEmrbQcmPAblDSxglP3onG fwc1BFdEEr7I9dj8wbRsSN8TS91vfl3bAz/wuCwmjPcEyXH/4dpH1XZgtq153qhO6EZX kog3eCaz25wwL3v+7/RS0pAj24SspycIa9e9P6/HTErIqlu7X8OsnlgYEII2JGcJGhsU 3F5gauL2YkA9RiWt2st3LoaNuQDDTGrAREvajrX9DznF2CDOvr+9qk6ICP/VAObP2Ncd 3uDKmnk/HoDYi9TvQF63zgBrE6vEpH0F7xgzGJwX23s5XxmNL08X7TfWMtv710xRVaCG 4w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33v38atbnd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 07:57:48 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08TBWIC0160589; Tue, 29 Sep 2020 07:57:48 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 33v38atbmn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 07:57:48 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08TBqBsH019269; Tue, 29 Sep 2020 11:57:45 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma01fra.de.ibm.com with ESMTP id 33sw989pdp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2020 11:57:45 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08TBvh0T31392164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2020 11:57:43 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 912B3AE04D; Tue, 29 Sep 2020 11:57:43 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDBFBAE053; Tue, 29 Sep 2020 11:57:41 +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:41 +0000 (GMT) From: Madhavan Srinivasan To: oohall@gmail.com Date: Tue, 29 Sep 2020 17:27:12 +0530 Message-Id: <20200929115713.1082952-1-maddy@linux.ibm.com> X-Mailer: git-send-email 2.26.2 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 mlxscore=0 lowpriorityscore=0 suspectscore=1 spamscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 clxscore=1011 adultscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009290098 Subject: [Skiboot] [PATCH 1/2] hw/imc: move imc_init() towards end main_cpu_entry() 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" imc_init() checks for the 24x7 microcode state at boot to check whether the microcode is in proper state (running or paused). But in a larger system, loading of 24x7 microcode by OCC gets delayed. Because of this, imc_init() removes imc devices from the device tree. Moving imc_init() function towards end of the main_cpu_entry() works around this. Signed-off-by: Madhavan Srinivasan --- core/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/init.c b/core/init.c index 1289805f..da003e21 100644 --- a/core/init.c +++ b/core/init.c @@ -1322,9 +1322,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt) /* NX init */ nx_init(); - /* Init In-Memory Collection related stuff (load the IMC dtb into memory) */ - imc_init(); - /* Probe PHB3 on P8 */ probe_phb3(); @@ -1366,6 +1363,9 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt) /* Add the list of interrupts going to OPAL */ add_opal_interrupts(); + /* Init In-Memory Collection related stuff (load the IMC dtb into memory) */ + imc_init(); + /* Disable protected execution facility in BML */ cpu_disable_pef(); 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); } /*