From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH V2 16/33] xen/arm: Retrieve timer interrupts from the device tree Date: Wed, 08 May 2013 16:53:38 +0100 Message-ID: <518A7502.2050307@linaro.org> References: <3ac08fff0490b6d88a2609beae4b608c49f748dd.1367979526.git.julien.grall@linaro.org> <1368021001.17285.8.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1368021001.17285.8.camel@zakaz.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: Stefano Stabellini , "patches@linaro.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 05/08/2013 02:50 PM, Ian Campbell wrote: >> @@ -167,6 +204,15 @@ static void vtimer_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs) >> vgic_vcpu_inject_irq(current, irq, 1); >> } >> >> +/* Route timer's IRQ on this CPU */ >> +void __cpuinit route_timer_interrupt(void) >> +{ >> + gic_route_dt_irq(&timer_irq[PHYS_NONSECURE_PPI], >> + 1u << smp_processor_id(), 0xa0); >> + gic_route_dt_irq(&timer_irq[HYP_PPI], 1u << smp_processor_id(), 0xa0); >> + gic_route_dt_irq(&timer_irq[VIRT_PPI], 1u << smp_processor_id(), 0xa0); > > It occurs to me that this guy (and the underlying function) should > probably take a cpumask_t. Not now though. > >> +} >> + >> /* Set up the timer interrupt on this CPU */ >> void __cpuinit init_timer_interrupt(void) >> { >> @@ -184,10 +230,11 @@ void __cpuinit init_timer_interrupt(void) >> WRITE_SYSREG32(0, CNTHP_CTL_EL2); /* Hypervisor's timer disabled */ >> isb(); >> >> - /* XXX Need to find this IRQ number from devicetree? */ >> - request_irq(26, timer_interrupt, 0, "hyptimer", NULL); >> - request_irq(27, vtimer_interrupt, 0, "virtimer", NULL); >> - request_irq(30, timer_interrupt, 0, "phytimer", NULL); >> + request_dt_irq(&timer_irq[HYP_PPI], timer_interrupt, 0, "hyptimer", NULL); >> + request_dt_irq(&timer_irq[VIRT_PPI], vtimer_interrupt, 0, >> + "virtimer", NULL); >> + request_dt_irq(&timer_irq[PHYS_NONSECURE_PPI], timer_interrupt, 2, >> + "phytimer", NULL); > > Why the change to flags == 2 here? It's a mistake. I will fix it on the next patch series. -- Julien