diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
commit | e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch) | |
tree | 2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /include/asm-m68k | |
parent | 600511e86babe3727264a0883a3a264f6fb6caf5 (diff) | |
parent | f3cab8a0b1a772dc8b055b7affa567a366627c9e (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/bitops.h | 42 | ||||
-rw-r--r-- | include/asm-m68k/poll.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/stat.h | 3 |
3 files changed, 10 insertions, 36 deletions
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 13f4c0048463..1a61fdb56aaf 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h | |||
@@ -310,36 +310,10 @@ static inline int fls(int x) | |||
310 | 310 | ||
311 | return 32 - cnt; | 311 | return 32 - cnt; |
312 | } | 312 | } |
313 | #define fls64(x) generic_fls64(x) | ||
314 | 313 | ||
315 | /* | 314 | #include <asm-generic/bitops/fls64.h> |
316 | * Every architecture must define this function. It's the fastest | 315 | #include <asm-generic/bitops/sched.h> |
317 | * way of searching a 140-bit bitmap where the first 100 bits are | 316 | #include <asm-generic/bitops/hweight.h> |
318 | * unlikely to be set. It's guaranteed that at least one of the 140 | ||
319 | * bits is cleared. | ||
320 | */ | ||
321 | static inline int sched_find_first_bit(const unsigned long *b) | ||
322 | { | ||
323 | if (unlikely(b[0])) | ||
324 | return __ffs(b[0]); | ||
325 | if (unlikely(b[1])) | ||
326 | return __ffs(b[1]) + 32; | ||
327 | if (unlikely(b[2])) | ||
328 | return __ffs(b[2]) + 64; | ||
329 | if (b[3]) | ||
330 | return __ffs(b[3]) + 96; | ||
331 | return __ffs(b[4]) + 128; | ||
332 | } | ||
333 | |||
334 | |||
335 | /* | ||
336 | * hweightN: returns the hamming weight (i.e. the number | ||
337 | * of bits set) of a N-bit word | ||
338 | */ | ||
339 | |||
340 | #define hweight32(x) generic_hweight32(x) | ||
341 | #define hweight16(x) generic_hweight16(x) | ||
342 | #define hweight8(x) generic_hweight8(x) | ||
343 | 317 | ||
344 | /* Bitmap functions for the minix filesystem */ | 318 | /* Bitmap functions for the minix filesystem */ |
345 | 319 | ||
@@ -365,9 +339,9 @@ static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size) | |||
365 | return ((p - addr) << 4) + (res ^ 31); | 339 | return ((p - addr) << 4) + (res ^ 31); |
366 | } | 340 | } |
367 | 341 | ||
368 | #define minix_test_and_set_bit(nr, addr) test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) | 342 | #define minix_test_and_set_bit(nr, addr) __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) |
369 | #define minix_set_bit(nr,addr) set_bit((nr) ^ 16, (unsigned long *)(addr)) | 343 | #define minix_set_bit(nr,addr) __set_bit((nr) ^ 16, (unsigned long *)(addr)) |
370 | #define minix_test_and_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) | 344 | #define minix_test_and_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) |
371 | 345 | ||
372 | static inline int minix_test_bit(int nr, const void *vaddr) | 346 | static inline int minix_test_bit(int nr, const void *vaddr) |
373 | { | 347 | { |
@@ -377,9 +351,9 @@ static inline int minix_test_bit(int nr, const void *vaddr) | |||
377 | 351 | ||
378 | /* Bitmap functions for the ext2 filesystem. */ | 352 | /* Bitmap functions for the ext2 filesystem. */ |
379 | 353 | ||
380 | #define ext2_set_bit(nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) | 354 | #define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) |
381 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) | 355 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) |
382 | #define ext2_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 356 | #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
383 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 357 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
384 | 358 | ||
385 | static inline int ext2_test_bit(int nr, const void *vaddr) | 359 | static inline int ext2_test_bit(int nr, const void *vaddr) |
diff --git a/include/asm-m68k/poll.h b/include/asm-m68k/poll.h index c4b69c4a87e1..0fb8843647f8 100644 --- a/include/asm-m68k/poll.h +++ b/include/asm-m68k/poll.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define POLLWRBAND 256 | 13 | #define POLLWRBAND 256 |
14 | #define POLLMSG 0x0400 | 14 | #define POLLMSG 0x0400 |
15 | #define POLLREMOVE 0x1000 | 15 | #define POLLREMOVE 0x1000 |
16 | #define POLLRDHUP 0x2000 | ||
16 | 17 | ||
17 | struct pollfd { | 18 | struct pollfd { |
18 | int fd; | 19 | int fd; |
diff --git a/include/asm-m68k/stat.h b/include/asm-m68k/stat.h index c4c402a45e21..dd38bc2e9f98 100644 --- a/include/asm-m68k/stat.h +++ b/include/asm-m68k/stat.h | |||
@@ -60,8 +60,7 @@ struct stat64 { | |||
60 | long long st_size; | 60 | long long st_size; |
61 | unsigned long st_blksize; | 61 | unsigned long st_blksize; |
62 | 62 | ||
63 | unsigned long __pad4; /* future possible st_blocks high bits */ | 63 | unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ |
64 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
65 | 64 | ||
66 | unsigned long st_atime; | 65 | unsigned long st_atime; |
67 | unsigned long st_atime_nsec; | 66 | unsigned long st_atime_nsec; |