Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <palmer@dabbelt.com>
Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
Message-Id: <1447119071-19392-10-git-send-email-palmer@dabbelt.com>
[thuth: Remove it also from tools/include/uapi/linux/hw_breakpoint.h]
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Palmer Dabbelt and committed by
Arnd Bergmann
d3c7ec75 063f3ed9

+10 -20
+10
include/linux/hw_breakpoint.h
··· 7 7 8 8 #ifdef CONFIG_HAVE_HW_BREAKPOINT 9 9 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 + 10 20 extern int __init init_hw_breakpoint(void); 11 21 12 22 static inline void hw_breakpoint_init(struct perf_event_attr *attr)
-10
include/uapi/linux/hw_breakpoint.h
··· 22 22 HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, 23 23 }; 24 24 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 - 35 25 #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */
-10
tools/include/uapi/linux/hw_breakpoint.h
··· 22 22 HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, 23 23 }; 24 24 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 - 35 25 #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */