Commit d21f73c0 authored by Stéphane Eranian's avatar Stéphane Eranian Committed by David Mosberger

[PATCH] ia64: Perfmon update.

parent cb31399a
This diff is collapsed.
...@@ -194,7 +194,7 @@ ia64_save_extra (struct task_struct *task) ...@@ -194,7 +194,7 @@ ia64_save_extra (struct task_struct *task)
pfm_save_regs(task); pfm_save_regs(task);
# ifdef CONFIG_SMP # ifdef CONFIG_SMP
if (local_cpu_data->pfm_syst_wide) if (this_cpu(pfm_syst_wide))
pfm_syst_wide_update_task(task, 0); pfm_syst_wide_update_task(task, 0);
# endif # endif
#endif #endif
...@@ -216,7 +216,7 @@ ia64_load_extra (struct task_struct *task) ...@@ -216,7 +216,7 @@ ia64_load_extra (struct task_struct *task)
pfm_load_regs(task); pfm_load_regs(task);
# ifdef CONFIG_SMP # ifdef CONFIG_SMP
if (local_cpu_data->pfm_syst_wide) pfm_syst_wide_update_task(task, 1); if (this_cpu(pfm_syst_wide)) pfm_syst_wide_update_task(task, 1);
# endif # endif
#endif #endif
...@@ -361,6 +361,8 @@ copy_thread (int nr, unsigned long clone_flags, ...@@ -361,6 +361,8 @@ copy_thread (int nr, unsigned long clone_flags,
*/ */
atomic_set(&p->thread.pfm_notifiers_check, 0); atomic_set(&p->thread.pfm_notifiers_check, 0);
atomic_set(&p->thread.pfm_owners_check, 0); atomic_set(&p->thread.pfm_owners_check, 0);
/* clear list of sampling buffer to free for new task */
p->thread.pfm_smpl_buf_list = NULL;
if (current->thread.pfm_context) retval = pfm_inherit(p, child_ptregs); if (current->thread.pfm_context) retval = pfm_inherit(p, child_ptregs);
#endif #endif
...@@ -570,9 +572,8 @@ exit_thread (void) ...@@ -570,9 +572,8 @@ exit_thread (void)
pfm_flush_regs(current); pfm_flush_regs(current);
/* free debug register resources */ /* free debug register resources */
if ((current->thread.flags & IA64_THREAD_DBG_VALID) != 0) { if (current->thread.flags & IA64_THREAD_DBG_VALID)
pfm_release_debug_registers(current); pfm_release_debug_registers(current);
}
#endif #endif
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#define PFM_GET_FEATURES 0x0c #define PFM_GET_FEATURES 0x0c
#define PFM_DEBUG 0x0d #define PFM_DEBUG 0x0d
#define PFM_UNPROTECT_CONTEXT 0x0e #define PFM_UNPROTECT_CONTEXT 0x0e
#define PFM_GET_PMC_RESET_VAL 0x0f
/* /*
...@@ -173,6 +174,8 @@ extern int pfm_cleanup_smpl_buf(struct task_struct *); ...@@ -173,6 +174,8 @@ extern int pfm_cleanup_smpl_buf(struct task_struct *);
extern void pfm_syst_wide_update_task(struct task_struct *, int); extern void pfm_syst_wide_update_task(struct task_struct *, int);
extern void pfm_ovfl_block_reset (void); extern void pfm_ovfl_block_reset (void);
extern int pfm_syst_wide;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_IA64_PERFMON_H */ #endif /* _ASM_IA64_PERFMON_H */
...@@ -173,8 +173,6 @@ extern struct cpuinfo_ia64 { ...@@ -173,8 +173,6 @@ extern struct cpuinfo_ia64 {
__u64 ipi_count; __u64 ipi_count;
__u64 prof_counter; __u64 prof_counter;
__u64 prof_multiplier; __u64 prof_multiplier;
__u32 pfm_syst_wide;
__u32 pfm_dcr_pp;
#endif #endif
} cpu_info __per_cpu_data; } cpu_info __per_cpu_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment