From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 10/16] xen/events: Refactor evtchn_to_irq array to be dynamically allocated Date: Tue, 15 Oct 2013 19:58:41 +0100 Message-ID: <525D9061.5080609@citrix.com> References: <1381236555-27493-1-git-send-email-david.vrabel@citrix.com> <1381236555-27493-11-git-send-email-david.vrabel@citrix.com> <525C2F4E.6000507@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <525C2F4E.6000507@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: Malcolm Crossley , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 14/10/13 18:52, Boris Ostrovsky wrote: > On 10/08/2013 08:49 AM, David Vrabel wrote: >> @@ -482,13 +559,8 @@ static void shutdown_pirq(struct irq_data *data) >> return; >> mask_evtchn(evtchn); >> - >> - close.port = evtchn; >> - if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0) >> - BUG(); >> - >> - bind_evtchn_to_cpu(evtchn, 0); >> - evtchn_to_irq[evtchn] = -1; >> + xen_evtchn_close(evtchn); >> + set_evtchn_to_irq(evtchn, -1); > > Would it make sense to call set_evtchn_to_irq(evtchn, -1) from > xen_evtchn_close()? If you are dismantling an event channel you probably > always want to clear the irq mapping for that channel. I've added an xen_irq_info_cleanup() function which is paired with the various xen_irq_info_*setup() calls. David