kprobes.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 <asm-generic/kprobes.h>
  14. #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */
  15. #ifdef CONFIG_KPROBES
  16. #include <linux/types.h>
  17. typedef u16 kprobe_opcode_t;
  18. #define MAX_INSN_SIZE 2
  19. #define MAX_STACK_SIZE 64 /* 32 would probably be OK */
  20. #define kretprobe_blacklist_size 0
  21. #define arch_remove_kprobe(p) do { } while (0)
  22. /* Architecture specific copy of original instruction */
  23. struct arch_specific_insn {
  24. kprobe_opcode_t insn[MAX_INSN_SIZE];
  25. };
  26. struct prev_kprobe {
  27. struct kprobe *kp;
  28. unsigned int status;
  29. };
  30. /* per-cpu kprobe control block */
  31. struct kprobe_ctlblk {
  32. unsigned int kprobe_status;
  33. struct prev_kprobe prev_kprobe;
  34. struct pt_regs jprobe_saved_regs;
  35. char jprobes_stack[MAX_STACK_SIZE];
  36. };
  37. extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
  38. extern int kprobe_exceptions_notify(struct notifier_block *self,
  39. unsigned long val, void *data);
  40. #define flush_insn_slot(p) do { } while (0)
  41. #endif /* CONFIG_KPROBES */
  42. #endif /* __ASM_AVR32_KPROBES_H */