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

[Xen-changelog] [xen master] xen/arm: move itargets initialization to vgic-v2



commit 77e6abba1f853b4c9a2628f32772830514fd0f3f
Author:     Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
AuthorDate: Thu Sep 4 18:45:21 2014 +0530
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Sep 9 11:35:05 2014 +0100

    xen/arm: move itargets initialization to vgic-v2
    
    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>
    Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 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);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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