WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [MINIOS] Fix to use new event-channel API

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [MINIOS] Fix to use new event-channel API properly.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Sep 2006 17:00:27 +0000
Delivery-date: Sun, 17 Sep 2006 10:01:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID fc8ae086f7061ebd092162ddb93e54e8964fce55
# Parent  e269486165525e07d581b895df65e89f1e535d55
[MINIOS] Fix to use new event-channel API properly.
Signed-off-by: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
---
 extras/mini-os/events.c                              |   33 ++++++++-----------
 extras/mini-os/include/events.h                      |    7 +---
 extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    6 +--
 3 files changed, 21 insertions(+), 25 deletions(-)

diff -r e26948616552 -r fc8ae086f706 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Fri Sep 15 11:04:41 2006 +0100
+++ b/extras/mini-os/events.c   Fri Sep 15 11:07:25 2006 +0100
@@ -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 @@ int evtchn_alloc_unbound(domid_t pal, ev
 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_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 -r e26948616552 -r fc8ae086f706 extras/mini-os/include/events.h
--- a/extras/mini-os/include/events.h   Fri Sep 15 11:04:41 2006 +0100
+++ b/extras/mini-os/include/events.h   Fri Sep 15 11:07:25 2006 +0100
@@ -39,10 +39,9 @@ int evtchn_bind_interdomain(domid_t pal,
 
 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 -r e26948616552 -r fc8ae086f706 
extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h      Fri Sep 15 
11:04:41 2006 +0100
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h      Fri Sep 15 
11:07:25 2006 +0100
@@ -238,9 +238,9 @@ HYPERVISOR_update_va_mapping(
 
 static inline int
 HYPERVISOR_event_channel_op(
-       void *op)
-{
-       return _hypercall1(int, event_channel_op, op);
+       int cmd, void *op)
+{
+       return _hypercall2(int, event_channel_op, cmd, op);
 }
 
 static inline int

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [MINIOS] Fix to use new event-channel API properly., Xen patchbot-unstable <=