xref: /openbmc/linux/arch/csky/include/asm/uprobes.h (revision f80be457)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __ASM_CSKY_UPROBES_H
4 #define __ASM_CSKY_UPROBES_H
5 
6 #include <asm/probes.h>
7 
8 #define MAX_UINSN_BYTES		4
9 
10 #define UPROBE_SWBP_INSN	USR_BKPT
11 #define UPROBE_SWBP_INSN_SIZE	2
12 #define UPROBE_XOL_SLOT_BYTES	MAX_UINSN_BYTES
13 
14 typedef u32 uprobe_opcode_t;
15 
16 struct arch_uprobe_task {
17 	unsigned long   saved_trap_no;
18 };
19 
20 struct arch_uprobe {
21 	union {
22 		u8 insn[MAX_UINSN_BYTES];
23 		u8 ixol[MAX_UINSN_BYTES];
24 	};
25 	struct arch_probe_insn api;
26 	unsigned long insn_size;
27 	bool simulate;
28 };
29 
30 int uprobe_breakpoint_handler(struct pt_regs *regs);
31 int uprobe_single_step_handler(struct pt_regs *regs);
32 
33 #endif /* __ASM_CSKY_UPROBES_H */
34