public header: portability
PATCH 1/1 public header: portability
Hi!
Attached patch defines xen_*mb() macros for NetBSD.
Signature · 12 lines
AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
xen/include/public/io/ring.h +7 -0
@@ -30,9 +30,16 @@#include "../xen-compat.h" #if __XEN_INTERFACE_VERSION__ <0x00030208 +#if defined(__Linux__)#define xen_mb () mb()#define xen_rmb () rmb()#define xen_wmb () wmb() +#endif +#if defined(__NetBSD__) +#define xen_mb () x86_mfence() +#define xen_rmb () x86_lfence() +#define xen_wmb () x86_sfence() +#endif #endif typedef unsigned int RING_IDX ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · Christoph Egger
Attached patch defines xen_*mb() macros for NetBSD.
Signed-off-by Christoph Egger <[email protected]>
Since this has presumably never worked unmodified for NetBSD, it's not a compatibility issue. You should simply specify __XEN_INTERFACE_VERSION__ >= 0x00030208 and fix up any small build breakages that this causes in the NetBSD kernel sources.
-- Keir
Quoted 10 lines · Keir Fraser
Quoted 3 lines · Christoph Egger
Attached patch defines xen_*mb() macros for NetBSD.
Signed-off-by Christoph Egger <[email protected]>Since this has presumably never worked unmodified for NetBSD, it's not a compatibility issue. You should simply specify
__XEN_INTERFACE_VERSION__>=0x00030208and fix up any small build breakages that this causes in the NetBSD kernel sources.
Actually I suspect you're not specifying __XEN_INTERFACE_VERSION__ at all right now. The easiest way to do so is to add it to your CPPFLAGS (-D__XEN_INTERFACE_VERSION__=<whatever>), or NetBSD build system equivalent, then it definitely gets defined correctly everywhere that you include Xen public header files.
-- Keir