From: Ian Campbell Subject: Re: [PATCH v3 1/2] xen/arm: Divide GIC initialization in 2 parts Date: Wed, 16 Jul 2014 14:10:56 +0100 Message-ID: <1405516256.15219.4.camel@kazak.uk.xensource.com> References: <1404912223-9320-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X7Oz7-00057V-6V for xen-devel@lists.xenproject.org; Wed, 16 Jul 2014 13:11:02 +0000 In-Reply-To: <1404912223-9320-1-git-send-email-julien.grall@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 Wed, 2014-07-09 at 14:23 +0100, Julien Grall wrote: > Currently the function to translate IRQ from the device tree is set > unconditionally to be able to be able to retrieve serial/timer IRQ before the > GIC has been initialized. > > It assumes that the xlate function won't never changed. We may also need to "won't ever change". > @@ -560,8 +561,11 @@ static hw_irq_controller gicv2_guest_irq_type = { > .set_affinity = gicv2_irq_set_affinity, > }; > > +static int __init gicv2_init(void); I think you can reorder things to gic_init() { } ops gic_preinit() to avoid the forward declaration. > @@ -261,11 +265,15 @@ struct gic_info { > uint8_t nr_lrs; > /* Maintenance irq number */ > unsigned int maintenance_irq; > + /* Pointer to the device tree node representing the interrupt controller */ > + const struct dt_device_node *node; You added this to both struct gic_info and gicv2_info? Ian.