aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2019-09-03 12:34:34 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2019-10-04 10:25:23 +1000
commit3a17e38f6eac0028f2e4ca052455b38a4048c85d (patch)
treef09a84d6de8e7742c79a2908f4b89b3c74fe0db4 /hw/ppc
parentf767b1ac5766fcc48cc3939eeb7db7b95b98408b (diff)
downloadqemu-3a17e38f6eac0028f2e4ca052455b38a4048c85d.zip
qemu-3a17e38f6eac0028f2e4ca052455b38a4048c85d.tar.gz
qemu-3a17e38f6eac0028f2e4ca052455b38a4048c85d.tar.bz2
spapr: Skip leading zeroes from memory@ DT node names
The device tree build by QEMU at the machine reset time is used by SLOF to build its internal device tree but the node names are not preserved exactly so when QEMU provides a device tree update in response to H_CAS, it might become tricky to match a node from the update blob to the actual node in SLOF. This removed leading zeroes from "memory@" nodes and makes the DTC checker happy. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c69c034..42a5b8d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -388,7 +388,7 @@ static int spapr_populate_memory_node(void *fdt, int nodeid, hwaddr start,
mem_reg_property[0] = cpu_to_be64(start);
mem_reg_property[1] = cpu_to_be64(size);
- sprintf(mem_name, "memory@" TARGET_FMT_lx, start);
+ sprintf(mem_name, "memory@%" HWADDR_PRIx, start);
off = fdt_add_subnode(fdt, 0, mem_name);
_FDT(off);
_FDT((fdt_setprop_string(fdt, off, "device_type", "memory")));