From: Eirik Aanonsen Date: Wed, 6 Nov 2013 21:00:33 +0000 (+0100) Subject: avr32: add kprobe_ctlblk memory struct X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbc0d691a4dd7787efd94aa26fe7682a457e53d8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git avr32: add kprobe_ctlblk memory struct This re-enables kprobes on AVR32 architecture. Signed-off-by: Eirik Aanonsen Signed-off-by: Hans-Christian Egtvedt --- 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 @@ 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 @@ -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);