]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/hw_brk: Fix clearing of extraneous IRQ
authorMichael Neuling <mikey@neuling.org>
Mon, 24 Jun 2013 05:47:23 +0000 (15:47 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 25 Jun 2013 07:24:40 +0000 (17:24 +1000)
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>
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/hw_breakpoint.c

index a949bdfc9623b5bd9bbfca9dfdc0ec2b37214417..1150ae7c22c310f9307ba5867775e37e9560092e 100644 (file)
@@ -250,6 +250,7 @@ int __kprobes hw_breakpoint_handler(struct die_args *args)
         * we still need to single-step the instruction, but we don't
         * generate an event.
         */
+       info->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ;
        if (!((bp->attr.bp_addr <= dar) &&
              (dar - bp->attr.bp_addr < bp->attr.bp_len)))
                info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ;