From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 21/22] xen/arm: ITS: Generate ITS node for Dom0 Date: Wed, 26 Aug 2015 17:02:41 -0700 Message-ID: <55DE53A1.40600@citrix.com> References: <1437995524-19772-1-git-send-email-vijay.kilari@gmail.com> <1437995524-19772-22-git-send-email-vijay.kilari@gmail.com> <55D238CC.2060904@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , manish.jaggi@caviumnetworks.com, Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , Vijaya Kumar K List-Id: xen-devel@lists.xenproject.org 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