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] [Mini-OS] Make bind_virq return the port

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [Mini-OS] Make bind_virq return the port
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Nov 2007 13:50:11 -0800
Delivery-date: Fri, 23 Nov 2007 13:50:39 -0800
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195835159 0
# Node ID e40015e20548a14a71f437600f6b31313280360b
# Parent  d46265d21dc5148721a8cd252e72d870b38136e3
[Mini-OS] Make bind_virq return the port

Make bind_virq() return the port bound to the irq, which is useful
e.g. for masking/unmasking it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx>
---
 extras/mini-os/arch/ia64/time.c |    2 +-
 extras/mini-os/events.c         |    6 +++---
 extras/mini-os/include/events.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff -r d46265d21dc5 -r e40015e20548 extras/mini-os/arch/ia64/time.c
--- a/extras/mini-os/arch/ia64/time.c   Fri Nov 23 16:23:28 2007 +0000
+++ b/extras/mini-os/arch/ia64/time.c   Fri Nov 23 16:25:59 2007 +0000
@@ -267,7 +267,7 @@ init_time(void)
                printk("efi_get_time() failed\n");
 
        err = bind_virq(VIRQ_ITC, timer_interrupt, NULL);
-       if (err != 0) {
+       if (err == -1) {
                printk("XEN timer request chn bind failed %i\n", err);
                return;
        }
diff -r d46265d21dc5 -r e40015e20548 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Fri Nov 23 16:23:28 2007 +0000
+++ b/extras/mini-os/events.c   Fri Nov 23 16:25:59 2007 +0000
@@ -102,7 +102,7 @@ void unbind_evtchn(evtchn_port_t port )
        ev_actions[port].data = NULL;
 }
 
-int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
+evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
 {
        evtchn_bind_virq_t op;
 
@@ -113,11 +113,11 @@ int bind_virq(uint32_t virq, evtchn_hand
        if ( HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq, &op) != 0 )
        {
                printk("Failed to bind virtual IRQ %d\n", virq);
-               return 1;
+               return -1;
     }
     set_bit(op.port,bound_ports);
     bind_evtchn(op.port, handler, data);
-       return 0;
+       return op.port;
 }
 
 #if defined(__x86_64__)
diff -r d46265d21dc5 -r e40015e20548 extras/mini-os/include/events.h
--- a/extras/mini-os/include/events.h   Fri Nov 23 16:23:28 2007 +0000
+++ b/extras/mini-os/include/events.h   Fri Nov 23 16:25:59 2007 +0000
@@ -26,7 +26,7 @@ typedef void (*evtchn_handler_t)(evtchn_
 
 /* prototypes */
 int do_event(evtchn_port_t port, struct pt_regs *regs);
-int bind_virq(uint32_t virq, evtchn_handler_t handler, void *data);
+evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data);
 evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler,
                                                  void *data);
 void unbind_evtchn(evtchn_port_t port);

_______________________________________________
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] [Mini-OS] Make bind_virq return the port, Xen patchbot-unstable <=