-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/x86/linux-2.6-generic-bitops-v3 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-generic-bitops-v3: x86, bitops: select the generic bitmap search functions x86: include/asm-x86/pgalloc.h/bitops.h: checkpatch cleanups - formatting only x86: finalize bitops unification x86, UML: remove x86-specific implementations of find_first_bit x86: optimize find_first_bit for small bitmaps x86: switch 64-bit to generic find_first_bit x86: generic versions of find_first_(zero_)bit, convert i386 bitops: use __fls for fls64 on 64-bit archs generic: implement __fls on all 64-bit archs generic: introduce a generic __fls implementation x86: merge the simple bitops and move them to bitops.h x86, generic: optimize find_next_(zero_)bit for small constant-size bitmaps x86, uml: fix uml with generic find_next_bit for x86 x86: change x86 to use generic find_next_bit uml: Kconfig cleanup uml: fix build error
- Loading branch information
Showing
26 changed files
with
467 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
|
||
menu "Host processor type and features" | ||
|
||
source "arch/x86/Kconfig.cpu" | ||
|
||
endmenu | ||
|
||
config UML_X86 | ||
bool | ||
default y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef _ASM_GENERIC_BITOPS___FLS_H_ | ||
#define _ASM_GENERIC_BITOPS___FLS_H_ | ||
|
||
#include <asm/types.h> | ||
|
||
/** | ||
* __fls - find last (most-significant) set bit in a long word | ||
* @word: the word to search | ||
* | ||
* Undefined if no set bit exists, so code should check against 0 first. | ||
*/ | ||
static inline unsigned long __fls(unsigned long word) | ||
{ | ||
int num = BITS_PER_LONG - 1; | ||
|
||
#if BITS_PER_LONG == 64 | ||
if (!(word & (~0ul << 32))) { | ||
num -= 32; | ||
word <<= 32; | ||
} | ||
#endif | ||
if (!(word & (~0ul << (BITS_PER_LONG-16)))) { | ||
num -= 16; | ||
word <<= 16; | ||
} | ||
if (!(word & (~0ul << (BITS_PER_LONG-8)))) { | ||
num -= 8; | ||
word <<= 8; | ||
} | ||
if (!(word & (~0ul << (BITS_PER_LONG-4)))) { | ||
num -= 4; | ||
word <<= 4; | ||
} | ||
if (!(word & (~0ul << (BITS_PER_LONG-2)))) { | ||
num -= 2; | ||
word <<= 2; | ||
} | ||
if (!(word & (~0ul << (BITS_PER_LONG-1)))) | ||
num -= 1; | ||
return num; | ||
} | ||
|
||
#endif /* _ASM_GENERIC_BITOPS___FLS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.