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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44268C6FD1F for ; Tue, 2 Apr 2024 10:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7II8VlbWinX1WFCSGLh1/YCuYjloqqLKBTjiXbSQrnE=; b=4COCTpPWuMH36W 3D1rnheA9JNzFEse7i9do5hUPQHV73WlJdcOboDel03desJFG7Wa09KGoegRZS4hS5o4vCcYPxeHs 9Vj0qNUXohCPf9FlTMu0A8h6DaBTAFbyWoSmstJwbvz9mIQ6NukyuAdqvUaWEgVnyH8MaRCJiWRQ5 9/y0SjZag7HPBEMkEhc/abKiiH4WUb4/cbFkuwexyGUOfCxJ6qFlmyrzAUmw2sbr1ObSc/pElBvM0 shUcGMlbvCNpvQNcbpubXpF/UxQw6is9pU+cVIO0jSV9JSdihuFGcdUOsbCpArvJdqJnGP7Ek7qjt 9axY6A8gLKeTQsrV0qVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrbOj-0000000AedJ-2Wcf; Tue, 02 Apr 2024 10:29:45 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrbOg-0000000Aec5-2s7e for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 10:29:44 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C811DFEC; Tue, 2 Apr 2024 03:30:11 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3BBAE3F766; Tue, 2 Apr 2024 03:29:38 -0700 (PDT) Date: Tue, 2 Apr 2024 11:29:35 +0100 From: Sudeep Holla To: David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, Sudeep Holla , Catalin Marinas , Will Deacon , Robert Moore , "Rafael J. Wysocki" , Len Brown , mediou@amazon.de, alisaidi@amazon.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Saket Dumbre Subject: Re: [PATCH 2/2] arm64: acpi: Honour firmware_signature field of FACS, if it exists Message-ID: References: <20240312134148.727454-1-dwmw2@infradead.org> <20240312134148.727454-2-dwmw2@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_032942_810962_3F333BC5 X-CRM114-Status: GOOD ( 27.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Apr 02, 2024 at 10:29:57AM +0100, David Woodhouse wrote: > On Tue, 2024-03-12 at 13:41 +0000, David Woodhouse wrote: > > From: David Woodhouse > > = > > If the firmware_signature changes then OSPM should not attempt to resume > > from hibernate, but should instead perform a clean reboot. Set the glob= al > > swsusp_hardware_signature to allow the generic code to include the value > > in the swsusp header on disk, and perform the appropriate check on resu= me. > > = > > Signed-off-by: David Woodhouse > = > Ping? > = > > --- > > =A0arch/arm64/kernel/acpi.c | 10 ++++++++++ > > =A01 file changed, 10 insertions(+) > > = > > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > > index dba8fcec7f33..e0e7b93c16cc 100644 > > --- a/arch/arm64/kernel/acpi.c > > +++ b/arch/arm64/kernel/acpi.c > > @@ -26,6 +26,7 @@ > > =A0#include > > =A0#include > > =A0#include > > +#include > > =A0#include > > =A0 > > =A0#include > > @@ -227,6 +228,15 @@ void __init acpi_boot_table_init(void) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (earlycon_acpi_spcr_= enable) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0early_init_dt_scan_chosen_stdout(); > > =A0=A0=A0=A0=A0=A0=A0=A0} else { > > +#ifdef CONFIG_HIBERNATION > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0struct acpi_table_header = *facs =3D NULL; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0acpi_get_table(ACPI_SIG_F= ACS, 1, &facs); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (facs) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0s= wsusp_hardware_signature =3D > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0((struct acpi_table_facs *)facs)->hardware_signatur= e; > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0a= cpi_put_table(facs); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0} > > +#endif I think it is OK as a temporary solution for now. But there was some investigation last year as part of some work in Linaro to enable "drivers/acpi/sleep.c" into the build cleaning up some x86-ness in there. acpi_sleep_hibernate_setup() already does this but enabling sleep.c need some careful investigation so that it doesn't break any existing arm64/x86 platforms and made need some wordings clarification in the ACPI spec. Today system suspend work via psci std path bypassing the ACPI paths which may not be ideal as none of the ACPI methods are honoured. Some arm64 platforms may implement them and expect to be executed in the future, maybe ? So, until that happens, I see this as an possible alternative and temporary solution. Acked-by: Sudeep Holla -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel