probes.h 1022 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * arch/arm64/include/asm/probes.h
  3. *
  4. * Copyright (C) 2013 Linaro Limited
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. */
  15. #ifndef _ARM_PROBES_H
  16. #define _ARM_PROBES_H
  17. typedef u32 probe_opcode_t;
  18. typedef void (probes_handler_t) (u32 opcode, long addr, struct pt_regs *);
  19. /* architecture specific copy of original instruction */
  20. struct arch_probe_insn {
  21. probe_opcode_t *insn;
  22. pstate_check_t *pstate_cc;
  23. probes_handler_t *handler;
  24. /* restore address after step xol */
  25. unsigned long restore;
  26. };
  27. #ifdef CONFIG_KPROBES
  28. typedef u32 kprobe_opcode_t;
  29. struct arch_specific_insn {
  30. struct arch_probe_insn api;
  31. };
  32. #endif
  33. #endif