]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/riscv/virt: Remove unnecessary use of &first_cpu
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 12 Jan 2025 23:13:44 +0000 (00:13 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Sat, 18 Jan 2025 23:44:35 +0000 (09:44 +1000)
commitcb938a0a24bc911894b6fec1429e2e0cc8b2f948
treebf506896fdc6962fe367f26ba02eeef178acc50b
parent7703a1d1e6479084d58ee3106a3c8a72ed7357eb
hw/riscv/virt: Remove unnecessary use of &first_cpu

virt_machine_init() creates the HARTs vCPUs, then later
virt_machine_done() calls create_fdt_sockets(), so the
latter has access to the first vCPU via:

  RISCVVirtState {
    RISCVHartArrayState {
      RISCVCPU *harts;
      ...

    } soc[VIRT_SOCKETS_MAX];
    ...

  } s;

Directly use that instead of the &first_cpu global.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250112231344.34632-3-philmd@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c