All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dylan Reid <dylan@rivosinc.com>
To: qemu-riscv@nongnu.org
Cc: qemu-devel@nongnu.org, palmer@dabbelt.com,
	alistair.francis@wdc.com, bin.meng@windriver.com,
	Dylan Reid <dgreid@rivosinc.com>
Subject: [PATCH] hw/riscv: virt: Avoid double FDT platform node
Date: Thu, 12 May 2022 18:21:03 +0000	[thread overview]
Message-ID: <20220512182103.408627-1-dgreid@rivosinc.com> (raw)

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
startup:
```
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 entries")
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);
-
     g_free(imsic_name);
 
     /* S-level IMSIC node */
-- 
2.30.2



             reply	other threads:[~2022-05-12 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 18:21 Dylan Reid [this message]
2022-05-16 23:22 ` [PATCH] hw/riscv: virt: Avoid double FDT platform node Alistair Francis
2022-05-17  5:10 ` Alistair Francis
2022-05-19 15:04 ` Anup Patel
2022-05-19 20:45   ` Dylan Reid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512182103.408627-1-dgreid@rivosinc.com \
    --to=dylan@rivosinc.com \
    --cc=alistair.francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=dgreid@rivosinc.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.