diff options
| author | Andi Kleen <ak@suse.de> | 2006-03-25 10:31:37 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:14:38 -0500 |
| commit | 94949436191f69dac735919a9698612ef6b3dbba (patch) | |
| tree | 9648177bb03f620b6333153102e5bdd7e56f47ca | |
| parent | 5d05f4de414c98348219b633401ad9c9a5348a8b (diff) | |
[PATCH] x86_64: Make local_t 64bit instead of 32bit
For consistency with other architectures
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | include/asm-x86_64/local.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index 3e72c41727c5..bf148037d4e5 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | typedef struct | 6 | typedef struct |
| 7 | { | 7 | { |
| 8 | volatile unsigned int counter; | 8 | volatile unsigned long counter; |
| 9 | } local_t; | 9 | } local_t; |
| 10 | 10 | ||
| 11 | #define LOCAL_INIT(i) { (i) } | 11 | #define LOCAL_INIT(i) { (i) } |
| @@ -16,7 +16,7 @@ typedef struct | |||
| 16 | static __inline__ void local_inc(local_t *v) | 16 | static __inline__ void local_inc(local_t *v) |
| 17 | { | 17 | { |
| 18 | __asm__ __volatile__( | 18 | __asm__ __volatile__( |
| 19 | "incl %0" | 19 | "incq %0" |
| 20 | :"=m" (v->counter) | 20 | :"=m" (v->counter) |
| 21 | :"m" (v->counter)); | 21 | :"m" (v->counter)); |
| 22 | } | 22 | } |
| @@ -24,7 +24,7 @@ static __inline__ void local_inc(local_t *v) | |||
| 24 | static __inline__ void local_dec(local_t *v) | 24 | static __inline__ void local_dec(local_t *v) |
| 25 | { | 25 | { |
| 26 | __asm__ __volatile__( | 26 | __asm__ __volatile__( |
| 27 | "decl %0" | 27 | "decq %0" |
| 28 | :"=m" (v->counter) | 28 | :"=m" (v->counter) |
| 29 | :"m" (v->counter)); | 29 | :"m" (v->counter)); |
| 30 | } | 30 | } |
| @@ -32,7 +32,7 @@ static __inline__ void local_dec(local_t *v) | |||
| 32 | static __inline__ void local_add(unsigned int i, local_t *v) | 32 | static __inline__ void local_add(unsigned int i, local_t *v) |
| 33 | { | 33 | { |
| 34 | __asm__ __volatile__( | 34 | __asm__ __volatile__( |
| 35 | "addl %1,%0" | 35 | "addq %1,%0" |
| 36 | :"=m" (v->counter) | 36 | :"=m" (v->counter) |
| 37 | :"ir" (i), "m" (v->counter)); | 37 | :"ir" (i), "m" (v->counter)); |
| 38 | } | 38 | } |
| @@ -40,7 +40,7 @@ static __inline__ void local_add(unsigned int i, local_t *v) | |||
| 40 | static __inline__ void local_sub(unsigned int i, local_t *v) | 40 | static __inline__ void local_sub(unsigned int i, local_t *v) |
| 41 | { | 41 | { |
| 42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
| 43 | "subl %1,%0" | 43 | "subq %1,%0" |
| 44 | :"=m" (v->counter) | 44 | :"=m" (v->counter) |
| 45 | :"ir" (i), "m" (v->counter)); | 45 | :"ir" (i), "m" (v->counter)); |
| 46 | } | 46 | } |
