From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 09/21] xen/arm: Release IRQ routed to a domain when it's destroying Date: Thu, 07 Aug 2014 17:35:26 +0100 Message-ID: <53E3AACE.1000506@linaro.org> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-10-git-send-email-julien.grall@linaro.org> <53E25143.3060909@linaro.org> <53E26161.6060206@linaro.org> <53E39DF6.9030500@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFQf6-0001OC-6Z for xen-devel@lists.xenproject.org; Thu, 07 Aug 2014 16:35:32 +0000 Received: by mail-wi0-f170.google.com with SMTP id f8so1304670wiw.3 for ; Thu, 07 Aug 2014 09:35:30 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, tim@xen.org, ian.campbell@citrix.com, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 08/07/2014 05:31 PM, Stefano Stabellini wrote: > On Thu, 7 Aug 2014, Julien Grall wrote: >> On 08/07/2014 04:36 PM, Stefano Stabellini wrote: >>>> But I doubt we will have PPIs in future, there is more issues to handle >>>> (such as the number of VCPUs doesn't match the number of physical CPUs). >>> >>> In that case, why not call the two functions release_guest_spi and >>> gic_remove_spi_from_guest? >> >> Because the 2 functions to route the irq are called route_irq_to_guest >> and gic_route_irq_to_guest. > > I would prefer to avoid introducing more functions that look like they > can handle any irqs but actually they cannot by design. That why Xen checks the IRQ number at the beginning of route_irq_to_guest. > I would be OK with the asymmetry in function names. We could also turn > route_irq_to_guest into route_spi_to_guest and gic_route_irq_to_guest > into gic_route_spi_to_guest. Those functions will be used for MSI sooner or later. I would prefer to keep the current name and add an ASSERT. -- Julien Grall