spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / sh / include / asm / kprobes.h
blob134f3980e44a60ab9caf41796ad031f6bc966748
1 #ifndef __ASM_SH_KPROBES_H
2 #define __ASM_SH_KPROBES_H
4 #ifdef CONFIG_KPROBES
6 #include <linux/types.h>
7 #include <linux/ptrace.h>
9 typedef insn_size_t kprobe_opcode_t;
10 #define BREAKPOINT_INSTRUCTION 0xc33a
12 #define MAX_INSN_SIZE 16
13 #define MAX_STACK_SIZE 64
14 #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
15 (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
16 ? (MAX_STACK_SIZE) \
17 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
19 #define flush_insn_slot(p) do { } while (0)
20 #define kretprobe_blacklist_size 0
22 struct kprobe;
24 void arch_remove_kprobe(struct kprobe *);
25 void kretprobe_trampoline(void);
26 void jprobe_return_end(void);
28 /* Architecture specific copy of original instruction*/
29 struct arch_specific_insn {
30 /* copy of the original instruction */
31 kprobe_opcode_t insn[MAX_INSN_SIZE];
34 struct prev_kprobe {
35 struct kprobe *kp;
36 unsigned long status;
39 /* per-cpu kprobe control block */
40 struct kprobe_ctlblk {
41 unsigned long kprobe_status;
42 unsigned long jprobe_saved_r15;
43 struct pt_regs jprobe_saved_regs;
44 kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
45 struct prev_kprobe prev_kprobe;
48 extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49 extern int kprobe_exceptions_notify(struct notifier_block *self,
50 unsigned long val, void *data);
51 extern int kprobe_handle_illslot(unsigned long pc);
52 #else
54 #define kprobe_handle_illslot(pc) (-1)
56 #endif /* CONFIG_KPROBES */
57 #endif /* __ASM_SH_KPROBES_H */