linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM errata 430973 on multi platform kernels
Date: Tue, 7 Apr 2015 07:48:26 -0700	[thread overview]
Message-ID: <20150407144826.GL18048@atomide.com> (raw)
In-Reply-To: <CAALWOA8m9Gqv2ZL6ibWrWRBGsGBG2tpbutzVrwOjRpKCQ=mXXA@mail.gmail.com>

* Matthijs van Duin <matthijsvanduin@gmail.com> [150406 20:50]:
> On 7 April 2015 at 04:23, Tony Lindgren <tony@atomide.com> wrote:
> > Oops, sorry user error.. I was trying to clear IBE as a banked register
> > like L2 enable bit and of course it did not get cleared.. Clearing it
> > with a smc call really clears it. And in that case my test case seems to
> > work reliably on r3p2 without erratum 430973 enabled.
> 
> So if I understand correctly, you actually had crashes which only
> occurred with IBE enabled and the 430973 workaround disabled?

That's right. It seems to happen at least with r3p2 that has 430973
fixed. 

> That's quite interesting, since it seems to me that can only be the
> result of erratum 687067, which means
> 1. secrom indeed fails to implement the 687067 workaround.
> 2. "BTB invalidate by MVA" is used somewhere in the kernel.
> The 430973 workaround would likely conceal this problem due to
> regularly flushing the whole BTB, but I'm not sure how wise it is to
> rely on that...

Yes it seems to be hidden behind 430973. Anyways, we can print some
warnings in the kernel for incorrect revision and IBE handling.
 
> > I'm now thinking the kernel should just always set the 430973 specific
> > cpu_v7_switch_mm for all cortex-a8 if IBE bit is set.
> 
> And simply take the performance hit if secrom bogusly sets it and the
> bootloader doesn't fix it?

Yes it seems Russell's patch should do that for cortex-a8.
 
> Sounds reasonable enough to me, given how platform-specific the
> appropriate auxcr config is, as well as the means by which it can be
> changed.

Right, we have quite a few combinations already for omap3.. 34xx/36xx,
HS/GP, TI vs Nokia bootrom.. Just proves how useless all these
"security" "features" are in the long run :) They will just keep
biting people over and over in the long run even if not used.
 
> There's more secrom misconfiguration that the bootloader should fix
> anyhow to make optimal use of the processor...

Yeah. 
 
> > This will work as long as we can read the aux ctrl register IBE
> > bit using mrc, which I believe is the case for all cortex-a8 based
> > omap variants.
> 
> Aux control is always readable, only write is an issue.

OK, hopefully that's the case for 36xx HS version too.. I recall some
registers reading as zero on N9 but hopefully not for the aux control
register.
 
> On 7 April 2015 at 05:12, Sebastian Reichel <sre@kernel.org> wrote:
> > If I understood it correctly we can simply call the BTB flush on
> > cortex-a8 if IBE bit is not set, since it would be translated as
> > nop.
> 
> Indeed you can safely use the BTB-flushing context switch on any cortex-a8.
> 
> There's still value in checking if IBE is set on r2p1 or later, and if
> so emit a warning about suboptimal performance.
> 
> > So it should be safe to include the call on all cortex-a8 based
> > cpus. We may need a non-BTB-flushing function for non-cortex-a8
> > based cpus, though.
> 
> I just looked it up, apparently BTB-flushing on context switch is not
> needed architecturally in ARMv7 (though it was in ARMv6), so that
> version should probably indeed only be used for the cortex-a8.

OK

Regards,

