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

[Xen-changelog] [xen stable-4.8] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail



commit 15e40427d0de50b5c8c523711c00c7059edbf02b
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Wed Dec 6 14:51:37 2017 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Thu Jan 11 12:26:03 2018 -0800

    xen/arm: gic-v3: Bail out if gicv3_cpu_init fail
    
    When system registers are not enabled, all the access to them will trap
    in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only
    on success. As the rest of the code (e.g gicv3_hyp_init) relies on
    system register, it is better to bail out directly.
    
    This will save time on debugging early boot issue on GICv3 platform.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    (cherry picked from commit 9630c5ae363b4cbf8eb61366530f40c80680af4d)
---
 xen/arch/arm/gic-v3.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index 12775f5..a7d364c 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -770,8 +770,12 @@ static int gicv3_secondary_cpu_init(void)
     spin_lock(&gicv3.lock);
 
     res = gicv3_cpu_init();
+    if ( res )
+        goto out;
+
     gicv3_hyp_init();
 
+out:
     spin_unlock(&gicv3.lock);
 
     return res;
@@ -1572,8 +1576,12 @@ static int __init gicv3_init(void)
 
     gicv3_dist_init();
     res = gicv3_cpu_init();
+    if ( res )
+        goto out;
+
     gicv3_hyp_init();
 
+out:
     spin_unlock(&gicv3.lock);
 
     return res;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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