]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/riscv/virt.c: remove 'is_32_bit' param from create_fdt_socket_cpus()
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Wed, 11 Jan 2023 17:09:42 +0000 (14:09 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 20 Jan 2023 00:14:14 +0000 (10:14 +1000)
commit914c97f968cc70be5275fd230d38f99882896032
tree5f7699bb0217d857447e5c6e03e4191a1b460818
parentf5be2ccb43d3d8466f15f53b82f5fdba1684fc56
hw/riscv/virt.c: remove 'is_32_bit' param from create_fdt_socket_cpus()

create_fdt_socket_cpus() writes a different 'mmu-type' value if we're
running in 32 or 64 bits. However, the flag is being calculated during
virt_machine_init(), and is passed around in create_fdt(), then
create_fdt_socket(), and then finally create_fdt_socket_cpus(). None of
the intermediate functions are using the flag, which is a bit
misleading.

Remove 'is_32_bit' flag from create_fdt_socket_cpus() and calculate it
using the already available RISCVVirtState pointer. This will also
change the signature of create_fdt_socket() and create_fdt(), making it
clear that these functions don't do anything special when we're running
in 32 bit mode.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230111170948.316276-5-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c