lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] don't include asm/hw_breakpoint.h in user space
Date
asm/hw_breakpoint.h is evidently a kernel internal file and should
not be included globally, not even under an #ifdef.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
On Sunday 06 December 2009, Geert Uytterhoeven wrote:
> `make headers_check' now complains:
>
> usr/include/linux/perf_event.h:22: included file
> 'asm-m68k/hw_breakpoint.h' is not exported
>
> although CONFIG_HAVE_HW_BREAKPOINT is not set.
>
> As <asm/hw_breakpoint.h> exists for x86 only, I guess every one else
> is suffering from this.

Even on x86, that header is not exported.

--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -18,10 +18,6 @@
#include <linux/ioctl.h>
#include <asm/byteorder.h>

-#ifdef CONFIG_HAVE_HW_BREAKPOINT
-#include <asm/hw_breakpoint.h>
-#endif
-
/*
* User-space ABI bits:
*/
@@ -451,6 +447,10 @@ enum perf_callchain_context {
# include <asm/perf_event.h>
#endif

+#ifdef CONFIG_HAVE_HW_BREAKPOINT
+#include <asm/hw_breakpoint.h>
+#endif
+
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rculist.h>

\
 
 \ /
  Last update: 2009-12-07 17:17    [W:0.041 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site