]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sparc/kernel/process_64.c
Merge branch 'devel-stable' into devel
[mv-sheeva.git] / arch / sparc / kernel / process_64.c
index cb70476bd8f5ccd72a6f72900195f8a74f6abfcb..a5cf3864b31f87dcabf7abe4ea1e96be693b54b4 100644 (file)
@@ -352,12 +352,6 @@ void exit_thread(void)
                else
                        t->utraps[0]--;
        }
-
-       if (test_and_clear_thread_flag(TIF_PERFCTR)) {
-               t->user_cntd0 = t->user_cntd1 = NULL;
-               t->pcr_reg = 0;
-               write_pcr(0);
-       }
 }
 
 void flush_thread(void)
@@ -371,13 +365,6 @@ void flush_thread(void)
 
        set_thread_wsaved(0);
 
-       /* Turn off performance counters if on. */
-       if (test_and_clear_thread_flag(TIF_PERFCTR)) {
-               t->user_cntd0 = t->user_cntd1 = NULL;
-               t->pcr_reg = 0;
-               write_pcr(0);
-       }
-
        /* Clear FPU register state. */
        t->fpsaved[0] = 0;
        
@@ -591,16 +578,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
                t->kregs->u_regs[UREG_FP] =
                  ((unsigned long) child_sf) - STACK_BIAS;
 
-               /* Special case, if we are spawning a kernel thread from
-                * a userspace task (usermode helper, NFS or similar), we
-                * must disable performance counters in the child because
-                * the address space and protection realm are changing.
-                */
-               if (t->flags & _TIF_PERFCTR) {
-                       t->user_cntd0 = t->user_cntd1 = NULL;
-                       t->pcr_reg = 0;
-                       t->flags &= ~_TIF_PERFCTR;
-               }
                t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
                t->kregs->u_regs[UREG_G6] = (unsigned long) t;
                t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;