[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230321112522.46806-1-roger.pau@citrix.com>
Date: Tue, 21 Mar 2023 12:25:21 +0100
From: Roger Pau Monne <roger.pau@...rix.com>
To: linux-kernel@...r.kernel.org
Cc: xen-devel@...ts.xenproject.org, rafael@...nel.org,
Roger Pau Monne <roger.pau@...rix.com>,
kernel test robot <lkp@...el.com>,
Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Subject: [PATCH] x86/xen: move declaration/definition of xen_processor_present()
So that it doesn't break the build when CONFIG_XEN or CONFIG_XEN_DOM0
are not enabled.
The current header is only included when CONFIG_XEN_DOM0 is selected,
so instead place it in the top level xen.h header, and also use the
dummy helper when CONFIG_X86 is not selected, as the current
implementation is x86 only.
Reported-by: kernel test robot <lkp@...el.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303210729.DvRvIUla-lkp@intel.com/
Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
---
arch/x86/include/asm/xen/hypervisor.h | 10 ----------
include/xen/xen.h | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index 990a1609677e..5fc35f889cd1 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -63,14 +63,4 @@ void __init xen_pvh_init(struct boot_params *boot_params);
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
#endif
-#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI)
-bool __init xen_processor_present(uint32_t acpi_id);
-#else
-static inline bool xen_processor_present(uint32_t acpi_id)
-{
- BUG();
- return false;
-}
-#endif
-
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
diff --git a/include/xen/xen.h b/include/xen/xen.h
index 7adf59837c25..4410e74f3eb5 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -71,4 +71,14 @@ static inline void xen_free_unpopulated_pages(unsigned int nr_pages,
}
#endif
+#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI) && defined(CONFIG_X86)
+bool __init xen_processor_present(uint32_t acpi_id);
+#else
+static inline bool xen_processor_present(uint32_t acpi_id)
+{
+ BUG();
+ return false;
+}
+#endif
+
#endif /* _XEN_XEN_H */
--
2.40.0
Powered by blists - more mailing lists