powerpc/64: remove start_tb and accum_tb from thread_struct
authorNicholas Piggin <npiggin@gmail.com>
Fri, 4 May 2018 17:19:29 +0000 (03:19 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:40:26 +0000 (20:40 +1000)
These fields are only written to.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/process.c

index c4b36a494a63655528d2305e0393241b8743cb86..eff269adfa71cdbb084ad920af153e3845650a85 100644 (file)
@@ -264,10 +264,6 @@ struct thread_struct {
        struct thread_fp_state  *fp_save_area;
        int             fpexc_mode;     /* floating-point exception mode */
        unsigned int    align_ctl;      /* alignment handling control */
-#ifdef CONFIG_PPC64
-       unsigned long   start_tb;       /* Start purr when proc switched in */
-       unsigned long   accum_tb;       /* Total accumulated purr for process */
-#endif
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
        struct perf_event *ptrace_bps[HBP_NUM];
        /*
index 25db000fa5b33a25ae03a6c6e772977c4ce8b2b3..f4e5291584c55fae4cbfa10b956faf4fc0475075 100644 (file)
@@ -1188,11 +1188,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
         */
        if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
                struct cpu_usage *cu = this_cpu_ptr(&cpu_usage_array);
-               long unsigned start_tb, current_tb;
-               start_tb = old_thread->start_tb;
-               cu->current_tb = current_tb = mfspr(SPRN_PURR);
-               old_thread->accum_tb += (current_tb - start_tb);
-               new_thread->start_tb = current_tb;
+               cu->current_tb = mfspr(SPRN_PURR);
        }
 #endif /* CONFIG_PPC64 */