From 8ddd791f5b8924a34be4f28e44bf620a6646dc71 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sun, 26 Mar 2006 01:39:34 -0800 Subject: [PATCH] --- yaml --- r: 24187 b: refs/heads/master c: 7e33db4e2e9d67ee01d105e33fb773eed8ba10f0 h: refs/heads/master i: 24185: c6f0d79d6f8f0dcb2723a12bf1d9162c306940b3 24183: 760522aa0f55d25f26d56a4caf9fcec6ce977232 v: v3 --- [refs] | 2 +- trunk/arch/s390/Kconfig | 4 +++ trunk/include/asm-s390/bitops.h | 44 ++++----------------------------- 3 files changed, 10 insertions(+), 40 deletions(-) diff --git a/[refs] b/[refs] index 786a62569721..b3ca931b5a5b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e779b2f95f3786cd9cfc804cd6f04f7267d75541 +refs/heads/master: 7e33db4e2e9d67ee01d105e33fb773eed8ba10f0 diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig index 2b7364ed23bc..01c5c082f970 100644 --- a/trunk/arch/s390/Kconfig +++ b/trunk/arch/s390/Kconfig @@ -14,6 +14,10 @@ config RWSEM_XCHGADD_ALGORITHM bool default y +config GENERIC_HWEIGHT + bool + default y + config GENERIC_CALIBRATE_DELAY bool default y diff --git a/trunk/include/asm-s390/bitops.h b/trunk/include/asm-s390/bitops.h index 6b6a01dfc8dc..ca092ffb7a95 100644 --- a/trunk/include/asm-s390/bitops.h +++ b/trunk/include/asm-s390/bitops.h @@ -828,35 +828,12 @@ static inline int sched_find_first_bit(unsigned long *b) return find_first_bit(b, 140); } -/* - * 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 -/* - * fls: find last bit set. - */ -#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 +#include +#include #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); } -/* Bitmap functions for the minix filesystem. */ -/* 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) +#include #endif /* __KERNEL__ */