]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs
authorMark Rutland <mark.rutland@arm.com>
Fri, 6 Jan 2017 12:12:47 +0000 (13:12 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 8 Mar 2017 13:35:23 +0000 (10:35 -0300)
commit94bd88f9c1803962b1b908e5b9d97b2d942b6106
tree9a37ccc510e072392dea890313b3b64d2d6ffcf6
parent4d9de4677cf9bcabfffe995adf54b85d91adba24
ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs

BugLink: http://bugs.launchpad.net/bugs/1660993
commit ddc37832a1349f474c4532de381498020ed71d31 upstream.

On APQ8060, the kernel crashes in arch_hw_breakpoint_init, taking an
undefined instruction trap within write_wb_reg. This is because Scorpion
CPUs erroneously appear to set DBGPRSR.SPD when WFI is issued, even if
the core is not powered down. When DBGPRSR.SPD is set, breakpoint and
watchpoint registers are treated as undefined.

It's possible to trigger similar crashes later on from userspace, by
requesting the kernel to install a breakpoint or watchpoint, as we can
go idle at any point between the reset of the debug registers and their
later use. This has always been the case.

Given that this has always been broken, no-one has complained until now,
and there is no clear workaround, disable hardware breakpoints and
watchpoints on Scorpion to avoid these issues.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/arm/include/asm/cputype.h
arch/arm/kernel/hw_breakpoint.c