Skip to content

Commit 1e206fa

Browse files
XiaoWang1772palmer-dabbelt
authored andcommitted
drivers/perf: riscv: Remove redundant macro check
The macro CONFIG_RISCV_PMU must have been defined when riscv_pmu.c gets compiled, so this patch removes the redundant check. Signed-off-by: Xiao Wang <[email protected]> Reviewed-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f25170a commit 1e206fa

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/perf/riscv_pmu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ void arch_perf_update_userpage(struct perf_event *event,
3939
userpg->cap_user_time_short = 0;
4040
userpg->cap_user_rdpmc = riscv_perf_user_access(event);
4141

42-
#ifdef CONFIG_RISCV_PMU
4342
/*
4443
* The counters are 64-bit but the priv spec doesn't mandate all the
4544
* bits to be implemented: that's why, counter width can vary based on
4645
* the cpu vendor.
4746
*/
4847
if (userpg->cap_user_rdpmc)
4948
userpg->pmc_width = to_riscv_pmu(event->pmu)->ctr_get_width(event->hw.idx) + 1;
50-
#endif
5149

5250
do {
5351
rd = sched_clock_read_begin(&seq);

0 commit comments

Comments
 (0)