]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef _SPARC64_KPROBES_H |
2 | #define _SPARC64_KPROBES_H | |
3 | ||
1da177e4 | 4 | #include <linux/types.h> |
f215d985 | 5 | #include <linux/percpu.h> |
1da177e4 LT |
6 | |
7 | typedef u32 kprobe_opcode_t; | |
8 | ||
9 | #define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */ | |
10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ | |
11 | #define MAX_INSN_SIZE 2 | |
12 | ||
0498b635 | 13 | #define arch_remove_kprobe(p) do {} while (0) |
e6f47f97 | 14 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
f0882589 DM |
15 | |
16 | #define flush_insn_slot(p) \ | |
17 | do { flushi(&(p)->ainsn.insn[0]); \ | |
18 | flushi(&(p)->ainsn.insn[1]); \ | |
19 | } while (0) | |
1da177e4 LT |
20 | |
21 | /* Architecture specific copy of original instruction*/ | |
22 | struct arch_specific_insn { | |
23 | /* copy of the original instruction */ | |
24 | kprobe_opcode_t insn[MAX_INSN_SIZE]; | |
25 | }; | |
26 | ||
f215d985 AM |
27 | struct prev_kprobe { |
28 | struct kprobe *kp; | |
f0882589 | 29 | unsigned long status; |
f215d985 AM |
30 | unsigned long orig_tnpc; |
31 | unsigned long orig_tstate_pil; | |
32 | }; | |
33 | ||
34 | /* per-cpu kprobe control block */ | |
35 | struct kprobe_ctlblk { | |
36 | unsigned long kprobe_status; | |
37 | unsigned long kprobe_orig_tnpc; | |
38 | unsigned long kprobe_orig_tstate_pil; | |
f215d985 | 39 | struct pt_regs jprobe_saved_regs; |
f215d985 AM |
40 | struct prev_kprobe prev_kprobe; |
41 | }; | |
42 | ||
1da177e4 LT |
43 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
44 | unsigned long val, void *data); | |
127cda1e | 45 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
1da177e4 | 46 | #endif /* _SPARC64_KPROBES_H */ |