]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[SPARC64]: Kill all %pstate changes in context switch code.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 6 Feb 2006 05:59:03 +0000 (21:59 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:11:49 +0000 (01:11 -0800)
They are totally unnecessary because:

1) Interrupts are already disabled when switch_to()
   runs.

2) We don't use hard-coded alternate globals any longer.

This found a case in rtrap, which still assumed alternate
global %g6 was current_thread_info(), and that is fixed
by this changeset as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/rtrap.S
include/asm-sparc64/system.h

index e6130956307f88c873ce3e22ad28778184817825..a2fa277da62b44a5c49f87c48e506b8c0669c990 100644 (file)
@@ -224,7 +224,8 @@ rt_continue:        ldx                     [%sp + PTREGS_OFF + PT_V9_G1], %g1
                ldx                     [%sp + PTREGS_OFF + PT_V9_G4], %g4
                ldx                     [%sp + PTREGS_OFF + PT_V9_G5], %g5
                brz,pt                  %l3, 1f
-                nop
+               mov                     %g6, %l2
+
                /* Must do this before thread reg is clobbered below.  */
                LOAD_PER_CPU_BASE(%g5, %g6, %i0, %i1, %i2)
 1:
@@ -238,6 +239,8 @@ rt_continue:        ldx                     [%sp + PTREGS_OFF + PT_V9_G1], %g1
                SET_GL(1)
                .previous
 
+               mov                     %l2, %g6
+
                ldx                     [%sp + PTREGS_OFF + PT_V9_I0], %i0
                ldx                     [%sp + PTREGS_OFF + PT_V9_I1], %i1
 
index 26c0807af3e4c8b2dcad873f141f9d7dd5cb9224..a18ec87a52c1b2530c55f5dd2452133c5ce4703c 100644 (file)
@@ -213,7 +213,6 @@ do {        if (test_thread_flag(TIF_PERFCTR)) {                            \
                task_thread_info(next);                                 \
        __asm__ __volatile__(                                           \
        "mov    %%g4, %%g7\n\t"                                         \
-       "wrpr   %%g0, 0x95, %%pstate\n\t"                               \
        "stx    %%i6, [%%sp + 2047 + 0x70]\n\t"                         \
        "stx    %%i7, [%%sp + 2047 + 0x78]\n\t"                         \
        "rdpr   %%wstate, %%o5\n\t"                                     \
@@ -227,14 +226,10 @@ do {      if (test_thread_flag(TIF_PERFCTR)) {                            \
        "ldx    [%%g6 + %3], %%o6\n\t"                                  \
        "ldub   [%%g6 + %2], %%o5\n\t"                                  \
        "ldub   [%%g6 + %4], %%o7\n\t"                                  \
-       "mov    %%g6, %%l2\n\t"                                         \
        "wrpr   %%o5, 0x0, %%wstate\n\t"                                \
        "ldx    [%%sp + 2047 + 0x70], %%i6\n\t"                         \
        "ldx    [%%sp + 2047 + 0x78], %%i7\n\t"                         \
-       "wrpr   %%g0, 0x94, %%pstate\n\t"                               \
-       "mov    %%l2, %%g6\n\t"                                         \
        "ldx    [%%g6 + %6], %%g4\n\t"                                  \
-       "wrpr   %%g0, 0x96, %%pstate\n\t"                               \
        "brz,pt %%o7, 1f\n\t"                                           \
        " mov   %%g7, %0\n\t"                                           \
        "b,a ret_from_syscall\n\t"                                      \