]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: hw_breakpoint: fix ordering of debug register reset sequence
authorWill Deacon <will.deacon@arm.com>
Fri, 21 Sep 2012 14:38:26 +0000 (15:38 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 25 Oct 2012 16:20:09 +0000 (17:20 +0100)
commit48dabd784294c5ed3449d95ad114d9e9db0ca0d4
tree172c04a5f071576231aad1d3e137ba53bf3934b7
parentdadd180097e8d33847fbc94c83b92d9540258d41
ARM: hw_breakpoint: fix ordering of debug register reset sequence

The debug register reset sequence for v7 and v7.1 is congruent with
tap-dancing through a minefield.

Rather than wait until we've blown ourselves to pieces, this patch
instead checks the debug_err_mask after each potentially faulting
operation. We also move the enabling of monitor_mode to the end of the
sequence in order to prevent spurious debug events generated by UNKNOWN
register values.

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/hw_breakpoint.c