From: Ruslan Ruslichenko <Ruslan_Ruslichenko@epam.com>
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 <Ruslan_Ruslichenko@epam.com>
---
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 b0e26e11bc..f3a47cbafe 100644
--- a/hw/core/fdt_generic_util.c
+++ b/hw/core/fdt_generic_util.c
@@ -151,6 +151,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)
{
FDTMachineInfo *fdti = fdt_init_new_fdti(fdt);
@@ -164,6 +174,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();
--
2.43.0