From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 34/35] arm : acpi workarounds for firmware/linux dependencies Date: Thu, 05 Feb 2015 05:38:36 +0000 Message-ID: <54D301DC.6090306@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> <1423058539-26403-35-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: <1423058539-26403-35-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@linaro.org, xen-devel@lists.xen.org Cc: christoffer.dall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org Hi Parth, On 04/02/2015 14:02, parth.dixit@linaro.org wrote: > From: Parth Dixit > > Some bugs are identified in edk2 and some of the functionality is not > yet merged. This patch contains workarounds for them While I understand some workaround (based on your cover letter), some of them is unclear to me and need explanation. > > Signed-off-by: Parth Dixit > --- [..] > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > index 97061ce..e74555d 100644 > --- a/xen/arch/arm/vgic.c > +++ b/xen/arch/arm/vgic.c > @@ -254,6 +254,8 @@ void vgic_disable_irqs(struct vcpu *v, uint32_t r, int n) > } > } > > +#define VGIC_ICFG_MASK(intr) ( 1 << ( ( 2 * ( intr % 16 ) ) + 1 ) ) > + > void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) > { > struct domain *d = v->domain; > @@ -266,6 +268,20 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) > > while ( (i = find_next_bit(&mask, 32, i)) < 32 ) { > irq = i + (32 * n); > +#if defined(CONFIG_ARM_64) && defined(CONFIG_ACPI) > + if( ( n!=0 ) && is_hardware_domain(d) ){ > + struct vgic_irq_rank *vr = vgic_get_rank(v, n); > + uint32_t tr; > + tr = vr->icfg[i >> 4] ; > + > + if( ( tr & VGIC_ICFG_MASK(i) ) ) > + acpi_set_irq(irq, DT_IRQ_TYPE_EDGE_BOTH); > + else > + acpi_set_irq(irq, DT_IRQ_TYPE_LEVEL_MASK); What's the status of the dynamic IRQ configuration? > + > + route_irq_to_guest(d,irq,NULL); Hmmm, do you really plan to keep that here? What's your plan for this? > + } > +#endif > v_target = d->arch.vgic.handler->get_target_vcpu(v, irq); > p = irq_to_pending(v_target, irq); > set_bit(GIC_IRQ_GUEST_ENABLED, &p->status); > diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c > index 73da9d9..2d78ba0 100644 > --- a/xen/drivers/acpi/osl.c > +++ b/xen/drivers/acpi/osl.c > @@ -66,7 +66,7 @@ void __init acpi_os_vprintf(const char *fmt, va_list args) > > acpi_physical_address __init acpi_os_get_root_pointer(void) > { > - if (efi_enabled) { > + if (efi_enabled) { Spurious change > if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) > return efi.acpi20; > else if (efi.acpi != EFI_INVALID_TABLE_ADDR) > @@ -198,8 +198,11 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width) > > return AE_OK; > } > - > +#ifdef CONFIG_X86 > #define is_xmalloc_memory(ptr) ((unsigned long)(ptr) & (PAGE_SIZE - 1)) > +#else > +#define is_xmalloc_memory(ptr) 1 > +#endif Why? I though this was resolved? > void *__init acpi_os_alloc_memory(size_t sz) > { > Regards, -- Julien Grall