[PATCH] don't include asm/hw_breakpoint.h in user space

From: Arnd Bergmann
Date: Mon Dec 07 2009 - 11:14:02 EST


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@xxxxxxxx>

---
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>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/