From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix A15 798181 errata initialization
Date: Mon, 16 May 2016 16:27:58 +0000 [thread overview]
Message-ID: <20160516162757.GA29346@localhost.localdomain> (raw)
In-Reply-To: <5734FA64.6040501@nokia.com>
On Thu, May 12, 2016 at 11:49:24PM +0200, Matija Glavinic Pecotic wrote:
> And here is proposed handling from the same documents [1,2]:
>
> * In r3p2 and earlier versions with REVIDR[4]= 0,the full workaround is
> required.
> * In r3p2 and earlier versions with REVIDR[4]=1, REVIDR[9]=0, only the
> portion of the workaround up to the end of step 6 is required.
> * In r3p2 and earlier versions with REVIDR[4]=1, REVIDR[9]=1, no
> workaround is required.
> * In r3p3, if REVIDR[9]=0, only the portion of the workaround up
> to the end of step 6 is required.
> * In r3p3, if REVIDR[9]=1, no workaround is required.
>
> These imply following:
>
> REVIDR[9] set -> No WA
The errata documents haven't been updated yet but my reading of the
corresponding ARM support case is that the "REVIDR[9] set" case only
refers to r2p4. It should be a safe assumption for r3pX as well since
REVIDR[9] is an update to the previous REVIDR[4] ECO. Anyway, I asked
ARM support for clarification and get back to you.
> REVIDR[4] set, REVIDR[9] cleared -> Partial WA
> Both cleared -> Full WA
[...]
> diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
> index 2e72be4..b624758 100644
> --- a/arch/arm/kernel/smp_tlb.c
> +++ b/arch/arm/kernel/smp_tlb.c
> @@ -93,17 +93,30 @@ void erratum_a15_798181_init(void)
> unsigned int revidr = read_cpuid(CPUID_REVIDR);
>
> /* Brahma-B15 r0p0..r0p2 affected
> - * Cortex-A15 r0p0..r3p2 w/o ECO fix affected */
> - if ((midr & 0xff0ffff0) == 0x420f00f0 && midr <= 0x420f00f2)
> + * Cortex-A15 r0p0..r3p3 w/o ECO fix affected
> + */
Please add the rXpY ranges and corresponding REVIDR combinations to the
comment above. It makes it easier to read the code later without having
to dig into the commit logs.
> + if ((midr & 0xff0ffff0) == 0x420f00f0 && midr <= 0x420f00f2) {
> erratum_a15_798181_handler = erratum_a15_798181_broadcast;
> - else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr <= 0x413fc0f2 &&
> - (revidr & 0x210) != 0x210) {
> + } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x412fc0f2) {
> + erratum_a15_798181_handler = erratum_a15_798181_broadcast;
> + } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x412fc0f4) {
> if (revidr & 0x10)
> erratum_a15_798181_handler =
> erratum_a15_798181_partial;
> else
> erratum_a15_798181_handler =
> erratum_a15_798181_broadcast;
> + } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x413fc0f3) {
> + if ((revidr & 0x210) == 0)
> + erratum_a15_798181_handler =
> + erratum_a15_798181_broadcast;
> + else if (revidr & 0x10)
> + erratum_a15_798181_handler =
> + erratum_a15_798181_partial;
> + } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x414fc0f0) {
> + if ((revidr & 0x200) == 0)
> + erratum_a15_798181_handler =
> + erratum_a15_798181_partial;
This looks fine (once ARM support confirms the REVIDR[9] assumption
above.
--
Catalin
next prev parent reply other threads:[~2016-05-16 16:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 21:49 [PATCH] ARM: Fix A15 798181 errata initialization Matija Glavinic Pecotic
2016-05-16 16:27 ` Catalin Marinas [this message]
2016-05-16 20:29 ` Matija Glavinic Pecotic
-- strict thread matches above, loose matches on Subject: below --
2016-05-11 20:33 [PATCH] [ARM] " Matija Glavinic Pecotic
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=20160516162757.GA29346@localhost.localdomain \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).