From: Douglas Anderson <dianders@chromium.org>
To: Russell King <linux@armlinux.org.uk>
Cc: mark.rutland@arm.com, Douglas Anderson <dianders@chromium.org>,
heiko@sntech.de, Tony Lindgren <tony@atomide.com>,
Palmer Dabbelt <palmer@sifive.com>,
will.deacon@arm.com, bbatacha@arm.com,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Florian Fainelli <f.fainelli@gmail.com>,
linux-rockchip@lists.infradead.org, mka@chromium.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Salva.Climent@arm.com, Arnd Bergmann <arnd@arndb.de>,
Marc Zyngier <marc.zyngier@arm.com>,
sonnyrao@chromium.org, linux-arm-kernel@lists.infradead.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-kernel@vger.kernel.org, Paul Burton <paul.burton@mips.com>,
Andrew Morton <akpm@linux-foundation.org>,
robin.murphy@arm.com
Subject: [PATCH 1/2] ARM: errata: Workaround errata A12 857271 / A17 857272
Date: Fri, 19 Apr 2019 15:18:02 -0700 [thread overview]
Message-ID: <20190419221803.99322-1-dianders@chromium.org> (raw)
From: Sonny Rao <sonnyrao@chromium.org>
This adds support for working around errata A12 857271 / A17 857272.
These errata were causing hangs on rk3288-based Chromebooks and it was
confirmed that this workaround fixed the problems. In the Chrome OS
3.14 kernel [1] this erratum was known as ERRATA_FOOBAR due to lack of
an official number from ARM (though the workaround of setting chicken
bit 10 came from ARM). In the meantime ARM came up with official
errata numbers but never published the workaround upstream.
Let's actually get the workaround landed.
[1] https://crrev.com/c/342753
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
arch/arm/Kconfig | 19 +++++++++++++++++++
arch/arm/mm/proc-v7.S | 10 ++++++++++
2 files changed, 29 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b509cd338219..4376fe74f95e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1172,6 +1172,15 @@ config ARM_ERRATA_825619
DMB NSHST or DMB ISHST instruction followed by a mix of Cacheable
and Device/Strongly-Ordered loads and stores might cause deadlock
+config ARM_ERRATA_857271
+ bool "ARM errata: A12: CPU might deadlock under some very rare internal conditions"
+ depends on CPU_V7
+ help
+ This option enables the workaround for the 857271 Cortex-A12
+ (all revs) erratum. Under very rare timing conditions, the CPU might
+ hang. The workaround is expected to have a negligible performance
+ impact.
+
config ARM_ERRATA_852421
bool "ARM errata: A17: DMB ST might fail to create order between stores"
depends on CPU_V7
@@ -1193,6 +1202,16 @@ config ARM_ERRATA_852423
config option from the A12 erratum due to the way errata are checked
for and handled.
+config ARM_ERRATA_857272
+ bool "ARM errata: A17: CPU might deadlock under some very rare internal conditions"
+ depends on CPU_V7
+ help
+ This option enables the workaround for the 857272 Cortex-A17 erratum.
+ This erratum is not known to be fixed in any A17 revision.
+ This is identical to Cortex-A12 erratum 857271. It is a separate
+ config option from the A12 erratum due to the way errata are checked
+ for and handled.
+
endmenu
source "arch/arm/common/Kconfig"
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 339eb17c9808..cd2accbab844 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -391,6 +391,11 @@ __ca12_errata:
mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
orr r10, r10, #1 << 24 @ set bit #24
mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
+#endif
+#ifdef CONFIG_ARM_ERRATA_857271
+ mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
+ orr r10, r10, #1 << 10 @ set bit #10
+ mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
#endif
b __errata_finish
@@ -406,6 +411,11 @@ __ca17_errata:
mrcle p15, 0, r10, c15, c0, 1 @ read diagnostic register
orrle r10, r10, #1 << 12 @ set bit #12
mcrle p15, 0, r10, c15, c0, 1 @ write diagnostic register
+#endif
+#ifdef CONFIG_ARM_ERRATA_857272
+ mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
+ orr r10, r10, #1 << 10 @ set bit #10
+ mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
#endif
b __errata_finish
--
2.21.0.593.g511ec345e18-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-04-19 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 22:18 Douglas Anderson [this message]
2019-04-19 22:18 ` [PATCH 2/2] ARM: errata: add support for A12/A17 errata CR711784 Douglas Anderson
2019-04-23 10:19 ` Robin Murphy
2019-04-23 14:37 ` Doug Anderson
2019-04-23 14:03 ` [PATCH 1/2] ARM: errata: Workaround errata A12 857271 / A17 857272 Marc Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190419221803.99322-1-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=Salva.Climent@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=bbatacha@arm.com \
--cc=f.fainelli@gmail.com \
--cc=geert@linux-m68k.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mka@chromium.org \
--cc=palmer@sifive.com \
--cc=paul.burton@mips.com \
--cc=robin.murphy@arm.com \
--cc=sonnyrao@chromium.org \
--cc=tony@atomide.com \
--cc=will.deacon@arm.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).