hw/riscv: virt: Fix interrupt parent for dynamic platform devices
commitd644e5e44ff627d6b4da73a65795f60335ba4cb9
authorAnup Patel <apatel@ventanamicro.com>
Wed, 11 May 2022 14:45:28 +0000 (11 20:15 +0530)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 24 May 2022 00:38:50 +0000 (24 10:38 +1000)
tree0a2c063561e3f78116c94f547f00d3240e76cc21
parent62cf02451edb1d23bc44a35aca56a8347dfebff7
hw/riscv: virt: Fix interrupt parent for dynamic platform devices

When both APLIC and IMSIC are present in virt machine, the APLIC should
be used as parent interrupt controller for dynamic platform devices.

In case of  multiple sockets, we should prefer interrupt controller of
socket0 for dynamic platform devices.

Fixes: 3029fab64309 ("hw/riscv: virt: Add support for generating
platform FDT entries")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220511144528.393530-9-apatel@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c