Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1970698lqz; Tue, 2 Apr 2024 03:29:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7wVdFYiV+kSqhIvz2JnXvgwmzYJ571DZpn6ns9coMypSC+GsVKAPfAz9WaLOrJSY9u7LWKllY7/LG/FIElQsP3JeiJ8toIow1laFwLQ== X-Google-Smtp-Source: AGHT+IFTgP9SQj43suwu+h4Hqluzew0keksKWfW2RYdfBmtY+owJBf6jtu4TIDvShJQ9Z4Rrd5SA X-Received: by 2002:ac8:59c8:0:b0:431:4e0f:2f2c with SMTP id f8-20020ac859c8000000b004314e0f2f2cmr14469370qtf.38.1712053790559; Tue, 02 Apr 2024 03:29:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712053790; cv=pass; d=google.com; s=arc-20160816; b=ajzVJEGHImdNjyr8pcfNy2AwgoaW0ZpL7LTDjs8nC0tqxPdjKnwrYe3ia1nX9K19S1 +L8sV8tzPyQP5f8A4qGRP7IWp09i+/Rc56fFEoSuo/xKycamnimEbyEO7WNbDYW6fxfy XQeiWDXx6n/JPauSK1nxBGVMTwJU3vSUV/PD4MeJhZimXv3iVDilIigR2LsE5G1KKyb8 g9u5so0KHesOGqcdt9irAVfNX2cpxdusJ/9HbwP+jOCxq66657z2LfFbhMjh4Ncy9Hu/ MlyHowtGUbUQbI2Eew/zaaDLFUwKkOYeUb9Yy6cvrxsZoeOBoDyrI8hVz4gjySZhpYaX HSXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=fVP9hfubDvptQX63kyeYpPLDGQVFmXGdkzNvlSlBjk4=; fh=FLGZkxOZYojluX5a43DX8r6lYcxEp604tkcKfS4Jazc=; b=cyAbJnVeugTj32W442NhoH2bcqXqXPtARE8HUuAcRJy4z5+Fa93IRIAPT55UCZa0jO bLwj8XVFC1j/kykBfp6+cXHZqFS7ra+C3a0yknezbXh3/+grwFgTeyJezBcodI9w1PyX 4HQgr1TWKq44wapVf6P7Ol0VFqFOsXwNQcXNpFL02OVoyV8lJXBb+ctTfCYtO7tneLaq lZITr1OF76kNJmsJ0yz5H6R94gnsE5xcxYIw9jRyiUwBK+4XLpqdgU87BvPKx/ABpI2j LvbxPaL0rouCj/IgLJkp4OYH+sJaFamfzIZxK/eGV/TfnAdd965PQiQ8TCpjwpVkyD7r x19A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-127729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id er10-20020a05622a5e8a00b00432e3716358si4922950qtb.762.2024.04.02.03.29.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 03:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-127729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4AE7B1C20BD0 for ; Tue, 2 Apr 2024 10:29:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 949CF5D494; Tue, 2 Apr 2024 10:29:43 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 756345B5D6; Tue, 2 Apr 2024 10:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712053783; cv=none; b=b5RtPfDTyYrh8l/vj7pKNe2H1NWqXS2n6WaR8x8tHM0NaU06NqF4G3bgeRfvp38PXPsW33pWSSUN3ZpyQq4DxICqt7aUAVv3UfO1SQ+glEVfu5Q4Qy05UnU6CIl9iTIVCAVcdw8lh4oj0zxlyWh907kjA+NQwRtRE6H2igX7WQU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712053783; c=relaxed/simple; bh=0PLxVVExlBoCSyhGw16os7pDNVu9PcLykdvcokxzKlk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KhFdQb2kiZpg28fEIBeAJX7tHl4glEibNGguKyqi3OU6uwJ4k+iidZMWWJ3gP8Alt9M7lMMpVrEN/MQJRFFMJQsn9l0Sj8ap8nYSqE9BDwc2jLqvneAxGmTExrm8xr8dWEYNKK8ieVTjxEn6iPofRNgdezCPEowRBA4hHH8FS/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 global > > swsusp_hardware_signature to allow the generic code to include the value > > in the swsusp header on disk, and perform the appropriate check on resume. > > > > Signed-off-by: David Woodhouse > > Ping? > > > --- > > ?arch/arm64/kernel/acpi.c | 10 ++++++++++ > > ?1 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 @@ > > ?#include > > ?#include > > ?#include > > +#include > > ?#include > > ? > > ?#include > > @@ -227,6 +228,15 @@ void __init acpi_boot_table_init(void) > > ????????????????if (earlycon_acpi_spcr_enable) > > ????????????????????????early_init_dt_scan_chosen_stdout(); > > ????????} else { > > +#ifdef CONFIG_HIBERNATION > > +???????????????struct acpi_table_header *facs = NULL; > > +???????????????acpi_get_table(ACPI_SIG_FACS, 1, &facs); > > +???????????????if (facs) { > > +???????????????????????swsusp_hardware_signature = > > +???????????????????????????????((struct acpi_table_facs *)facs)->hardware_signature; > > +???????????????????????acpi_put_table(facs); > > +???????????????} > > +#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