Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1122925lql; Tue, 12 Mar 2024 07:57:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyMF7P7vSM5/lPGwYglUS1mM7Jd+wUWEVU1Yqiaf+JNsVl/FAX11mmekWmqK92TwRfYZaX3maZ+nXSYvhI+ozLB50NfJ6m+cHcnxNpNA== X-Google-Smtp-Source: AGHT+IEe4KgKdc1s8z295n1dxLskz7+7IT3aYAmtBrCzSB8NFmZf2y20xbpC9VlAKOVY7M2Xx90d X-Received: by 2002:a05:6a20:2444:b0:1a1:8a22:19f8 with SMTP id t4-20020a056a20244400b001a18a2219f8mr589421pzc.46.1710255450745; Tue, 12 Mar 2024 07:57:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710255450; cv=pass; d=google.com; s=arc-20160816; b=lIYWUekNOVeQHRE5JPe+a49+Zxt7MsO10rAQbT1WO+iFBeyhzkJRtkqJ30f1Fp3qZd vHQhclkjIVZXyDcNg6z+lqUlBXTMmVv4JZTvMSHwWp257IfN1lBvc07SAkSd8gJSaunv fSlRmaSh2iejddYSfR0/Q0xDelts+pQUqjXiB3WqIOdyD8Zu7QHwGAWyLhYEIBnturpb vOqG19DH1xaNtmcgG/Mnm/yCHEZr0WpBPNG5Lu34wXcSbnYUYj3bX60fSUKknenoaQHO 0joMi8iEWV9PqyuJISnM1Wyt723ryFM3q1p/G4ZjccM1tjdQIpRdWvAEiHxGCpujRd3P Uvcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=afNcz38ZHur08T8xK+zgfWPGvMN0cnA27BpXSiLWcYI=; fh=KOOQwNii067moTJNQo4+/3qOHF2eSwNAN7eB7B1aD1s=; b=eHRtZq15hGr796v0EV4izVtGWsX8sf8RAuOXa9kkxOpAvK9EFYTEIohRDOWxj4czOU 528g9WgllHt/uyzo/p3zfreLShF/bmAFgUSQ2mck1nWzij9fPDLE0ilI/fJOMm2LbwSj xJ6RCASLfHwl87d1CQE+CUuS1SAdqNTynhwzkMZF05eXCHLRgt6BTNBrp1Eehx7Xw2W9 NVRjJpKrwbGowd827t6Xx1yAFh/v1OjQHU1L6IIalYC9iWFHP2x/fggdVIYNakuXI0NN ACOprnYf80ZTs+bFRmXeVajtnb330iCM+Ge11Jjsp0TF5EHXAoigUlg8y3QsoVKUHZoS wvDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rYlrYsh7; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-100297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100297-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o25-20020a637e59000000b005e47d608cbesi6916979pgn.134.2024.03.12.07.57.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rYlrYsh7; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-100297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100297-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D2A5286850 for ; Tue, 12 Mar 2024 13:42:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 909717A708; Tue, 12 Mar 2024 13:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rYlrYsh7" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F4412AE66; Tue, 12 Mar 2024 13:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710250916; cv=none; b=i3lW++PtpueyNLFMX48P8WA1XKtKgDio0mGBjDaeYIs2KyM/5grCOP1OjfMWquEzYtpVRnZ62rHNDNXVDNkT528FxsG+CRkluhKI1JJzrv7uuWTH+ATMHcVxEbZm3ZDXcR7x+WJkNRE8mhTIiwTxQ+vIyBPHPDFowYldnSu5m/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710250916; c=relaxed/simple; bh=FxDY+kZRT1RApJ1t6STPTz8JjYr743x0+SzzLlFAsTw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OUdH0s99N3MhsleaJlr2HiRtEnz1xM1ym70CrpEHlBrztklQCkAyqkyq62aYFk48X3O5EN+7dls3jt7K1t4A1Y+sWAY91iJvF2cWghI1sogzk30ZaFQGy2Kuf4bmgz5TzPn00vSh1YezAQN1AeAgtgdYaSyuAJhWKPR79SZRzfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=casper.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=rYlrYsh7; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=casper.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=afNcz38ZHur08T8xK+zgfWPGvMN0cnA27BpXSiLWcYI=; b=rYlrYsh75MAHk+v6ElXVZKnHIB 71X829QiPdMXkKz3CfWeKyp4JEnwNoA6w/LT0YNu3LWXp7BmQLzRl4jUZfHN3YMM/FH1J8+7X4KHg MPPPil6RUPzOBsUELC7PlKyCIfFb6nHKiC047G2WcUhhutnwZuH90A+ewM0gluxdwIb0HU+B8crce wC4TwPKywtPWSzVBHwQMRn1uH6xM+vVNE25O6MvriYODW8wAnvx3jbhLWIHJ4WXAkij6A/xy/ehU7 tSe/LnsV2HZ6NEj1vWeVMgrzkSLcEXNtpNfQW08GfhfSmC+3DmlkKyGVGkoyT15P/riUDpe+KK1SR SFZKgYrQ==; Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk2O4-000000037rM-23j8; Tue, 12 Mar 2024 13:41:48 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk2O4-000000033FM-0fbO; Tue, 12 Mar 2024 13:41:48 +0000 From: David Woodhouse To: linux-arm-kernel@lists.infradead.org Cc: 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 Subject: [PATCH 2/2] arm64: acpi: Honour firmware_signature field of FACS, if it exists Date: Tue, 12 Mar 2024 13:41:47 +0000 Message-ID: <20240312134148.727454-2-dwmw2@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312134148.727454-1-dwmw2@infradead.org> References: <20240312134148.727454-1-dwmw2@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 --- 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 acpi_parse_spcr(earlycon_acpi_spcr_enable, true); if (IS_ENABLED(CONFIG_ACPI_BGRT)) acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); -- 2.44.0