Skip to content

Commit

Permalink
avr32: add kprobe_ctlblk memory struct
Browse files Browse the repository at this point in the history
This re-enables kprobes on AVR32 architecture.

Signed-off-by: Eirik Aanonsen <eaa@wprmedical.com>
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
  • Loading branch information
Eirik Aanonsen authored and Hans-Christian Egtvedt committed Nov 20, 2013
1 parent d617b33 commit dbc0d69
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/avr32/include/asm/kprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
typedef u16 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */
#define MAX_INSN_SIZE 2
#define MAX_STACK_SIZE 64 /* 32 would probably be OK */

#define kretprobe_blacklist_size 0

Expand All @@ -26,6 +27,19 @@ struct arch_specific_insn {
kprobe_opcode_t insn[MAX_INSN_SIZE];
};

struct prev_kprobe {
struct kprobe *kp;
unsigned int status;
};

/* per-cpu kprobe control block */
struct kprobe_ctlblk {
unsigned int kprobe_status;
struct prev_kprobe prev_kprobe;
struct pt_regs jprobe_saved_regs;
char jprobes_stack[MAX_STACK_SIZE];
};

extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
Expand Down

0 comments on commit dbc0d69

Please sign in to comment.