perf_event.h 541 B

1234567891011121314151617181920
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2018 SiFive
  4. * Copyright (C) 2018 Andes Technology Corporation
  5. *
  6. */
  7. #ifndef _ASM_RISCV_PERF_EVENT_H
  8. #define _ASM_RISCV_PERF_EVENT_H
  9. #include <linux/perf_event.h>
  10. #define perf_arch_bpf_user_pt_regs(regs) (struct user_regs_struct *)regs
  11. #define perf_arch_fetch_caller_regs(regs, __ip) { \
  12. (regs)->epc = (__ip); \
  13. (regs)->s0 = (unsigned long) __builtin_frame_address(0); \
  14. (regs)->sp = current_stack_pointer; \
  15. (regs)->status = SR_PP; \
  16. }
  17. #endif /* _ASM_RISCV_PERF_EVENT_H */