linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / powerpc / kernel / entry_64.S
index 54d9f5c..24be0cf 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ *  arch/ppc64/kernel/entry.S
+ *
  *  PowerPC version 
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
@@ -18,6 +20,7 @@
  *  2 of the License, or (at your option) any later version.
  */
 
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <asm/unistd.h>
 #include <asm/processor.h>
@@ -56,12 +59,10 @@ system_call_common:
        beq-    1f
        ld      r1,PACAKSAVE(r13)
 1:     std     r10,0(r1)
-       crclr   so
        std     r11,_NIP(r1)
        std     r12,_MSR(r1)
        std     r0,GPR0(r1)
        std     r10,GPR1(r1)
-       ACCOUNT_CPU_USER_ENTRY(r10, r11)
        std     r2,GPR2(r1)
        std     r3,GPR3(r1)
        std     r4,GPR4(r1)
@@ -75,6 +76,7 @@ system_call_common:
        std     r11,GPR11(r1)
        std     r11,GPR12(r1)
        std     r9,GPR13(r1)
+       crclr   so
        mfcr    r9
        mflr    r10
        li      r11,0xc01
@@ -168,9 +170,8 @@ syscall_error_cont:
        stdcx.  r0,0,r1                 /* to clear the reservation */
        andi.   r6,r8,MSR_PR
        ld      r4,_LINK(r1)
-       beq-    1f
-       ACCOUNT_CPU_USER_EXIT(r11, r12)
-       ld      r13,GPR13(r1)   /* only restore r13 if returning to usermode */
+       beq-    1f                      /* only restore r13 if */
+       ld      r13,GPR13(r1)           /* returning to usermode */
 1:     ld      r2,GPR2(r1)
        li      r12,MSR_RI
        andc    r11,r10,r12
@@ -321,7 +322,7 @@ _GLOBAL(ret_from_fork)
  * the fork code also.
  *
  * The code which creates the new task context is in 'copy_thread'
- * in arch/powerpc/kernel/process.c 
+ * in arch/ppc64/kernel/process.c
  */
        .align  7
 _GLOBAL(_switch)
@@ -485,7 +486,6 @@ restore:
         * userspace
         */
        beq     1f
-       ACCOUNT_CPU_USER_EXIT(r3, r4)
        REST_GPR(13, r1)
 1:
        ld      r3,_CTR(r1)
@@ -616,12 +616,6 @@ _GLOBAL(enter_rtas)
        mfsrr1  r10
        std     r10,_SRR1(r1)
 
-       /* Temporary workaround to clear CR until RTAS can be modified to
-        * ignore all bits.
-        */
-       li      r0,0
-       mtcr    r0
-
        /* There is no way it is acceptable to get here with interrupts enabled,
         * check it with the asm equivalent of WARN_ON
         */