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

[Xen-devel] [PATCH RFC 2/6] xen/arm: hwdom GIC: inherit interrupt parent from host device tree



From: "Kyle J. Temkin" <temkink@xxxxxxxxxxxx>

Currently, we don't copy in the interrupt parent from the host device
tree; and instead let Xen automatically figure it out when generating
the device tree for the hardware domain.

In cases where a non-GIC interrupt controller is present, this can lead
to incorrect assignment of interrupt parents, and throughly confuse the
hwdom. Instead of letting this fall to chance, pass through the
phandles.

Signed-off-by: Kyle Temkin <temkink@xxxxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 35ab08d..52c9a01 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -764,8 +764,8 @@ static int make_gic_node(const struct domain *d, void *fdt,
 {
     const struct dt_device_node *gic = dt_interrupt_controller;
     int res = 0;
-    const void *addrcells, *sizecells;
-    u32 addrcells_len, sizecells_len;
+    const void *addrcells, *sizecells, *iparent;
+    u32 addrcells_len, sizecells_len, iparent_len;
 
     /*
      * Xen currently supports only a single GIC. Discard any secondary
@@ -795,6 +795,14 @@ static int make_gic_node(const struct domain *d, void *fdt,
             return res;
     }
 
+    iparent = dt_get_property(gic, "interrupt-parent", &iparent_len);
+    if ( iparent )
+    {
+        res = fdt_property(fdt, "interrupt-parent", iparent, iparent_len);
+        if ( res )
+          return res;
+    }
+
     addrcells = dt_get_property(gic, "#address-cells", &addrcells_len);
     if ( addrcells )
     {
-- 
2.9.2


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

 


Rackspace

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