kprobes.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Kernel Probes (KProbes)
  3. *
  4. * Copyright (C) 2005-2006 Atmel Corporation
  5. * Copyright (C) IBM Corporation, 2002, 2004
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef __ASM_AVR32_KPROBES_H
  12. #define __ASM_AVR32_KPROBES_H
  13. #include <linux/types.h>
  14. typedef u16 kprobe_opcode_t;
  15. #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */
  16. #define MAX_INSN_SIZE 2
  17. #define MAX_STACK_SIZE 64 /* 32 would probably be OK */
  18. #define kretprobe_blacklist_size 0
  19. #define arch_remove_kprobe(p) do { } while (0)
  20. /* Architecture specific copy of original instruction */
  21. struct arch_specific_insn {
  22. kprobe_opcode_t insn[MAX_INSN_SIZE];
  23. };
  24. struct prev_kprobe {
  25. struct kprobe *kp;
  26. unsigned int status;
  27. };
  28. /* per-cpu kprobe control block */
  29. struct kprobe_ctlblk {
  30. unsigned int kprobe_status;
  31. struct prev_kprobe prev_kprobe;
  32. struct pt_regs jprobe_saved_regs;
  33. char jprobes_stack[MAX_STACK_SIZE];
  34. };
  35. extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
  36. extern int kprobe_exceptions_notify(struct notifier_block *self,
  37. unsigned long val, void *data);
  38. #define flush_insn_slot(p) do { } while (0)
  39. #endif /* __ASM_AVR32_KPROBES_H */