probes.h 563 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_RISCV_PROBES_H
  3. #define _ASM_RISCV_PROBES_H
  4. typedef u32 probe_opcode_t;
  5. typedef bool (probes_handler_t) (u32 opcode, unsigned long addr, struct pt_regs *);
  6. /* architecture specific copy of original instruction */
  7. struct arch_probe_insn {
  8. probe_opcode_t *insn;
  9. probes_handler_t *handler;
  10. /* restore address after simulation */
  11. unsigned long restore;
  12. };
  13. #ifdef CONFIG_KPROBES
  14. typedef u32 kprobe_opcode_t;
  15. struct arch_specific_insn {
  16. struct arch_probe_insn api;
  17. };
  18. #endif
  19. #endif /* _ASM_RISCV_PROBES_H */