Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221710 > unrolled thread
| Started by | Palmer Dabbelt <palmer@dabbelt.com> |
|---|---|
| First post | 2015-09-09 23:10 +0200 |
| Last post | 2015-09-10 13:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:10 +0200
Re: [PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__ David Howells <dhowells@redhat.com> - 2015-09-10 13:20 +0200
| From | Palmer Dabbelt <palmer@dabbelt.com> |
|---|---|
| Date | 2015-09-09 23:10 +0200 |
| Subject | [PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__ |
| Message-ID | <q6UMV-6gS-11@gated-at.bofh.it> |
I'm actually not sure what to do here: if this enum is meant to be
used by userspace, then it has to be the same regardless of kernel
configuration. One option would be to have the kernel expose all the
values to userspace and then map them internally if
CONFIG_HAVE_MIXED_BREAKPOINT_REGS isn't set, but that feels like it'd
be more invasive.
Here I took the simple and fail-fast route to hide all the
definitions.
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
---
include/uapi/linux/hw_breakpoint.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h
index b04000a2296a..2498bfbf56c4 100644
--- a/include/uapi/linux/hw_breakpoint.h
+++ b/include/uapi/linux/hw_breakpoint.h
@@ -17,14 +17,16 @@ enum {
HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
};
+#ifdef __KERNEL__
enum bp_type_idx {
TYPE_INST = 0,
-#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
+#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)
TYPE_DATA = 0,
#else
TYPE_DATA = 1,
#endif
TYPE_MAX
};
+#endif /* __KERNEL__ */
#endif /* _UAPI_LINUX_HW_BREAKPOINT_H */
--
2.4.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2015-09-10 13:20 +0200 |
| Message-ID | <q783w-8ez-13@gated-at.bofh.it> |
| In reply to | #1221710 |
Palmer Dabbelt <palmer@dabbelt.com> wrote:
> +#ifdef __KERNEL__
> enum bp_type_idx {
> TYPE_INST = 0,
> -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
> +#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)
> TYPE_DATA = 0,
> #else
> TYPE_DATA = 1,
> #endif
> TYPE_MAX
> };
> +#endif /* __KERNEL__ */
This should be in include/linux/hw_breakpoint.h without __KERNEL__ markings.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web