kprobes.h 1.1 KB

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