[PATCH] bitops: s390: use generic bitops

- remove generic_ffs()
- remove generic_fls()
- remove generic_fls64()
- remove generic_hweight{64,32,16,8}()
- remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Akinobu Mita 2006-03-26 01:39:34 -08:00 committed by Linus Torvalds
parent e779b2f95f
commit 7e33db4e2e
2 changed files with 9 additions and 39 deletions

View File

@ -14,6 +14,10 @@ config RWSEM_XCHGADD_ALGORITHM
bool bool
default y default y
config GENERIC_HWEIGHT
bool
default y
config GENERIC_CALIBRATE_DELAY config GENERIC_CALIBRATE_DELAY
bool bool
default y default y

View File

@ -828,35 +828,12 @@ static inline int sched_find_first_bit(unsigned long *b)
return find_first_bit(b, 140); return find_first_bit(b, 140);
} }
/* #include <asm-generic/bitops/ffs.h>
* ffs: find first bit set. This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
#define ffs(x) generic_ffs(x)
/* #include <asm-generic/bitops/fls.h>
* fls: find last bit set. #include <asm-generic/bitops/fls64.h>
*/
#define fls(x) generic_fls(x)
#define fls64(x) generic_fls64(x)
/*
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
*/
#define hweight64(x) \
({ \
unsigned long __x = (x); \
unsigned int __w; \
__w = generic_hweight32((unsigned int) __x); \
__w += generic_hweight32((unsigned int) (__x>>32)); \
__w; \
})
#define hweight32(x) generic_hweight32(x)
#define hweight16(x) generic_hweight16(x)
#define hweight8(x) generic_hweight8(x)
#include <asm-generic/bitops/hweight.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
@ -1011,18 +988,7 @@ ext2_find_next_zero_bit(void *vaddr, unsigned long size, unsigned long offset)
return offset + ext2_find_first_zero_bit(p, size); return offset + ext2_find_first_zero_bit(p, size);
} }
/* Bitmap functions for the minix filesystem. */ #include <asm-generic/bitops/minix.h>
/* FIXME !!! */
#define minix_test_and_set_bit(nr,addr) \
__test_and_set_bit(nr,(unsigned long *)addr)
#define minix_set_bit(nr,addr) \
__set_bit(nr,(unsigned long *)addr)
#define minix_test_and_clear_bit(nr,addr) \
__test_and_clear_bit(nr,(unsigned long *)addr)
#define minix_test_bit(nr,addr) \
test_bit(nr,(unsigned long *)addr)
#define minix_find_first_zero_bit(addr,size) \
find_first_zero_bit(addr,size)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */