1 #ifndef __ASM_SH_HW_BREAKPOINT_H
2 #define __ASM_SH_HW_BREAKPOINT_H
4 #include <uapi/asm/hw_breakpoint.h>
6 #define __ARCH_HW_BREAKPOINT_H
8 #include <linux/kdebug.h>
9 #include <linux/types.h>
12 struct arch_hw_breakpoint {
13 char *name; /* Contains name of the symbol to set bkpt */
14 unsigned long address;
21 unsigned int num_events;
23 void (*enable)(struct arch_hw_breakpoint *, int);
24 void (*disable)(struct arch_hw_breakpoint *, int);
25 void (*enable_all)(unsigned long);
26 void (*disable_all)(void);
27 unsigned long (*active_mask)(void);
28 unsigned long (*triggered_mask)(void);
29 void (*clear_triggered_mask)(unsigned long);
30 struct clk *clk; /* optional interface clock / MSTP bit */
37 /* Maximum number of UBC channels */
40 static inline int hw_breakpoint_slots(int type)
45 /* arch/sh/kernel/hw_breakpoint.c */
46 extern int arch_check_bp_in_kernelspace(struct perf_event *bp);
47 extern int arch_validate_hwbkpt_settings(struct perf_event *bp);
48 extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
49 unsigned long val, void *data);
51 int arch_install_hw_breakpoint(struct perf_event *bp);
52 void arch_uninstall_hw_breakpoint(struct perf_event *bp);
53 void hw_breakpoint_pmu_read(struct perf_event *bp);
55 extern void arch_fill_perf_breakpoint(struct perf_event *bp);
56 extern int register_sh_ubc(struct sh_ubc *);
58 extern struct pmu perf_ops_bp;
60 #endif /* __ASM_SH_HW_BREAKPOINT_H */