From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 14/18] xen/arm: IRQ: Store IRQ type in arch_irq_desc Date: Wed, 16 Apr 2014 16:52:47 +0100 Message-ID: <534EA74F.8070500@linaro.org> References: <1396968247-8768-1-git-send-email-julien.grall@linaro.org> <1396968247-8768-15-git-send-email-julien.grall@linaro.org> <1397663127.24638.218.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WaS8o-00045g-5C for xen-devel@lists.xenproject.org; Wed, 16 Apr 2014 15:52:50 +0000 Received: by mail-ee0-f50.google.com with SMTP id c13so8895437eek.23 for ; Wed, 16 Apr 2014 08:52:48 -0700 (PDT) In-Reply-To: <1397663127.24638.218.camel@kazak.uk.xensource.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: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 04/16/2014 04:45 PM, Ian Campbell wrote: > On Tue, 2014-04-08 at 15:44 +0100, Julien Grall wrote: > [...] >> @@ -282,7 +286,8 @@ int setup_dt_irq(const struct dt_irq *irq, struct irqaction *new) >> * TODO: Handle case where SPI is setup on different CPU than >> * the targeted CPU and the priority. >> */ >> - gic_route_irq_to_xen(desc, level, cpumask_of(smp_processor_id()), >> + desc->arch.type = irq->type; >> + gic_route_irq_to_xen(desc, cpumask_of(smp_processor_id()), >> GIC_PRI_IRQ); >> desc->handler->startup(desc); >> } > [...] >> @@ -341,10 +345,9 @@ int route_dt_irq_to_guest(struct domain *d, const struct dt_irq *irq, >> goto out; >> } >> >> - level = dt_irq_is_level_triggered(irq); >> - gic_route_irq_to_guest(d, desc, level, cpumask_of(smp_processor_id()), >> + desc->arch.type = irq->type; >> + gic_route_irq_to_guest(d, desc, cpumask_of(smp_processor_id()), >> GIC_PRI_IRQ); > > > When I asked why these two assignments weren't using irq_set_type you > said you were going to add an assert. The arch.type in setup_dt_irq will be removed in next patch. It's only here for bisection. For the second one, I was planning to add an ASSERT in irq_set_type not here. But, I forgot to take into account your comment from V3 on this patch :/. Here it's fine because the function will bail out if the IRQ desc is already setup it (see patch #12). Regards, -- Julien Grall