1 #ifndef __ASM_SH_KPROBES_H
2 #define __ASM_SH_KPROBES_H
6 #include <linux/types.h>
7 #include <linux/ptrace.h>
11 typedef u16 kprobe_opcode_t;
12 #define BREAKPOINT_INSTRUCTION 0xc3ff
14 #define MAX_INSN_SIZE 16
15 #define MAX_STACK_SIZE 64
16 #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
17 (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
19 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
21 #define regs_return_value(regs) ((regs)->regs[0])
22 #define flush_insn_slot(p) do { } while (0)
23 #define kretprobe_blacklist_size 0
27 void arch_remove_kprobe(struct kprobe *);
28 void kretprobe_trampoline(void);
29 void jprobe_return_end(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 unsigned long jprobe_saved_r15;
46 struct pt_regs jprobe_saved_regs;
47 kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
48 struct prev_kprobe prev_kprobe;
51 extern int kprobe_exceptions_notify(struct notifier_block *self,
52 unsigned long val, void *data);
53 extern int kprobe_handle_illslot(unsigned long pc);
56 #define kprobe_handle_illslot(pc) (-1)
58 #endif /* CONFIG_KPROBES */
59 #endif /* __ASM_SH_KPROBES_H */