aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mn10300/bitops.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-06 09:53:05 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-06 09:53:05 +0100
commit3d7a96f5a485b7d06c2379f343d7312af89ec9e2 (patch)
tree5f097f68eb0f9fd3fa4a10f38672e300e9127b10 /include/asm-mn10300/bitops.h
parentkmemtrace: Remove the relay version of kmemtrace (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm (diff)
downloadlinux-dev-3d7a96f5a485b7d06c2379f343d7312af89ec9e2.tar.xz
linux-dev-3d7a96f5a485b7d06c2379f343d7312af89ec9e2.zip
Merge branch 'linus' into tracing/kmemtrace2
Diffstat (limited to 'include/asm-mn10300/bitops.h')
-rw-r--r--include/asm-mn10300/bitops.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-mn10300/bitops.h b/include/asm-mn10300/bitops.h
index cc6d40c05cf3..0b610f482abb 100644
--- a/include/asm-mn10300/bitops.h
+++ b/include/asm-mn10300/bitops.h
@@ -196,6 +196,17 @@ int fls(int x)
}
/**
+ * __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)
+{
+ return __ilog2_u32(word);
+}
+
+/**
* ffs - find first bit set
* @x: the word to search
*