]> xenbits.xensource.com Git - mini-os.git/commitdiff
minios: fix build issue with xen_*mb defines xen-4.8.0-rc1 xen-RELEASE-4.8.0 xen-RELEASE-4.8.1
authorJuergen Gross <jgross@suse.com>
Wed, 28 Sep 2016 09:50:04 +0000 (11:50 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 28 Sep 2016 11:09:38 +0000 (12:09 +0100)
Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
with uncommon config settings") introduced a bug which will break
the build, as xc_minios.c will have defined those macros via
xc_private.h.

Fix this by defining the macros only if compiling a minios source.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
include/x86/os.h

index 0f5dd6c3a80453f863911155822d69dc7ef98b3f..fbc2eeb1fee4a875c419f1c150ef89f95d59afb0 100644 (file)
@@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
 #error "Unsupported architecture"
 #endif
 
-#endif /* ifdef __INSIDE_MINIOS */
-
 /********************* common i386 and x86_64  ****************************/
 #define xen_mb()  mb()
 #define xen_rmb() rmb()
 #define xen_wmb() wmb()
 #define xen_barrier() asm volatile ( "" : : : "memory")
 
+#endif /* ifdef __INSIDE_MINIOS */
+
 #define wrmsr(msr,val1,val2) \
       __asm__ __volatile__("wrmsr" \
                            : /* no outputs */ \