diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-16 09:26:35 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-17 09:58:08 -0500 |
commit | afcd4f6235659c611f0e62236f6a7bc0ae08af1e (patch) | |
tree | e0ee747117de6bf2fabc0d4dd1c76864288256df | |
parent | 3967278496ffa69704b941745de393223406a83d (diff) |
tools: Adopt fls_long and deps
Will be used when adopting rounddown_pow_of_two.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9m0tt5300q1ygv51hejjas82@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/include/asm-generic/bitops.h | 3 | ||||
-rw-r--r-- | tools/include/asm-generic/bitops/__fls.h | 1 | ||||
-rw-r--r-- | tools/include/asm-generic/bitops/fls.h | 1 | ||||
-rw-r--r-- | tools/include/asm-generic/bitops/fls64.h | 1 | ||||
-rw-r--r-- | tools/include/linux/bitops.h | 7 | ||||
-rw-r--r-- | tools/perf/MANIFEST | 6 | ||||
-rw-r--r-- | tools/perf/Makefile.perf | 3 |
7 files changed, 22 insertions, 0 deletions
diff --git a/tools/include/asm-generic/bitops.h b/tools/include/asm-generic/bitops.h index 6dfd9d5fd828..6eedba1f7732 100644 --- a/tools/include/asm-generic/bitops.h +++ b/tools/include/asm-generic/bitops.h | |||
@@ -13,6 +13,9 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm-generic/bitops/__ffs.h> | 15 | #include <asm-generic/bitops/__ffs.h> |
16 | #include <asm-generic/bitops/fls.h> | ||
17 | #include <asm-generic/bitops/__fls.h> | ||
18 | #include <asm-generic/bitops/fls64.h> | ||
16 | #include <asm-generic/bitops/find.h> | 19 | #include <asm-generic/bitops/find.h> |
17 | 20 | ||
18 | #ifndef _TOOLS_LINUX_BITOPS_H_ | 21 | #ifndef _TOOLS_LINUX_BITOPS_H_ |
diff --git a/tools/include/asm-generic/bitops/__fls.h b/tools/include/asm-generic/bitops/__fls.h new file mode 100644 index 000000000000..2218b9add4c1 --- /dev/null +++ b/tools/include/asm-generic/bitops/__fls.h | |||
@@ -0,0 +1 @@ | |||
#include <../../../../include/asm-generic/bitops/__fls.h> | |||
diff --git a/tools/include/asm-generic/bitops/fls.h b/tools/include/asm-generic/bitops/fls.h new file mode 100644 index 000000000000..dbf711a28f71 --- /dev/null +++ b/tools/include/asm-generic/bitops/fls.h | |||
@@ -0,0 +1 @@ | |||
#include <../../../../include/asm-generic/bitops/fls.h> | |||
diff --git a/tools/include/asm-generic/bitops/fls64.h b/tools/include/asm-generic/bitops/fls64.h new file mode 100644 index 000000000000..980b1f63c047 --- /dev/null +++ b/tools/include/asm-generic/bitops/fls64.h | |||
@@ -0,0 +1 @@ | |||
#include <../../../../include/asm-generic/bitops/fls64.h> | |||
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h index 5237bc9f6266..26005a15e7e2 100644 --- a/tools/include/linux/bitops.h +++ b/tools/include/linux/bitops.h | |||
@@ -43,4 +43,11 @@ static inline unsigned long hweight_long(unsigned long w) | |||
43 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); | 43 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); |
44 | } | 44 | } |
45 | 45 | ||
46 | static inline unsigned fls_long(unsigned long l) | ||
47 | { | ||
48 | if (sizeof(l) == 4) | ||
49 | return fls(l); | ||
50 | return fls64(l); | ||
51 | } | ||
52 | |||
46 | #endif | 53 | #endif |
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 7729af9f417a..83e2887f91a3 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST | |||
@@ -8,7 +8,10 @@ tools/lib/util/find_next_bit.c | |||
8 | tools/include/asm/bug.h | 8 | tools/include/asm/bug.h |
9 | tools/include/asm-generic/bitops/atomic.h | 9 | tools/include/asm-generic/bitops/atomic.h |
10 | tools/include/asm-generic/bitops/__ffs.h | 10 | tools/include/asm-generic/bitops/__ffs.h |
11 | tools/include/asm-generic/bitops/__fls.h | ||
11 | tools/include/asm-generic/bitops/find.h | 12 | tools/include/asm-generic/bitops/find.h |
13 | tools/include/asm-generic/bitops/fls64.h | ||
14 | tools/include/asm-generic/bitops/fls.h | ||
12 | tools/include/asm-generic/bitops.h | 15 | tools/include/asm-generic/bitops.h |
13 | tools/include/linux/bitops.h | 16 | tools/include/linux/bitops.h |
14 | tools/include/linux/compiler.h | 17 | tools/include/linux/compiler.h |
@@ -16,6 +19,9 @@ tools/include/linux/export.h | |||
16 | tools/include/linux/hash.h | 19 | tools/include/linux/hash.h |
17 | tools/include/linux/log2.h | 20 | tools/include/linux/log2.h |
18 | tools/include/linux/types.h | 21 | tools/include/linux/types.h |
22 | include/asm-generic/bitops/fls64.h | ||
23 | include/asm-generic/bitops/__fls.h | ||
24 | include/asm-generic/bitops/fls.h | ||
19 | include/linux/const.h | 25 | include/linux/const.h |
20 | include/linux/perf_event.h | 26 | include/linux/perf_event.h |
21 | include/linux/rbtree.h | 27 | include/linux/rbtree.h |
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 28e590eae560..67a03a825b3c 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -234,7 +234,10 @@ LIB_H += util/include/linux/bitmap.h | |||
234 | LIB_H += ../include/linux/bitops.h | 234 | LIB_H += ../include/linux/bitops.h |
235 | LIB_H += ../include/asm-generic/bitops/atomic.h | 235 | LIB_H += ../include/asm-generic/bitops/atomic.h |
236 | LIB_H += ../include/asm-generic/bitops/find.h | 236 | LIB_H += ../include/asm-generic/bitops/find.h |
237 | LIB_H += ../include/asm-generic/bitops/fls64.h | ||
238 | LIB_H += ../include/asm-generic/bitops/fls.h | ||
237 | LIB_H += ../include/asm-generic/bitops/__ffs.h | 239 | LIB_H += ../include/asm-generic/bitops/__ffs.h |
240 | LIB_H += ../include/asm-generic/bitops/__fls.h | ||
238 | LIB_H += ../include/asm-generic/bitops.h | 241 | LIB_H += ../include/asm-generic/bitops.h |
239 | LIB_H += ../include/linux/compiler.h | 242 | LIB_H += ../include/linux/compiler.h |
240 | LIB_H += ../include/linux/log2.h | 243 | LIB_H += ../include/linux/log2.h |