kprobes.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _ARC_KPROBES_H
  9. #define _ARC_KPROBES_H
  10. #include <asm-generic/kprobes.h>
  11. #ifdef CONFIG_KPROBES
  12. typedef u16 kprobe_opcode_t;
  13. #define UNIMP_S_INSTRUCTION 0x79e0
  14. #define TRAP_S_2_INSTRUCTION 0x785e
  15. #define MAX_INSN_SIZE 8
  16. #define MAX_STACK_SIZE 64
  17. struct arch_specific_insn {
  18. int is_short;
  19. kprobe_opcode_t *t1_addr, *t2_addr;
  20. kprobe_opcode_t t1_opcode, t2_opcode;
  21. };
  22. #define flush_insn_slot(p) do { } while (0)
  23. #define kretprobe_blacklist_size 0
  24. struct kprobe;
  25. void arch_remove_kprobe(struct kprobe *p);
  26. int kprobe_exceptions_notify(struct notifier_block *self,
  27. unsigned long val, void *data);
  28. struct prev_kprobe {
  29. struct kprobe *kp;
  30. unsigned long status;
  31. };
  32. struct kprobe_ctlblk {
  33. unsigned int kprobe_status;
  34. struct prev_kprobe prev_kprobe;
  35. };
  36. int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
  37. void kretprobe_trampoline(void);
  38. void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
  39. #else
  40. #define trap_is_kprobe(address, regs)
  41. #endif /* CONFIG_KPROBES */
  42. #endif /* _ARC_KPROBES_H */