Message ID | 1471343113-10652-13-git-send-email-zhaoshenglong@huawei.com |
---|---|
State | Superseded |
Headers | show |
Hi Shannon, On 16/08/2016 06:25, Shannon Zhao wrote: > From: Shannon Zhao <shannon.zhao@linaro.org> > > Rename finalise_one_memory_node to finalise_one_node and pass the node > name via function parameter. > > This is useful for adding ACPI module which will be added by a later > patch. > > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Acked-by: Julien Grall <julien.grall@arm.com> Regards, > --- > tools/libxl/libxl_arm.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c > index fa0497c..b95fdf5 100644 > --- a/tools/libxl/libxl_arm.c > +++ b/tools/libxl/libxl_arm.c > @@ -904,11 +904,11 @@ out: > return rc; > } > > -static void finalise_one_memory_node(libxl__gc *gc, void *fdt, > - uint64_t base, uint64_t size) > +static void finalise_one_node(libxl__gc *gc, void *fdt, const char *uname, > + uint64_t base, uint64_t size) > { > int node, res; > - const char *name = GCSPRINTF("/memory@%"PRIx64, base); > + const char *name = GCSPRINTF("%s@%"PRIx64, uname, base); > > node = fdt_path_offset(fdt, name); > assert(node > 0); > @@ -971,7 +971,7 @@ int libxl__arch_domain_finalise_hw_description(libxl__gc *gc, > for (i = 0; i < GUEST_RAM_BANKS; i++) { > const uint64_t size = (uint64_t)dom->rambank_size[i] << XC_PAGE_SHIFT; > > - finalise_one_memory_node(gc, fdt, bankbase[i], size); > + finalise_one_node(gc, fdt, "/memory", bankbase[i], size); > } > > debug_dump_fdt(gc, fdt); >
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index fa0497c..b95fdf5 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -904,11 +904,11 @@ out: return rc; } -static void finalise_one_memory_node(libxl__gc *gc, void *fdt, - uint64_t base, uint64_t size) +static void finalise_one_node(libxl__gc *gc, void *fdt, const char *uname, + uint64_t base, uint64_t size) { int node, res; - const char *name = GCSPRINTF("/memory@%"PRIx64, base); + const char *name = GCSPRINTF("%s@%"PRIx64, uname, base); node = fdt_path_offset(fdt, name); assert(node > 0); @@ -971,7 +971,7 @@ int libxl__arch_domain_finalise_hw_description(libxl__gc *gc, for (i = 0; i < GUEST_RAM_BANKS; i++) { const uint64_t size = (uint64_t)dom->rambank_size[i] << XC_PAGE_SHIFT; - finalise_one_memory_node(gc, fdt, bankbase[i], size); + finalise_one_node(gc, fdt, "/memory", bankbase[i], size); } debug_dump_fdt(gc, fdt);