x86: optimize find_first_bit for small bitmaps
commit3a48305028aa38afba93fc05066c71a6ee668ad8
authorAlexander van Heukelum <heukelum@mailshack.com>
Tue, 1 Apr 2008 15:42:21 +0000 (1 17:42 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Apr 2008 17:21:17 +0000 (26 19:21 +0200)
tree5fd5b9bd9b4daa7cafb87c2706693fe57bc8af51
parent2aba6925fdb96428d1129a61b1233597a03a387b
x86: optimize find_first_bit for small bitmaps

Avoid a call to find_first_bit if the bitmap size is know at
compile time and small enough to fit in a single long integer.
Modeled after an optimization in the original x86_64-specific
code.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/bitops.h