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.
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
{
27 unsigned long saved_trap_no
;
31 u8 insn
[MAX_UINSN_BYTES
];
32 unsigned long ixol
[2];
33 uprobe_opcode_t bpinsn
;
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
;