1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_KPROBES_H
3 #define __ASM_SH_KPROBES_H
5 #include <asm-generic/kprobes.h>
7 #define BREAKPOINT_INSTRUCTION 0xc33a
11 #include <linux/types.h>
12 #include <linux/ptrace.h>
14 typedef insn_size_t kprobe_opcode_t
;
16 #define MAX_INSN_SIZE 16
17 #define MAX_STACK_SIZE 64
18 #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
19 (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
21 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
23 #define flush_insn_slot(p) do { } while (0)
24 #define kretprobe_blacklist_size 0
28 void arch_remove_kprobe(struct kprobe
*);
29 void __kretprobe_trampoline(void);
31 /* Architecture specific copy of original instruction*/
32 struct arch_specific_insn
{
33 /* copy of the original instruction */
34 kprobe_opcode_t insn
[MAX_INSN_SIZE
];
42 /* per-cpu kprobe control block */
43 struct kprobe_ctlblk
{
44 unsigned long kprobe_status
;
45 struct prev_kprobe prev_kprobe
;
48 extern int kprobe_fault_handler(struct pt_regs
*regs
, int trapnr
);
49 extern int kprobe_handle_illslot(unsigned long pc
);
52 #define kprobe_handle_illslot(pc) (-1)
54 #endif /* CONFIG_KPROBES */
55 #endif /* __ASM_SH_KPROBES_H */