Move bp_type_idx to include/linux/hw_breakpoint.h
authorPalmer Dabbelt <palmer@dabbelt.com>
Fri, 10 Mar 2023 16:07:55 +0000 (17:07 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 10 Mar 2023 20:05:16 +0000 (21:05 +0100)
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>
include/linux/hw_breakpoint.h
include/uapi/linux/hw_breakpoint.h
tools/include/uapi/linux/hw_breakpoint.h

index f319bd26b0307e1cf9b6c434edf419ef7d33431c..7fbb4591127341aa42915a2b4bc36b8989ca596e 100644 (file)
@@ -7,6 +7,16 @@
 
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
 
+enum bp_type_idx {
+       TYPE_INST       = 0,
+#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)
+       TYPE_DATA       = 0,
+#else
+       TYPE_DATA       = 1,
+#endif
+       TYPE_MAX
+};
+
 extern int __init init_hw_breakpoint(void);
 
 static inline void hw_breakpoint_init(struct perf_event_attr *attr)
index 965e4d8606d81aea7792252d93b72dceb0dd7f86..1575d3ca6f0d5c9175d4f507c39454919f6041e6 100644 (file)
@@ -22,14 +22,4 @@ enum {
        HW_BREAKPOINT_INVALID   = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
 };
 
-enum bp_type_idx {
-       TYPE_INST       = 0,
-#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
-       TYPE_DATA       = 0,
-#else
-       TYPE_DATA       = 1,
-#endif
-       TYPE_MAX
-};
-
 #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */
index 965e4d8606d81aea7792252d93b72dceb0dd7f86..1575d3ca6f0d5c9175d4f507c39454919f6041e6 100644 (file)
@@ -22,14 +22,4 @@ enum {
        HW_BREAKPOINT_INVALID   = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
 };
 
-enum bp_type_idx {
-       TYPE_INST       = 0,
-#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
-       TYPE_DATA       = 0,
-#else
-       TYPE_DATA       = 1,
-#endif
-       TYPE_MAX
-};
-
 #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */