[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 41/41] arm : acpi route irq's at time of boot



NOTE: This is a wrokaround to be fixed later.
Route all the irq's to Dom0 at the time of booting.
Trigger and polarity will be set dyanmaically when
Dom0 request's for it.

Signed-off-by: Parth Dixit <parth.dixit@xxxxxxxxxx>
---
 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 */
+     for( i = 32 ; i < 255 ; i++ )
+     {
+        struct irq_desc *desc;
+        desc = irq_to_desc(i);
+        if( desc->action != NULL)
+            continue;
+
+        vgic_reserve_virq(d, i);
+        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;
+        }
+     }
+
     /* map rsdp table */
     size = sizeof(struct acpi_table_rsdp);
 
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.