Commit 6282c8d3 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Two small compile fixes for x86-64

Here are two small compile fixes for x86-64 in 2.5.6pre2.
- Remove call to schedule_tail.
- Fix inline assembly of semaphores to work with latest gcc 3.1.
parent 63547b06
...@@ -102,8 +102,6 @@ ...@@ -102,8 +102,6 @@
* A newly forked process directly context switches into this. * A newly forked process directly context switches into this.
*/ */
ENTRY(ret_from_fork) ENTRY(ret_from_fork)
movq %rbx, %rdi
call schedule_tail
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
bt $TIF_SYSCALL_TRACE,threadinfo_flags(%rcx) bt $TIF_SYSCALL_TRACE,threadinfo_flags(%rcx)
jc rff_trace jc rff_trace
......
...@@ -157,9 +157,9 @@ LOCK_PREFIX " xadd %%edx,(%%rax)\n\t" /* subtracts 1, returns the old valu ...@@ -157,9 +157,9 @@ LOCK_PREFIX " xadd %%edx,(%%rax)\n\t" /* subtracts 1, returns the old valu
" jmp 1b\n" " jmp 1b\n"
".previous\n" ".previous\n"
"# ending __up_read\n" "# ending __up_read\n"
: "+m"(sem->count), "+d"(tmp) : "+d"(tmp)
: "a"(sem) : "a"(sem)
: "memory", "cc"); : "memory");
} }
/* /*
...@@ -169,7 +169,7 @@ static inline void __up_write(struct rw_semaphore *sem) ...@@ -169,7 +169,7 @@ static inline void __up_write(struct rw_semaphore *sem)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"# beginning __up_write\n\t" "# beginning __up_write\n\t"
" movl %2,%%edx\n\t" " movl %1,%%edx\n\t"
LOCK_PREFIX " xaddl %%edx,(%%rax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */ LOCK_PREFIX " xaddl %%edx,(%%rax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
" jnz 2f\n\t" /* jump if the lock is being waited upon */ " jnz 2f\n\t" /* jump if the lock is being waited upon */
"1:\n\t" "1:\n\t"
...@@ -181,7 +181,7 @@ LOCK_PREFIX " xaddl %%edx,(%%rax)\n\t" /* tries to transition 0xffff0001 -> ...@@ -181,7 +181,7 @@ LOCK_PREFIX " xaddl %%edx,(%%rax)\n\t" /* tries to transition 0xffff0001 ->
" jmp 1b\n" " jmp 1b\n"
".previous\n" ".previous\n"
"# ending __up_write\n" "# ending __up_write\n"
: "+m"(sem->count) :
: "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS) : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS)
: "memory", "cc", "edx"); : "memory", "cc", "edx");
} }
......
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