diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
commit | 353816f43d1fb340ff2d9a911dd5d0799c09f6a5 (patch) | |
tree | 517290fd884d286fe2971137ac89f89e3567785a /include/asm-xtensa | |
parent | 160bbab3000dafccbe43688e48208cecf4deb879 (diff) | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r-- | include/asm-xtensa/bitops.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h index 23261e8f2e5a..6c3930397bd3 100644 --- a/include/asm-xtensa/bitops.h +++ b/include/asm-xtensa/bitops.h | |||
@@ -82,6 +82,16 @@ static inline int fls (unsigned int x) | |||
82 | return 32 - __cntlz(x); | 82 | return 32 - __cntlz(x); |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | ||
86 | * __fls - find last (most-significant) set bit in a long word | ||
87 | * @word: the word to search | ||
88 | * | ||
89 | * Undefined if no set bit exists, so code should check against 0 first. | ||
90 | */ | ||
91 | static inline unsigned long __fls(unsigned long word) | ||
92 | { | ||
93 | return 31 - __cntlz(word); | ||
94 | } | ||
85 | #else | 95 | #else |
86 | 96 | ||
87 | /* Use the generic implementation if we don't have the nsa/nsau instructions. */ | 97 | /* Use the generic implementation if we don't have the nsa/nsau instructions. */ |
@@ -90,6 +100,7 @@ static inline int fls (unsigned int x) | |||
90 | # include <asm-generic/bitops/__ffs.h> | 100 | # include <asm-generic/bitops/__ffs.h> |
91 | # include <asm-generic/bitops/ffz.h> | 101 | # include <asm-generic/bitops/ffz.h> |
92 | # include <asm-generic/bitops/fls.h> | 102 | # include <asm-generic/bitops/fls.h> |
103 | # include <asm-generic/bitops/__fls.h> | ||
93 | 104 | ||
94 | #endif | 105 | #endif |
95 | 106 | ||