Skip to content

Commit d3c7ec7

Browse files
palmer-dabbeltarndb
authored andcommitted
Move bp_type_idx to include/linux/hw_breakpoint.h
This has a "#ifdef CONFIG_*" that used to be exposed to userspace. The names in here are so generic that I don't think it's a good idea to expose them to userspace (or even the rest of the kernel). There are multiple in-kernel users, so it's been moved to a kernel header file. Signed-off-by: Palmer Dabbelt <[email protected]> Reviewed-by: Andrew Waterman <[email protected]> Reviewed-by: Albert Ou <[email protected]> Message-Id: <[email protected]> [thuth: Remove it also from tools/include/uapi/linux/hw_breakpoint.h] Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Thomas Huth <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 063f3ed commit d3c7ec7

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

include/linux/hw_breakpoint.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77

88
#ifdef CONFIG_HAVE_HW_BREAKPOINT
99

10+
enum bp_type_idx {
11+
TYPE_INST = 0,
12+
#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)
13+
TYPE_DATA = 0,
14+
#else
15+
TYPE_DATA = 1,
16+
#endif
17+
TYPE_MAX
18+
};
19+
1020
extern int __init init_hw_breakpoint(void);
1121

1222
static inline void hw_breakpoint_init(struct perf_event_attr *attr)

include/uapi/linux/hw_breakpoint.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,4 @@ enum {
2222
HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
2323
};
2424

25-
enum bp_type_idx {
26-
TYPE_INST = 0,
27-
#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
28-
TYPE_DATA = 0,
29-
#else
30-
TYPE_DATA = 1,
31-
#endif
32-
TYPE_MAX
33-
};
34-
3525
#endif /* _UAPI_LINUX_HW_BREAKPOINT_H */

tools/include/uapi/linux/hw_breakpoint.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,4 @@ enum {
2222
HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
2323
};
2424

25-
enum bp_type_idx {
26-
TYPE_INST = 0,
27-
#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
28-
TYPE_DATA = 0,
29-
#else
30-
TYPE_DATA = 1,
31-
#endif
32-
TYPE_MAX
33-
};
34-
3525
#endif /* _UAPI_LINUX_HW_BREAKPOINT_H */

0 commit comments

Comments
 (0)