Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / hw_watchpoint.h
1 #ifndef __HW_BREAKPOINT_H
2 #define __HW_BREAKPOINT_H
3
4 typedef int (*wp_handler)(unsigned int addr);
5
6 struct wp_event
7 {
8 unsigned int virt;
9 unsigned int phys;
10 int type;
11 wp_handler handler;
12 int in_use;
13 int auto_disable;
14 };
15
16 #define WP_EVENT_TYPE_READ 1
17 #define WP_EVENT_TYPE_WRITE 2
18 #define WP_EVENT_TYPE_ALL 3
19
20 #define init_wp_event(__e, __v, __p, __t, __h) \
21 do { \
22 (__e)->virt = (__v); \
23 (__e)->phys = (__p); \
24 (__e)->type = (__t); \
25 (__e)->handler = (__h); \
26 (__e)->auto_disable = 0; \
27 } while (0)
28
29 #define auto_disable_wp(__e) \
30 do { \
31 (__e)->auto_disable = 1; \
32 } while (0)
33
34 extern int add_hw_watchpoint(struct wp_event *wp_event);
35 extern int del_hw_watchpoint(struct wp_event *wp_event);
36
37 #endif /* !__HW_BREAKPOINT_H */