Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1087856rwd; Thu, 25 May 2023 07:55:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6f5jIOdSE+PnOFfNAbdileLJFHdChBLQls/b8Wz7oja9bs+rKpT+KfXaEv0RDKUym6dAq6 X-Received: by 2002:a17:902:e548:b0:1a6:4b60:3195 with SMTP id n8-20020a170902e54800b001a64b603195mr1843302plf.66.1685026535003; Thu, 25 May 2023 07:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685026534; cv=none; d=google.com; s=arc-20160816; b=tmr7mc6bUA4lYshwz4jxOeJJa+zjv7w07R5eo/MajdVzi2JOnsAn/dlpRtadkW5/I9 PN6BjHtuzU0kgyFsFCdESRm2GaNbATTvO2/o3f6QY6wtulgOMOiDN+8eoLjDenDogOc7 b0ul0P7xO5FEDu4dHOtvx/IhUr64s94LHTm+MJUUPd6lfUBl3x4m/EZb8oaxTROh1Cxi dLIwJXbDkx01YxwcQXd4Ttb4bOwTx0B1+2Jh295xuLRwfvWaUIguzQQaUMyAjy+vllN3 ntsFHtcL4M/cgSNL7LgIJwJkDWSg64Ym1+R/NouJrqHO5hRS3S8HVzeRN9QUrlb0tA0W pDEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PrcdPJRgF1/6efRXBZ3QV/i6PqNRv/YKfNZKYdJ5DH8=; b=UNex6hguL5maYyyIxLN6ejvheyL0/gZbFp/fLA+nuBdRn3vuVoPEcaUf1zbZdKgT3V dX6ypmMHXtR8wvMgBCEn93/98BlcF8VAnXqMtTRsZV0GhWtk+1p+5U3xxHiFvjXa2oB8 NofKwUbN2t4+QYEqjo9kB+tM1S3K3yXUbhNcrzcnJXzjHLdH+2lN3AIigmaKS4nXoakj QNn0ABNE/x1E5nDKDlDrtcmoQa3ccN8Px220dW4QbFoIABabf6tCjedQ3YkeFWKbyk26 Tb3rBAxKPmG+fHqOJyWrRHKryEeutGJqf+LkNFRc6Mi+M71KGF4s3qKVS3XBdi809RCz ENYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Kk8PXdNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a1709029a8a00b001adb9d3bf5bsi667194plp.372.2023.05.25.07.55.22; Thu, 25 May 2023 07:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Kk8PXdNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241608AbjEYOVL (ORCPT + 99 others); Thu, 25 May 2023 10:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241607AbjEYOVI (ORCPT ); Thu, 25 May 2023 10:21:08 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEAD0191 for ; Thu, 25 May 2023 07:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685024466; x=1716560466; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YCkWpWKLi5LA0hLoKYmV6Pn63lRC3AnzJmUk0eTfHn4=; b=Kk8PXdNbevFZ7tPkt421fyb9Tt7zG/F3a4pw6lIjQQg4+ACO2NzwDv+I blYp+tqFXrgEkkYtJu9+q/tBZ7qMuFWybnw9zGM/YdqvtWEQxUi/enkK5 9EH6Sm9BuuANi+WNSRwhxPf06wwVohELijFVM6RTPXdKfNe08ieZOV4MT izx9eEBqitYaEX/7Pr++f9JZEaAXRnefwbO8STV+DkHwfQwZKX+UgIYmW cMdk51TTN94pJZKVJnHlz4iDmKKpMDkyYPaptzDpgxrV7Kmf+M8Drjv8c ZWO2D8r1yaxU2+DBzH7oooSvq5g/QLB8DLa/QvAzvr01KxpTh+GM3d4d4 Q==; X-IronPort-AV: E=Sophos;i="6.00,191,1681196400"; d="asc'?scan'208";a="153919948" 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 07:21:03 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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 07:20:59 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) 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 07:20:57 -0700 Date: Thu, 25 May 2023 15:20:35 +0100 From: Conor Dooley To: Anup Patel CC: Anup Patel , Atish Patra , Alexandre Ghiti , , Alexandre Ghiti , , , , , , Guo Ren , Paul Walmsley , Song Shuai , , Andrew Jones Subject: Re: Bug report: kernel paniced when system hibernates Message-ID: <20230525-citric-waged-a2f78d27eb0c@wendy> References: <20230525-guacamole-swimmer-68048a73baac@wendy> <20230525-postnasal-monopoly-98adb96ffaa1@wendy> <20230525-shrapnel-precut-26500fca4a48@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AIux2bwC0CEBr+0s" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AIux2bwC0CEBr+0s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 25, 2023 at 07:29:46PM +0530, Anup Patel wrote: > On Thu, May 25, 2023 at 7:26=E2=80=AFPM Conor Dooley wrote: > > > > On Thu, May 25, 2023 at 07:13:11PM +0530, Anup Patel wrote: > > > On Thu, May 25, 2023 at 7:08=E2=80=AFPM Conor Dooley wrote: > > > > > > > > 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 firmw= are, the > > > > > > firmware should make sure that it is reserved by using the prop= erty for > > > > > > that purpose :) > > > > > > > > > There is no issue with OpenSBI since it does the right thing by m= arking > > > > > 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. > > > > > > Yes, we are talking about the same thing. It's not just OpenSBI not > > > setting no-map property in reserved memory node because other > > > SBI implementations would be doing the same thing (i.e. not setting > > > no-map property) > > > > Other SBI implementations doing the same thing doesn't make it any more > > correct though, right? >=20 > Like multiple folks suggested, we need DT binding for distinguishing > firmware reserved memory from other reserved memory. And I have agreed with multiple times! > Until that > happens we should either mark hibernate support as experimental > or revert it. That works for me. How about the below? -- >8 -- =46rom 1d4381290a1600eff9b29b8ace6be73955d9726c Mon Sep 17 00:00:00 2001 =46rom: Conor Dooley Date: Thu, 25 May 2023 15:09:08 +0100 Subject: [PATCH] RISC-V: mark hibernation as broken Hibernation support depends on firmware marking its reserved regions as not mappable by Linux. As things stand, the de-facto SBI implementation (OpenSBI) does not do this, and other implementations may not do so either, resulting in kernel panics during hibernation ([1], [2]). Disable support for hibernation until such time that an SBI implementation independent way to communicate what regions are reserved has been agreed upon. Reported-by: Song Shuai Link: https://lore.kernel.org/all/CAAYs2=3DgQvkhTeioMmqRDVGjdtNF_vhB+vm_1dH= JxPNi75YDQ_Q@mail.gmail.com/ [1] Reported-by: JeeHeng Sia Link: https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/ITXwaKfA6z8 Signed-off-by: Conor Dooley --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 13f058490608..b2495192f35a 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -801,7 +801,7 @@ menu "Power management options" source "kernel/power/Kconfig" =20 config ARCH_HIBERNATION_POSSIBLE - def_bool y + def_bool n =20 config ARCH_HIBERNATION_HEADER def_bool HIBERNATION --=20 2.39.2 --AIux2bwC0CEBr+0s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZG9usgAKCRB4tDGHoIJi 0o+bAQC85DODqSEm+RKOlB9eGicWZIkp8ZTsFWp6dFDXuf2vnQEAro2D8OY5ZsL8 p9xN+HrUuCPopNZZedQoTMeZzPSUkwQ= =Ks3R -----END PGP SIGNATURE----- --AIux2bwC0CEBr+0s--