[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Remove bool return code from evtchn_set_pending() and callers.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Mon, 14 May 2012 16:32:19 +0000
  • Delivery-date: Mon, 14 May 2012 16:32:53 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1336647513 -3600
# Node ID 3a71173d20e1249856ef4bf6a12e638e100e90f5
# Parent  27d63b9f111abc7c61a213e8d714f6df81d11f73
Remove bool return code from evtchn_set_pending() and callers.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 27d63b9f111a -r 3a71173d20e1 xen/arch/x86/hvm/vmsi.c
--- a/xen/arch/x86/hvm/vmsi.c   Thu May 10 11:22:18 2012 +0100
+++ b/xen/arch/x86/hvm/vmsi.c   Thu May 10 11:58:33 2012 +0100
@@ -111,7 +111,7 @@ int vmsi_deliver(
     return 1;
 }
 
-int vmsi_deliver_pirq(struct domain *d, const struct hvm_pirq_dpci *pirq_dpci)
+void vmsi_deliver_pirq(struct domain *d, const struct hvm_pirq_dpci *pirq_dpci)
 {
     uint32_t flags = pirq_dpci->gmsi.gflags;
     int vector = pirq_dpci->gmsi.gvec;
@@ -129,7 +129,6 @@ int vmsi_deliver_pirq(struct domain *d, 
     ASSERT(pirq_dpci->flags & HVM_IRQ_DPCI_GUEST_MSI);
 
     vmsi_deliver(d, vector, dest, dest_mode, delivery_mode, trig_mode);
-    return 1;
 }
 
 /* Return value, -1 : multi-dests, non-negative value: dest_vcpu_id */
diff -r 27d63b9f111a -r 3a71173d20e1 xen/common/event_channel.c
--- a/xen/common/event_channel.c        Thu May 10 11:22:18 2012 +0100
+++ b/xen/common/event_channel.c        Thu May 10 11:58:33 2012 +0100
@@ -94,7 +94,7 @@ static uint8_t get_xen_consumer(xen_even
 /* Get the notification function for a given Xen-bound event channel. */
 #define xen_notification_fn(e) (xen_consumers[(e)->xen_consumer-1])
 
-static int evtchn_set_pending(struct vcpu *v, int port);
+static void evtchn_set_pending(struct vcpu *v, int port);
 
 static int virq_is_global(uint32_t virq)
 {
@@ -594,9 +594,7 @@ int evtchn_send(struct domain *d, unsign
         if ( consumer_is_xen(rchn) )
             (*xen_notification_fn(rchn))(rvcpu, rport);
         else
-        {
             evtchn_set_pending(rvcpu, rport);
-        }
         break;
     case ECS_IPI:
         evtchn_set_pending(ld->vcpu[lchn->notify_vcpu_id], lport);
@@ -614,7 +612,7 @@ out:
     return ret;
 }
 
-static int evtchn_set_pending(struct vcpu *v, int port)
+static void evtchn_set_pending(struct vcpu *v, int port)
 {
     struct domain *d = v->domain;
     int vcpuid;
@@ -627,7 +625,7 @@ static int evtchn_set_pending(struct vcp
      */
 
     if ( test_and_set_bit(port, &shared_info(d, evtchn_pending)) )
-        return 1;
+        return;
 
     if ( !test_bit        (port, &shared_info(d, evtchn_mask)) &&
          !test_and_set_bit(port / BITS_PER_EVTCHN_WORD(d),
@@ -638,7 +636,7 @@ static int evtchn_set_pending(struct vcp
     
     /* Check if some VCPU might be polling for this event. */
     if ( likely(bitmap_empty(d->poll_mask, d->max_vcpus)) )
-        return 0;
+        return;
 
     /* Wake any interested (or potentially interested) pollers. */
     for ( vcpuid = find_first_bit(d->poll_mask, d->max_vcpus);
@@ -653,8 +651,6 @@ static int evtchn_set_pending(struct vcp
             vcpu_unblock(v);
         }
     }
-
-    return 0;
 }
 
 int guest_enabled_event(struct vcpu *v, uint32_t virq)
@@ -710,7 +706,7 @@ static void send_guest_global_virq(struc
     spin_unlock_irqrestore(&v->virq_lock, flags);
 }
 
-int send_guest_pirq(struct domain *d, const struct pirq *pirq)
+void send_guest_pirq(struct domain *d, const struct pirq *pirq)
 {
     int port;
     struct evtchn *chn;
@@ -724,11 +720,11 @@ int send_guest_pirq(struct domain *d, co
     if ( pirq == NULL || (port = pirq->evtchn) == 0 )
     {
         BUG_ON(!is_hvm_domain(d));
-        return 0;
+        return;
     }
 
     chn = evtchn_from_port(d, port);
-    return evtchn_set_pending(d->vcpu[chn->notify_vcpu_id], port);
+    evtchn_set_pending(d->vcpu[chn->notify_vcpu_id], port);
 }
 
 static struct domain *global_virq_handlers[NR_VIRQS] __read_mostly;
diff -r 27d63b9f111a -r 3a71173d20e1 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c      Thu May 10 11:22:18 2012 +0100
+++ b/xen/drivers/passthrough/io.c      Thu May 10 11:58:33 2012 +0100
@@ -469,14 +469,15 @@ void hvm_dpci_msi_eoi(struct domain *d, 
     spin_unlock(&d->event_lock);
 }
 
-static int hvm_pci_msi_assert(struct domain *d,
-                              struct hvm_pirq_dpci *pirq_dpci)
+static void hvm_pci_msi_assert(
+    struct domain *d, struct hvm_pirq_dpci *pirq_dpci)
 {
     struct pirq *pirq = dpci_pirq(pirq_dpci);
 
-    return (hvm_domain_use_pirq(d, pirq)
-            ? send_guest_pirq(d, pirq)
-            : vmsi_deliver_pirq(d, pirq_dpci));
+    if ( hvm_domain_use_pirq(d, pirq) )
+        send_guest_pirq(d, pirq);
+    else
+        vmsi_deliver_pirq(d, pirq_dpci);
 }
 
 static int _hvm_dirq_assist(struct domain *d, struct hvm_pirq_dpci *pirq_dpci,
diff -r 27d63b9f111a -r 3a71173d20e1 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h     Thu May 10 11:22:18 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h     Thu May 10 11:58:33 2012 +0100
@@ -219,7 +219,7 @@ int vmsi_deliver(
     uint8_t dest, uint8_t dest_mode,
     uint8_t delivery_mode, uint8_t trig_mode);
 struct hvm_pirq_dpci;
-int vmsi_deliver_pirq(struct domain *d, const struct hvm_pirq_dpci *);
+void vmsi_deliver_pirq(struct domain *d, const struct hvm_pirq_dpci *);
 int hvm_girq_dest_2_vcpu_id(struct domain *d, uint8_t dest, uint8_t dest_mode);
 
 #define hvm_paging_enabled(v) \
diff -r 27d63b9f111a -r 3a71173d20e1 xen/include/xen/event.h
--- a/xen/include/xen/event.h   Thu May 10 11:22:18 2012 +0100
+++ b/xen/include/xen/event.h   Thu May 10 11:58:33 2012 +0100
@@ -39,9 +39,8 @@ int set_global_virq_handler(struct domai
  * send_guest_pirq:
  *  @d:        Domain to which physical IRQ should be sent
  *  @pirq:     Physical IRQ number
- * Returns TRUE if the delivery port was already pending.
  */
-int send_guest_pirq(struct domain *, const struct pirq *);
+void send_guest_pirq(struct domain *, const struct pirq *);
 
 /* Send a notification from a given domain's event-channel port. */
 int evtchn_send(struct domain *d, unsigned int lport);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.