summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-28 18:34:21 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-28 18:34:21 +0100
commit8c178beeb20ce3801c4851d41342d0ca32ad292c (patch)
tree61241209d094d9289546cf6742f8bbc61d4b9f2d
parentrevert "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0" (diff)
parent[POWERPC] Fix missed hardware breakpoints across multiple threads (diff)
downloadlinux-8c178beeb20ce3801c4851d41342d0ca32ad292c.tar.xz
linux-8c178beeb20ce3801c4851d41342d0ca32ad292c.zip
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
-rw-r--r--arch/powerpc/kernel/process.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 59311ec0d422..4ec605521504 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -241,8 +241,12 @@ void discard_lazy_cpu_state(void)
}
#endif /* CONFIG_SMP */
+static DEFINE_PER_CPU(unsigned long, current_dabr);
+
int set_dabr(unsigned long dabr)
{
+ __get_cpu_var(current_dabr) = dabr;
+
#ifdef CONFIG_PPC_MERGE /* XXX for now */
if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr);
@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr)
DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
#endif
-static DEFINE_PER_CPU(unsigned long, current_dabr);
-
struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *new)
{
@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
#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);
- __get_cpu_var(current_dabr) = new->thread.dabr;
- }
new_thread = &new->thread;
old_thread = &current->thread;