[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>
This commit is contained in:
committed by
Linus Torvalds
parent
63fb6fd1c8
commit
875d43e72b
@@ -533,14 +533,14 @@ static inline unsigned long ffz(unsigned long word)
|
||||
int b = 0, s;
|
||||
|
||||
word = ~word;
|
||||
#ifdef CONFIG_MIPS32
|
||||
#ifdef CONFIG_32BIT
|
||||
s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s;
|
||||
s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s;
|
||||
s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s;
|
||||
s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s;
|
||||
s = 1; if (word << 31 != 0) s = 0; b += s;
|
||||
#endif
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s;
|
||||
s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s;
|
||||
s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s;
|
||||
@@ -683,7 +683,7 @@ found_middle:
|
||||
*/
|
||||
static inline int sched_find_first_bit(const unsigned long *b)
|
||||
{
|
||||
#ifdef CONFIG_MIPS32
|
||||
#ifdef CONFIG_32BIT
|
||||
if (unlikely(b[0]))
|
||||
return __ffs(b[0]);
|
||||
if (unlikely(b[1]))
|
||||
@@ -694,7 +694,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
|
||||
return __ffs(b[3]) + 96;
|
||||
return __ffs(b[4]) + 128;
|
||||
#endif
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
if (unlikely(b[0]))
|
||||
return __ffs(b[0]);
|
||||
if (unlikely(b[1]))
|
||||
|
Reference in New Issue
Block a user