Skip to content

Commit 8c8d0f0

Browse files
atishp04avpatel
authored andcommitted
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 <[email protected]> Signed-off-by: Atish Patra <[email protected]> Acked-by: Paul Walmsley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
1 parent 5c6d333 commit 8c8d0f0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/perf/riscv_pmu_sbi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ PMU_FORMAT_ATTR(event, "config:0-47");
6363
PMU_FORMAT_ATTR(firmware, "config:62-63");
6464

6565
static bool sbi_v2_available;
66+
static bool sbi_v3_available;
6667
static DEFINE_STATIC_KEY_FALSE(sbi_pmu_snapshot_available);
6768
#define sbi_pmu_snapshot_available() \
6869
static_branch_unlikely(&sbi_pmu_snapshot_available)
@@ -1452,6 +1453,9 @@ static int __init pmu_sbi_devinit(void)
14521453
if (sbi_spec_version >= sbi_mk_version(2, 0))
14531454
sbi_v2_available = true;
14541455

1456+
if (sbi_spec_version >= sbi_mk_version(3, 0))
1457+
sbi_v3_available = true;
1458+
14551459
ret = cpuhp_setup_state_multi(CPUHP_AP_PERF_RISCV_STARTING,
14561460
"perf/riscv/pmu:starting",
14571461
pmu_sbi_starting_cpu, pmu_sbi_dying_cpu);

0 commit comments

Comments
 (0)