From 87730ef14ada9238ceebf5524a1dca0b159bfe51 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 2 Apr 2008 10:54:02 -0700 Subject: [PATCH] --- yaml --- r: 93176 b: refs/heads/master c: 3e334239d89d4a71610be5a3e8432464d421d9ec h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/block/xen-blkfront.c | 7 +++++++ trunk/include/xen/interface/io/protocols.h | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 trunk/include/xen/interface/io/protocols.h diff --git a/[refs] b/[refs] index 79c9ecf92645..29d78544f88f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b15993fcc1bf15f717fb4414b32e4a11534dfdc4 +refs/heads/master: 3e334239d89d4a71610be5a3e8432464d421d9ec diff --git a/trunk/drivers/block/xen-blkfront.c b/trunk/drivers/block/xen-blkfront.c index 9c6f3f99208d..2e7c81e3f36a 100644 --- a/trunk/drivers/block/xen-blkfront.c +++ b/trunk/drivers/block/xen-blkfront.c @@ -47,6 +47,7 @@ #include #include +#include #include @@ -614,6 +615,12 @@ static int talk_to_backend(struct xenbus_device *dev, message = "writing event-channel"; goto abort_transaction; } + err = xenbus_printf(xbt, dev->nodename, "protocol", "%s", + XEN_IO_PROTO_ABI_NATIVE); + if (err) { + message = "writing protocol"; + goto abort_transaction; + } err = xenbus_transaction_end(xbt, 0); if (err) { diff --git a/trunk/include/xen/interface/io/protocols.h b/trunk/include/xen/interface/io/protocols.h new file mode 100644 index 000000000000..01fc8ae5f0b0 --- /dev/null +++ b/trunk/include/xen/interface/io/protocols.h @@ -0,0 +1,21 @@ +#ifndef __XEN_PROTOCOLS_H__ +#define __XEN_PROTOCOLS_H__ + +#define XEN_IO_PROTO_ABI_X86_32 "x86_32-abi" +#define XEN_IO_PROTO_ABI_X86_64 "x86_64-abi" +#define XEN_IO_PROTO_ABI_IA64 "ia64-abi" +#define XEN_IO_PROTO_ABI_POWERPC64 "powerpc64-abi" + +#if defined(__i386__) +# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_32 +#elif defined(__x86_64__) +# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_64 +#elif defined(__ia64__) +# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_IA64 +#elif defined(__powerpc64__) +# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_POWERPC64 +#else +# error arch fixup needed here +#endif + +#endif