From nobody Fri Apr 26 13:21:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1619698303; cv=none; d=zohomail.com; s=zohoarc; b=aOPUs74S9A9n2YGBR9VsU+EfGMYvgZHf6UHl0Ej3MTyJaYSpLNyucsp59Nvvhh2L1+Oo/EAKK4ekmDSv80mpU/l3EPzB9zTgOtcPebSN0fLYHUwkPO2WTTmS+dz+lZ8j4Kq9o9BTYqp2AHiPvrXQ367UDSC0UtMAlgzdG6Zkw7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619698303; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=fAtiyhQ+RDtJm4C/Do+Fk0sgoo4kmJFKuACKxyMRK1U=; b=Aru9UXjqV7cEGzKHgD3ayZJ7rlUyklPoZDKoVtTsYTAUb+n1fpyqdJm8646Xcldj+Z+pOsUSp6/ETRAb82TE9EZ61YelaQ7Vdj5JLFXYYGIOKDcnPY9Rf2+/hzyJervHR64RcSx3pbz2RuZCmdJIM/3mG/0mUr/hqN3hT83vu8A= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1619698303581540.9299102531985; Thu, 29 Apr 2021 05:11:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.119951.226787 (Exim 4.92) (envelope-from ) id 1lc5Vw-0003po-OM; Thu, 29 Apr 2021 12:11:28 +0000 Received: by outflank-mailman (output) from mailman id 119951.226787; Thu, 29 Apr 2021 12:11:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lc5Vw-0003ph-LS; Thu, 29 Apr 2021 12:11:28 +0000 Received: by outflank-mailman (input) for mailman id 119951; Thu, 29 Apr 2021 12:11:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lc5Vu-0003pc-RV for xen-devel@lists.xenproject.org; Thu, 29 Apr 2021 12:11:26 +0000 Received: from mx.upb.ro (unknown [141.85.13.200]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ec14441a-45b1-4ed4-98a3-d91da804a1ee; Thu, 29 Apr 2021 12:11:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id BCA1AB560111; Thu, 29 Apr 2021 15:11:23 +0300 (EEST) Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dWKHISy5oTLp; Thu, 29 Apr 2021 15:11:21 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id DB37CB560113; Thu, 29 Apr 2021 15:11:21 +0300 (EEST) Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UyrHAYFsH8iD; Thu, 29 Apr 2021 15:11:21 +0300 (EEST) Received: from localhost.localdomain (unknown [188.25.174.245]) by mx.upb.ro (Postfix) with ESMTPSA id 1BC53B560111; Thu, 29 Apr 2021 15:11:21 +0300 (EEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec14441a-45b1-4ed4-98a3-d91da804a1ee X-Virus-Scanned: amavisd-new at upb.ro From: Costin Lupu To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH] x86/ACPI: Fix build error when tboot is disabled Date: Thu, 29 Apr 2021 15:11:16 +0300 Message-Id: <79df12ade0840338590f440cd064052a961fe23b.1619698239.git.costin.lupu@cs.pub.ro> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When tboot is disabled via menuconfig we get undefined reference error for g_tboot_shared. This patch fixes that by disabling the causing source code when tboot is disabled. Signed-off-by: Costin Lupu --- xen/arch/x86/acpi/power.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index 91a8c4d0bd..29d9775aed 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -407,6 +407,7 @@ static int acpi_get_wake_status(void) return val; } =20 +#ifdef CONFIG_TBOOT static void tboot_sleep(u8 sleep_state) { uint32_t shutdown_type; @@ -451,18 +452,21 @@ static void tboot_sleep(u8 sleep_state) =20 tboot_shutdown(shutdown_type); } +#endif =20 /* System is really put into sleep state by this stub */ acpi_status acpi_enter_sleep_state(u8 sleep_state) { acpi_status status; =20 +#ifdef CONFIG_TBOOT if ( tboot_in_measured_env() ) { tboot_sleep(sleep_state); printk(XENLOG_ERR "TBOOT failed entering s3 state\n"); return_ACPI_STATUS(AE_ERROR); } +#endif =20 ACPI_FLUSH_CPU_CACHE(); =20 --=20 2.20.1