diff options
author | Eirik Aanonsen <eaa@wprmedical.com> | 2013-11-06 16:00:33 -0500 |
---|---|---|
committer | Hans-Christian Egtvedt <hegtvedt@cisco.com> | 2013-11-20 03:53:22 -0500 |
commit | dbc0d691a4dd7787efd94aa26fe7682a457e53d8 (patch) | |
tree | 3d66d4d5a8b5cbf711309b6b7bc359110877e474 /arch/avr32 | |
parent | d617b338bbfdd77e9cbd8e7dc949cee3dd73d575 (diff) |
avr32: add kprobe_ctlblk memory struct
This re-enables kprobes on AVR32 architecture.
Signed-off-by: Eirik Aanonsen <eaa@wprmedical.com>
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/include/asm/kprobes.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/avr32/include/asm/kprobes.h b/arch/avr32/include/asm/kprobes.h index 996cb656474e..45f563ed73fd 100644 --- a/arch/avr32/include/asm/kprobes.h +++ b/arch/avr32/include/asm/kprobes.h | |||
@@ -16,6 +16,7 @@ | |||
16 | typedef u16 kprobe_opcode_t; | 16 | typedef u16 kprobe_opcode_t; |
17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ | 17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ |
18 | #define MAX_INSN_SIZE 2 | 18 | #define MAX_INSN_SIZE 2 |
19 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | ||
19 | 20 | ||
20 | #define kretprobe_blacklist_size 0 | 21 | #define kretprobe_blacklist_size 0 |
21 | 22 | ||
@@ -26,6 +27,19 @@ struct arch_specific_insn { | |||
26 | kprobe_opcode_t insn[MAX_INSN_SIZE]; | 27 | kprobe_opcode_t insn[MAX_INSN_SIZE]; |
27 | }; | 28 | }; |
28 | 29 | ||
30 | struct prev_kprobe { | ||
31 | struct kprobe *kp; | ||
32 | unsigned int status; | ||
33 | }; | ||
34 | |||
35 | /* per-cpu kprobe control block */ | ||
36 | struct kprobe_ctlblk { | ||
37 | unsigned int kprobe_status; | ||
38 | struct prev_kprobe prev_kprobe; | ||
39 | struct pt_regs jprobe_saved_regs; | ||
40 | char jprobes_stack[MAX_STACK_SIZE]; | ||
41 | }; | ||
42 | |||
29 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | 43 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
30 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 44 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
31 | unsigned long val, void *data); | 45 | unsigned long val, void *data); |