aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/include')
-rw-r--r--arch/alpha/include/asm/bitops.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h
index 296da1d5ed57..1dce24bc455a 100644
--- a/arch/alpha/include/asm/bitops.h
+++ b/arch/alpha/include/asm/bitops.h
@@ -438,22 +438,20 @@ static inline unsigned int __arch_hweight8(unsigned int w)
438 438
439/* 439/*
440 * Every architecture must define this function. It's the fastest 440 * Every architecture must define this function. It's the fastest
441 * way of searching a 140-bit bitmap where the first 100 bits are 441 * way of searching a 100-bit bitmap. It's guaranteed that at least
442 * unlikely to be set. It's guaranteed that at least one of the 140 442 * one of the 100 bits is cleared.
443 * bits is set.
444 */ 443 */
445static inline unsigned long 444static inline unsigned long
446sched_find_first_bit(unsigned long b[3]) 445sched_find_first_bit(const unsigned long b[2])
447{ 446{
448 unsigned long b0 = b[0], b1 = b[1], b2 = b[2]; 447 unsigned long b0, b1, ofs, tmp;
449 unsigned long ofs;
450 448
451 ofs = (b1 ? 64 : 128); 449 b0 = b[0];
452 b1 = (b1 ? b1 : b2); 450 b1 = b[1];
453 ofs = (b0 ? 0 : ofs); 451 ofs = (b0 ? 0 : 64);
454 b0 = (b0 ? b0 : b1); 452 tmp = (b0 ? b0 : b1);
455 453
456 return __ffs(b0) + ofs; 454 return __ffs(tmp) + ofs;
457} 455}
458 456
459#include <asm-generic/bitops/ext2-non-atomic.h> 457#include <asm-generic/bitops/ext2-non-atomic.h>