blob: becc38fa06c5a5c60422c4f4d62efcb1ab4494ce [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC64_KPROBES_H
2#define _SPARC64_KPROBES_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <linux/types.h>
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -08005#include <linux/percpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
7typedef 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 Mavinakayanahalli0498b632006-01-09 20:52:46 -080014#define arch_remove_kprobe(p) do {} while (0)
Anil S Keshavamurthye6f47f92006-06-26 00:25:29 -070015#define ARCH_INACTIVE_KPROBE_COUNT 0
David S. Millerf0882582006-12-10 02:42:03 -080016
17#define flush_insn_slot(p) \
18do { flushi(&(p)->ainsn.insn[0]); \
19 flushi(&(p)->ainsn.insn[1]); \
20} while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
22/* Architecture specific copy of original instruction*/
23struct arch_specific_insn {
24 /* copy of the original instruction */
25 kprobe_opcode_t insn[MAX_INSN_SIZE];
26};
27
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -080028struct prev_kprobe {
29 struct kprobe *kp;
David S. Millerf0882582006-12-10 02:42:03 -080030 unsigned long status;
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -080031 unsigned long orig_tnpc;
32 unsigned long orig_tstate_pil;
33};
34
35/* per-cpu kprobe control block */
36struct kprobe_ctlblk {
37 unsigned long kprobe_status;
38 unsigned long kprobe_orig_tnpc;
39 unsigned long kprobe_orig_tstate_pil;
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -080040 struct pt_regs jprobe_saved_regs;
Ananth N Mavinakayanahallif215d982005-11-07 01:00:11 -080041 struct prev_kprobe prev_kprobe;
42};
43
Linus Torvalds1da177e2005-04-16 15:20:36 -070044extern int kprobe_exceptions_notify(struct notifier_block *self,
45 unsigned long val, void *data);
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#endif /* _SPARC64_KPROBES_H */