aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@gmail.com>2019-12-16 10:13:43 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2019-12-19 16:03:31 +0100
commit34bfc10a6e7e573563a700239d302ab5944b3397 (patch)
tree8488f7729afe17ede7099c3101d6b038e14e321d /arch
parentriscv, bpf: Add missing uapi header for BPF_PROG_TYPE_PERF_EVENT programs (diff)
downloadlinux-dev-34bfc10a6e7e573563a700239d302ab5944b3397.tar.xz
linux-dev-34bfc10a6e7e573563a700239d302ab5944b3397.zip
riscv, perf: Add arch specific perf_arch_bpf_user_pt_regs
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
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/asm/perf_event.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/perf_event.h b/arch/riscv/include/asm/perf_event.h
index aefbfaa6a781..0234048b12bc 100644
--- a/arch/riscv/include/asm/perf_event.h
+++ b/arch/riscv/include/asm/perf_event.h
@@ -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 */