diff options
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/atomic_32.h | 10 | ||||
-rw-r--r-- | arch/x86/include/asm/atomic_64.h | 18 |
2 files changed, 3 insertions, 25 deletions
diff --git a/arch/x86/include/asm/atomic_32.h b/arch/x86/include/asm/atomic_32.h index ad5b9f6ecddf..85b46fba4229 100644 --- a/arch/x86/include/asm/atomic_32.h +++ b/arch/x86/include/asm/atomic_32.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_X86_ATOMIC_32_H | 2 | #define _ASM_X86_ATOMIC_32_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | ||
5 | #include <asm/processor.h> | 6 | #include <asm/processor.h> |
6 | #include <asm/cmpxchg.h> | 7 | #include <asm/cmpxchg.h> |
7 | 8 | ||
@@ -10,15 +11,6 @@ | |||
10 | * resource counting etc.. | 11 | * resource counting etc.. |
11 | */ | 12 | */ |
12 | 13 | ||
13 | /* | ||
14 | * Make sure gcc doesn't try to be clever and move things around | ||
15 | * on us. We need to use _exactly_ the address the user gave us, | ||
16 | * not some alias that contains the same information. | ||
17 | */ | ||
18 | typedef struct { | ||
19 | int counter; | ||
20 | } atomic_t; | ||
21 | |||
22 | #define ATOMIC_INIT(i) { (i) } | 14 | #define ATOMIC_INIT(i) { (i) } |
23 | 15 | ||
24 | /** | 16 | /** |
diff --git a/arch/x86/include/asm/atomic_64.h b/arch/x86/include/asm/atomic_64.h index 279d2a731f3f..8c21731984da 100644 --- a/arch/x86/include/asm/atomic_64.h +++ b/arch/x86/include/asm/atomic_64.h | |||
@@ -1,25 +1,15 @@ | |||
1 | #ifndef _ASM_X86_ATOMIC_64_H | 1 | #ifndef _ASM_X86_ATOMIC_64_H |
2 | #define _ASM_X86_ATOMIC_64_H | 2 | #define _ASM_X86_ATOMIC_64_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <asm/alternative.h> | 5 | #include <asm/alternative.h> |
5 | #include <asm/cmpxchg.h> | 6 | #include <asm/cmpxchg.h> |
6 | 7 | ||
7 | /* atomic_t should be 32 bit signed type */ | ||
8 | |||
9 | /* | 8 | /* |
10 | * Atomic operations that C can't guarantee us. Useful for | 9 | * Atomic operations that C can't guarantee us. Useful for |
11 | * resource counting etc.. | 10 | * resource counting etc.. |
12 | */ | 11 | */ |
13 | 12 | ||
14 | /* | ||
15 | * Make sure gcc doesn't try to be clever and move things around | ||
16 | * on us. We need to use _exactly_ the address the user gave us, | ||
17 | * not some alias that contains the same information. | ||
18 | */ | ||
19 | typedef struct { | ||
20 | int counter; | ||
21 | } atomic_t; | ||
22 | |||
23 | #define ATOMIC_INIT(i) { (i) } | 13 | #define ATOMIC_INIT(i) { (i) } |
24 | 14 | ||
25 | /** | 15 | /** |
@@ -191,11 +181,7 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
191 | #define atomic_inc_return(v) (atomic_add_return(1, v)) | 181 | #define atomic_inc_return(v) (atomic_add_return(1, v)) |
192 | #define atomic_dec_return(v) (atomic_sub_return(1, v)) | 182 | #define atomic_dec_return(v) (atomic_sub_return(1, v)) |
193 | 183 | ||
194 | /* An 64bit atomic type */ | 184 | /* The 64-bit atomic type */ |
195 | |||
196 | typedef struct { | ||
197 | long counter; | ||
198 | } atomic64_t; | ||
199 | 185 | ||
200 | #define ATOMIC64_INIT(i) { (i) } | 186 | #define ATOMIC64_INIT(i) { (i) } |
201 | 187 | ||