Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers/perf: riscv: Add SBI v3.0 flag

There are new PMU related features introduced in SBI v3.0.
1. Raw Event v2 which allows mhpmeventX value to be 56 bit wide.
2. Get Event info function to do a bulk query at one shot.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Acked-by: Paul Walmsley <pjw@kernel.org>
Link: https://lore.kernel.org/r/20250909-pmu_event_info-v6-1-d8f80cacb884@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>

authored by

Atish Patra and committed by
Anup Patel
8c8d0f00 5c6d333a

+4
+4
drivers/perf/riscv_pmu_sbi.c
··· 63 63 PMU_FORMAT_ATTR(firmware, "config:62-63"); 64 64 65 65 static bool sbi_v2_available; 66 + static bool sbi_v3_available; 66 67 static DEFINE_STATIC_KEY_FALSE(sbi_pmu_snapshot_available); 67 68 #define sbi_pmu_snapshot_available() \ 68 69 static_branch_unlikely(&sbi_pmu_snapshot_available) ··· 1452 1451 1453 1452 if (sbi_spec_version >= sbi_mk_version(2, 0)) 1454 1453 sbi_v2_available = true; 1454 + 1455 + if (sbi_spec_version >= sbi_mk_version(3, 0)) 1456 + sbi_v3_available = true; 1455 1457 1456 1458 ret = cpuhp_setup_state_multi(CPUHP_AP_PERF_RISCV_STARTING, 1457 1459 "perf/riscv/pmu:starting",