From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7
Date: Wed, 30 Dec 2015 23:18:37 +0100 [thread overview]
Message-ID: <20151230231837.5dbdab78@lilith> (raw)
In-Reply-To: <1451414642-21289-1-git-send-email-marex@denx.de>
Hello Marek,
On Tue, 29 Dec 2015 19:44:01 +0100, Marek Vasut <marex@denx.de> wrote:
> The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is
> set, it configures TTBR0 register. This register must be configured for the
> cache on ARMv7 to operate correctly.
>
> The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the
> TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor
> issues which are hard to replicate, for example certain USB sticks are not
> detected or QSPI NOR sometimes fails to write pages completely.
>
> The solution is to replace CONFIG_ARMV7 test with CONFIG_CPU_V7 one. This is
> correct because the code which added the test(s) for CONFIG_ARMV7 was added
> shortly after CONFIG_ARMV7 was replaced by CONFIG_CPU_V7 and this code was
> not adjusted correctly to reflect that change.
Analysis of the series shows that:
- it does not change the values of DCACHE_OFF, DCACHE_WRITETHROUGH and
DCACHE_WRITEBACK;
- it does change the value of DCACHE_WRITEALLOC from 0x16 to 0x101E, but
DCACHE_WRITEALLOC is only used when CONFIG_SYS_ARM_CACHE_WRITEALLOC is
defined, which does not happen throughout U-Boot, as shown by a search
for "WRITEALLOC".
- it sets inner and outer region cache control bits in TTBR0, to match
the cacheability of the DDR in which the MMU table resides.
Marek performed tests of patch 1/2 only (with the S bit set) and of
the whole series (wih the S bit clear). With patch 1/2 only, Marek could
witness the performance hit described by Stefan Roese; with the whole
series, Marek saw no performance hit any more.
I will therefore take this patch series in, since it fixes an obvious
issue in the U-Boot code and does not show any adverse effect.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2015-12-30 22:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 18:44 [U-Boot] [PATCH 1/2] arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 Marek Vasut
2015-12-29 18:44 ` [U-Boot] [PATCH 2/2] arm: Remove S bit from MMU section entry Marek Vasut
2015-12-30 22:18 ` Albert ARIBAUD [this message]
2016-01-29 16:22 ` [U-Boot] [PATCH 1/2] arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 Albert ARIBAUD
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=20151230231837.5dbdab78@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.