vserver 1.9.3
[linux-2.6.git] / arch / ppc64 / kernel / entry.S
index 2d48d24..f0a12ea 100644 (file)
@@ -122,7 +122,7 @@ SystemCall_common:
        andi.   r11,r10,_TIF_SYSCALL_T_OR_A
        bne-    syscall_dotrace
 syscall_dotrace_cont:
-       cmpl  0,r0,NR_syscalls
+       cmpldi  0,r0,NR_syscalls
        bge-    syscall_enosys
 
 system_call:                   /* label this so stack traces look sane */
@@ -204,7 +204,7 @@ syscall_enosys:
 
 syscall_error:
        lbz     r11,TI_SC_NOERR(r12)
-       cmp   0,r11,0
+       cmpwi   0,r11,0
        bne-    syscall_error_cont
        neg     r3,r3
        oris    r5,r5,0x1000    /* Set SO bit in CR */
@@ -393,9 +393,17 @@ BEGIN_FTR_SECTION
        cmpd    cr1,r6,r9       /* or is new ESID the same as current ESID? */
        cror    eq,4*cr1+eq,eq
        beq     2f              /* if yes, don't slbie it */
-       oris    r6,r6,0x0800    /* set C (class) bit */
-       slbie   r6
-       slbie   r6              /* Workaround POWER5 < DD2.1 issue */
+       oris    r0,r6,0x0800    /* set C (class) bit */
+
+       /* Bolt in the new stack SLB entry */
+       ld      r7,KSP_VSID(r4) /* Get new stack's VSID */
+       oris    r6,r6,(SLB_ESID_V)@h
+       ori     r6,r6,(SLB_NUM_BOLTED-1)@l
+       slbie   r0
+       slbie   r0              /* Workaround POWER5 < DD2.1 issue */
+       slbmte  r7,r6
+       isync
+
 2:
 END_FTR_SECTION_IFSET(CPU_FTR_SLB)
        clrrdi  r7,r8,THREAD_SHIFT      /* base of new stack */
@@ -738,6 +746,10 @@ _STATIC(rtas_restore_regs)
        mtlr    r0
         blr                            /* return to caller */
 
+#endif /* CONFIG_PPC_PSERIES */
+
+#ifdef CONFIG_PPC_MULTIPLATFORM
+
 _GLOBAL(enter_prom)
        mflr    r0
        std     r0,16(r1)
@@ -769,11 +781,8 @@ _GLOBAL(enter_prom)
        std     r11,_MSR(r1)
 
        /* Get the PROM entrypoint */
-        bl      .reloc_offset
-       LOADADDR(r12,prom)
-       sub     r12,r12,r3
-       ld      r12,PROMENTRY(r12)
-       mtlr    r12
+       ld      r0,GPR4(r1)
+       mtlr    r0
 
        /* Switch MSR to 32 bits mode
         */
@@ -826,4 +835,4 @@ _GLOBAL(enter_prom)
        mtlr    r0
         blr
        
-#endif /* defined(CONFIG_PPC_PSERIES) */
+#endif /* CONFIG_PPC_MULTIPLATFORM */