Matthew Wilcox
c68a2aab33
radix tree test suite: Remove duplicate bitops code
...
By adding __set_bit and __clear_bit to the tools include directory, we
can share the bitops code. This reveals an include loop between kernel.h,
log2.h, bitmap.h and bitops.h. Break it the same way as the kernel does;
by moving the kernel.h include from bitops.h to bitmap.h.
Signed-off-by: Matthew Wilcox <[email protected] >
2017-01-27 21:29:39 -05:00
Jiri Olsa
02bc11de56
tools lib: Add for_each_clear_bit macro
...
Adding for_each_clear_bit macro plus all its the necessary backbone
functions. Taken from related kernel code. It will be used in following
patch.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-10-24 11:07:33 -03:00
Arnaldo Carvalho de Melo
de1e17b1d0
tools: Copy the bitops files accessed from the kernel and check for drift
...
copy some more kernel files accessed from tools/, check for drift.
Cc: Adrian Hunter <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-18 18:33:41 -03:00
Arnaldo Carvalho de Melo
bb9707077b
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 <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-07-12 15:20:39 -03:00
Josh Poimboeuf
1698872b5c
tools: Copy hashtable.h into tools directory
...
Copy hashtable.h from include/linux/tools.h. It's needed by objtool in
the next patch in the series.
Add some includes that it needs, and remove references to
kernel-specific features like RCU and __read_mostly.
Also change some if its dependency headers' includes to use quotes
instead of brackets so gcc can find them.
Signed-off-by: Josh Poimboeuf <[email protected] >
Cc: Andrew Morton <[email protected] >
Cc: Andy Lutomirski <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Bernd Petrovitsch <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Chris J Arges <[email protected] >
Cc: Jiri Slaby <[email protected] >
Cc: Linus Torvalds <[email protected] >
Cc: Michal Marek <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Pedro Alves <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: [email protected]
Link: http://lkml.kernel.org/r/be3bef72f6540d8a510515408119d968a0e18179.1457502970.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <[email protected] >
2016-03-09 10:48:09 +01:00
Arnaldo Carvalho de Melo
25cd480e44
tools: Remove bitops/hweight usage of bits in tools/perf
...
We need to use lib/hweight.c for that, just like we do for lib/rbtree.c,
so tools need to link hweight.o. For now do it directly, but we need to
have a tools/lib/lk.a or .so that collects these goodies...
Reported-by: Jan Beulich <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-16 17:49:29 -03:00
Arnaldo Carvalho de Melo
afcd4f6235
tools: Adopt fls_long and deps
...
Will be used when adopting rounddown_pow_of_two.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:58:08 -03:00
Arnaldo Carvalho de Melo
23e1a358e8
tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:14:48 -03:00
Arnaldo Carvalho de Melo
cae68d4f6a
tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:11:52 -03:00
Arnaldo Carvalho de Melo
2dc0b97219
tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:09:34 -03:00