Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Drop asm/types.h wrapper

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>

authored by

Frederic Weisbecker and committed by
Ingo Molnar
802da5f2 a4fb581b

+15 -19
-1
tools/perf/Makefile
··· 352 352 LIB_H += util/include/asm/byteorder.h 353 353 LIB_H += util/include/asm/swab.h 354 354 LIB_H += util/include/asm/system.h 355 - LIB_H += util/include/asm/types.h 356 355 LIB_H += util/include/asm/uaccess.h 357 356 LIB_H += perf.h 358 357 LIB_H += util/event.h
+12
tools/perf/util/include/asm/bitops.h
··· 1 + #ifndef _PERF_ASM_BITOPS_H_ 2 + #define _PERF_ASM_BITOPS_H_ 3 + 4 + #include <sys/types.h> 5 + #include "../../types.h" 6 + #include <linux/compiler.h> 7 + 8 + /* CHECKME: Not sure both always match */ 9 + #define BITS_PER_LONG __WORDSIZE 10 + 1 11 #include "../../../../include/asm-generic/bitops/__fls.h" 2 12 #include "../../../../include/asm-generic/bitops/fls.h" 3 13 #include "../../../../include/asm-generic/bitops/fls64.h" 4 14 #include "../../../../include/asm-generic/bitops/__ffs.h" 5 15 #include "../../../../include/asm-generic/bitops/ffz.h" 6 16 #include "../../../../include/asm-generic/bitops/hweight.h" 17 + 18 + #endif
+1 -1
tools/perf/util/include/asm/byteorder.h
··· 1 - #include "../asm/types.h" 1 + #include <asm/types.h> 2 2 #include "../../../../include/linux/swab.h"
-17
tools/perf/util/include/asm/types.h
··· 1 - #ifndef PERF_ASM_TYPES_H_ 2 - #define PERF_ASM_TYPES_H_ 3 - 4 - #include <linux/compiler.h> 5 - #include "../../types.h" 6 - #include <sys/types.h> 7 - 8 - /* CHECKME: Not sure both always match */ 9 - #define BITS_PER_LONG __WORDSIZE 10 - 11 - typedef u64 __u64; 12 - typedef u32 __u32; 13 - typedef u16 __u16; 14 - typedef u8 __u8; 15 - typedef s64 __s64; 16 - 17 - #endif /* PERF_ASM_TYPES_H_ */
+2
tools/perf/util/include/linux/types.h
··· 1 1 #ifndef _PERF_LINUX_TYPES_H_ 2 2 #define _PERF_LINUX_TYPES_H_ 3 3 4 + #include <asm/types.h> 5 + 4 6 #define DECLARE_BITMAP(name,bits) \ 5 7 unsigned long name[BITS_TO_LONGS(bits)] 6 8