Tony

  reply	other threads:[~2015-04-07 14:48 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1425236828-28349-1-git-send-email-jarkko.nikula@bitmer.com>
     [not found] ` <55197A12.1050009@bitmer.com>
     [not found]   ` <20150330164237.GJ10805@atomide.com>
     [not found]     ` <55198BA4.5010207@bitmer.com>
     [not found]       ` <20150330175051.GK10805@atomide.com>
     [not found]         ` <20150331123233.GA15103@earth>
     [not found]           ` <20150401194734.GT10805@atomide.com>
     [not found]             ` <20150403163553.GA16247@earth>
2015-04-03 18:39               ` ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages) Tony Lindgren
2015-04-03 19:21                 ` Robert Nelson
2015-04-05 13:00                   ` Sebastian Reichel
2015-04-05 13:26                     ` Pali Rohár
2015-04-05 13:45                       ` Sebastian Reichel
2015-04-05 13:52                         ` Pali Rohár
2015-04-06 17:38                           ` Sebastian Reichel
2015-04-03 20:42               ` Pavel Machek
2015-04-03 22:08               ` ARM errata 430973 on multi platform kernels Ivaylo Dimitrov
2015-04-03 22:15                 ` Tony Lindgren
2015-04-03 22:47                   ` Ivaylo Dimitrov
2015-04-03 22:52                     ` Tony Lindgren
2015-04-05  4:13                       ` Matthijs van Duin
2015-04-05  7:23                         ` Ivaylo Dimitrov
2015-04-05 16:50                           ` Matthijs van Duin
2015-04-05 16:52                             ` Matthijs van Duin
2015-04-05 21:08                             ` Ivaylo Dimitrov
2015-04-05 23:52                               ` Matthijs van Duin
2015-04-06 15:19                                 ` Tony Lindgren
2015-04-06 15:40                                   ` Tony Lindgren
2015-04-06 17:14                                     ` Ivaylo Dimitrov
2015-04-06 17:42                                       ` Tony Lindgren
2015-04-06 18:14                                         ` Matthijs van Duin
2015-04-07  2:23                                           ` Tony Lindgren
2015-04-07  3:12                                             ` Sebastian Reichel
2015-04-07  3:49                                               ` Matthijs van Duin
2015-04-07 14:48                                                 ` Tony Lindgren [this message]
2015-04-09 22:37                                             ` Grazvydas Ignotas
2015-04-09 22:44                                               ` Tony Lindgren
2015-04-09 23:44                                                 ` Nishanth Menon
2015-04-10 22:05                                                 ` Grazvydas Ignotas
2015-04-10 23:08                                                   ` Tony Lindgren
2015-04-16 16:53                                               ` Matthijs van Duin
2015-04-07 13:58                                           ` Russell King - ARM Linux
2015-04-07 13:57                                         ` Russell King - ARM Linux
2015-04-07 15:22                                           ` Tony Lindgren
2015-04-07 15:44                                             ` Tony Lindgren
2015-04-08 23:08                                               ` Russell King - ARM Linux
2015-04-08 23:15                                                 ` Tony Lindgren
2015-04-08 23:06                                             ` Russell King - ARM Linux
2015-04-09 13:48                                               ` Russell King - ARM Linux
2015-04-09 15:09                                                 ` Tony Lindgren
2015-04-09 15:30                                                   ` Russell King - ARM Linux
2015-04-15 16:31                                                 ` Sebastian Reichel
2015-04-16 16:08                                                   ` Tony Lindgren
2015-04-17 18:41                                                     ` Sebastian Reichel
2015-04-20 23:40                                                       ` Tony Lindgren
2015-04-23 10:25                                                         ` Russell King - ARM Linux
2015-04-23 14:17                                                           ` Tony Lindgren
2015-04-28 18:13                                                             ` Russell King - ARM Linux
2015-04-29 14:40                                                               ` Tony Lindgren
2015-05-04 14:24                                                                 ` Tony Lindgren
2015-04-24  8:54                                                           ` Matthijs van Duin
2015-04-28 18:11                                                             ` Russell King - ARM Linux
2015-05-02  6:51                                                               ` Matthijs van Duin
2015-04-05 13:39                         ` Sebastian Reichel
2015-04-06 15:24                           ` Tony Lindgren

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=20150407144826.GL18048@atomide.com \
    --to=tony@atomide.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).