diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-05-13 18:56:32 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe2.(none)> | 2009-06-11 15:02:31 -0400 |
commit | 9858c60cc2d33b18367b2bc6947e3ea23db26ccb (patch) | |
tree | 7c16d44461bbecf58257c5b6344f1ed01d137a79 /include/asm-generic/bitops.h | |
parent | d7c4f1b78afeedfc22b1756fcdc1acbe84284d74 (diff) |
asm-generic: make bitops.h usable
bitops.h apparently suffered from some level of bitrot, it
was missing the smp_mb__{before,after}_clear_bit functions,
and included other headers in an invalid order.
This changes the file so that new architectures can use
it out of the box.
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic/bitops.h')
-rw-r--r-- | include/asm-generic/bitops.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index c9f369c4bd7e..a54f4421a24d 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h | |||
@@ -1,19 +1,29 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_H_ | 1 | #ifndef __ASM_GENERIC_BITOPS_H |
2 | #define _ASM_GENERIC_BITOPS_H_ | 2 | #define __ASM_GENERIC_BITOPS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * For the benefit of those who are trying to port Linux to another | 5 | * For the benefit of those who are trying to port Linux to another |
6 | * architecture, here are some C-language equivalents. You should | 6 | * architecture, here are some C-language equivalents. You should |
7 | * recode these in the native assembly language, if at all possible. | 7 | * recode these in the native assembly language, if at all possible. |
8 | * | 8 | * |
9 | * C language equivalents written by Theodore Ts'o, 9/26/92 | 9 | * C language equivalents written by Theodore Ts'o, 9/26/92 |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <asm-generic/bitops/atomic.h> | 12 | #include <linux/irqflags.h> |
13 | #include <asm-generic/bitops/non-atomic.h> | 13 | #include <linux/compiler.h> |
14 | |||
15 | /* | ||
16 | * clear_bit may not imply a memory barrier | ||
17 | */ | ||
18 | #ifndef smp_mb__before_clear_bit | ||
19 | #define smp_mb__before_clear_bit() smp_mb() | ||
20 | #define smp_mb__after_clear_bit() smp_mb() | ||
21 | #endif | ||
22 | |||
14 | #include <asm-generic/bitops/__ffs.h> | 23 | #include <asm-generic/bitops/__ffs.h> |
15 | #include <asm-generic/bitops/ffz.h> | 24 | #include <asm-generic/bitops/ffz.h> |
16 | #include <asm-generic/bitops/fls.h> | 25 | #include <asm-generic/bitops/fls.h> |
26 | #include <asm-generic/bitops/__fls.h> | ||
17 | #include <asm-generic/bitops/fls64.h> | 27 | #include <asm-generic/bitops/fls64.h> |
18 | #include <asm-generic/bitops/find.h> | 28 | #include <asm-generic/bitops/find.h> |
19 | 29 | ||
@@ -26,8 +36,10 @@ | |||
26 | #include <asm-generic/bitops/hweight.h> | 36 | #include <asm-generic/bitops/hweight.h> |
27 | #include <asm-generic/bitops/lock.h> | 37 | #include <asm-generic/bitops/lock.h> |
28 | 38 | ||
39 | #include <asm-generic/bitops/atomic.h> | ||
40 | #include <asm-generic/bitops/non-atomic.h> | ||
29 | #include <asm-generic/bitops/ext2-non-atomic.h> | 41 | #include <asm-generic/bitops/ext2-non-atomic.h> |
30 | #include <asm-generic/bitops/ext2-atomic.h> | 42 | #include <asm-generic/bitops/ext2-atomic.h> |
31 | #include <asm-generic/bitops/minix.h> | 43 | #include <asm-generic/bitops/minix.h> |
32 | 44 | ||
33 | #endif /* _ASM_GENERIC_BITOPS_H */ | 45 | #endif /* __ASM_GENERIC_BITOPS_H */ |