aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/event_channel.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-05-29 09:22:50 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-05-29 09:22:50 +0100
commit0e4debb7fa5c4aa063cafded36991230ff5dd18f (patch)
tree062f4c7d8f97da704b43d592728f277aa98cdaef /xen/common/event_channel.c
parent903b93211f568cb10fa90b7dc46f5caffb10df7d (diff)
downloadxen-0e4debb7fa5c4aa063cafded36991230ff5dd18f.tar.gz
xen-0e4debb7fa5c4aa063cafded36991230ff5dd18f.tar.bz2
xen-0e4debb7fa5c4aa063cafded36991230ff5dd18f.zip
Revert 19661:326b24bfa9f9 "Free pirq_to_evtchn/pirq_mask..."
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/event_channel.c')
-rw-r--r--xen/common/event_channel.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index f4ea79f4b2..c51fd10031 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -1013,27 +1013,10 @@ void notify_via_xen_event_channel(int lport)
int evtchn_init(struct domain *d)
{
spin_lock_init(&d->event_lock);
-
- d->pirq_to_evtchn = xmalloc_array(u16, d->nr_pirqs);
- d->pirq_mask = xmalloc_array(
- unsigned long, BITS_TO_LONGS(d->nr_pirqs));
- if ( (d->pirq_to_evtchn == NULL) || (d->pirq_mask == NULL) )
- goto fail;
- memset(d->pirq_to_evtchn, 0, d->nr_pirqs * sizeof(*d->pirq_to_evtchn));
- bitmap_zero(d->pirq_mask, d->nr_pirqs);
-
if ( get_free_port(d) != 0 )
- goto fail;
+ return -EINVAL;
evtchn_from_port(d, 0)->state = ECS_RESERVED;
-
return 0;
-
- fail:
- xfree(d->pirq_to_evtchn);
- d->pirq_to_evtchn = NULL;
- xfree(d->pirq_mask);
- d->pirq_mask = NULL;
- return -ENOMEM;
}
@@ -1061,11 +1044,6 @@ void evtchn_destroy(struct domain *d)
d->evtchn[i] = NULL;
}
spin_unlock(&d->event_lock);
-
- xfree(d->pirq_to_evtchn);
- d->pirq_to_evtchn = NULL;
- xfree(d->pirq_mask);
- d->pirq_mask = NULL;
}
static void domain_dump_evtchn_info(struct domain *d)