diff options
author | Michael Neuling <mikey@neuling.org> | 2013-06-24 01:47:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 17:07:19 -0400 |
commit | 277b5ae153a96d594ae6d61b244b936d6f77ff56 (patch) | |
tree | 498cfdd6d78132e2df00795ae775349dd996d594 /arch | |
parent | b101957a5871ec616e18a8a6f0330d0e06a05754 (diff) |
powerpc/hw_brk: Fix clearing of extraneous IRQ
commit 540e07c67efe42ef6b6be4f1956931e676d58a15 upstream.
In 9422de3 "powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint
registers" we changed the way we mark extraneous irqs with this:
- info->extraneous_interrupt = !((bp->attr.bp_addr <= dar) &&
- (dar - bp->attr.bp_addr < bp->attr.bp_len));
+ if (!((bp->attr.bp_addr <= dar) &&
+ (dar - bp->attr.bp_addr < bp->attr.bp_len)))
+ info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ;
Unfortunately this is bogus as it never clears extraneous IRQ if it's already
set.
This correctly clears extraneous IRQ before possibly setting it.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/hw_breakpoint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index a949bdfc9623..1150ae7c22c3 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c | |||
@@ -250,6 +250,7 @@ int __kprobes hw_breakpoint_handler(struct die_args *args) | |||
250 | * we still need to single-step the instruction, but we don't | 250 | * we still need to single-step the instruction, but we don't |
251 | * generate an event. | 251 | * generate an event. |
252 | */ | 252 | */ |
253 | info->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ; | ||
253 | if (!((bp->attr.bp_addr <= dar) && | 254 | if (!((bp->attr.bp_addr <= dar) && |
254 | (dar - bp->attr.bp_addr < bp->attr.bp_len))) | 255 | (dar - bp->attr.bp_addr < bp->attr.bp_len))) |
255 | info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ; | 256 | info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ; |