perf tools: Drop asm/types.h wrapper
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 22 Oct 2009 21:23:24 +0000 (23:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 23 Oct 2009 05:55:19 +0000 (07:55 +0200)
Wrapping the kernel headers is dangerous when it comes to arch
headers. Once we wrap asm/types.h, it will also replace the
glibc asm/types.h, not only the kernel one.

This results in build errors on some machines.

Drop this wrapper and do its work from linux/types.h wrapper,
also the glibc asm/types.h can already handle most of the type
definition it was doing (typedef __u64, __u32, etc...).

Todo: Check the others asm/*.h wrappers to prevent from other
conflicts.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
LKML-Reference: <1256246604-17156-3-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/Makefile
tools/perf/util/include/asm/bitops.h
tools/perf/util/include/asm/byteorder.h
tools/perf/util/include/asm/types.h [deleted file]
tools/perf/util/include/linux/types.h

index 65e6e52fe3783679804d9e9da9c6555beabb5baf..0a40c29b238734d8e41ffe4fbe49fac3c12484ca 100644 (file)
@@ -352,7 +352,6 @@ LIB_H += util/include/asm/bitops.h
 LIB_H += util/include/asm/byteorder.h
 LIB_H += util/include/asm/swab.h
 LIB_H += util/include/asm/system.h
-LIB_H += util/include/asm/types.h
 LIB_H += util/include/asm/uaccess.h
 LIB_H += perf.h
 LIB_H += util/event.h
index fbe4d92129195e699db37c67f792f999d3f79514..58e9817ffae070dd3c4507e0b32790998b334de1 100644 (file)
@@ -1,6 +1,18 @@
+#ifndef _PERF_ASM_BITOPS_H_
+#define _PERF_ASM_BITOPS_H_
+
+#include <sys/types.h>
+#include "../../types.h"
+#include <linux/compiler.h>
+
+/* CHECKME: Not sure both always match */
+#define BITS_PER_LONG  __WORDSIZE
+
 #include "../../../../include/asm-generic/bitops/__fls.h"
 #include "../../../../include/asm-generic/bitops/fls.h"
 #include "../../../../include/asm-generic/bitops/fls64.h"
 #include "../../../../include/asm-generic/bitops/__ffs.h"
 #include "../../../../include/asm-generic/bitops/ffz.h"
 #include "../../../../include/asm-generic/bitops/hweight.h"
+
+#endif
index 39f367cfaf564c4dedfe9d0696f4cbc38a78154b..b722abe3a6260a8fc412700c947fcaf3e7f5973a 100644 (file)
@@ -1,2 +1,2 @@
-#include "../asm/types.h"
+#include <asm/types.h>
 #include "../../../../include/linux/swab.h"
diff --git a/tools/perf/util/include/asm/types.h b/tools/perf/util/include/asm/types.h
deleted file mode 100644 (file)
index 06703c6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef PERF_ASM_TYPES_H_
-#define PERF_ASM_TYPES_H_
-
-#include <linux/compiler.h>
-#include "../../types.h"
-#include <sys/types.h>
-
-/* CHECKME: Not sure both always match */
-#define BITS_PER_LONG  __WORDSIZE
-
-typedef u64    __u64;
-typedef u32    __u32;
-typedef u16    __u16;
-typedef u8     __u8;
-typedef s64    __s64;
-
-#endif /* PERF_ASM_TYPES_H_ */
index 858a38d084354e63df079bce8184afd011d20084..196862a81a218e8d3603db854e1263b9ce317963 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _PERF_LINUX_TYPES_H_
 #define _PERF_LINUX_TYPES_H_
 
+#include <asm/types.h>
+
 #define DECLARE_BITMAP(name,bits) \
        unsigned long name[BITS_TO_LONGS(bits)]