Skip to content

Commit

Permalink
riscv, perf: Add arch specific perf_arch_bpf_user_pt_regs
Browse files Browse the repository at this point in the history
RISC-V was missing a proper perf_arch_bpf_user_pt_regs macro for
CONFIG_PERF_EVENT builds.

Signed-off-by: Björn Töpel <bjorn.topel@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191216091343.23260-10-bjorn.topel@gmail.com
  • Loading branch information
Björn Töpel authored and Daniel Borkmann committed Dec 19, 2019
1 parent eb9928b commit 34bfc10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/riscv/include/asm/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,8 @@ struct riscv_pmu {
int irq;
};

#ifdef CONFIG_PERF_EVENTS
#define perf_arch_bpf_user_pt_regs(regs) (struct user_regs_struct *)regs
#endif

#endif /* _ASM_RISCV_PERF_EVENT_H */

0 comments on commit 34bfc10

Please sign in to comment.