aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-09-15 11:07:25 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-09-15 11:07:25 +0100
commitd1423b28827cdc817d486df09db3cf98d4e83201 (patch)
tree54684ab17eb39231d9577285b0dc4ed218c64dc9 /extras
parenteff691edc0cb3de7725212624749f8e3c3d7a8cd (diff)
downloadxen-d1423b28827cdc817d486df09db3cf98d4e83201.tar.gz
xen-d1423b28827cdc817d486df09db3cf98d4e83201.tar.bz2
xen-d1423b28827cdc817d486df09db3cf98d4e83201.zip
[MINIOS] Fix to use new event-channel API properly.
Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Diffstat (limited to 'extras')
-rw-r--r--extras/mini-os/events.c33
-rw-r--r--extras/mini-os/include/events.h7
-rw-r--r--extras/mini-os/include/x86/x86_32/hypercall-x86_32.h4
3 files changed, 20 insertions, 24 deletions
diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c
index 57e835225d..e05f68d83d 100644
--- a/extras/mini-os/events.c
+++ b/extras/mini-os/events.c
@@ -88,19 +88,18 @@ void unbind_evtchn(evtchn_port_t port )
int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
{
- evtchn_op_t op;
+ evtchn_bind_virq_t op;
/* Try to bind the virq to a port */
- op.cmd = EVTCHNOP_bind_virq;
- op.u.bind_virq.virq = virq;
- op.u.bind_virq.vcpu = smp_processor_id();
+ op.virq = virq;
+ op.vcpu = smp_processor_id();
- if ( HYPERVISOR_event_channel_op(&op) != 0 )
+ if ( HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq, &op) != 0 )
{
printk("Failed to bind virtual IRQ %d\n", virq);
return 1;
}
- bind_evtchn(op.u.bind_virq.port, handler, data);
+ bind_evtchn(op.port, handler, data);
return 0;
}
@@ -151,14 +150,13 @@ void default_handler(evtchn_port_t port, struct pt_regs *regs, void *ignore)
int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
void *data, evtchn_port_t *port)
{
- evtchn_op_t op;
- op.cmd = EVTCHNOP_alloc_unbound;
- op.u.alloc_unbound.dom = DOMID_SELF;
- op.u.alloc_unbound.remote_dom = pal;
- int err = HYPERVISOR_event_channel_op(&op);
+ evtchn_alloc_unbound_t op;
+ op.dom = DOMID_SELF;
+ op.remote_dom = pal;
+ int err = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound, &op);
if (err)
return err;
- *port = bind_evtchn(op.u.alloc_unbound.port, handler, data);
+ *port = bind_evtchn(op.port, handler, data);
return err;
}
@@ -169,14 +167,13 @@ int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port,
evtchn_handler_t handler, void *data,
evtchn_port_t *local_port)
{
- evtchn_op_t op;
- op.cmd = EVTCHNOP_bind_interdomain;
- op.u.bind_interdomain.remote_dom = pal;
- op.u.bind_interdomain.remote_port = remote_port;
- int err = HYPERVISOR_event_channel_op(&op);
+ evtchn_bind_interdomain_t op;
+ op.remote_dom = pal;
+ op.remote_port = remote_port;
+ int err = HYPERVISOR_event_channel_op(EVTCHNOP_bind_interdomain, &op);
if (err)
return err;
- evtchn_port_t port = op.u.bind_interdomain.local_port;
+ evtchn_port_t port = op.local_port;
clear_evtchn(port); /* Without, handler gets invoked now! */
*local_port = bind_evtchn(port, handler, data);
return err;
diff --git a/extras/mini-os/include/events.h b/extras/mini-os/include/events.h
index cdb6311845..9adaf29711 100644
--- a/extras/mini-os/include/events.h
+++ b/extras/mini-os/include/events.h
@@ -39,10 +39,9 @@ int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port,
static inline int notify_remote_via_evtchn(evtchn_port_t port)
{
- evtchn_op_t op;
- op.cmd = EVTCHNOP_send;
- op.u.send.port = port;
- return HYPERVISOR_event_channel_op(&op);
+ evtchn_send_t op;
+ op.port = port;
+ return HYPERVISOR_event_channel_op(EVTCHNOP_send, &op);
}
diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
index 6556c4f7e2..70e8997a86 100644
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
@@ -238,9 +238,9 @@ HYPERVISOR_update_va_mapping(
static inline int
HYPERVISOR_event_channel_op(
- void *op)
+ int cmd, void *op)
{
- return _hypercall1(int, event_channel_op, op);
+ return _hypercall2(int, event_channel_op, cmd, op);
}
static inline int