[tip:perf/core] tools: Copy the bitsperlong.h files from the kernel

From: tip-bot for Arnaldo Carvalho de Melo
Date: Wed Jul 13 2016 - 03:23:00 EST


Commit-ID: bb9707077b4ee5f77bc9939b057ff8a0d410296f
Gitweb: http://git.kernel.org/tip/bb9707077b4ee5f77bc9939b057ff8a0d410296f
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Tue, 12 Jul 2016 11:12:18 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 12 Jul 2016 15:20:39 -0300

tools: Copy the bitsperlong.h files from the kernel

We use it in bitops/__ffs.h and bitops/atomic.h, that we also got from
the kernel, but were getting it from either newer systems that carry it
in /usr/include, or from the kernel sources, that we decided not to
touch from tools/ code. Fix it.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-lwqvgbuitjmrdpjmjp6zqnyx@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
{arch => tools/arch}/alpha/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/arm64/include/uapi/asm/bitsperlong.h | 0
.../arch/frv}/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/h8300/include/asm/bitsperlong.h | 0
{arch => tools/arch}/hexagon/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/ia64/include/uapi/asm/bitsperlong.h | 0
.../arch/m32r}/include/uapi/asm/bitsperlong.h | 0
.../arch/microblaze}/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/mips/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/mn10300/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/parisc/include/uapi/asm/bitsperlong.h | 0
{arch => tools/arch}/powerpc/include/uapi/asm/bitsperlong.h | 0
tools/arch/s390/include/uapi/asm/bitsperlong.h | 12 ++++++++++++
{arch => tools/arch}/score/include/uapi/asm/bitsperlong.h | 0
tools/arch/sparc/include/uapi/asm/bitsperlong.h | 12 ++++++++++++
{arch => tools/arch}/tile/include/uapi/asm/bitsperlong.h | 0
tools/arch/x86/include/uapi/asm/bitsperlong.h | 12 ++++++++++++
tools/include/asm-generic/bitops/__ffs.h | 1 +
tools/include/asm-generic/bitops/atomic.h | 1 +
{include => tools/include}/asm-generic/bitsperlong.h | 0
{include => tools/include}/uapi/asm-generic/bitsperlong.h | 0
21 files changed, 38 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/bitsperlong.h b/tools/arch/alpha/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/alpha/include/uapi/asm/bitsperlong.h
copy to tools/arch/alpha/include/uapi/asm/bitsperlong.h
diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/tools/arch/arm64/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/arm64/include/uapi/asm/bitsperlong.h
copy to tools/arch/arm64/include/uapi/asm/bitsperlong.h
diff --git a/arch/mn10300/include/uapi/asm/bitsperlong.h b/tools/arch/frv/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/mn10300/include/uapi/asm/bitsperlong.h
copy to tools/arch/frv/include/uapi/asm/bitsperlong.h
diff --git a/arch/h8300/include/asm/bitsperlong.h b/tools/arch/h8300/include/asm/bitsperlong.h
similarity index 100%
copy from arch/h8300/include/asm/bitsperlong.h
copy to tools/arch/h8300/include/asm/bitsperlong.h
diff --git a/arch/hexagon/include/uapi/asm/bitsperlong.h b/tools/arch/hexagon/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/hexagon/include/uapi/asm/bitsperlong.h
copy to tools/arch/hexagon/include/uapi/asm/bitsperlong.h
diff --git a/arch/ia64/include/uapi/asm/bitsperlong.h b/tools/arch/ia64/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/ia64/include/uapi/asm/bitsperlong.h
copy to tools/arch/ia64/include/uapi/asm/bitsperlong.h
diff --git a/arch/mn10300/include/uapi/asm/bitsperlong.h b/tools/arch/m32r/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/mn10300/include/uapi/asm/bitsperlong.h
copy to tools/arch/m32r/include/uapi/asm/bitsperlong.h
diff --git a/arch/mn10300/include/uapi/asm/bitsperlong.h b/tools/arch/microblaze/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/mn10300/include/uapi/asm/bitsperlong.h
copy to tools/arch/microblaze/include/uapi/asm/bitsperlong.h
diff --git a/arch/mips/include/uapi/asm/bitsperlong.h b/tools/arch/mips/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/mips/include/uapi/asm/bitsperlong.h
copy to tools/arch/mips/include/uapi/asm/bitsperlong.h
diff --git a/arch/mn10300/include/uapi/asm/bitsperlong.h b/tools/arch/mn10300/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/mn10300/include/uapi/asm/bitsperlong.h
copy to tools/arch/mn10300/include/uapi/asm/bitsperlong.h
diff --git a/arch/parisc/include/uapi/asm/bitsperlong.h b/tools/arch/parisc/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/parisc/include/uapi/asm/bitsperlong.h
copy to tools/arch/parisc/include/uapi/asm/bitsperlong.h
diff --git a/arch/powerpc/include/uapi/asm/bitsperlong.h b/tools/arch/powerpc/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/powerpc/include/uapi/asm/bitsperlong.h
copy to tools/arch/powerpc/include/uapi/asm/bitsperlong.h
diff --git a/tools/arch/s390/include/uapi/asm/bitsperlong.h b/tools/arch/s390/include/uapi/asm/bitsperlong.h
new file mode 100644
index 0000000..e351ea2
--- /dev/null
+++ b/tools/arch/s390/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,12 @@
+#ifndef __ASM_S390_BITSPERLONG_H
+#define __ASM_S390_BITSPERLONG_H
+
+#ifndef __s390x__
+#define __BITS_PER_LONG 32
+#else
+#define __BITS_PER_LONG 64
+#endif
+
+#include <asm-generic/bitsperlong.h>
+
+#endif /* __ASM_S390_BITSPERLONG_H */
diff --git a/arch/score/include/uapi/asm/bitsperlong.h b/tools/arch/score/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/score/include/uapi/asm/bitsperlong.h
copy to tools/arch/score/include/uapi/asm/bitsperlong.h
diff --git a/tools/arch/sparc/include/uapi/asm/bitsperlong.h b/tools/arch/sparc/include/uapi/asm/bitsperlong.h
new file mode 100644
index 0000000..b62dd90
--- /dev/null
+++ b/tools/arch/sparc/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,12 @@
+#ifndef __ASM_ALPHA_BITSPERLONG_H
+#define __ASM_ALPHA_BITSPERLONG_H
+
+#if defined(__sparc__) && defined(__arch64__)
+#define __BITS_PER_LONG 64
+#else
+#define __BITS_PER_LONG 32
+#endif
+
+#include <asm-generic/bitsperlong.h>
+
+#endif /* __ASM_ALPHA_BITSPERLONG_H */
diff --git a/arch/tile/include/uapi/asm/bitsperlong.h b/tools/arch/tile/include/uapi/asm/bitsperlong.h
similarity index 100%
copy from arch/tile/include/uapi/asm/bitsperlong.h
copy to tools/arch/tile/include/uapi/asm/bitsperlong.h
diff --git a/tools/arch/x86/include/uapi/asm/bitsperlong.h b/tools/arch/x86/include/uapi/asm/bitsperlong.h
new file mode 100644
index 0000000..6e23c54
--- /dev/null
+++ b/tools/arch/x86/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,12 @@
+#ifndef __ASM_X86_BITSPERLONG_H
+#define __ASM_X86_BITSPERLONG_H
+
+#if defined(__x86_64__) && !defined(__ILP32__)
+# define __BITS_PER_LONG 64
+#else
+# define __BITS_PER_LONG 32
+#endif
+
+#include <asm-generic/bitsperlong.h>
+
+#endif /* __ASM_X86_BITSPERLONG_H */
diff --git a/tools/include/asm-generic/bitops/__ffs.h b/tools/include/asm-generic/bitops/__ffs.h
index c941750..b3accfd 100644
--- a/tools/include/asm-generic/bitops/__ffs.h
+++ b/tools/include/asm-generic/bitops/__ffs.h
@@ -2,6 +2,7 @@
#define _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_

#include <asm/types.h>
+#include <asm/bitsperlong.h>

/**
* __ffs - find first bit in word.
diff --git a/tools/include/asm-generic/bitops/atomic.h b/tools/include/asm-generic/bitops/atomic.h
index 4bccd7c3..18663f5 100644
--- a/tools/include/asm-generic/bitops/atomic.h
+++ b/tools/include/asm-generic/bitops/atomic.h
@@ -2,6 +2,7 @@
#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_

#include <asm/types.h>
+#include <asm/bitsperlong.h>

static inline void set_bit(int nr, unsigned long *addr)
{
diff --git a/include/asm-generic/bitsperlong.h b/tools/include/asm-generic/bitsperlong.h
similarity index 100%
copy from include/asm-generic/bitsperlong.h
copy to tools/include/asm-generic/bitsperlong.h
diff --git a/include/uapi/asm-generic/bitsperlong.h b/tools/include/uapi/asm-generic/bitsperlong.h
similarity index 100%
copy from include/uapi/asm-generic/bitsperlong.h
copy to tools/include/uapi/asm-generic/bitsperlong.h