aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/hw_breakpoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/hw_breakpoint.h')
-rw-r--r--arch/sh/include/asm/hw_breakpoint.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/sh/include/asm/hw_breakpoint.h b/arch/sh/include/asm/hw_breakpoint.h
new file mode 100644
index 000000000000..0f4a00f60058
--- /dev/null
+++ b/arch/sh/include/asm/hw_breakpoint.h
@@ -0,0 +1,53 @@
1#ifndef __ASM_SH_HW_BREAKPOINT_H
2#define __ASM_SH_HW_BREAKPOINT_H
3
4#include <linux/kdebug.h>
5#include <linux/types.h>
6#include <asm/ubc.h>
7
8#ifdef __KERNEL__
9#define __ARCH_HW_BREAKPOINT_H
10
11struct arch_hw_breakpoint {
12 char *name; /* Contains name of the symbol to set bkpt */
13 unsigned long address;
14 unsigned long asid;
15 u16 len;
16 u16 type;
17};
18
19enum {
20 SH_BREAKPOINT_READ = (1 << 1),
21 SH_BREAKPOINT_WRITE = (1 << 2),
22 SH_BREAKPOINT_RW = SH_BREAKPOINT_READ | SH_BREAKPOINT_WRITE,
23
24 SH_BREAKPOINT_LEN_1 = (1 << 12),
25 SH_BREAKPOINT_LEN_2 = (1 << 13),
26 SH_BREAKPOINT_LEN_4 = SH_BREAKPOINT_LEN_1 | SH_BREAKPOINT_LEN_2,
27 SH_BREAKPOINT_LEN_8 = (1 << 14),
28};
29
30/* Total number of available UBC channels */
31#define HBP_NUM 1 /* XXX */
32
33struct perf_event;
34struct task_struct;
35struct pmu;
36
37extern int arch_check_va_in_userspace(unsigned long va, u16 hbp_len);
38extern int arch_validate_hwbkpt_settings(struct perf_event *bp,
39 struct task_struct *tsk);
40extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
41 unsigned long val, void *data);
42
43int arch_install_hw_breakpoint(struct perf_event *bp);
44void arch_uninstall_hw_breakpoint(struct perf_event *bp);
45void hw_breakpoint_pmu_read(struct perf_event *bp);
46void hw_breakpoint_pmu_unthrottle(struct perf_event *bp);
47
48extern void arch_fill_perf_breakpoint(struct perf_event *bp);
49
50extern struct pmu perf_ops_bp;
51
52#endif /* __KERNEL__ */
53#endif /* __ASM_SH_HW_BREAKPOINT_H */