linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/xen: move declaration/definition of xen_processor_present()
@ 2023-03-21 11:25 Roger Pau Monne
  0 siblings, 0 replies; only message in thread
From: Roger Pau Monne @ 2023-03-21 11:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: xen-devel, rafael, Roger Pau Monne, kernel test robot,
	Juergen Gross, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Stefano Stabellini, Oleksandr Tyshchenko

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@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303210729.DvRvIUla-lkp@intel.com/
Signed-off-by: Roger Pau Monné <roger.pau@citrix.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-21 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 11:25 [PATCH] x86/xen: move declaration/definition of xen_processor_present() Roger Pau Monne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).