aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/process_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/process_64.c')
-rw-r--r--arch/sparc/kernel/process_64.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index cb70476bd8f5..a5cf3864b31f 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -352,12 +352,6 @@ void exit_thread(void)
352 else 352 else
353 t->utraps[0]--; 353 t->utraps[0]--;
354 } 354 }
355
356 if (test_and_clear_thread_flag(TIF_PERFCTR)) {
357 t->user_cntd0 = t->user_cntd1 = NULL;
358 t->pcr_reg = 0;
359 write_pcr(0);
360 }
361} 355}
362 356
363void flush_thread(void) 357void flush_thread(void)
@@ -371,13 +365,6 @@ void flush_thread(void)
371 365
372 set_thread_wsaved(0); 366 set_thread_wsaved(0);
373 367
374 /* Turn off performance counters if on. */
375 if (test_and_clear_thread_flag(TIF_PERFCTR)) {
376 t->user_cntd0 = t->user_cntd1 = NULL;
377 t->pcr_reg = 0;
378 write_pcr(0);
379 }
380
381 /* Clear FPU register state. */ 368 /* Clear FPU register state. */
382 t->fpsaved[0] = 0; 369 t->fpsaved[0] = 0;
383 370
@@ -591,16 +578,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
591 t->kregs->u_regs[UREG_FP] = 578 t->kregs->u_regs[UREG_FP] =
592 ((unsigned long) child_sf) - STACK_BIAS; 579 ((unsigned long) child_sf) - STACK_BIAS;
593 580
594 /* Special case, if we are spawning a kernel thread from
595 * a userspace task (usermode helper, NFS or similar), we
596 * must disable performance counters in the child because
597 * the address space and protection realm are changing.
598 */
599 if (t->flags & _TIF_PERFCTR) {
600 t->user_cntd0 = t->user_cntd1 = NULL;
601 t->pcr_reg = 0;
602 t->flags &= ~_TIF_PERFCTR;
603 }
604 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); 581 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
605 t->kregs->u_regs[UREG_G6] = (unsigned long) t; 582 t->kregs->u_regs[UREG_G6] = (unsigned long) t;
606 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; 583 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;