xen/arm: fix duplicate memory node in DT
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 8 Oct 2019 01:15:01 +0000 (18:15 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 8 Oct 2019 21:10:10 +0000 (14:10 -0700)
commit98d1dac88f82c2b79d528faabe5e3fda8133e8bb
tree282aa3efcf9c7c46fe65e242cb28b1f34df9ab19
parenta89a41bc33d4fe16609090179aa7d92fbba90138
xen/arm: fix duplicate memory node in DT

When reserved-memory regions are present in the host device tree, dom0
is started with multiple memory nodes. Each memory node should have a
unique name, but today they are all called "memory" leading to Linux
printing the following warning at boot:

  OF: Duplicate name in base, renamed to "memory#1"

This patch fixes the problem by appending a "@<unit-address>" to the
name, as per the Device Tree specification, where <unit-address> matches
the base of address of the first region.

Fixes: 248faa637d2 (xen/arm: add reserved-memory regions to the dom0 memory node)
Reported-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/arm/domain_build.c