From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 41/41] arm : acpi route irq's at time of boot Date: Mon, 8 Jun 2015 18:44:14 +0100 Message-ID: <5575D46E.60204@citrix.com> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> <1431893048-5214-42-git-send-email-parth.dixit@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431893048-5214-42-git-send-email-parth.dixit@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: Parth Dixit , xen-devel@lists.xen.org Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org Hi, On 17/05/2015 21:04, Parth Dixit wrote: > NOTE: This is a wrokaround to be fixed later. How do you plan to fix it? > Route all the irq's to Dom0 at the time of booting. > Trigger and polarity will be set dyanmaically when s/dyanmaically/dynamically/ > Dom0 request's for it. > > Signed-off-by: Parth Dixit > --- > xen/arch/arm/domain_build.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 2ce30bf..cdad86b 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -1481,6 +1481,26 @@ static int prepare_acpi(struct domain *d, struct kernel_info *kinfo, struct memb > acpi_os_unmap_memory(rsdp_tbl, sizeof(struct acpi_table_rsdp) ); > > prepare_efi_table(d, kinfo, tbl_add); > + > + /* configure interrupts gicv2 only */ The indentation seems wrong. Also, why GICv2 only? I don't see anything GICv2 specific... > + for( i = 32 ; i < 255 ; i++ ) > + { > + struct irq_desc *desc; Newline. > + desc = irq_to_desc(i); > + if( desc->action != NULL) > + continue; > + > + vgic_reserve_virq(d, i); This function returns an error code. If you don't use it explain why in a comment. > + set_irq_type(i, ACPI_IRQ_TYPE_NONE); > + res = route_irq_to_guest(d, i, i, NULL); > + if ( res ) > + { > + printk(XENLOG_ERR "Unable to route IRQ %u to domain %u\n", > + i, d->domain_id); > + continue; Shouldn't we bail out here? Regards, -- Julien Grall