提交 36d632ea 编写于 作者: N Nicholas Piggin 提交者: Michael Ellerman

powerpc/64: remove start_tb and accum_tb from thread_struct

These fields are only written to.
Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 54071e41
...@@ -264,10 +264,6 @@ struct thread_struct { ...@@ -264,10 +264,6 @@ struct thread_struct {
struct thread_fp_state *fp_save_area; struct thread_fp_state *fp_save_area;
int fpexc_mode; /* floating-point exception mode */ int fpexc_mode; /* floating-point exception mode */
unsigned int align_ctl; /* alignment handling control */ 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 #ifdef CONFIG_HAVE_HW_BREAKPOINT
struct perf_event *ptrace_bps[HBP_NUM]; struct perf_event *ptrace_bps[HBP_NUM];
/* /*
......
...@@ -1188,11 +1188,7 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -1188,11 +1188,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
*/ */
if (firmware_has_feature(FW_FEATURE_SPLPAR)) { if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
struct cpu_usage *cu = this_cpu_ptr(&cpu_usage_array); struct cpu_usage *cu = this_cpu_ptr(&cpu_usage_array);
long unsigned start_tb, current_tb; cu->current_tb = mfspr(SPRN_PURR);
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;
} }
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册