diff options
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/bitops.h | 82 | ||||
-rw-r--r-- | arch/powerpc/include/asm/types.h | 2 |
2 files changed, 35 insertions, 49 deletions
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 8a7e9314c68a..2e561876fc89 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -281,68 +281,56 @@ unsigned long __arch_hweight64(__u64 w); | |||
281 | 281 | ||
282 | /* Little-endian versions */ | 282 | /* Little-endian versions */ |
283 | 283 | ||
284 | static __inline__ int test_le_bit(unsigned long nr, | 284 | static __inline__ int test_bit_le(unsigned long nr, |
285 | __const__ unsigned long *addr) | 285 | __const__ void *addr) |
286 | { | 286 | { |
287 | __const__ unsigned char *tmp = (__const__ unsigned char *) addr; | 287 | __const__ unsigned char *tmp = (__const__ unsigned char *) addr; |
288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; | 288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; |
289 | } | 289 | } |
290 | 290 | ||
291 | #define __set_le_bit(nr, addr) \ | 291 | static inline void __set_bit_le(int nr, void *addr) |
292 | __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 292 | { |
293 | #define __clear_le_bit(nr, addr) \ | 293 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
294 | __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 294 | } |
295 | |||
296 | static inline void __clear_bit_le(int nr, void *addr) | ||
297 | { | ||
298 | __clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
299 | } | ||
300 | |||
301 | static inline int test_and_set_bit_le(int nr, void *addr) | ||
302 | { | ||
303 | return test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
304 | } | ||
295 | 305 | ||
296 | #define test_and_set_le_bit(nr, addr) \ | 306 | static inline int test_and_clear_bit_le(int nr, void *addr) |
297 | test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 307 | { |
298 | #define test_and_clear_le_bit(nr, addr) \ | 308 | return test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
299 | test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 309 | } |
310 | |||
311 | static inline int __test_and_set_bit_le(int nr, void *addr) | ||
312 | { | ||
313 | return __test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
314 | } | ||
300 | 315 | ||
301 | #define __test_and_set_le_bit(nr, addr) \ | 316 | static inline int __test_and_clear_bit_le(int nr, void *addr) |
302 | __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 317 | { |
303 | #define __test_and_clear_le_bit(nr, addr) \ | 318 | return __test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
304 | __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 319 | } |
305 | 320 | ||
306 | #define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0) | 321 | #define find_first_zero_bit_le(addr, size) \ |
307 | unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, | 322 | find_next_zero_bit_le((addr), (size), 0) |
323 | unsigned long find_next_zero_bit_le(const void *addr, | ||
308 | unsigned long size, unsigned long offset); | 324 | unsigned long size, unsigned long offset); |
309 | 325 | ||
310 | unsigned long generic_find_next_le_bit(const unsigned long *addr, | 326 | unsigned long find_next_bit_le(const void *addr, |
311 | unsigned long size, unsigned long offset); | 327 | unsigned long size, unsigned long offset); |
312 | /* Bitmap functions for the ext2 filesystem */ | 328 | /* Bitmap functions for the ext2 filesystem */ |
313 | 329 | ||
314 | #define ext2_set_bit(nr,addr) \ | ||
315 | __test_and_set_le_bit((nr), (unsigned long*)addr) | ||
316 | #define ext2_clear_bit(nr, addr) \ | ||
317 | __test_and_clear_le_bit((nr), (unsigned long*)addr) | ||
318 | |||
319 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 330 | #define ext2_set_bit_atomic(lock, nr, addr) \ |
320 | test_and_set_le_bit((nr), (unsigned long*)addr) | 331 | test_and_set_bit_le((nr), (unsigned long*)addr) |
321 | #define ext2_clear_bit_atomic(lock, nr, addr) \ | 332 | #define ext2_clear_bit_atomic(lock, nr, addr) \ |
322 | test_and_clear_le_bit((nr), (unsigned long*)addr) | 333 | test_and_clear_bit_le((nr), (unsigned long*)addr) |
323 | |||
324 | #define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr) | ||
325 | |||
326 | #define ext2_find_first_zero_bit(addr, size) \ | ||
327 | find_first_zero_le_bit((unsigned long*)addr, size) | ||
328 | #define ext2_find_next_zero_bit(addr, size, off) \ | ||
329 | generic_find_next_zero_le_bit((unsigned long*)addr, size, off) | ||
330 | |||
331 | #define ext2_find_next_bit(addr, size, off) \ | ||
332 | generic_find_next_le_bit((unsigned long *)addr, size, off) | ||
333 | /* Bitmap functions for the minix filesystem. */ | ||
334 | |||
335 | #define minix_test_and_set_bit(nr,addr) \ | ||
336 | __test_and_set_le_bit(nr, (unsigned long *)addr) | ||
337 | #define minix_set_bit(nr,addr) \ | ||
338 | __set_le_bit(nr, (unsigned long *)addr) | ||
339 | #define minix_test_and_clear_bit(nr,addr) \ | ||
340 | __test_and_clear_le_bit(nr, (unsigned long *)addr) | ||
341 | #define minix_test_bit(nr,addr) \ | ||
342 | test_le_bit(nr, (unsigned long *)addr) | ||
343 | |||
344 | #define minix_find_first_zero_bit(addr,size) \ | ||
345 | find_first_zero_le_bit((unsigned long *)addr, size) | ||
346 | 334 | ||
347 | #include <asm-generic/bitops/sched.h> | 335 | #include <asm-generic/bitops/sched.h> |
348 | 336 | ||
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index e16a6b2d96f1..8947b9827bc4 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -44,8 +44,6 @@ typedef struct { | |||
44 | 44 | ||
45 | typedef __vector128 vector128; | 45 | typedef __vector128 vector128; |
46 | 46 | ||
47 | typedef u64 dma64_addr_t; | ||
48 | |||
49 | typedef struct { | 47 | typedef struct { |
50 | unsigned long entry; | 48 | unsigned long entry; |
51 | unsigned long toc; | 49 | unsigned long toc; |