aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/riscv/numa.c8
-rw-r--r--hw/riscv/spike.c2
-rw-r--r--hw/riscv/virt.c2
-rw-r--r--include/hw/riscv/numa.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/hw/riscv/numa.c b/hw/riscv/numa.c
index f4343f5..4720102 100644
--- a/hw/riscv/numa.c
+++ b/hw/riscv/numa.c
@@ -164,7 +164,7 @@ void riscv_socket_fdt_write_id(const MachineState *ms, const char *node_name,
}
}
-void riscv_socket_fdt_write_distance_matrix(const MachineState *ms, void *fdt)
+void riscv_socket_fdt_write_distance_matrix(const MachineState *ms)
{
int i, j, idx;
uint32_t *dist_matrix, dist_matrix_size;
@@ -184,10 +184,10 @@ void riscv_socket_fdt_write_distance_matrix(const MachineState *ms, void *fdt)
}
}
- qemu_fdt_add_subnode(fdt, "/distance-map");
- qemu_fdt_setprop_string(fdt, "/distance-map", "compatible",
+ qemu_fdt_add_subnode(ms->fdt, "/distance-map");
+ qemu_fdt_setprop_string(ms->fdt, "/distance-map", "compatible",
"numa-distance-map-v1");
- qemu_fdt_setprop(fdt, "/distance-map", "distance-matrix",
+ qemu_fdt_setprop(ms->fdt, "/distance-map", "distance-matrix",
dist_matrix, dist_matrix_size);
g_free(dist_matrix);
}
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 5f12d80..badc11e 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -174,7 +174,7 @@ static void create_fdt(SpikeState *s, const MemMapEntry *memmap,
g_free(clust_name);
}
- riscv_socket_fdt_write_distance_matrix(mc, fdt);
+ riscv_socket_fdt_write_distance_matrix(mc);
qemu_fdt_add_subnode(fdt, "/chosen");
qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", "/htif");
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 6a2422a..e6d4f06 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -805,7 +805,7 @@ static void create_fdt_sockets(RISCVVirtState *s, const MemMapEntry *memmap,
}
}
- riscv_socket_fdt_write_distance_matrix(mc, mc->fdt);
+ riscv_socket_fdt_write_distance_matrix(mc);
}
static void create_fdt_virtio(RISCVVirtState *s, const MemMapEntry *memmap,
diff --git a/include/hw/riscv/numa.h b/include/hw/riscv/numa.h
index 634df66..8f52802 100644
--- a/include/hw/riscv/numa.h
+++ b/include/hw/riscv/numa.h
@@ -100,9 +100,9 @@ void riscv_socket_fdt_write_id(const MachineState *ms, const char *node_name,
* @ms: pointer to machine state
* @socket_id: socket index
*
- * Write NUMA distance matrix in FDT for given machine
+ * Write NUMA distance matrix in MachineState->fdt
*/
-void riscv_socket_fdt_write_distance_matrix(const MachineState *ms, void *fdt);
+void riscv_socket_fdt_write_distance_matrix(const MachineState *ms);
CpuInstanceProperties
riscv_numa_cpu_index_to_props(MachineState *ms, unsigned cpu_index);