bitops: remove ext2 non-atomic bitops from asm/bitops.h
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 23 Mar 2011 23:42:14 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:21 +0000 (19:46 -0700)
As the result of conversions, there are no users of ext2 non-atomic bit
operations except for ext2 filesystem itself.  Now we can put them into
architecture independent code in ext2 filesystem, and remove from
asm/bitops.h for all architectures.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 files changed:
arch/alpha/include/asm/bitops.h
arch/arm/include/asm/bitops.h
arch/avr32/include/asm/bitops.h
arch/blackfin/include/asm/bitops.h
arch/cris/include/asm/bitops.h
arch/frv/include/asm/bitops.h
arch/h8300/include/asm/bitops.h
arch/ia64/include/asm/bitops.h
arch/m32r/include/asm/bitops.h
arch/m68k/include/asm/bitops_mm.h
arch/m68k/include/asm/bitops_no.h
arch/mips/include/asm/bitops.h
arch/mn10300/include/asm/bitops.h
arch/parisc/include/asm/bitops.h
arch/powerpc/include/asm/bitops.h
arch/s390/include/asm/bitops.h
arch/sh/include/asm/bitops.h
arch/sparc/include/asm/bitops_32.h
arch/sparc/include/asm/bitops_64.h
arch/tile/include/asm/bitops.h
arch/x86/include/asm/bitops.h
arch/xtensa/include/asm/bitops.h
fs/ext2/ext2.h
include/asm-generic/bitops.h
include/asm-generic/bitops/ext2-non-atomic.h [deleted file]

index 955fec7cfeb82dbe5c659da96a475994567cd019..822433a00c68b907d91923c4712e01ae01c0189b 100644 (file)
@@ -455,7 +455,6 @@ sched_find_first_bit(const unsigned long b[2])
 }
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(l,n,a)   test_and_set_bit(n,a)
 #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a)
index 0112005f3e9f995b6defcc45ea910f3616fa3fc2..f68f1fb6b38e25d5ef1bc95be9df925cc21b62ef 100644 (file)
@@ -339,18 +339,11 @@ static inline int find_next_bit_le(const void *p, int size, int offset)
 
 /*
  * Ext2 is defined to use little-endian byte ordering.
- * These do not need to be atomic.
  */
-#define ext2_set_bit __test_and_set_bit_le
 #define ext2_set_bit_atomic(lock, nr, p)       \
                test_and_set_bit_le(nr, p)
-#define ext2_clear_bit __test_and_clear_bit_le
 #define ext2_clear_bit_atomic(lock, nr, p)     \
                test_and_clear_bit_le(nr, p)
-#define ext2_test_bit test_bit_le
-#define ext2_find_first_zero_bit find_first_zero_bit_le
-#define ext2_find_next_zero_bit find_next_zero_bit_le
-#define ext2_find_next_bit find_next_bit_le
 
 /*
  * Minix is defined to use little-endian byte ordering.
index 1c482fc9da78d71457057ca739a9e8089e6ab325..73a163a71f12c5a87fdaa91df3272db9a01f7516 100644 (file)
@@ -300,7 +300,6 @@ static inline int ffs(unsigned long word)
 #include <asm-generic/bitops/lock.h>
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix-le.h>
 
index fe257cfec978366bd83dc8da31ff46299fdba6f5..6a69690bd4653d5bc8c74fd9edf71f319489bf61 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm-generic/bitops/lock.h>
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
index 599ae6730bc8fde7f414d01cfdc499512f17bb29..71bea4032ebdb62350f2190ac3a9ba6d1586aea7 100644 (file)
@@ -155,7 +155,6 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
 #include <asm-generic/bitops/lock.h>
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(l,n,a)   test_and_set_bit(n,a)
 #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a)
index 2631917c2be4d6734f1396da3d487b7af3a8307e..e3ea644108cea9dc69a5dc73d202b724a7abc8a7 100644 (file)
@@ -402,7 +402,6 @@ int __ilog2_u64(u64 n)
 #include <asm-generic/bitops/lock.h>
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(lock,nr,addr)      test_and_set_bit  ((nr) ^ 0x18, (addr))
 #define ext2_clear_bit_atomic(lock,nr,addr)    test_and_clear_bit((nr) ^ 0x18, (addr))
index 763094fdd7c267c236e5a16debca4ca5291be73a..23cea66689804f35bdac6b209dca82ba11c9edaf 100644 (file)
@@ -201,7 +201,6 @@ static __inline__ unsigned long __ffs(unsigned long word)
 #include <asm-generic/bitops/hweight.h>
 #include <asm-generic/bitops/lock.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
index 2cde4f0f1aab30422b4280f5b41707d2131e3be9..336984acc8c049010a7d1235b7e0868339e1f650 100644 (file)
@@ -457,7 +457,6 @@ static __inline__ unsigned long __arch_hweight64(unsigned long x)
 #ifdef __KERNEL__
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(l,n,a)     test_and_set_bit(n,a)
 #define ext2_clear_bit_atomic(l,n,a)   test_and_clear_bit(n,a)
index 681f7e8e458e89e03d667524185dcbe9dbfab148..cdfb4c82fb8806100748f95b32e0534235e4d582 100644 (file)
@@ -267,7 +267,6 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr)
 #ifdef __KERNEL__
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
index d4658487defd814f5b5dd579751589660d2a1e43..3d16871402adc9c135a12ec59c06967b05496333 100644 (file)
@@ -490,17 +490,10 @@ static inline unsigned long find_next_bit_le(const void *addr,
 
 /* Bitmap functions for the ext2 filesystem. */
 
