]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm: fsl-imx8mp: Don't call qdev_get_machine in soc init
authorAlistair Francis <alistair.francis@wdc.com>
Thu, 12 Mar 2026 04:31:56 +0000 (14:31 +1000)
committerThomas Huth <thuth@redhat.com>
Mon, 16 Mar 2026 10:36:31 +0000 (11:36 +0100)
commitb67d0bcdd41cb536883c3732a0f95803e975dcd8
tree0af4bb3ef67003fe27fc7f447462ae62cde9c4d9
parent99757d557437dbcf57a3d43fe7427fe89f248ef3
hw/arm: fsl-imx8mp: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device fsl-imx8mp,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of initialising the CPUs in
the SoC init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-6-alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/arm/fsl-imx8mp.c