Commit 00463c16 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] i386: Use early clobbers for semaphores now

The new code does clobber the result early, so make sure to tell
gcc to not put it into the same register as a input argument
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>
Acked-by: default avatarKyle McMartin <kyle@parisc-linux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cdb8355a
...@@ -126,7 +126,7 @@ static inline int down_interruptible(struct semaphore * sem) ...@@ -126,7 +126,7 @@ static inline int down_interruptible(struct semaphore * sem)
"lea %1,%%eax\n\t" "lea %1,%%eax\n\t"
"call __down_failed_interruptible\n" "call __down_failed_interruptible\n"
"2:" "2:"
:"=a" (result), "+m" (sem->count) :"=&a" (result), "+m" (sem->count)
: :
:"memory"); :"memory");
return result; return result;
...@@ -148,7 +148,7 @@ static inline int down_trylock(struct semaphore * sem) ...@@ -148,7 +148,7 @@ static inline int down_trylock(struct semaphore * sem)
"lea %1,%%eax\n\t" "lea %1,%%eax\n\t"
"call __down_failed_trylock\n\t" "call __down_failed_trylock\n\t"
"2:\n" "2:\n"
:"=a" (result), "+m" (sem->count) :"=&a" (result), "+m" (sem->count)
: :
:"memory"); :"memory");
return result; return result;
......
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