Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93176
b: refs/heads/master
c: 3e33423
h: refs/heads/master
v: v3
  • Loading branch information
Markus Armbruster authored and Ingo Molnar committed Apr 24, 2008
1 parent 3321482 commit 87730ef
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b15993fcc1bf15f717fb4414b32e4a11534dfdc4
refs/heads/master: 3e334239d89d4a71610be5a3e8432464d421d9ec
7 changes: 7 additions & 0 deletions trunk/drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#include <xen/interface/grant_table.h>
#include <xen/interface/io/blkif.h>
#include <xen/interface/io/protocols.h>

#include <asm/xen/hypervisor.h>

Expand Down Expand Up @@ -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) {
Expand Down
21 changes: 21 additions & 0 deletions trunk/include/xen/interface/io/protocols.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 87730ef

Please sign in to comment.