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

Re: [Xen-devel] [PATCH v5 21/22] xen/arm: ITS: Generate ITS node for Dom0



Hi Vijay,

On 26/08/2015 05:40, Vijay Kilari wrote:
+        {
+            fdt32_t phandle = gic_get_msi_handle();
+            DPRINT(" Set msi-parent(ITS) phandle 0x%x\n",phandle);
+            fdt_property(kinfo->fdt, prop->name, (void *)&phandle,
+                         sizeof(phandle));
+            continue;
+        }
+
           res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len);

           xfree(new_data);
@@ -875,6 +888,10 @@ static int make_gic_node(const struct domain *d, void
*fdt,
           return res;

       res = fdt_end_node(fdt);
+    if ( res )
+        return res;
+
+    res = gic_its_hwdom_dt_node(d, node, fdt);


Can you explain why you didn't follow my suggestion to plumb the ITS node
creation in gic_hwdow_dt_node? IHMO there is no need of new callback.

Furthermore the call is misplaced. You will end up to have a DT looking like

gic {
}

gic-its {
}

rather than

gic {
   gic-its {
   }
}

  As discussed, I have tried to generate ITS node inside gic node and call
fdt_end_node() for gic after generating ITS node. But dom0 fails to
find ITS node in the generated device tree. Any clue?

I can't give any clue without any log from Linux or code you've written...

I still think that your previous code is wrong (see Documentation/devicetree/bindings/arm/gic-v3.txt in Linux tree), because fdt_end_node of the parent should be called after all the children has been created i.e

fdt_begin_node(fdt, "gic");

/* properties of the gic node */

fdt_begin_node(fdt, "ITS");

/* properties of the ITS node */

fdt_end_node(fdt); // End of ITS
fdt_end_node(fdt); // End of GIC

Note that *all* the properties of the GIC node should have been written before creating the children nodes. Otherwise the device tree is considered as invalid.

Regards,

--
Julien Grall

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