Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp64764lql; Fri, 12 Apr 2024 04:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbzTaOL+8pITPb75AVvf878pG4XVCrf9yLS8XmwwLXX52u4I4TL1vIB9U5rZnq2WRD3n40yxwTctCo0IcQ02FTy0IPm7tL1GLFvvRXkg== X-Google-Smtp-Source: AGHT+IGK2e568P1w3NHSNWZezi5oJktxPefJ+8/MeM31KlIcURSPBFhkvHbh4uQhh1ZTsih2FmIS X-Received: by 2002:a05:6359:5146:b0:17f:837b:da8 with SMTP id oc6-20020a056359514600b0017f837b0da8mr2037546rwb.22.1712919852050; Fri, 12 Apr 2024 04:04:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712919852; cv=pass; d=google.com; s=arc-20160816; b=NxsLKMg4GkPy/qJDtyVMBPkEruq7f5ce7ZH8GUpJX7Fs2fEjWBFtS7/HXf+ZeVF3MX pIV2zzKvIxbtgdLTQpnsoZp+yMXTGSlAcBbB6ETPmlxkfCkombj316ROh4rejcHYYOYd U3idOoxRxHV65wL71sTwe5UnFZG+a+CiVQ2EQnas3o11Y5NUsLNWggG8OI8kORUbI5x4 aib66Qk1E8lXZeloJC3PohLqaHi7E6dI8XuVlwEgHr6sGaPIjpaV5zc3ftRGsAsqdmlX jV1MV+M1dx546MX4U8O3jcKVlmh8QiFKfHGhchcrDUcGYZ0sqS2/SObmTVtdByH/coTj CGpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:sender:cc:to :subject:date:from:message-id:references:in-reply-to:dkim-signature; bh=GHkEo0uIXHettMVCbsHimID5bYVEU0q/Ed8abuN0cqo=; fh=vQgF6PIoX2P+SMbfqNmXfWTWrLFinRAgzqVjYI7u3Y0=; b=04+c1/AHzDMHS9R0nku+O0PhWdwPOvlOBHt01Xy6EY1qBdFSlshQXF/TMug6COA3Mc cZHlPFA7DUPoZPqdN6lghcTpl301vf2Zmdkv1Pxeowkj2495lRcDoZlWGukk4K1G+f22 KPHf1EspHyRls4wOXIdyq6qaFEGCv0pWsqR8lKtyxe/2jBbvR8TOHV01osHA+VqAXQcR q4v889OrkBgw2isogT3V/RNWyS/SSSyhyzz3nje2fa31XMHCNV4c1RDqMmo9HZxa01+V g/0pnmUxBSstqstGMjvz+VcPmaEOfs/RdTzLkfr0NsnFe/oduOZSLxQQUUddh6je6tFp LbjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KiUuUVgq; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-142205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142205-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m6-20020a637d46000000b005dc81a30772si3096840pgn.301.2024.04.12.04.04.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 04:04:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KiUuUVgq; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-142205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142205-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9107CB26B15 for ; Fri, 12 Apr 2024 08:06:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2984C535B8; Fri, 12 Apr 2024 08:04:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KiUuUVgq" 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 E2CF355774; Fri, 12 Apr 2024 08:04:25 +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=1712909072; cv=none; b=sRZMDDOlBO9WqCHSilgFg0UFwVVjCgD1xDQKeUan9+i8onVToNx4vhGte2k9fohKk0RNCcM81RxvOyqAY8DAefLZG99bFNQ2dnwJ6jfOMKj+rP7mNyZ5F5o9oaR7kWc6IBUfdLlNQWPSF/GEhCFuDQjzQU2Y0w04QZLrBtJ+dHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712909072; c=relaxed/simple; bh=d7cFxhCB3YkupKziFZ26ogRn5cKTA+vaajWjvO+U5mw=; h=In-Reply-To:References:Message-Id:From:Date:Subject:To:Cc; b=Ev8cWZaZc7GorpT9qiVN5rhqyZerCE9USkwZgwgKzlJeFrjfKKWY3cvI5KQZqIQ7wlJ/1bNTzie5+6oj4m5t81TxkT5Juk9cHcZP+ggvE1DZWo24BbVLU3D19Fj3y26v7NGbmlbGdmXMDsbS8c74R77iV/vAoTrZ59TKudYqfp4= 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=KiUuUVgq; 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:Cc:To:Subject:Date:From: Message-Id:References:In-Reply-To:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GHkEo0uIXHettMVCbsHimID5bYVEU0q/Ed8abuN0cqo=; b=KiUuUVgqBsUbNnmujmNFQgElNs vZoxYrB+KxLxZM8vSWCv7Wb/4/fiOLou9IESxOTDVSW30YLzoQxzONYa02q7gx7TiixdWhtDBq++9 yq/3xK4KOCRAcA9fYeJjAeHU5N3GxU0wNz3+IAN+UHgLPhbdsS9i08JWzSYOhksV/7AZ6wTFiPax2 YGyRJ3Micen4JqhKU5U8SWSj2d60wZPf23KPTBm06XzvUqggj5PN5qy/UJ4NmnLzeG7Y1uek29ekF WtsqJPMJCp0V6rjjByZKuwzsXP/FU/3YxkR2mF//E7u1c3Mm1aB2vY9jTvZeecIGFqEcHejpBn0es F3Xa3sYQ==; 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 1rvBtV-00000008izc-39VM; Fri, 12 Apr 2024 08:04:21 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvBtV-00000009KTB-0quC; Fri, 12 Apr 2024 09:04:21 +0100 In-Reply-To: <20240412073530.2222496-1-dwmw2@infradead.org> References: <20240412073530.2222496-1-dwmw2@infradead.org> Message-Id: <20240412073530.2222496-3-dwmw2@infradead.org> From: David Woodhouse Date: Mon, 11 Mar 2024 13:04:07 +0000 Subject: [PATCH v2 2/2] arm64: acpi: Honour firmware_signature field of FACS, if it exists To: Catalin Marinas , Will Deacon Cc: Robert Moore , "Rafael J. Wysocki" , Len Brown , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Acked-by: Sudeep Holla --- 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