linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / ia64 / kernel / pal.S
index af5cc0b..5018c7f 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/processor.h>
 
        .data
-       .globl pal_entry_point
 pal_entry_point:
        data8 ia64_pal_default_handler
        .text
@@ -54,7 +53,7 @@ END(ia64_pal_default_handler)
  * in4        1 ==> clear psr.ic,  0 ==> don't clear psr.ic
  *
  */
-GLOBAL_ENTRY(__ia64_pal_call_static)
+GLOBAL_ENTRY(ia64_pal_call_static)
        .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
        alloc loc1 = ar.pfs,5,5,0,0
        movl loc2 = pal_entry_point
@@ -91,7 +90,7 @@ GLOBAL_ENTRY(__ia64_pal_call_static)
        ;;
        srlz.d                          // seralize restoration of psr.l
        br.ret.sptk.many b0
-END(__ia64_pal_call_static)
+END(ia64_pal_call_static)
 
 /*
  * Make a PAL call using the stacked registers calling convention.
@@ -218,7 +217,12 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
        .body
        ;;
        ld8 loc2 = [loc2]               // loc2 <- entry point
-       mov loc3 = psr                  // save psr
+       mov out0 = in0          // first argument
+       mov out1 = in1          // copy arg2
+       mov out2 = in2          // copy arg3
+       mov out3 = in3          // copy arg3
+       ;;
+       mov loc3 = psr          // save psr
        ;;
        mov loc4=ar.rsc                 // save RSE configuration
        dep.z loc2=loc2,0,61            // convert pal entry point to physical
@@ -232,23 +236,18 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
        ;;
        andcm r16=loc3,r16              // removes bits to clear from psr
        br.call.sptk.many rp=ia64_switch_mode_phys
-
-       mov out0 = in0                  // first argument
-       mov out1 = in1                  // copy arg2
-       mov out2 = in2                  // copy arg3
-       mov out3 = in3                  // copy arg3
+.ret6:
        mov loc5 = r19
        mov loc6 = r20
-
        br.call.sptk.many rp=b7         // now make the call
-
+.ret7:
        mov ar.rsc=0                    // put RSE in enforced lazy, LE mode
        mov r16=loc3                    // r16= original psr
        mov r19=loc5
        mov r20=loc6
        br.call.sptk.many rp=ia64_switch_mode_virt      // return to virtual mode
 
-       mov psr.l  = loc3               // restore init PSR
+.ret8: mov psr.l  = loc3               // restore init PSR
        mov ar.pfs = loc1
        mov rp = loc0
        ;;