mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
[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: Andi Kleen <ak@suse.de> Cc: Andrew Morton <akpm@osdl.org> Acked-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
cdb8355add
commit
00463c1633
@ -126,7 +126,7 @@ static inline int down_interruptible(struct semaphore * sem)
|
||||
"lea %1,%%eax\n\t"
|
||||
"call __down_failed_interruptible\n"
|
||||
"2:"
|
||||
:"=a" (result), "+m" (sem->count)
|
||||
:"=&a" (result), "+m" (sem->count)
|
||||
:
|
||||
:"memory");
|
||||
return result;
|
||||
@ -148,7 +148,7 @@ static inline int down_trylock(struct semaphore * sem)
|
||||
"lea %1,%%eax\n\t"
|
||||
"call __down_failed_trylock\n\t"
|
||||
"2:\n"
|
||||
:"=a" (result), "+m" (sem->count)
|
||||
:"=&a" (result), "+m" (sem->count)
|
||||
:
|
||||
:"memory");
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user