Commit 8c178bee authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix missed hardware breakpoints across multiple threads
parents 48d3d826 a2ceff5e
...@@ -241,8 +241,12 @@ void discard_lazy_cpu_state(void) ...@@ -241,8 +241,12 @@ void discard_lazy_cpu_state(void)
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
static DEFINE_PER_CPU(unsigned long, current_dabr);
int set_dabr(unsigned long dabr) int set_dabr(unsigned long dabr)
{ {
__get_cpu_var(current_dabr) = dabr;
#ifdef CONFIG_PPC_MERGE /* XXX for now */ #ifdef CONFIG_PPC_MERGE /* XXX for now */
if (ppc_md.set_dabr) if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr); return ppc_md.set_dabr(dabr);
...@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr) ...@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr)
DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
#endif #endif
static DEFINE_PER_CPU(unsigned long, current_dabr);
struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *new) struct task_struct *new)
{ {
...@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev, ...@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) { if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
set_dabr(new->thread.dabr); set_dabr(new->thread.dabr);
__get_cpu_var(current_dabr) = new->thread.dabr;
}
new_thread = &new->thread; new_thread = &new->thread;
old_thread = &current->thread; old_thread = &current->thread;
......
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