From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH 10/16] xen/events: Refactor evtchn_to_irq array to be dynamically allocated Date: Mon, 14 Oct 2013 13:52:14 -0400 Message-ID: <525C2F4E.6000507@oracle.com> References: <1381236555-27493-1-git-send-email-david.vrabel@citrix.com> <1381236555-27493-11-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1381236555-27493-11-git-send-email-david.vrabel@citrix.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: David Vrabel Cc: Malcolm Crossley , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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. -boris