blob: e4efe652b54b91322a81025a42e11f44ddcc2bbe [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC64_KPROBES_H
2#define _SPARC64_KPROBES_H
3
4#include <linux/config.h>
5#include <linux/types.h>
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -08006#include <linux/percpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8typedef u32 kprobe_opcode_t;
9
10#define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */
11#define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
12#define MAX_INSN_SIZE 2
13
14#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
Ananth N Mavinakayanahalli0498b632006-01-09 20:52:46 -080015#define arch_remove_kprobe(p) do {} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17/* Architecture specific copy of original instruction*/
18struct arch_specific_insn {
19 /* copy of the original instruction */
20 kprobe_opcode_t insn[MAX_INSN_SIZE];
21};
22
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -080023struct prev_kprobe {
24 struct kprobe *kp;
25 unsigned int status;
26 unsigned long orig_tnpc;
27 unsigned long orig_tstate_pil;
28};
29
30/* per-cpu kprobe control block */
31struct kprobe_ctlblk {
32 unsigned long kprobe_status;
33 unsigned long kprobe_orig_tnpc;
34 unsigned long kprobe_orig_tstate_pil;
35 long *jprobe_saved_esp;
36 struct pt_regs jprobe_saved_regs;
37 struct pt_regs *jprobe_saved_regs_location;
38 struct sparc_stackf jprobe_saved_stack;
39 struct prev_kprobe prev_kprobe;
40};
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042extern int kprobe_exceptions_notify(struct notifier_block *self,
43 unsigned long val, void *data);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#endif /* _SPARC64_KPROBES_H */