12dd0e8d2SSandeepa Prabhu /* 22dd0e8d2SSandeepa Prabhu * arch/arm64/include/asm/probes.h 32dd0e8d2SSandeepa Prabhu * 42dd0e8d2SSandeepa Prabhu * Copyright (C) 2013 Linaro Limited 52dd0e8d2SSandeepa Prabhu * 62dd0e8d2SSandeepa Prabhu * This program is free software; you can redistribute it and/or modify 72dd0e8d2SSandeepa Prabhu * it under the terms of the GNU General Public License version 2 as 82dd0e8d2SSandeepa Prabhu * published by the Free Software Foundation. 92dd0e8d2SSandeepa Prabhu * 102dd0e8d2SSandeepa Prabhu * This program is distributed in the hope that it will be useful, 112dd0e8d2SSandeepa Prabhu * but WITHOUT ANY WARRANTY; without even the implied warranty of 122dd0e8d2SSandeepa Prabhu * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 132dd0e8d2SSandeepa Prabhu * General Public License for more details. 142dd0e8d2SSandeepa Prabhu */ 152dd0e8d2SSandeepa Prabhu #ifndef _ARM_PROBES_H 162dd0e8d2SSandeepa Prabhu #define _ARM_PROBES_H 172dd0e8d2SSandeepa Prabhu 1839a67d49SSandeepa Prabhu #include <asm/opcodes.h> 1939a67d49SSandeepa Prabhu 202dd0e8d2SSandeepa Prabhu struct kprobe; 212dd0e8d2SSandeepa Prabhu struct arch_specific_insn; 222dd0e8d2SSandeepa Prabhu 232dd0e8d2SSandeepa Prabhu typedef u32 kprobe_opcode_t; 242dd0e8d2SSandeepa Prabhu typedef void (kprobes_handler_t) (u32 opcode, long addr, struct pt_regs *); 252dd0e8d2SSandeepa Prabhu 262dd0e8d2SSandeepa Prabhu /* architecture specific copy of original instruction */ 272dd0e8d2SSandeepa Prabhu struct arch_specific_insn { 282dd0e8d2SSandeepa Prabhu kprobe_opcode_t *insn; 2939a67d49SSandeepa Prabhu pstate_check_t *pstate_cc; 302dd0e8d2SSandeepa Prabhu kprobes_handler_t *handler; 312dd0e8d2SSandeepa Prabhu /* restore address after step xol */ 322dd0e8d2SSandeepa Prabhu unsigned long restore; 332dd0e8d2SSandeepa Prabhu }; 342dd0e8d2SSandeepa Prabhu 352dd0e8d2SSandeepa Prabhu #endif 36