summaryrefslogtreecommitdiff
path: root/include/asm-mn10300/bitops.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-03 17:54:51 (GMT)
committerIngo Molnar <mingo@elte.hu>2009-01-03 17:54:51 (GMT)
commite465b535ce5b2318798c68e1454917204494bfe3 (patch)
tree7cd7af9813a1fe2bfb04f9edd149e0f152b6cb1d /include/asm-mn10300/bitops.h
parent7eb19553369c46cc1fa64caf120cbcab1b597f7c (diff)
parent5ece5c5192d065c229da01e7b347c1d3877b59fa (diff)
downloadlinux-fsl-qoriq-e465b535ce5b2318798c68e1454917204494bfe3.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into cpus4096-v2
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 cc6d40c..0b610f4 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
*