aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2012-05-10 11:58:33 +0100
committerKeir Fraser <keir@xen.org>2012-05-10 11:58:33 +0100
commit1be84a9889e1e63d85ace8cdf8e03744a571aee3 (patch)
treea68d4f8e56716c4790916249914a010b1530b8a8
parent60e6552bd51bc4301da662a7e5bf073f51de8636 (diff)
downloadxen-1be84a9889e1e63d85ace8cdf8e03744a571aee3.tar.gz
xen-1be84a9889e1e63d85ace8cdf8e03744a571aee3.tar.bz2
xen-1be84a9889e1e63d85ace8cdf8e03744a571aee3.zip
Remove bool return code from evtchn_set_pending() and callers.
Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r--xen/arch/x86/hvm/vmsi.c3
-rw-r--r--xen/common/event_channel.c18
-rw-r--r--xen/drivers/passthrough/io.c11
-rw-r--r--xen/include/asm-x86/hvm/hvm.h2
-rw-r--r--xen/include/xen/event.h3
5 files changed, 16 insertions, 21 deletions
diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c
index 517b6b31f9..cfc7c80b75 100644
--- a/xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -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, const struct hvm_pirq_dpci *pirq_dpci)
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 --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 17ccb84ad2..53777f8888 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -94,7 +94,7 @@ static uint8_t get_xen_consumer(xen_event_channel_notification_t fn)
/* 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, unsigned int lport)
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 vcpu *v, int port)
*/
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 vcpu *v, int port)
/* 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 vcpu *v, int port)
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(struct domain *d, uint32_t virq)
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, const struct pirq *pirq)
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 --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index b4dc641eae..29b815f3af 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -469,14 +469,15 @@ void hvm_dpci_msi_eoi(struct domain *d, int vector)
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 --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index c34b9535cb..22f94513ea 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -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 --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 11a639adff..71c3e92a12 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -39,9 +39,8 @@ int set_global_virq_handler(struct domain *d, uint32_t virq);
* 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);