aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/bitops.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-03 18:56:16 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:06 -0400
commit875d43e72b5bf22161a81de7554f88eccf8a51ae (patch)
treea676fe7298b478b7ee9fe7be9cb07c9a0b928370 /include/asm-mips/bitops.h
parent63fb6fd1c86181d9dd9ba0e6e6082799e149b56b (diff)
[PATCH] mips: clean up 32/64-bit configuration
Start cleaning 32-bit vs. 64-bit configuration. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-mips/bitops.h')
-rw-r--r--include/asm-mips/bitops.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 779d2187a6a4..bc136dcfdbe6 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -533,14 +533,14 @@ static inline unsigned long ffz(unsigned long word)
533 int b = 0, s; 533 int b = 0, s;
534 534
535 word = ~word; 535 word = ~word;
536#ifdef CONFIG_MIPS32 536#ifdef CONFIG_32BIT
537 s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; 537 s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s;
538 s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; 538 s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s;
539 s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; 539 s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s;
540 s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; 540 s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s;
541 s = 1; if (word << 31 != 0) s = 0; b += s; 541 s = 1; if (word << 31 != 0) s = 0; b += s;
542#endif 542#endif
543#ifdef CONFIG_MIPS64 543#ifdef CONFIG_64BIT
544 s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; 544 s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s;
545 s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; 545 s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s;
546 s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; 546 s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s;
@@ -683,7 +683,7 @@ found_middle:
683 */ 683 */
684static inline int sched_find_first_bit(const unsigned long *b) 684static inline int sched_find_first_bit(const unsigned long *b)
685{ 685{
686#ifdef CONFIG_MIPS32 686#ifdef CONFIG_32BIT
687 if (unlikely(b[0])) 687 if (unlikely(b[0]))
688 return __ffs(b[0]); 688 return __ffs(b[0]);
689 if (unlikely(b[1])) 689 if (unlikely(b[1]))
@@ -694,7 +694,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
694 return __ffs(b[3]) + 96; 694 return __ffs(b[3]) + 96;
695 return __ffs(b[4]) + 128; 695 return __ffs(b[4]) + 128;
696#endif 696#endif
697#ifdef CONFIG_MIPS64 697#ifdef CONFIG_64BIT
698 if (unlikely(b[0])) 698 if (unlikely(b[0]))
699 return __ffs(b[0]); 699 return __ffs(b[0]);
700 if (unlikely(b[1])) 700 if (unlikely(b[1]))