diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-10-29 11:14:54 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-10-29 11:14:54 +0000 |
commit | bde7d0c41aaf5d38d0697feb2750df61685960f7 (patch) | |
tree | 054effc61576f6f5bffb089305dbc9fc68ef47fc /xen/common/event_channel.c | |
parent | 4e69eb152ebb1f81b539eb4c1decb372ad29242b (diff) | |
download | xen-bde7d0c41aaf5d38d0697feb2750df61685960f7.tar.gz xen-bde7d0c41aaf5d38d0697feb2750df61685960f7.tar.bz2 xen-bde7d0c41aaf5d38d0697feb2750df61685960f7.zip |
Point per-vcpu vcpu_info at a dummy structure by default, avoiding
need for scattered NULL-pointer checks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/event_channel.c')
-rw-r--r-- | xen/common/event_channel.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 58be1729b0..d052f15980 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -244,9 +244,6 @@ static long evtchn_bind_virq(evtchn_bind_virq_t *bind) ((v = d->vcpu[vcpu]) == NULL) ) return -ENOENT; - if ( unlikely(!v->vcpu_info) ) - return -EAGAIN; - spin_lock(&d->event_lock); if ( v->virq_to_evtchn[virq] != 0 ) @@ -280,9 +277,6 @@ static long evtchn_bind_ipi(evtchn_bind_ipi_t *bind) (d->vcpu[vcpu] == NULL) ) return -ENOENT; - if ( unlikely(!d->vcpu[vcpu]->vcpu_info) ) - return -EAGAIN; - spin_lock(&d->event_lock); if ( (port = get_free_port(d)) < 0 ) @@ -726,9 +720,6 @@ long evtchn_bind_vcpu(unsigned int port, unsigned int vcpu_id) if ( (vcpu_id >= d->max_vcpus) || (d->vcpu[vcpu_id] == NULL) ) return -ENOENT; - if ( unlikely(!d->vcpu[vcpu_id]->vcpu_info) ) - return -EAGAIN; - spin_lock(&d->event_lock); if ( !port_is_valid(d, port) ) @@ -952,9 +943,6 @@ int alloc_unbound_xen_event_channel( struct domain *d = local_vcpu->domain; int port; - if ( unlikely(!local_vcpu->vcpu_info) ) - return -EAGAIN; - spin_lock(&d->event_lock); if ( (port = get_free_port(d)) < 0 ) |