x86/xen: move declaration/definition of xen_processor_present()
Subsystems (3)
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.
Reported-by kernel test robot <[email protected]>
Signed-off-by Roger Pau Monné <[email protected]>
--- 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
@@ -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
@@ -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