From: Ruslan Ruslichenko <[email protected]> Realize cpu clusters at the end of fdt machine creation process, as they need to be created after cpu's nodes are realized.
Signed-off-by: Ruslan Ruslichenko <[email protected]> --- hw/core/fdt_generic_util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/core/fdt_generic_util.c b/hw/core/fdt_generic_util.c index 63390e2f17..3179248142 100644 --- a/hw/core/fdt_generic_util.c +++ b/hw/core/fdt_generic_util.c @@ -157,6 +157,16 @@ static void fdt_init_all_irqs(FDTMachineInfo *fdti) } } +static void fdt_init_cpu_clusters(FDTMachineInfo *fdti) +{ + FDTCPUCluster *cl = fdti->clusters; + + while (cl) { + qdev_realize(DEVICE(cl->cpu_cluster), NULL, &error_fatal); + cl = cl->next; + } +} + FDTMachineInfo *fdt_generic_create_machine(void *fdt, qemu_irq *cpu_irq) { char node_path[DT_PATH_LENGTH]; @@ -172,6 +182,7 @@ FDTMachineInfo *fdt_generic_create_machine(void *fdt, qemu_irq *cpu_irq) while (qemu_co_enter_next(fdti->cq, NULL)) { ; } + fdt_init_cpu_clusters(fdti); fdt_init_all_irqs(fdti); memory_region_transaction_commit(); } else { -- 2.43.0
