[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] hw/riscv: virt: Avoid double FDT platform node

From: Dylan Reid
Subject: [PATCH] hw/riscv: virt: Avoid double FDT platform node
Date: Thu, 12 May 2022 18:21:03 +0000

When starting the virt machine with `-machine virt,aia=aplic-imsic`,
both the imsic and aplic init code will add platform fdt nodes by
calling `platform_bus_add_all_fdt_nodes`. This leads to an error at
qemu_fdt_add_subnode: Failed to create subnode /platform@4000000: FDT_ERR_EXISTS

The call from `create_fdt_imsic` is not needed as an imsic is currently
always combined with an aplic that will create the nodes.

Fixes: 3029fab64309 ("hw/riscv: virt: Add support for generating platform FDT 
Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
 hw/riscv/virt.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 3326f4db96..d625f776a6 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -561,11 +561,6 @@ static void create_fdt_imsic(RISCVVirtState *s, const 
MemMapEntry *memmap,
     qemu_fdt_setprop_cell(mc->fdt, imsic_name, "phandle", *msi_m_phandle);
-    platform_bus_add_all_fdt_nodes(mc->fdt, imsic_name,
-                                   memmap[VIRT_PLATFORM_BUS].base,
-                                   memmap[VIRT_PLATFORM_BUS].size,
-                                   VIRT_PLATFORM_BUS_IRQ);
     /* S-level IMSIC node */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]