The patch titled powerpc: introduce little-endian bitops has been added to the -mm tree. Its filename is powerpc-introduce-little-endian-bitops.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: powerpc: introduce little-endian bitops From: Akinobu Mita <akinobu.mita@xxxxxxxxx> Introduce little-endian bit operations by renaming existing powerpc native little-endian bit operations and changing them to take any pointer types. Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/powerpc/include/asm/bitops.h | 50 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff -puN arch/powerpc/include/asm/bitops.h~powerpc-introduce-little-endian-bitops arch/powerpc/include/asm/bitops.h --- a/arch/powerpc/include/asm/bitops.h~powerpc-introduce-little-endian-bitops +++ a/arch/powerpc/include/asm/bitops.h @@ -281,27 +281,27 @@ unsigned long __arch_hweight64(__u64 w); /* Little-endian versions */ -static __inline__ int test_le_bit(unsigned long nr, - __const__ unsigned long *addr) +static __inline__ int test_bit_le(unsigned long nr, + __const__ void *addr) { __const__ unsigned char *tmp = (__const__ unsigned char *) addr; return (tmp[nr >> 3] >> (nr & 7)) & 1; } -#define __set_le_bit(nr, addr) \ - __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) -#define __clear_le_bit(nr, addr) \ - __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) - -#define test_and_set_le_bit(nr, addr) \ - test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) -#define test_and_clear_le_bit(nr, addr) \ - test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) - -#define __test_and_set_le_bit(nr, addr) \ - __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) -#define __test_and_clear_le_bit(nr, addr) \ - __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) +#define __set_bit_le(nr, addr) \ + __set_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) +#define __clear_bit_le(nr, addr) \ + __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) + +#define test_and_set_bit_le(nr, addr) \ + test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) +#define test_and_clear_bit_le(nr, addr) \ + test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) + +#define __test_and_set_bit_le(nr, addr) \ + __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) +#define __test_and_clear_bit_le(nr, addr) \ + __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (unsigned long *)(addr)) #define find_first_zero_bit_le(addr, size) \ find_next_zero_bit_le((addr), (size), 0) @@ -313,16 +313,16 @@ unsigned long find_next_bit_le(const voi /* Bitmap functions for the ext2 filesystem */ #define ext2_set_bit(nr,addr) \ - __test_and_set_le_bit((nr), (unsigned long*)addr) + __test_and_set_bit_le((nr), (unsigned long*)addr) #define ext2_clear_bit(nr, addr) \ - __test_and_clear_le_bit((nr), (unsigned long*)addr) + __test_and_clear_bit_le((nr), (unsigned long*)addr) #define ext2_set_bit_atomic(lock, nr, addr) \ - test_and_set_le_bit((nr), (unsigned long*)addr) + test_and_set_bit_le((nr), (unsigned long*)addr) #define ext2_clear_bit_atomic(lock, nr, addr) \ - test_and_clear_le_bit((nr), (unsigned long*)addr) + test_and_clear_bit_le((nr), (unsigned long*)addr) -#define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr) +#define ext2_test_bit(nr, addr) test_bit_le((nr),(unsigned long*)addr) #define ext2_find_first_zero_bit(addr, size) \ find_first_zero_bit_le((unsigned long*)addr, size) @@ -334,13 +334,13 @@ unsigned long find_next_bit_le(const voi /* Bitmap functions for the minix filesystem. */ #define minix_test_and_set_bit(nr,addr) \ - __test_and_set_le_bit(nr, (unsigned long *)addr) + __test_and_set_bit_le(nr, (unsigned long *)addr) #define minix_set_bit(nr,addr) \ - __set_le_bit(nr, (unsigned long *)addr) + __set_bit_le(nr, (unsigned long *)addr) #define minix_test_and_clear_bit(nr,addr) \ - __test_and_clear_le_bit(nr, (unsigned long *)addr) + __test_and_clear_bit_le(nr, (unsigned long *)addr) #define minix_test_bit(nr,addr) \ - test_le_bit(nr, (unsigned long *)addr) + test_bit_le(nr, (unsigned long *)addr) #define minix_find_first_zero_bit(addr,size) \ find_first_zero_bit_le((unsigned long *)addr, size) _ Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are smp-move-smp-setup-functions-to-kernel-smpc.patch kvm-stop-including-asm-generic-bitops-leh-directly.patch rds-stop-including-asm-generic-bitops-leh-directly.patch bitops-merge-little-and-big-endian-definisions-in-asm-generic-bitops-leh.patch asm-generic-rename-generic-little-endian-bitops-functions.patch asm-generic-change-little-endian-bitops-to-take-any-pointer-types.patch powerpc-introduce-little-endian-bitops.patch s390-introduce-little-endian-bitops.patch arm-introduce-little-endian-bitops.patch m68k-introduce-little-endian-bitops.patch bitops-introduce-config_generic_find_bit_le.patch m68knommu-introduce-little-endian-bitops.patch bitops-introduce-little-endian-bitops-for-most-architectures.patch asm-generic-use-little-endian-bitops.patch kvm-use-little-endian-bitops.patch rds-use-little-endian-bitops.patch ext3-use-little-endian-bitops.patch ext4-use-little-endian-bitops.patch ocfs2-use-little-endian-bitops.patch nilfs2-use-little-endian-bitops.patch reiserfs-use-little-endian-bitops.patch udf-use-little-endian-bitops.patch ufs-use-little-endian-bitops.patch md-use-little-endian-bitops.patch dm-use-little-endian-bitops.patch bitops-remove-ext2-non-atomic-bitops-from-asm-bitopsh.patch m68k-remove-inline-asm-from-minix_find_first_zero_bit.patch bitops-remove-minix-bitops-from-asm-bitopsh.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html