aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/bitops.h
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-11-28 13:44:40 -0700
committerTom Rini <trini@ti.com>2012-11-28 13:44:40 -0700
commite57d9d15eeab923f6c0de05d7caad317d861bbc5 (patch)
tree4c48c08c983e1b50850cdc7206ed4fb796087bed /arch/x86/include/asm/bitops.h
parenta86fcff69519841aa1338efb1ace37ca77c16c35 (diff)
parentd02a568e9aa3c3500d9b680f60782c192fd51691 (diff)
Merge branch 'master' of git://www.denx.de/git/u-boot-x86
Diffstat (limited to 'arch/x86/include/asm/bitops.h')
-rw-r--r--arch/x86/include/asm/bitops.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index c7a38f237a..5a7e4cba2b 100644
--- 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