On 8/26/2026 7:05 PM, Joel Stanley wrote:
The machine state carries around the FDT size which isn't used by
anything.
AFAIK no RISC-V boards are doing anything with the fdt_size return value
from create_fdt() at this moment. Maybe they were doing it in the past and
we just kept it around.
Probably something we could clean up in other boards too.
Signed-off-by: Joel Stanley <[email protected]>
---
Reviewed-by: Daniel Henrique Barboza <[email protected]>
include/hw/riscv/tt_atlantis.h | 2 --
hw/riscv/tt_atlantis.c | 6 ++++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/hw/riscv/tt_atlantis.h b/include/hw/riscv/tt_atlantis.h
index c9308aa57017..d0cca3b02424 100644
--- a/include/hw/riscv/tt_atlantis.h
+++ b/include/hw/riscv/tt_atlantis.h
@@ -33,8 +33,6 @@ struct TTAtlantisState {
DeviceState *irqchip;
DesignWareI2CState i2c[TT_ATL_NUM_I2C];
UnimplementedDeviceState uart1;
-
- int fdt_size;
};
enum {
diff --git a/hw/riscv/tt_atlantis.c b/hw/riscv/tt_atlantis.c
index acfd0d31b368..127c89be4f60 100644
--- a/hw/riscv/tt_atlantis.c
+++ b/hw/riscv/tt_atlantis.c
@@ -366,9 +366,10 @@ static void finalize_fdt(TTAtlantisState *s)
static void create_fdt(TTAtlantisState *s)
{
MachineState *ms = MACHINE(s);
+ int fdt_size = 0;
ms->fdt = create_board_device_tree("Tenstorrent Atlantis RISC-V Machine",
- "tenstorrent,atlantis", &s->fdt_size);
+ "tenstorrent,atlantis", &fdt_size);
qemu_fdt_add_subnode(ms->fdt, "/chosen");
@@ -384,8 +385,9 @@ static void load_fdt(TTAtlantisState *s)
MachineState *ms = MACHINE(s);
char **node_path;
Error *err = NULL;
+ int fdt_size = 0;
- ms->fdt = load_device_tree(ms->dtb, &s->fdt_size);
+ ms->fdt = load_device_tree(ms->dtb, &fdt_size);
if (!ms->fdt) {
error_report("load_device_tree() failed");
exit(1);