]> xenbits.xensource.com Git - people/pauldu/mini-os.git/commitdiff
mini-os: fix builds with uncommon config settings
authorJuergen Gross <jgross@suse.com>
Fri, 2 Sep 2016 08:56:45 +0000 (10:56 +0200)
committerWei Liu <wei.liu2@citrix.com>
Mon, 5 Sep 2016 11:16:11 +0000 (12:16 +0100)
Some config settings won't build standalone. Fix the following cases:

- all CONFIG_* set to "n"
- standard config with latest Xen interface version

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
include/x86/os.h
include/xenbus.h

index 90ab6e6324e4cbfe01b979be5a1adbfcd0490be3..0f5dd6c3a80453f863911155822d69dc7ef98b3f 100644 (file)
@@ -514,6 +514,11 @@ static __inline__ unsigned long __ffs(unsigned long word)
 #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")
+
 #define wrmsr(msr,val1,val2) \
       __asm__ __volatile__("wrmsr" \
                            : /* no outputs */ \
index c254652067f2c1920d2099c41e1348205c36232d..12391b9b06fffc524c91a0156ee75b8540d661cb 100644 (file)
@@ -7,10 +7,14 @@ typedef unsigned long xenbus_transaction_t;
 #define XBT_NIL ((xenbus_transaction_t)0)
 
 #ifdef CONFIG_XENBUS
+extern uint32_t xenbus_evtchn;
+
 /* Initialize the XenBus system. */
 void init_xenbus(void);
 void get_xenbus(void *p);
 #else
+#define xenbus_evtchn ~0
+
 static inline void init_xenbus(void)
 {
 }
@@ -33,8 +37,6 @@ struct xenbus_event {
 };
 typedef struct xenbus_event *xenbus_event_queue;
 
-extern uint32_t xenbus_evtchn;
-
 char *xenbus_watch_path_token(xenbus_transaction_t xbt, const char *path, const char *token, xenbus_event_queue *events);
 char *xenbus_unwatch_path_token(xenbus_transaction_t xbt, const char *path, const char *token);
 extern struct wait_queue_head xenbus_watch_queue;