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

[Xen-changelog] [xen master] xen/arm: gic-v2: Only create GICv2m node when there are GICv2m frame available



commit ba9f0951da9c47d8504d549f692fe154027fa587
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Wed Jun 15 14:40:48 2016 +0100
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Jun 17 10:28:36 2016 +0100

    xen/arm: gic-v2: Only create GICv2m node when there are GICv2m frame 
available
    
    Xen will crash on platform where GICv2m is not available with the
    following error:
    
    (XEN) Can't find ranges property for the gic node
    (XEN) Device tree generation failed (-15).
    (XEN)
    (XEN) ****************************************
    (XEN) Panic on CPU 0:
    (XEN) Could not set up DOM0 guest OS
    (XEN) ****************************************
    
    This is because the property "ranges" may not be present in the GIC
    when there are no GICv2m frames.
    
    Skip the creation of the GICv2m node when the hardware does not
    support it.
    
    This fixes boot after commit "xen/arm: Export GICv2m register frames to
    DOM0 by device tree".
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Acked-by: Wei Chen <wei.chen@xxxxxxxxxx>
---
 xen/arch/arm/gic-v2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index 2c1c0ba..4e2f4c7 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -669,6 +669,10 @@ static int gicv2m_make_dt_node(const struct domain *d,
     const struct dt_device_node *v2m = NULL;
     const struct v2m_data *v2m_data;
 
+    /* It is not necessary to create the node if there are not GICv2m frames */
+    if ( list_empty(&gicv2m_info) )
+        return 0;
+
     /* The sub-nodes require the ranges property */
     prop = dt_get_property(gic, "ranges", &len);
     if ( !prop )
--
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®.