diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-03-26 04:39:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:10 -0500 |
commit | 67b0ad574b5ee90f8ea58196ff8a7f3780b75365 (patch) | |
tree | ca9bc212f6efa8f5170185ef1fa21f75de0684fd /include/asm-frv | |
parent | 72b61a3cfd80d1321eb898be8ceae2064f0fbea1 (diff) |
[PATCH] bitops: use non atomic operations for minix_*_bit() and ext2_*_bit()
Bitmap functions for the minix filesystem and the ext2 filesystem except
ext2_set_bit_atomic() and ext2_clear_bit_atomic() do not require the atomic
guarantees.
But these are defined by using atomic bit operations on several architectures.
(cris, frv, h8300, ia64, m32r, m68k, m68knommu, mips, s390, sh, sh64, sparc,
sparc64, v850, and xtensa)
This patch switches to non atomic bit operation.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-frv')
-rw-r--r-- | include/asm-frv/bitops.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h index f686b519878e..9c5db5c34c1b 100644 --- a/include/asm-frv/bitops.h +++ b/include/asm-frv/bitops.h | |||
@@ -259,11 +259,11 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
259 | #define hweight16(x) generic_hweight16(x) | 259 | #define hweight16(x) generic_hweight16(x) |
260 | #define hweight8(x) generic_hweight8(x) | 260 | #define hweight8(x) generic_hweight8(x) |
261 | 261 | ||
262 | #define ext2_set_bit(nr, addr) test_and_set_bit ((nr) ^ 0x18, (addr)) | 262 | #define ext2_set_bit(nr, addr) __test_and_set_bit ((nr) ^ 0x18, (addr)) |
263 | #define ext2_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 0x18, (addr)) | 263 | #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (addr)) |
264 | 264 | ||
265 | #define ext2_set_bit_atomic(lock,nr,addr) ext2_set_bit((nr), addr) | 265 | #define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit ((nr) ^ 0x18, (addr)) |
266 | #define ext2_clear_bit_atomic(lock,nr,addr) ext2_clear_bit((nr), addr) | 266 | #define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr) ^ 0x18, (addr)) |
267 | 267 | ||
268 | static inline int ext2_test_bit(int nr, const volatile void * addr) | 268 | static inline int ext2_test_bit(int nr, const volatile void * addr) |
269 | { | 269 | { |
@@ -331,9 +331,9 @@ found_middle: | |||
331 | } | 331 | } |
332 | 332 | ||
333 | /* Bitmap functions for the minix filesystem. */ | 333 | /* Bitmap functions for the minix filesystem. */ |
334 | #define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr) | 334 | #define minix_test_and_set_bit(nr,addr) __test_and_set_bit ((nr) ^ 0x18, (addr)) |
335 | #define minix_set_bit(nr,addr) ext2_set_bit(nr,addr) | 335 | #define minix_set_bit(nr,addr) __set_bit((nr) ^ 0x18, (addr)) |
336 | #define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr) | 336 | #define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit((nr) ^ 0x18, (addr)) |
337 | #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr) | 337 | #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr) |
338 | #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size) | 338 | #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size) |
339 | 339 | ||