Skip to content

Commit dbc0d69

Browse files
Eirik Aanonsenhegtvedt-te
authored andcommitted
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>
1 parent d617b33 commit dbc0d69

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎arch/avr32/include/asm/kprobes.h‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
typedef u16 kprobe_opcode_t;
1717
#define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */
1818
#define MAX_INSN_SIZE 2
19+
#define MAX_STACK_SIZE 64 /* 32 would probably be OK */
1920

2021
#define kretprobe_blacklist_size 0
2122

@@ -26,6 +27,19 @@ struct arch_specific_insn {
2627
kprobe_opcode_t insn[MAX_INSN_SIZE];
2728
};
2829

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+
2943
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
3044
extern int kprobe_exceptions_notify(struct notifier_block *self,
3145
unsigned long val, void *data);

0 commit comments

Comments
 (0)