Linux 4.8-rc8
[linux/fpc-iii.git] / arch / sparc / include / asm / kprobes.h
bloba145d798e1123a9f189e4d546092f689551289f6
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 kretprobe_blacklist_size 0
15 #define arch_remove_kprobe(p) do {} while (0)
17 #define flush_insn_slot(p) \
18 do { flushi(&(p)->ainsn.insn[0]); \
19 flushi(&(p)->ainsn.insn[1]); \
20 } while (0)
22 void kretprobe_trampoline(void);
24 /* Architecture specific copy of original instruction*/
25 struct arch_specific_insn {
26 /* copy of the original instruction */
27 kprobe_opcode_t insn[MAX_INSN_SIZE];
30 struct prev_kprobe {
31 struct kprobe *kp;
32 unsigned long status;
33 unsigned long orig_tnpc;
34 unsigned long orig_tstate_pil;
37 /* per-cpu kprobe control block */
38 struct kprobe_ctlblk {
39 unsigned long kprobe_status;
40 unsigned long kprobe_orig_tnpc;
41 unsigned long kprobe_orig_tstate_pil;
42 struct pt_regs jprobe_saved_regs;
43 struct prev_kprobe prev_kprobe;
46 int kprobe_exceptions_notify(struct notifier_block *self,
47 unsigned long val, void *data);
48 int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49 asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
50 struct pt_regs *regs);
51 #endif /* _SPARC64_KPROBES_H */