kprobes.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _SPARC64_KPROBES_H
  2. #define _SPARC64_KPROBES_H
  3. #include <linux/types.h>
  4. #include <linux/percpu.h>
  5. typedef u32 kprobe_opcode_t;
  6. #define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */
  7. #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
  8. #define MAX_INSN_SIZE 2
  9. #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
  10. #define arch_remove_kprobe(p) do {} while (0)
  11. #define ARCH_INACTIVE_KPROBE_COUNT 0
  12. #define flush_insn_slot(p) do { } while (0)
  13. /* Architecture specific copy of original instruction*/
  14. struct arch_specific_insn {
  15. /* copy of the original instruction */
  16. kprobe_opcode_t insn[MAX_INSN_SIZE];
  17. };
  18. struct prev_kprobe {
  19. struct kprobe *kp;
  20. unsigned int status;
  21. unsigned long orig_tnpc;
  22. unsigned long orig_tstate_pil;
  23. };
  24. /* per-cpu kprobe control block */
  25. struct kprobe_ctlblk {
  26. unsigned long kprobe_status;
  27. unsigned long kprobe_orig_tnpc;
  28. unsigned long kprobe_orig_tstate_pil;
  29. long *jprobe_saved_esp;
  30. struct pt_regs jprobe_saved_regs;
  31. struct pt_regs *jprobe_saved_regs_location;
  32. struct sparc_stackf jprobe_saved_stack;
  33. struct prev_kprobe prev_kprobe;
  34. };
  35. extern int kprobe_exceptions_notify(struct notifier_block *self,
  36. unsigned long val, void *data);
  37. #endif /* _SPARC64_KPROBES_H */