1#ifndef _SPARC64_KPROBES_H 2#define _SPARC64_KPROBES_H 3 4#include <asm-generic/kprobes.h> 5 6#define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */ 7#define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ 8 9#ifdef CONFIG_KPROBES 10#include <linux/types.h> 11#include <linux/percpu.h> 12 13typedef u32 kprobe_opcode_t; 14 15#define MAX_INSN_SIZE 2 16 17#define kretprobe_blacklist_size 0 18 19#define arch_remove_kprobe(p) do {} while (0) 20 21#define flush_insn_slot(p) \ 22do { flushi(&(p)->ainsn.insn[0]); \ 23 flushi(&(p)->ainsn.insn[1]); \ 24} while (0) 25 26void kretprobe_trampoline(void); 27 28/* Architecture specific copy of original instruction*/ 29struct arch_specific_insn { 30 /* copy of the original instruction */ 31 kprobe_opcode_t insn[MAX_INSN_SIZE]; 32}; 33 34struct prev_kprobe { 35 struct kprobe *kp; 36 unsigned long status; 37 unsigned long orig_tnpc; 38 unsigned long orig_tstate_pil; 39}; 40 41/* per-cpu kprobe control block */ 42struct kprobe_ctlblk { 43 unsigned long kprobe_status; 44 unsigned long kprobe_orig_tnpc; 45 unsigned long kprobe_orig_tstate_pil; 46 struct pt_regs jprobe_saved_regs; 47 struct prev_kprobe prev_kprobe; 48}; 49 50int kprobe_exceptions_notify(struct notifier_block *self, 51 unsigned long val, void *data); 52int kprobe_fault_handler(struct pt_regs *regs, int trapnr); 53asmlinkage void __kprobes kprobe_trap(unsigned long trap_level, 54 struct pt_regs *regs); 55 56#endif /* CONFIG_KPROBES */ 57#endif /* _SPARC64_KPROBES_H */ 58