-#define ext2_set_bit __test_and_set_bit_le
 #define ext2_set_bit_atomic(lock, nr, addr)    \
        test_and_set_bit_le(nr, addr)
-#define ext2_clear_bit __test_and_clear_bit_le
 #define ext2_clear_bit_atomic(lock, nr, addr)  \
        test_and_clear_bit_le(nr, addr)
-#define ext2_find_next_zero_bit find_next_zero_bit_le
-#define ext2_find_next_bit find_next_bit_le
-#define ext2_test_bit test_bit_le
-#define ext2_find_first_zero_bit find_first_zero_bit_le
-#define ext2_find_first_bit find_first_bit_le
 
 #endif /* __KERNEL__ */
 
index 74b3f81f2e21bbf42b7109b0f367b4215a461138..8db5fef8631fc2d42a8fc773cf194ba458fe337a 100644 (file)
@@ -336,13 +336,6 @@ found_middle:
        return result + ffz(__swab32(tmp));
 }
 
-#define ext2_set_bit __test_and_set_bit_le
-#define ext2_clear_bit __test_and_clear_bit_le
-#define ext2_test_bit test_bit_le
-#define ext2_find_first_zero_bit find_first_zero_bit_le
-#define ext2_find_next_zero_bit find_next_zero_bit_le
-#define ext2_find_next_bit find_next_bit_le
-
 #include <asm-generic/bitops/minix.h>
 
 #endif /* __KERNEL__ */
index ef420eb12222714c9625559c3988641ff4c28206..e062718a3fea2f461841cf361bc30917b24702a6 100644 (file)
@@ -677,7 +677,6 @@ static inline int ffs(int word)
 #include <asm-generic/bitops/const_hweight.h>
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
index 42b54539c3887ca28fb2f47a64da4a41268a1d6e..a5f460cb834d782f556c7cb206efe59efd842922 100644 (file)
@@ -234,7 +234,6 @@ int ffs(int x)
        test_and_clear_bit((nr), (addr))
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/minix-le.h>
 
 #endif /* __KERNEL__ */
index 4b9e58debb189d6be4e0bc3bd782edd2f5fc0d28..919d7ed155e053ac495596010f83f37a93950a0a 100644 (file)
@@ -223,7 +223,6 @@ static __inline__ int fls(int x)
 #ifdef __KERNEL__
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 /* '3' is bits per byte */
 #define LE_BYTE_ADDR ((sizeof(unsigned long) - 1) << 3)
index 0c1046fbdd2447c300357db9f99829f163c7b56d..e3bd9a3bcb43afa97ebb346ffcdf0eda05596b7e 100644 (file)
@@ -327,25 +327,11 @@ unsigned long find_next_bit_le(const void *addr,
                                    unsigned long size, unsigned long offset);
 /* Bitmap functions for the ext2 filesystem */
 
