From: Ian Campbell Subject: Re: [PATCH v4 14/18] xen/arm: IRQ: Store IRQ type in arch_irq_desc Date: Fri, 2 May 2014 09:57:13 +0100 Message-ID: <1399021033.29636.18.camel@kazak.uk.xensource.com> References: <1398171530-27391-1-git-send-email-julien.grall@linaro.org> <1398171530-27391-15-git-send-email-julien.grall@linaro.org> <1398261881.18537.127.camel@kazak.uk.xensource.com> <53635C2E.4040909@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 1Wg9HS-000053-CE for xen-devel@lists.xenproject.org; Fri, 02 May 2014 08:57:18 +0000 In-Reply-To: <53635C2E.4040909@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2014-05-02 at 09:49 +0100, Julien Grall wrote: > Hi Ian, > > Sorry for the delay, for some unknown reason I skipped this mail. > > On 23/04/14 15:04, Ian Campbell wrote: > >> + * CPU0 otherwise we may miss the type if the IRQ type has been > >> + * set early. > > > > what does "set early" mean, how early is early? Initialised before > > secondary CPUs were brought up perhaps? > > Yes. I will replace "set early" by "initialised before secondary CPUs > were brought up" > > > > > /* PPIs are included in local_irqs, we copy the IRQ type from > > * CPU0 when bringing up secondary cpus in order to pick up any > > * configuration done before this CPU came up. For interrupts > > * configured after this point this is done in XXX(). > > I guess you suggest to replace the previous comment by this one, right? If it is factually accurate, yes. > > Why is the copying not conditional on CPU!=0? > > As the CPU were not online (therefore its per_cpu regions is not there) > at the time we setup the IRQ we have to unconditionally set the IRQ type. But CPU0 must have been online when we setup the IRQ. IOW if CPU==0 then isn't desc->arch.type = per_cpu(local_irq_desc, 0)[irq].arch.type; equivalent to desc->arch.type = desc->arch.type ? Ian.