diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -30,6 +30,10 @@ #ifndef _MACHINE_X86_XEN_XEN_OS_H_ #define _MACHINE_X86_XEN_XEN_OS_H_ +#ifndef _XEN_XEN_OS_H_ +#error "do not #include machine/xen/xen-os.h, #include xen/xen-os.h instead" +#endif + /* Shared memory needs write-back as its cache attribute for coherency. */ #define VM_MEMATTR_XEN VM_MEMATTR_WRITE_BACK diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -57,7 +57,6 @@ #include #include -#include #include #include diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -71,12 +71,6 @@ return (hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN)); } -#endif - -#include - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ extern shared_info_t *HYPERVISOR_shared_info; @@ -117,6 +111,12 @@ return (xen_domain() && (hvm_start_flags & SIF_INITDOMAIN) != 0); } +#endif + +#include + +/* Everything below this point is not included by assembler (.S) files. */ +#ifndef __ASSEMBLY__ /* * Based on ofed/include/linux/bitops.h