-#define ext2_set_bit(nr,addr) \
-       __test_and_set_bit_le((nr), (unsigned long*)addr)
-#define ext2_clear_bit(nr, addr) \
-       __test_and_clear_bit_le((nr), (unsigned long*)addr)
-
 #define ext2_set_bit_atomic(lock, nr, addr) \
        test_and_set_bit_le((nr), (unsigned long*)addr)
 #define ext2_clear_bit_atomic(lock, nr, addr) \
        test_and_clear_bit_le((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)
-#define ext2_find_next_zero_bit(addr, size, off) \
-       find_next_zero_bit_le((unsigned long *)addr, size, off)
-
-#define ext2_find_next_bit(addr, size, off) \
-       find_next_bit_le((unsigned long *)addr, size, off)
 /* Bitmap functions for the minix filesystem.  */
 
 #define minix_test_and_set_bit(nr,addr) \
index f48f9644e4b50c81556ae1f44a3025dfb5205ce4..2dd32bba47eeed771b41b76655f16377a930ebb4 100644 (file)
@@ -857,17 +857,10 @@ static inline int find_next_bit_le(void *vaddr, unsigned long size,
        return offset + find_first_bit_le(p, size);
 }
 
-#define ext2_set_bit __test_and_set_bit_le
 #define ext2_set_bit_atomic(lock, nr, addr)    \
        test_and_set_bit_le(nr, addr)
-#define ext2_clear_bit __test_and_clear_bit_le
 #define ext2_clear_bit_atomic(lock, nr, addr)  \
        test_and_clear_bit_le(nr, addr)
-#define ext2_test_bit test_bit_le
-#define ext2_find_first_zero_bit find_first_zero_bit_le
-#define ext2_find_next_zero_bit find_next_zero_bit_le
-#define ext2_find_first_bit find_first_bit_le
-#define ext2_find_next_bit find_next_bit_le
 
 #include <asm-generic/bitops/minix.h>
 
index 9167810c57bd32d2e64da3100bdf8229cfe0c29a..fc5cd5b9b446909b61d46b8de0c5a0e38ee63297 100644 (file)
@@ -95,7 +95,6 @@ static inline unsigned long ffz(unsigned long word)
 #include <asm-generic/bitops/lock.h>
 #include <asm-generic/bitops/sched.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 #include <asm-generic/bitops/fls.h>
index 5b3ab0646587931df90c779c2c6c65950baa9390..75da6f82a12e7ed717cfc7ff065f8a9ca4ccd693 100644 (file)
@@ -104,7 +104,6 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
 #include <asm-generic/bitops/lock.h>
 #include <asm-generic/bitops/find.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
index 9097862faaadc3ca6038a30c1122c1c7f0d74f3e..66db28e6bbf51c43c35bcb5f50a7b5688e1817de 100644 (file)
@@ -90,7 +90,6 @@ static inline unsigned int __arch_hweight8(unsigned int w)
 #ifdef __KERNEL__
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(lock,nr,addr) \
        test_and_set_bit((nr) ^ 0x38,(unsigned long *)(addr))
index 56b03553ad06a962a3cfe599fdf047fc5a3e6afd..5447addafca4e1fcf7949ff1f0164378d11c18ee 100644 (file)
@@ -123,7 +123,6 @@ static inline unsigned long __arch_hweight64(__u64 w)
 #include <asm-generic/bitops/find.h>
 #include <asm-generic/bitops/sched.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
 #endif /* _ASM_TILE_BITOPS_H */
index c68bc101441df84ecc4675dbbfc2cb53dfb3a8c9..3c95e072c179f0a4d6e6ea7d1e604a72fcae10b7 100644 (file)
@@ -457,7 +457,6 @@ static inline int fls(int x)
 #ifdef __KERNEL__
 
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #define ext2_set_bit_atomic(lock, nr, addr)                    \
        test_and_set_bit((nr), (unsigned long *)(addr))
index 0475c11bfde2fb3087da83f1be380e8d147569b1..a56b7b577f09368aca87f9d8821a827592b2ef95 100644 (file)
@@ -107,7 +107,6 @@ static inline unsigned long __fls(unsigned long word)
 #include <asm-generic/bitops/fls64.h>
 #include <asm-generic/bitops/find.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 
 #ifdef __XTENSA_EL__
 # define ext2_set_bit_atomic(lock,nr,addr)                             \
index 1b48c337087293bfb95733d52def539f68ff219d..645be9e7ee4713b9bfc6fc7c11095ce57addcd09 100644 (file)
@@ -174,3 +174,9 @@ ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
        return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
                le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
 }
+
+#define ext2_set_bit   __test_and_set_bit_le
+#define ext2_clear_bit __test_and_clear_bit_le
+#define ext2_test_bit  test_bit_le
+#define ext2_find_first_zero_bit       find_first_zero_bit_le
+#define ext2_find_next_zero_bit                find_next_zero_bit_le
index 933710b06e828cd655bd306b073dad7dfc362264..dd7c0147aecb7911756e47dc9dd89b08e30f3e02 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm-generic/bitops/atomic.h>
 #include <asm-generic/bitops/non-atomic.h>
 #include <asm-generic/bitops/le.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 #include <asm-generic/bitops/minix.h>
 
diff --git a/include/asm-generic/bitops/ext2-non-atomic.h b/include/asm-generic/bitops/ext2-non-atomic.h
deleted file mode 100644 (file)
index ad0a244..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_
-#define _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_
-
-#define ext2_set_bit(nr,addr)  \
-       __test_and_set_bit_le((nr), (unsigned long *)(addr))
-#define ext2_clear_bit(nr,addr)        \
-       __test_and_clear_bit_le((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))
-#define ext2_find_next_zero_bit(addr, size, off) \
-       find_next_zero_bit_le((unsigned long *)(addr), (size), (off))
-#define ext2_find_next_bit(addr, size, off) \
-       find_next_bit_le((unsigned long *)(addr), (size), (off))
-
-#endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */