From 0e4debb7fa5c4aa063cafded36991230ff5dd18f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 29 May 2009 09:22:50 +0100 Subject: Revert 19661:326b24bfa9f9 "Free pirq_to_evtchn/pirq_mask..." Signed-off-by: Keir Fraser --- xen/common/event_channel.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'xen/common/event_channel.c') 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) -- cgit v1.2.3