[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 12/12] xen: strip /chosen/module@<N>/* from dom0 device tree
These nodes are used by Xen to find the initial modules. Only drop the "xen,multiboot-module" compatible nodes in case someone else has a similar idea. Signed-off-by: Ian Campbell <ian.campbel@xxxxxxxxxx> --- xen/arch/arm/domain_build.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 7a964f7..d2158d8 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -179,6 +179,7 @@ static int write_nodes(struct domain *d, struct kernel_info *kinfo, int depth = 0, last_depth = -1; u32 address_cells[DEVICE_TREE_MAX_DEPTH]; u32 size_cells[DEVICE_TREE_MAX_DEPTH]; + int parents[DEVICE_TREE_MAX_DEPTH]; int ret; for ( node = 0, depth = 0; @@ -196,10 +197,25 @@ static int write_nodes(struct domain *d, struct kernel_info *kinfo, } while ( last_depth-- >= depth ) + { + parents[last_depth+1] = -1; fdt_end_node(kinfo->fdt); + } address_cells[depth] = device_tree_get_u32(fdt, node, "#address-cells"); size_cells[depth] = device_tree_get_u32(fdt, node, "#size-cells"); + parents[depth] = node; + + /* Skip /chosen/module@<N>/ nodes */ + if ( depth == 2 && + device_tree_node_matches(fdt, parents[1], "chosen") && + device_tree_node_matches(fdt, node, "module") && + fdt_node_check_compatible(fdt, node, + "xen,multiboot-module" ) == 0 ) + { + last_depth = depth - 1; + continue; + } fdt_begin_node(kinfo->fdt, name); -- 1.7.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |