@@ -225,7 +225,6 @@ LIB_H += util/include/linux/types.h
LIB_H += util/include/linux/linkage.h
LIB_H += util/include/asm/asm-offsets.h
LIB_H += util/include/asm/bug.h
-LIB_H += util/include/asm/byteorder.h
LIB_H += util/include/asm/hweight.h
LIB_H += util/include/asm/swab.h
LIB_H += util/include/asm/system.h
deleted file mode 100644
@@ -1,2 +0,0 @@
-#include <asm/types.h>
-#include "../../../../include/uapi/linux/swab.h"
@@ -7,10 +7,30 @@
#define __bitwise
#endif
+#ifndef __le16
+typedef __u16 __bitwise __le16;
+#endif
+
#ifndef __le32
typedef __u32 __bitwise __le32;
#endif
+#ifndef __be16
+typedef __u16 __bitwise __be16;
+#endif
+
+#ifndef __le64
+typedef __u64 __bitwise __le64;
+#endif
+
+#ifndef __be32
+typedef __u32 __bitwise __be32;
+#endif
+
+#ifndef __be64
+typedef __u64 __bitwise __be64;
+#endif
+
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
Remove the local tools/perf/util/include/asm/byteorder.h and add a few missing typedefs to tools/perf/util/include/linux/types.h. The local byteorder.h complicates defining big/little endian versions of data structures in include/uapi/linux/perf_event.h. Fix proposed by Michael Ellerman. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> --- tools/perf/Makefile | 1 - tools/perf/util/include/asm/byteorder.h | 2 -- tools/perf/util/include/linux/types.h | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) delete mode 100644 tools/perf/util/include/asm/byteorder.h