tools: Adopt rounddown_pow_of_two and deps
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Dec 2014 15:14:11 +0000 (12:14 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Dec 2014 14:58:13 +0000 (11:58 -0300)
commitfa37c025c5bec6704dad714365a7f62d9cb13a36
treedad2b099ef1c4a3c7e52978f35cdf22bb5833f90
parentafcd4f6235659c611f0e62236f6a7bc0ae08af1e
tools: Adopt rounddown_pow_of_two and deps

Will be used to make sure we pass a power of two when automatically
setting up the perf_mmap addr range length, as the kernel code
validating input on /proc/sys/kernel/perf_event_mlock_kb accepts any
integer, if we plain use it to set up the mmap lenght, we may get an
EINVAL when passing a non power 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-zflvep0q01dmkruf4o291l4p@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/linux/log2.h