From deeb9969357d377110ac61fe3c6482c7303313ae Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sun, 12 Jan 2025 23:56:14 +0100 Subject: hw/arm/v7m: Remove use of &first_cpu in machine_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When instanciating the machine model, the machine_init() implementations usually create the CPUs, so have access to its first CPU. Use that rather then the &first_cpu global. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Samuel Tardieu Message-id: 20250112225614.33723-4-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/arm/b-l475e-iot01a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/arm/b-l475e-iot01a.c') diff --git a/hw/arm/b-l475e-iot01a.c b/hw/arm/b-l475e-iot01a.c index 5002a40f06..c9a5209216 100644 --- a/hw/arm/b-l475e-iot01a.c +++ b/hw/arm/b-l475e-iot01a.c @@ -82,7 +82,7 @@ static void bl475e_init(MachineState *machine) sysbus_realize(SYS_BUS_DEVICE(&s->soc), &error_fatal); sc = STM32L4X5_SOC_GET_CLASS(&s->soc); - armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename, 0, + armv7m_load_kernel(s->soc.armv7m.cpu, machine->kernel_filename, 0, sc->flash_size); if (object_class_by_name(TYPE_DM163)) { -- cgit 1.4.1