diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2011-05-26 19:26:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:38 -0400 |
commit | 04b18ff9ca69545a2447462a65c7ba5373e23f69 (patch) | |
tree | 750ded98da86a30730b77d195e94bf6d271ffe99 /arch/arm/include | |
parent | 63e424c84429903c92a0f1e9654c31ccaf6694d0 (diff) |
arm: use asm-generic/bitops/le.h
The previous style change enables to use asm-generic/bitops/le.h on arm.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/bitops.h | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index 18a024b7b676..b4892a06442c 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h | |||
@@ -203,8 +203,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); | |||
203 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz) | 203 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz) |
204 | #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off) | 204 | #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off) |
205 | 205 | ||
206 | #define WORD_BITOFF_TO_LE(x) ((x)) | ||
207 | |||
208 | #else | 206 | #else |
209 | /* | 207 | /* |
210 | * These are the big endian, atomic definitions. | 208 | * These are the big endian, atomic definitions. |
@@ -214,8 +212,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); | |||
214 | #define find_first_bit(p,sz) _find_first_bit_be(p,sz) | 212 | #define find_first_bit(p,sz) _find_first_bit_be(p,sz) |
215 | #define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off) | 213 | #define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off) |
216 | 214 | ||
217 | #define WORD_BITOFF_TO_LE(x) ((x) ^ 0x18) | ||
218 | |||
219 | #endif | 215 | #endif |
220 | 216 | ||
221 | #if __LINUX_ARM_ARCH__ < 5 | 217 | #if __LINUX_ARM_ARCH__ < 5 |
@@ -287,40 +283,7 @@ static inline int fls(int x) | |||
287 | #include <asm-generic/bitops/hweight.h> | 283 | #include <asm-generic/bitops/hweight.h> |
288 | #include <asm-generic/bitops/lock.h> | 284 | #include <asm-generic/bitops/lock.h> |
289 | 285 | ||
290 | static inline void __set_bit_le(int nr, void *addr) | 286 | #ifdef __ARMEB__ |
291 | { | ||
292 | __set_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
293 | } | ||
294 | |||
295 | static inline void __clear_bit_le(int nr, void *addr) | ||
296 | { | ||
297 | __clear_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
298 | } | ||
299 | |||
300 | static inline int __test_and_set_bit_le(int nr, void *addr) | ||
301 | { | ||
302 | return __test_and_set_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
303 | } | ||
304 | |||
305 | static inline int test_and_set_bit_le(int nr, void *addr) | ||
306 | { | ||
307 | return test_and_set_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
308 | } | ||
309 | |||
310 | static inline int __test_and_clear_bit_le(int nr, void *addr) | ||
311 | { | ||
312 | return __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
313 | } | ||
314 | |||
315 | static inline int test_and_clear_bit_le(int nr, void *addr) | ||
316 | { | ||
317 | return test_and_clear_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
318 | } | ||
319 | |||
320 | static inline int test_bit_le(int nr, const void *addr) | ||
321 | { | ||
322 | return test_bit(WORD_BITOFF_TO_LE(nr), addr); | ||
323 | } | ||
324 | 287 | ||
325 | static inline int find_first_zero_bit_le(const void *p, unsigned size) | 288 | static inline int find_first_zero_bit_le(const void *p, unsigned size) |
326 | { | 289 | { |
@@ -340,6 +303,10 @@ static inline int find_next_bit_le(const void *p, int size, int offset) | |||
340 | } | 303 | } |
341 | #define find_next_bit_le find_next_bit_le | 304 | #define find_next_bit_le find_next_bit_le |
342 | 305 | ||
306 | #endif | ||
307 | |||
308 | #include <asm-generic/bitops/le.h> | ||
309 | |||
343 | /* | 310 | /* |
344 | * Ext2 is defined to use little-endian byte ordering. | 311 | * Ext2 is defined to use little-endian byte ordering. |
345 | */ | 312 | */ |