1 #ifndef _SPARC64_KPROBES_H
2 #define _SPARC64_KPROBES_H
4 #include <linux/types.h>
5 #include <linux/percpu.h>
7 typedef u32 kprobe_opcode_t;
9 #define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */
10 #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
11 #define MAX_INSN_SIZE 2
13 #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
14 #define arch_remove_kprobe(p) do {} while (0)
15 #define ARCH_INACTIVE_KPROBE_COUNT 0
17 #define flush_insn_slot(p) \
18 do { flushi(&(p)->ainsn.insn[0]); \
19 flushi(&(p)->ainsn.insn[1]); \
22 /* Architecture specific copy of original instruction*/
23 struct arch_specific_insn {
24 /* copy of the original instruction */
25 kprobe_opcode_t insn[MAX_INSN_SIZE];
31 unsigned long orig_tnpc;
32 unsigned long orig_tstate_pil;
35 /* per-cpu kprobe control block */
36 struct kprobe_ctlblk {
37 unsigned long kprobe_status;
38 unsigned long kprobe_orig_tnpc;
39 unsigned long kprobe_orig_tstate_pil;
40 struct pt_regs jprobe_saved_regs;
41 struct prev_kprobe prev_kprobe;
44 extern int kprobe_exceptions_notify(struct notifier_block *self,
45 unsigned long val, void *data);
46 #endif /* _SPARC64_KPROBES_H */