diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
commit | 156f7b56ee4b918b95991750e0f34da8ad416eae (patch) | |
tree | fd47da260b3c78631721f36edf01b2878358283a /arch/arm/kernel/hw_breakpoint.c | |
parent | 2e2fb031287a5946d97b85769f80ca60f0166e15 (diff) | |
parent | d97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-17.06-rtlsk-v4.1-17.05-rtlsk-v4.1-17.03-rtlinux-linaro-lsk-v4.1-rt
Diffstat (limited to 'arch/arm/kernel/hw_breakpoint.c')
-rw-r--r-- | arch/arm/kernel/hw_breakpoint.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index dc7d0a95bd36..c02c06b1f755 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -1067,6 +1067,22 @@ static int __init arch_hw_breakpoint_init(void) return 0; } + /* + * Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD + * whenever a WFI is issued, even if the core is not powered down, in + * violation of the architecture. When DBGPRSR.SPD is set, accesses to + * breakpoint and watchpoint registers are treated as undefined, so + * this results in boot time and runtime failures when these are + * accessed and we unexpectedly take a trap. + * + * It's not clear if/how this can be worked around, so we blacklist + * Scorpion CPUs to avoid these issues. + */ + if (read_cpuid_part() == ARM_CPU_PART_SCORPION) { + pr_info("Scorpion CPU detected. Hardware breakpoints and watchpoints disabled\n"); + return 0; + } + has_ossr = core_has_os_save_restore(); /* Determine how many BRPs/WRPs are available. */ |