File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 12
12
#include <linux/ptrace.h>
13
13
#include <linux/interrupt.h>
14
14
15
+ #ifdef CONFIG_RISCV_BASE_PMU
15
16
#define RISCV_BASE_COUNTERS 2
16
17
17
18
/*
18
19
* The RISCV_MAX_COUNTERS parameter should be specified.
19
20
*/
20
21
21
- #ifdef CONFIG_RISCV_BASE_PMU
22
22
#define RISCV_MAX_COUNTERS 2
23
- #endif
24
-
25
- #ifndef RISCV_MAX_COUNTERS
26
- #error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
27
- #endif
28
23
29
24
/*
30
25
* These are the indexes of bits in counteren register *minus* 1,
@@ -82,6 +77,7 @@ struct riscv_pmu {
82
77
int irq ;
83
78
};
84
79
80
+ #endif
85
81
#ifdef CONFIG_PERF_EVENTS
86
82
#define perf_arch_bpf_user_pt_regs (regs ) (struct user_regs_struct *)regs
87
83
#endif
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
43
43
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
44
44
obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
45
45
46
- obj-$(CONFIG_PERF_EVENTS ) += perf_event.o
46
+ obj-$(CONFIG_RISCV_BASE_PMU ) += perf_event.o
47
47
obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
48
48
obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
49
49
obj-$(CONFIG_RISCV_SBI) += sbi.o
You can’t perform that action at this time.
0 commit comments