Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _SPARC64_KPROBES_H |
| 2 | #define _SPARC64_KPROBES_H |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #include <linux/types.h> |
Ananth N Mavinakayanahalli | f215d98 | 2005-11-07 01:00:11 -0800 | [diff] [blame] | 5 | #include <linux/percpu.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
Ananth N Mavinakayanahalli | 0498b63 | 2006-01-09 20:52:46 -0800 | [diff] [blame] | 14 | #define arch_remove_kprobe(p) do {} while (0) |
Anil S Keshavamurthy | e6f47f9 | 2006-06-26 00:25:29 -0700 | [diff] [blame] | 15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
bibo, mao | a9ad965 | 2006-07-30 03:03:26 -0700 | [diff] [blame] | 16 | #define flush_insn_slot(p) do { } while (0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
| 18 | /* Architecture specific copy of original instruction*/ |
| 19 | struct arch_specific_insn { |
| 20 | /* copy of the original instruction */ |
| 21 | kprobe_opcode_t insn[MAX_INSN_SIZE]; |
| 22 | }; |
| 23 | |
Ananth N Mavinakayanahalli | f215d98 | 2005-11-07 01:00:11 -0800 | [diff] [blame] | 24 | struct prev_kprobe { |
| 25 | struct kprobe *kp; |
| 26 | unsigned int status; |
| 27 | unsigned long orig_tnpc; |
| 28 | unsigned long orig_tstate_pil; |
| 29 | }; |
| 30 | |
| 31 | /* per-cpu kprobe control block */ |
| 32 | struct kprobe_ctlblk { |
| 33 | unsigned long kprobe_status; |
| 34 | unsigned long kprobe_orig_tnpc; |
| 35 | unsigned long kprobe_orig_tstate_pil; |
| 36 | long *jprobe_saved_esp; |
| 37 | struct pt_regs jprobe_saved_regs; |
| 38 | struct pt_regs *jprobe_saved_regs_location; |
| 39 | struct sparc_stackf jprobe_saved_stack; |
| 40 | struct prev_kprobe prev_kprobe; |
| 41 | }; |
| 42 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
| 44 | unsigned long val, void *data); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #endif /* _SPARC64_KPROBES_H */ |