Commit 94949436 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Make local_t 64bit instead of 32bit

For consistency with other architectures
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5d05f4de
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
typedef struct typedef struct
{ {
volatile unsigned int counter; volatile unsigned long counter;
} local_t; } local_t;
#define LOCAL_INIT(i) { (i) } #define LOCAL_INIT(i) { (i) }
...@@ -16,7 +16,7 @@ typedef struct ...@@ -16,7 +16,7 @@ typedef struct
static __inline__ void local_inc(local_t *v) static __inline__ void local_inc(local_t *v)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"incl %0" "incq %0"
:"=m" (v->counter) :"=m" (v->counter)
:"m" (v->counter)); :"m" (v->counter));
} }
...@@ -24,7 +24,7 @@ static __inline__ void local_inc(local_t *v) ...@@ -24,7 +24,7 @@ static __inline__ void local_inc(local_t *v)
static __inline__ void local_dec(local_t *v) static __inline__ void local_dec(local_t *v)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"decl %0" "decq %0"
:"=m" (v->counter) :"=m" (v->counter)
:"m" (v->counter)); :"m" (v->counter));
} }
...@@ -32,7 +32,7 @@ static __inline__ void local_dec(local_t *v) ...@@ -32,7 +32,7 @@ static __inline__ void local_dec(local_t *v)
static __inline__ void local_add(unsigned int i, local_t *v) static __inline__ void local_add(unsigned int i, local_t *v)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"addl %1,%0" "addq %1,%0"
:"=m" (v->counter) :"=m" (v->counter)
:"ir" (i), "m" (v->counter)); :"ir" (i), "m" (v->counter));
} }
...@@ -40,7 +40,7 @@ static __inline__ void local_add(unsigned int i, local_t *v) ...@@ -40,7 +40,7 @@ static __inline__ void local_add(unsigned int i, local_t *v)
static __inline__ void local_sub(unsigned int i, local_t *v) static __inline__ void local_sub(unsigned int i, local_t *v)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"subl %1,%0" "subq %1,%0"
:"=m" (v->counter) :"=m" (v->counter)
:"ir" (i), "m" (v->counter)); :"ir" (i), "m" (v->counter));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment