linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Michael Neuling <mikey@neuling.org>
Cc: linuxppc-dev@lists.ozlabs.org, Ian Munsie <imunsie@au1.ibm.com>
Subject: [PATCH] powerpc: fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations
Date: Tue, 21 Jan 2014 23:24:02 +0100	[thread overview]
Message-ID: <8761pdht31.fsf_-_@igel.home> (raw)
In-Reply-To: <12813.1357794092__45363.9676016339$1357794149$gmane$org@ale.ozlabs.ibm.com> (Michael Neuling's message of "Thu, 10 Jan 2013 16:01:32 +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>
---
 arch/powerpc/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 4a96556..7714950 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -690,7 +690,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
-- 
1.8.5.3


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2014-01-21 22:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21  0:06 [PATCH 0/7] powerpc: add POWER8 DAWR support Michael Neuling
2012-12-21  0:06 ` [PATCH 1/7] powerpc: Remove extra zeros from 32 bit CPU features definitions Michael Neuling
2012-12-21  0:06 ` [PATCH 2/7] powerpc: Repack 64bit CPU features to remove holes Michael Neuling
2012-12-21  0:06 ` [PATCH 3/7] powerpc: Add helper functions set the DAWR and CIABR using set_mode Michael Neuling
2012-12-21  0:06 ` [PATCH 4/7] powerpc: Add DAWR CPU feature bit definition Michael Neuling
2012-12-21  0:06 ` [PATCH 5/7] powerpc: Add DAWR/X SPR number definitions Michael Neuling
2012-12-21  0:06 ` [PATCH 6/7] powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers Michael Neuling
2013-01-10  5:01   ` Michael Neuling
2013-01-11  2:11   ` [PATCH] powerpc: Fix typo in breakpoint kgdb code Michael Neuling
     [not found]   ` <12813.1357794092__45363.9676016339$1357794149$gmane$org@ale.ozlabs.ibm.com>
2014-01-21 22:24     ` Andreas Schwab [this message]
2014-01-22  4:46       ` [PATCH] powerpc: fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations Michael Neuling
2012-12-21  0:06 ` [PATCH 7/7] powerpc: Add the DAWR support to the set_break() Michael Neuling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761pdht31.fsf_-_@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=imunsie@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).