projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
[platform/kernel/u-boot.git]
/
arch
/
x86
/
include
/
asm
/
bitops.h
diff --git
a/arch/x86/include/asm/bitops.h
b/arch/x86/include/asm/bitops.h
index
c7a38f2
..
5a7e4cb
100644
(file)
--- a/
arch/x86/include/asm/bitops.h
+++ b/
arch/x86/include/asm/bitops.h
@@
-351,6
+351,11
@@
static __inline__ int ffs(int x)
}
#define PLATFORM_FFS
+static inline int __ilog2(unsigned int x)
+{
+ return generic_fls(x) - 1;
+}
+
/**
* hweightN - returns the hamming weight of a N-bit word
* @x: the word to weigh