Skip to contentSkip to conversation

x86/xen: move declaration/definition of xen_processor_present()

PATCH New Roger Pau Monne 1 participant 1 message Mar 21, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/x86/include/asm/xen/hypervisor.h | 10 ----------
 include/xen/xen.h                     | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/include/asm/xen/hypervisor.h +0 -10
index 990a1609677e..5fc35f889cd1 100644
@@ -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 */
include/xen/xen.h +10 -0
index 7adf59837c25..4410e74f3eb5 100644
@@ -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 */
Signature · 1 line
2.40.0