powerpc: Fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 21 Jan 2014 22:24:02 +0000 (23:24 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 29 Jan 2014 05:58:47 +0000 (16:58 +1100)
This fixes a logic error that caused a failure to update the hw breakpoint
registers when not using the hw-breakpoint interface.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/process.c

index 64b7a6e61dd1acd6fa102a6e856da6afb089f136..8d4c247f17389f283d02bc48dba044ff077e3ffe 100644 (file)
@@ -811,7 +811,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
  * schedule DABR
  */
 #ifndef CONFIG_HAVE_HW_BREAKPOINT
-       if (unlikely(hw_brk_match(&__get_cpu_var(current_brk), &new->thread.hw_brk)))
+       if (unlikely(!hw_brk_match(&__get_cpu_var(current_brk), &new->thread.hw_brk)))
                set_breakpoint(&new->thread.hw_brk);
 #endif /* CONFIG_HAVE_HW_BREAKPOINT */
 #endif