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