From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 13/29] xen/arm: Use hierarchical device tree to retrieve GIC information Date: Mon, 29 Apr 2013 17:30:49 +0100 Message-ID: <517EA039.3000302@linaro.org> References: <1367249743.3142.348.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: <1367249743.3142.348.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: Anthony Perard , "patches@linaro.org" , Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 04/29/2013 04:35 PM, Ian Campbell wrote: > On Mon, 2013-04-29 at 00:01 +0100, Julien Grall wrote: >> - Remove early parsing for GIC addresses >> - Remove hard coded maintenance IRQ number > > At last, the payoff! > >> >> Signed-off-by: Julien Grall >> --- >> xen/arch/arm/gic.c | 63 ++++++++++++++++++++++++++++------------- >> xen/common/device_tree.c | 42 --------------------------- > > I like this line! > >> @@ -464,7 +486,7 @@ void gic_route_ppis(void) >> { >> /* XXX should get these from DT */ >> /* GIC maintenance */ >> - gic_route_irq(25, 1, 1u << smp_processor_id(), 0xa0); >> + gic_route_dt_irq(&gic.maintenance, 1u << smp_processor_id(), 0xa0); >> /* Hypervisor Timer */ >> gic_route_irq(26, 1, 1u << smp_processor_id(), 0xa0); >> /* Virtual Timer */ >> @@ -813,7 +835,8 @@ void gic_dump_info(struct vcpu *v) >> >> void __cpuinit init_maintenance_interrupt(void) >> { >> - request_irq(25, maintenance_interrupt, 0, "irq-maintenance", NULL); >> + request_irq(gic.maintenance.irq, maintenance_interrupt, >> + 0, "irq-maintenance", NULL); > > Would a dt_request_irq be useful anywhere other than here? > Yes. Nearly everywhere the IRQ is retrieved from the device tree (ie: UART, timer...). I will create dt_request_irq. -- Julien