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

[Xen-devel] [PATCH v9 1/7] xen/arm: move itargets initialization to vgic-v2



From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>

itarget registers are GIC version specific. So move
initialization of these registers to vgic-v2 driver.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
---
 xen/arch/arm/vgic-v2.c |    7 +++++++
 xen/arch/arm/vgic.c    |    6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
index f57dbf9..54751b6 100644
--- a/xen/arch/arm/vgic-v2.c
+++ b/xen/arch/arm/vgic-v2.c
@@ -538,6 +538,13 @@ static int vgic_v2_vcpu_init(struct vcpu *v)
 
 static int vgic_v2_domain_init(struct domain *d)
 {
+    int i;
+
+    /* By default deliver to CPU0 */
+    for ( i = 0; i < DOMAIN_NR_RANKS(d); i++ )
+        memset(d->arch.vgic.shared_irqs[i].itargets, 0x1,
+               sizeof(d->arch.vgic.shared_irqs[i].itargets));
+
     /* We rely on gicv_setup() to initialize dbase(vGIC distributor base) */
     register_mmio_handler(d, &vgic_v2_distr_mmio_handler, d->arch.vgic.dbase,
                           PAGE_SIZE);
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 17b3b6d..6b41dbf 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -96,13 +96,7 @@ int domain_vgic_init(struct domain *d)
         INIT_LIST_HEAD(&d->arch.vgic.pending_irqs[i].lr_queue);
     }
     for (i=0; i<DOMAIN_NR_RANKS(d); i++)
-    {
         spin_lock_init(&d->arch.vgic.shared_irqs[i].lock);
-        /* By default deliver to CPU0 */
-        memset(d->arch.vgic.shared_irqs[i].itargets,
-               0x1,
-               sizeof(d->arch.vgic.shared_irqs[i].itargets));
-    }
 
     d->arch.vgic.handler->domain_init(d);
 
-- 
1.7.9.5


_______________________________________________
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®.