kprobes.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 kretprobe_blacklist_size 0
  10. #define arch_remove_kprobe(p) do {} while (0)
  11. #define flush_insn_slot(p) \
  12. do { flushi(&(p)->ainsn.insn[0]); \
  13. flushi(&(p)->ainsn.insn[1]); \
  14. } while (0)
  15. void kretprobe_trampoline(void);
  16. /* Architecture specific copy of original instruction*/
  17. struct arch_specific_insn {
  18. /* copy of the original instruction */
  19. kprobe_opcode_t insn[MAX_INSN_SIZE];
  20. };
  21. struct prev_kprobe {
  22. struct kprobe *kp;
  23. unsigned long status;
  24. unsigned long orig_tnpc;
  25. unsigned long orig_tstate_pil;
  26. };
  27. /* per-cpu kprobe control block */
  28. struct kprobe_ctlblk {
  29. unsigned long kprobe_status;
  30. unsigned long kprobe_orig_tnpc;
  31. unsigned long kprobe_orig_tstate_pil;
  32. struct pt_regs jprobe_saved_regs;
  33. struct prev_kprobe prev_kprobe;
  34. };
  35. int kprobe_exceptions_notify(struct notifier_block *self,
  36. unsigned long val, void *data);
  37. int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
  38. asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
  39. struct pt_regs *regs);
  40. #endif /* _SPARC64_KPROBES_H */