Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: v7 setup function should invalidate L1 cache
Date: Wed, 20 May 2015 00:18:43 +0200	[thread overview]
Message-ID: <8164344.VcU8v2tIF5@wuerfel> (raw)
In-Reply-To: <20150519220721.GK2067@n2100.arm.linux.org.uk>

On Tuesday 19 May 2015 23:07:21 Russell King - ARM Linux wrote:
> If you look carefully at this, you'll notice that it's utter crap.
> (Sorry, but it is.)  It has two problems:
> 
> 1. It'll never match a Cortex-A9 CPU.  Cortex-A9 has a MIDR value of
>    0x412fc09a, not 0x00000c09.  The bit position of the part number
>    field isn't even right.
>
> 2. If it does match, then we branch to "v7_invalidate_l1" without setting
>    the link register: we'll never return back here (we'll return to whatever
>    random value the link register contains) and so we'll never make it to
>    secondary_startup.  *Thankfully*, because of (1), this branch will
>    never be taken - this is it's saving grace.

Yes, I've understood both before.
 
> Your patch introduces a /third/ form of crapiness:
> 
> 3. If the PSR happens to have Z=1, the "beq" instruction will be taken,
>    thereby crashing the system because of (2).

Right, this was the result of sloppiness on my side when fat-fingering
a patch for illustration.
 
> The /simplest/ change which would fix this problem is to just change
> proc-v7.S.  The remainder is effectively a cleanup removing redundant
> code.

Fair enough. I wasn't sure if we're confident enough about that
change already to put it into stable backports. If the risk is low
enough, that's fine.

	Arnd

  reply	other threads:[~2015-05-19 22:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 16:12 [PATCH] ARM: v7 setup function should invalidate L1 cache Russell King
2015-05-19 21:44 ` Heiko Stuebner
2015-05-19 21:55   ` Arnd Bergmann
2015-05-19 22:07     ` Russell King - ARM Linux
2015-05-19 22:18       ` Arnd Bergmann [this message]
2015-05-19 22:32         ` Russell King - ARM Linux
2015-05-19 22:01 ` Florian Fainelli
2015-05-20 18:54 ` Dinh Nguyen
2015-05-20 22:48 ` Sebastian Hesselbarth
2015-05-21  2:08 ` Shawn Guo
2015-05-21  8:30 ` Thierry Reding
2015-05-22  7:36 ` Geert Uytterhoeven
2015-06-01 10:41   ` Geert Uytterhoeven
2015-06-01 10:53     ` Russell King - ARM Linux
2015-06-01 11:50       ` Geert Uytterhoeven
2015-06-17 20:35         ` Dinh Nguyen
2015-06-17 21:30           ` Russell King - ARM Linux
2015-06-17 22:12             ` Dinh Nguyen
2015-06-17 22:31               ` Dinh Nguyen
2015-06-17 22:51                 ` Russell King - ARM Linux
2015-05-22 10:45 ` Michal Simek
2015-06-01 10:21 ` Wei Xu
2015-07-08  1:17 ` [PATCH] ARM: BCM63xx: Remove custom secondary_startup function Florian Fainelli
2015-07-12  1:34   ` Florian Fainelli

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=8164344.VcU8v2tIF5@wuerfel \
    --to=arnd@arndb.de \
    --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