]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Two small compile fixes for x86-64
authorAndi Kleen <ak@muc.de>
Thu, 7 Mar 2002 08:57:13 +0000 (00:57 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 7 Mar 2002 08:57:13 +0000 (00:57 -0800)
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.

arch/x86_64/kernel/entry.S
include/asm-x86_64/rwsem.h

index e46bd97f9e343a74ae7c5ed6a17c8a3ae18abe66..6b98b90891f43fbfa51bfc99065990636c2b04d3 100644 (file)
  * A newly forked process directly context switches into this.
  */    
 ENTRY(ret_from_fork)
-       movq %rbx, %rdi
-       call schedule_tail
        GET_THREAD_INFO(%rcx)
        bt $TIF_SYSCALL_TRACE,threadinfo_flags(%rcx)
        jc rff_trace
index e77847de2ec3f35dad6a01125abea5f6c5f8f677..5e65cd25c4816264e12d87690faf10333a936fb9 100644 (file)
@@ -157,9 +157,9 @@ LOCK_PREFIX "  xadd      %%edx,(%%rax)\n\t" /* subtracts 1, returns the old valu
                "  jmp       1b\n"
                ".previous\n"
                "# ending __up_read\n"
-               : "+m"(sem->count), "+d"(tmp)
+               : "+d"(tmp)
                : "a"(sem)
-               : "memory", "cc");
+               : "memory");
 }
 
 /*
@@ -169,7 +169,7 @@ static inline void __up_write(struct rw_semaphore *sem)
 {
        __asm__ __volatile__(
                "# 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 */
                "  jnz       2f\n\t" /* jump if the lock is being waited upon */
                "1:\n\t"
@@ -181,7 +181,7 @@ LOCK_PREFIX "  xaddl     %%edx,(%%rax)\n\t" /* tries to transition 0xffff0001 ->
                "  jmp       1b\n"
                ".previous\n"
                "# ending __up_write\n"
-               : "+m"(sem->count)
+               : 
                : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS)
                : "memory", "cc", "edx");
 }