From patchwork Fri Apr 5 18:20:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Anastasio X-Patchwork-Id: 13619307 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 A30ADCD11C2 for ; Fri, 5 Apr 2024 18:21:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.701357.1095742 (Exim 4.92) (envelope-from ) id 1rsoBH-0007AW-Ph; Fri, 05 Apr 2024 18:20:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 701357.1095742; Fri, 05 Apr 2024 18:20:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rsoBH-00079t-N4; Fri, 05 Apr 2024 18:20:51 +0000 Received: by outflank-mailman (input) for mailman id 701357; Fri, 05 Apr 2024 18:20:50 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rsoBG-00077g-14 for xen-devel@lists.xenproject.org; Fri, 05 Apr 2024 18:20:50 +0000 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 38576c6a-f379-11ee-a1ef-f123f15fe8a2; Fri, 05 Apr 2024 20:20:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 185DD82855AB; Fri, 5 Apr 2024 13:20:45 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id WlUwro3q7qks; Fri, 5 Apr 2024 13:20:44 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id F2CE98285607; Fri, 5 Apr 2024 13:20:43 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oOiyGNosNpEl; Fri, 5 Apr 2024 13:20:43 -0500 (CDT) Received: from raptor-ewks-026.2lan (5.edge.rptsys.com [23.155.224.38]) by mail.rptsys.com (Postfix) with ESMTPSA id 52C7782855AB; Fri, 5 Apr 2024 13:20:43 -0500 (CDT) 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: 38576c6a-f379-11ee-a1ef-f123f15fe8a2 DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com F2CE98285607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1712341244; bh=CHdkWKhIxnJ7d1hR9BPeVfbie9iAebaLrDQcbBpsOlE=; h=From:To:Date:Message-Id:MIME-Version; b=GZcUJO7fs+j4dZZTgmY78Gg6Xo8uUHk6isc0q//becuyC9dpaqThh8iYpKdlvckxS G4MjSRdJ4lrhwu2tLuMO/47ecedCJti5dpQs6deqeUaTLAk1uRhloqIZvAH2Ocv7MB gGJ/zNY+uBNYYX8UnDho4zH3dGhvNl2YEQk2dJAw= X-Virus-Scanned: amavisd-new at rptsys.com From: Shawn Anastasio To: xen-devel@lists.xenproject.org Cc: tpearson@raptorengineering.com, Shawn Anastasio , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Juergen Gross , Dario Faggioli Subject: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs Date: Fri, 5 Apr 2024 13:20:31 -0500 Message-Id: <20240405182031.396528-1-sanastasio@raptorengineering.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so that the header can be included on architectures without ACPI support, like ppc. This change revealed some missing #includes across the ARM tree, so fix those as well. Suggested-by: Jan Beulich Signed-off-by: Shawn Anastasio Acked-by: Jan Beulich Reviewed-by: Michal Orzel --- xen/arch/arm/arm32/mmu/mm.c | 1 + xen/arch/arm/arm64/smpboot.c | 3 ++- xen/arch/arm/domain_build.c | 1 - xen/arch/arm/gic-v2.c | 1 - xen/arch/arm/gic-v3.c | 2 -- xen/arch/arm/include/asm/acpi.h | 1 - xen/arch/arm/mmu/setup.c | 1 + xen/arch/arm/psci.c | 1 + xen/arch/arm/smpboot.c | 1 + xen/arch/arm/traps.c | 3 ++- xen/common/sched/boot-cpupool.c | 2 +- xen/include/xen/acpi.h | 8 ++++++-- 12 files changed, 15 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/arm32/mmu/mm.c b/xen/arch/arm/arm32/mmu/mm.c index cb441ca87c..0ab6ae52a6 100644 --- a/xen/arch/arm/arm32/mmu/mm.c +++ b/xen/arch/arm/arm32/mmu/mm.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c index bf81d018b3..a225fae64d 100644 --- a/xen/arch/arm/arm64/smpboot.c +++ b/xen/arch/arm/arm64/smpboot.c @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -7,7 +9,6 @@ #include #include #include -#include struct smp_enable_ops { int (*prepare_cpu)(int cpu); diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 085d88671e..54232ed4cb 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index 5d6885e389..02043c0d4b 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index 1cb1360606..cd3e1acf79 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -25,8 +25,6 @@ #include #include -#include - #include #include #include diff --git a/xen/arch/arm/include/asm/acpi.h b/xen/arch/arm/include/asm/acpi.h index e53973e054..13756dd341 100644 --- a/xen/arch/arm/include/asm/acpi.h +++ b/xen/arch/arm/include/asm/acpi.h @@ -74,7 +74,6 @@ static inline void enable_acpi(void) acpi_disabled = false; } #else -#define acpi_disabled (true) #define disable_acpi() #define enable_acpi() #endif diff --git a/xen/arch/arm/mmu/setup.c b/xen/arch/arm/mmu/setup.c index 57f1b46499..c0cb17ca2e 100644 --- a/xen/arch/arm/mmu/setup.c +++ b/xen/arch/arm/mmu/setup.c @@ -10,6 +10,7 @@ #include #include +#include #include /* Override macros from asm/page.h to make them work with mfn_t */ diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index 695d2fa1f1..b6860a7760 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@ -9,6 +9,7 @@ */ +#include #include #include #include diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index a84e706d77..6efed87678 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -7,6 +7,7 @@ * Copyright (c) 2011 Citrix Systems. */ +#include #include #include #include diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 9cffe7f790..083157d6f2 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -7,6 +7,7 @@ * Copyright (c) 2011 Citrix Systems. */ +#include #include #include #include @@ -30,7 +31,6 @@ #include #include -#include #include #include #include @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/boot-cpupool.c b/xen/common/sched/boot-cpupool.c index 5955e6f9a9..feeac3b704 100644 --- a/xen/common/sched/boot-cpupool.c +++ b/xen/common/sched/boot-cpupool.c @@ -7,8 +7,8 @@ * Copyright (C) 2022 Arm Ltd. */ +#include #include -#include /* * pool_cpu_map: Index is logical cpu number, content is cpupool id, (-1) for diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h index 6a2f5983fd..73ca4ad75c 100644 --- a/xen/include/xen/acpi.h +++ b/xen/include/xen/acpi.h @@ -37,10 +37,10 @@ #ifndef __ASSEMBLY__ +#include #include -#include -#include +#include #define ACPI_MADT_GET_(fld, x) (((x) & ACPI_MADT_##fld##_MASK) / \ (ACPI_MADT_##fld##_MASK & -ACPI_MADT_##fld##_MASK)) @@ -54,6 +54,9 @@ #ifdef CONFIG_ACPI +#include +#include + extern acpi_physical_address rsdp_hint; extern bool opt_acpi_verbose; @@ -118,6 +121,7 @@ extern u32 pci_mmcfg_base_addr; #else /*!CONFIG_ACPI*/ #define acpi_mp_config 0 +#define acpi_disabled (true) static inline int acpi_boot_init(void) {