aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv
diff options
context:
space:
mode:
authorRob Bradford <rbradford@rivosinc.com>2023-10-31 15:37:15 +0000
committerAlistair Francis <alistair.francis@wdc.com>2023-11-07 11:06:02 +1000
commit2571a6427c4ded57e44d4c6cf92376d869a75a5c (patch)
treebcec662289cc1659737cd0bb5204a65ee89373d9 /hw/riscv
parent7c1bb1d8d412f03ec7d6042971892bd0dff222b7 (diff)
downloadqemu-2571a6427c4ded57e44d4c6cf92376d869a75a5c.zip
qemu-2571a6427c4ded57e44d4c6cf92376d869a75a5c.tar.gz
qemu-2571a6427c4ded57e44d4c6cf92376d869a75a5c.tar.bz2
target/riscv: Use existing PMU counter mask in FDT generation
During the FDT generation use the existing mask containing the enabled counters rather then generating a new one. Using the existing mask will support the use of discontinuous counters. Signed-off-by: Rob Bradford <rbradford@rivosinc.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Message-ID: <20231031154000.18134-4-rbradford@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv')
-rw-r--r--hw/riscv/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 1732c42..c7fc97e 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -722,7 +722,7 @@ static void create_fdt_pmu(RISCVVirtState *s)
pmu_name = g_strdup_printf("/pmu");
qemu_fdt_add_subnode(ms->fdt, pmu_name);
qemu_fdt_setprop_string(ms->fdt, pmu_name, "compatible", "riscv,pmu");
- riscv_pmu_generate_fdt_node(ms->fdt, hart.cfg.pmu_num, pmu_name);
+ riscv_pmu_generate_fdt_node(ms->fdt, hart.pmu_avail_ctrs, pmu_name);
g_free(pmu_name);
}