* [PATCH][XEN] public header: portability
@ 2008-08-21 10:03 Christoph Egger
2008-08-21 10:15 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Egger @ 2008-08-21 10:03 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
Hi!
Attached patch defines xen_*mb() macros for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
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
[-- Attachment #2: public_ring.diff --]
[-- Type: text/x-diff, Size: 552 bytes --]
diff -r 598d92a5ae7a xen/include/public/io/ring.h
--- a/xen/include/public/io/ring.h Wed Aug 20 14:45:21 2008 +0100
+++ b/xen/include/public/io/ring.h Thu Aug 21 11:27:43 2008 +0200
@@ -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;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][XEN] public header: portability
2008-08-21 10:03 [PATCH][XEN] public header: portability Christoph Egger
@ 2008-08-21 10:15 ` Keir Fraser
2008-08-21 10:18 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2008-08-21 10:15 UTC (permalink / raw)
To: Christoph Egger, xen-devel
On 21/8/08 11:03, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> Attached patch defines xen_*mb() macros for NetBSD.
>
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][XEN] public header: portability
2008-08-21 10:15 ` Keir Fraser
@ 2008-08-21 10:18 ` Keir Fraser
0 siblings, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2008-08-21 10:18 UTC (permalink / raw)
To: Christoph Egger, xen-devel
On 21/8/08 11:15, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
> On 21/8/08 11:03, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
>
>> Attached patch defines xen_*mb() macros for NetBSD.
>>
>> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
>
> 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.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-21 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 10:03 [PATCH][XEN] public header: portability Christoph Egger
2008-08-21 10:15 ` Keir Fraser
2008-08-21 10:18 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.