@samitouri / QOSamiQemu / commits / c50dbdc750

hw/riscv/virt.c: change 'plic' nodename to 'interrupt-controller'

We're still using "/soc/plic@..." as FDT nodename in virt.c. This is not the right nodename per the DT docs: https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/sifive%2Cplic-1.0.0.txt The nodename must be 'interrupt-controller@...' since the node inherits the 'interrupt-controller' type. In fact, ever since at least the 2020 Linux kernel commit c825a081c169cc7f ("dt-bindings: riscv: convert plic bindings to json-schema") the correct nodename has been 'interrupt-controller' for the sifive PLIC controller. There's no deprecation needed for bug fixes so we're just fixing the name. This was the policy we dud when fixing the aplic [1] and the imsic [2] nodenames to 'interrupt-controller@...' as well. The sifive_u PLIC FDT already uses the correct nodename for PLIC, so it is safe to assume that available SW is already aware of the correct nodename and this change won't affect well-behaved SW. [1] commit 29390fd ("hw/riscv/virt.c: rename aplic nodename to 'interrupt-controller'") [2] commit e8ad581 ("hw/riscv/virt.c: change imsic nodename to 'interrupt-controller'") Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260616235939.1358663-5-daniel.barboza@oss.qualcomm.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Daniel Henrique Barboza committed Jun 16, 2026 at 20:59 UTC c50dbdc750e47bbdcc27713f0d402b5d25c46511
1 file changed +1 -1
hw/riscv/virt.c
+1 -1
@@ -335,7 +335,7 @@ static void create_fdt_socket_plic(RISCVVirtState *s,
335 plic_phandles[socket] = (*phandle)++;
336 plic_addr = s->memmap[VIRT_PLIC].base +
337 (s->memmap[VIRT_PLIC].size * socket);
338 - plic_name = g_strdup_printf("/soc/plic@%lx", plic_addr);
338 + plic_name = g_strdup_printf("/soc/interrupt-controller@%lx", plic_addr);
339 qemu_fdt_add_subnode(ms->fdt, plic_name);
340 qemu_fdt_setprop_cell(ms->fdt, plic_name,
341 "#interrupt-cells", FDT_PLIC_INT_CELLS);