From: Thierry Reding <thierry.reding@gmail.com>
To: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-sh@vger.kernel.org,
linux-tegra@vger.kernel.org, Christian Daudt <bcm@fixthebug.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Marc Carino <marc.ceeeee@gmail.com>,
Brian Norris <computersforpeace@gmail.com>,
Gregory Fong <gregory.0xf0@gmail.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Wei Xu <xuwei5@hisilicon.com>, Shawn Guo <shawn.guo@linaro.org>,
Sascha Hauer <kernel@pengutronix.de>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@free-electrons.com>,
Barry Song <baohua@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
Simon Horman <horms@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
Dinh Nguyen <dinguyen@opensource.altera.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Alexandre Courbot <gnurou@gmail.com>,
Micha
Subject: Re: [PATCH] ARM: v7 setup function should invalidate L1 cache
Date: Thu, 21 May 2015 10:30:47 +0200 [thread overview]
Message-ID: <20150521083046.GA30323@ulmo.nvidia.com> (raw)
In-Reply-To: <E1Yuk8W-0001tC-IK@rmk-PC.arm.linux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2370 bytes --]
On Tue, May 19, 2015 at 05:12:56PM +0100, Russell King wrote:
> All ARMv5 and older CPUs invalidate their caches in the early assembly
> setup function, prior to enabling the MMU. This is because the L1
> cache should not contain any data relevant to the execution of the
> kernel at this point; all data should have been flushed out to memory.
>
> This requirement should also be true for ARMv6 and ARMv7 CPUs - indeed,
> these typically do not search their caches when caching is disabled (as
> it needs to be when the MMU is disabled) so this change should be safe.
>
> ARMv7 allows there to be CPUs which search their caches while caching is
> disabled, and it's permitted that the cache is uninitialised at boot;
> for these, the architecture reference manual requires that an
> implementation specific code sequence is used immediately after reset
> to ensure that the cache is placed into a sane state. Such
> functionality is definitely outside the remit of the Linux kernel, and
> must be done by the SoC's firmware before _any_ CPU gets to the Linux
> kernel.
>
> Changing the data cache clean+invalidate to a mere invalidate allows us
> to get rid of a lot of platform specific hacks around this issue for
> their secondary CPU bringup paths - some of which were buggy.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
[...]
> arch/arm/mach-tegra/Makefile | 2 +-
> arch/arm/mach-tegra/headsmp.S | 12 ------------
> arch/arm/mach-tegra/reset.c | 2 +-
> arch/arm/mach-tegra/reset.h | 1 -
[...]
Russell,
I saw a couple of conflicts trying to apply this to v4.1-rc1..v4.1-rc4
or any of recent linux-next versions. I ended up applying this on top of
your for-next branch and tested using that. The conflicts seem very
minor and a test merge of Tegra's for-next branch resolved this fine. A
test merge of next-20150520 shows one conflict in mach-socfpga/core.h,
but it's a trivial one to resolve.
Anyway, the patch seems to work fine on TrimSlice (Tegra20), Beaver
(Tegra30), Dalmore (Tegra114) and Jetson TK1 (Tegra124). Tested on
Paul's boot farm:
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Paul, thanks for setting up the boot test infrastructure, this saved me
a lot of time.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-05-21 8:30 UTC|newest]
Thread overview: 22+ 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 22:01 ` Florian Fainelli
[not found] ` <E1Yuk8W-0001tC-IK-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-05-19 21:44 ` Heiko Stuebner
2015-05-19 21:55 ` Arnd Bergmann
2015-05-19 22:07 ` Russell King - ARM Linux
[not found] ` <20150519220721.GK2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-05-19 22:18 ` Arnd Bergmann
2015-05-19 22:32 ` Russell King - ARM Linux
2015-05-20 18:54 ` Dinh Nguyen
2015-05-21 2:08 ` Shawn Guo
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
[not found] ` <CAMuHMdUXCy+87-pwLiJ7ynaM1AeFq0f7R3sJ4prdE3QN09z++w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-17 20:35 ` Dinh Nguyen
2015-06-17 21:30 ` Russell King - ARM Linux
[not found] ` <20150617213006.GC7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-06-17 22:12 ` Dinh Nguyen
[not found] ` <5581F0DD.60408-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2015-06-17 22:31 ` Dinh Nguyen
[not found] ` <5581F542.708-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2015-06-17 22:51 ` Russell King - ARM Linux
2015-05-22 10:45 ` Michal Simek
2015-06-01 10:21 ` Wei Xu
2015-05-20 22:48 ` Sebastian Hesselbarth
2015-05-21 8:30 ` Thierry Reding [this message]
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=20150521083046.GA30323@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=andrew@lunn.ch \
--cc=baohua@kernel.org \
--cc=bcm@fixthebug.org \
--cc=computersforpeace@gmail.com \
--cc=dinguyen@opensource.altera.com \
--cc=f.fainelli@gmail.com \
--cc=gnurou@gmail.com \
--cc=gregory.0xf0@gmail.com \
--cc=gregory.clement@free-electrons.com \
--cc=heiko@sntech.de \
--cc=horms@verge.net.au \
--cc=jason@lakedaemon.net \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=marc.ceeeee@gmail.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=swarren@wwwdotorg.org \
--cc=xuwei5@hisilicon.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).