From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08325C77B7A for ; Thu, 25 May 2023 13:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241302AbjEYNig (ORCPT ); Thu, 25 May 2023 09:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241201AbjEYNie (ORCPT ); Thu, 25 May 2023 09:38:34 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3051AE4E for ; Thu, 25 May 2023 06:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685021898; x=1716557898; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7/MPnMSTTqvi1h2V28m7HvVkRafCnNib35+NgbBtu4I=; b=iUqrv4dJh4xPsLSq1R5ptPyeXBmfArWU3yNjjUhb6am12g08fbUMQ2id Qxs5m1r680A7Xq8VcAK3xv2WljMpBKk115ox9jnYG4AqVovOD5vPFGzNY 2a1bUiOlWaqVHGATO4TdsNgIQtzaBB6ArTGpc1R70/sMfOg3Q21HnpVsp zuqkSOWpbkfoxnwfMys50g9PWnOUAx9Bv4p7kqpAPo63zy/rolR6H0xBM obrqoDgJ0UXD+2Ly79NpvwZdBa39Xjn0uCoe0VpUq9VKkLBxsOVlE+fUl /OoSFuLUW4MNR8LQXRTd72/mK0DqgnmsKTDgY3TPTsh704snonIovB5E3 w==; X-IronPort-AV: E=Sophos;i="6.00,191,1681196400"; d="asc'?scan'208";a="153913613" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 May 2023 06:38:08 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 25 May 2023 06:38:08 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 25 May 2023 06:38:05 -0700 Date: Thu, 25 May 2023 14:37:43 +0100 From: Conor Dooley To: Anup Patel CC: Atish Patra , Alexandre Ghiti , , Alexandre Ghiti , , Anup Patel , , , , , Guo Ren , Paul Walmsley , Song Shuai , , Andrew Jones Subject: Re: Bug report: kernel paniced when system hibernates Message-ID: <20230525-postnasal-monopoly-98adb96ffaa1@wendy> References: <20230517-preacher-primer-f41020b3376a@wendy> <20230525-guacamole-swimmer-68048a73baac@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JrOGZxtEPS2oo1aX" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JrOGZxtEPS2oo1aX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 25, 2023 at 06:51:28PM +0530, Anup Patel wrote: > > We should only rely on this node name for known bad versions of opensbi > > IMO. Going forward, if something needs to be reserved for firmware, the > > firmware should make sure that it is reserved by using the property for > > that purpose :) > There is no issue with OpenSBI since it does the right thing by marking > memory as reserved in the DT. This real issue is with the kernel handling > of reserved memory for hibernate. I don't think we are talking about the same thing here. I meant the no-map property which OpenSBI does not set. > Like Atish mentioned, not just OpenSBI, there will be other entities > (like TSM) or some other M-mode firmware which will also reserve > memory in DT/ACPI so clearly kernel needs a SBI implementation > independent way of handling reserved memory for hibernate. > > > Another option is to use compatible string or label property to indicate > > > that this memory region is not to be saved/restored during hibernation. > > > This can be documented in RISC-V DT bindings as well as the booting guide > > > doc that alex was talking about. > > > > Sure, a dt-binding for sbi reserved regions doesn't immediately sound > > like an awful idea... But we still have to work around the borked > > firmware - be that disabling hibernation or using the mmode_resv node > > when we know that the version of OpenSBI is one of those with the > > problem. Did you skip over this? I was agreeing that defining a common binding for sbi reserved regions was a good idea. --JrOGZxtEPS2oo1aX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZG9kpwAKCRB4tDGHoIJi 0p+GAQCn1Y7yJhVNQl0WAf2V+rgtzqGw5oM5zSzgGijoW2F4KQD/X+ycRbX3wKqC IsL+AdtJs3lRjPV4gheoUkWsJcmvAA8= =S5k1 -----END PGP SIGNATURE----- --JrOGZxtEPS2oo1aX--