uprobes.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. */
  6. #ifndef __ASM_UPROBES_H
  7. #define __ASM_UPROBES_H
  8. #include <linux/notifier.h>
  9. #include <linux/types.h>
  10. #include <asm/break.h>
  11. #include <asm/inst.h>
  12. /*
  13. * We want this to be defined as union mips_instruction but that makes the
  14. * generic code blow up.
  15. */
  16. typedef u32 uprobe_opcode_t;
  17. /*
  18. * Classic MIPS (note this implementation doesn't consider microMIPS yet)
  19. * instructions are always 4 bytes but in order to deal with branches and
  20. * their delay slots, we treat instructions as having 8 bytes maximum.
  21. */
  22. #define MAX_UINSN_BYTES 8
  23. #define UPROBE_XOL_SLOT_BYTES 128 /* Max. cache line size */
  24. #define UPROBE_BRK_UPROBE 0x000d000d /* break 13 */
  25. #define UPROBE_BRK_UPROBE_XOL 0x000e000d /* break 14 */
  26. #define UPROBE_SWBP_INSN UPROBE_BRK_UPROBE
  27. #define UPROBE_SWBP_INSN_SIZE 4
  28. struct arch_uprobe {
  29. unsigned long resume_epc;
  30. u32 insn[2];
  31. u32 ixol[2];
  32. };
  33. struct arch_uprobe_task {
  34. unsigned long saved_trap_nr;
  35. };
  36. #endif /* __ASM_UPROBES_H */