Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / arm / include / asm / uprobes.h
blob9472c20b7d496e7ff1a235520e3aca6b6e086e5c
1 /*
2 * Copyright (C) 2012 Rabin Vincent <rabin at rab.in>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef _ASM_UPROBES_H
10 #define _ASM_UPROBES_H
12 #include <asm/probes.h>
13 #include <asm/opcodes.h>
15 typedef u32 uprobe_opcode_t;
17 #define MAX_UINSN_BYTES 4
18 #define UPROBE_XOL_SLOT_BYTES 64
20 #define UPROBE_SWBP_ARM_INSN 0xe7f001f9
21 #define UPROBE_SS_ARM_INSN 0xe7f001fa
22 #define UPROBE_SWBP_INSN __opcode_to_mem_arm(UPROBE_SWBP_ARM_INSN)
23 #define UPROBE_SWBP_INSN_SIZE 4
25 struct arch_uprobe_task {
26 u32 backup;
27 unsigned long saved_trap_no;
30 struct arch_uprobe {
31 u8 insn[MAX_UINSN_BYTES];
32 unsigned long ixol[2];
33 uprobe_opcode_t bpinsn;
34 bool simulate;
35 u32 pcreg;
36 void (*prehandler)(struct arch_uprobe *auprobe,
37 struct arch_uprobe_task *autask,
38 struct pt_regs *regs);
39 void (*posthandler)(struct arch_uprobe *auprobe,
40 struct arch_uprobe_task *autask,
41 struct pt_regs *regs);
42 struct arch_probes_insn asi;
45 #endif