Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Kernel Probes (KProbes) |
| 3 | * |
| 4 | * Copyright (C) 2005-2006 Atmel Corporation |
| 5 | * Copyright (C) IBM Corporation, 2002, 2004 |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | #ifndef __ASM_AVR32_KPROBES_H |
| 12 | #define __ASM_AVR32_KPROBES_H |
| 13 | |
| 14 | #include <linux/types.h> |
| 15 | |
| 16 | typedef u16 kprobe_opcode_t; |
| 17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ |
| 18 | #define MAX_INSN_SIZE 2 |
Eirik Aanonsen | dbc0d69 | 2013-11-06 22:00:33 +0100 | [diff] [blame] | 19 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 20 | |
Masami Hiramatsu | f438d91 | 2007-10-16 01:27:49 -0700 | [diff] [blame] | 21 | #define kretprobe_blacklist_size 0 |
| 22 | |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 23 | #define arch_remove_kprobe(p) do { } while (0) |
| 24 | |
| 25 | /* Architecture specific copy of original instruction */ |
| 26 | struct arch_specific_insn { |
| 27 | kprobe_opcode_t insn[MAX_INSN_SIZE]; |
| 28 | }; |
| 29 | |
Eirik Aanonsen | dbc0d69 | 2013-11-06 22:00:33 +0100 | [diff] [blame] | 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 | |
Christoph Hellwig | 9caebec | 2007-05-12 17:56:11 +0200 | [diff] [blame] | 43 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 44 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
| 45 | unsigned long val, void *data); |
| 46 | |
| 47 | #define flush_insn_slot(p) do { } while (0) |
| 48 | |
| 49 | #endif /* __ASM_AVR32_KPROBES_H */ |