From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: socfpga: Fix cache configuration
Date: Wed, 9 Dec 2015 21:50:01 +0800 [thread overview]
Message-ID: <1449669001.2573.4.camel@altera.com> (raw)
In-Reply-To: <201512081353.52192.marex@denx.de>
On Tue, 2015-12-08 at 13:53 +0100, Marek Vasut wrote:
> On Tuesday, December 08, 2015 at 12:13:23 PM, Pavel Machek wrote:
>
> [...]
>
> > > > Thanks for the pointers.
> > > >
> > > > I checked the source and enabled the debug message. Noticed my
> > > > failure
> > > > is due to small LEB and PEB size. It was set to 4k which is the
> > > > sub
> > > > -sector erase size of NOR flash. I suspect you didn't hit this
> > > > as you
> > > > generate ubinized image which is 64kB erase size.
> > > >
> > > > I will continue to dig more. Need to ensure it works when user
> > > > create
> > > > UBI part in U-Boot on top of serial NOR flash (which is
> > > > commonly 4kB
> > > > erase size). Hopefully existing U-Boot already have source
> > > > taking care
> > > > this :)
> > >
> > > I am tempted to revert this patch, since it breaks USB and UBI
> > > for me
> > > on two different boards though.
> >
> > It caused regressions it was not supposed to change. That means
> > revert...
>
> I found the bug, it's not a bug in this patch, but it's even broader
> issue.
>
Nice!
> Look at arch/arm/lib/cache-cp15.c , the file checks for CONFIG_ARMV7
> and only
> ifdef CONFIG_ARMV7, then it configures TTBR0. If CONFIG_ARMV7 is not
> set, it
> configures nothing. But, I cannot find any place for any ARMV7
> machine which
> would actually set the CONFIG_ARMV7 option.
>
> I verified this on SoCFPGA and indeed, CONFIG_ARMV7 is not set, so
> this piece
> of code is never executed and thus my cache misbehaves.
>
> I guess the right way to fix this would be to replace #ifdef
> CONFIG_ARMV7 with
> CONFIG_CPU_V7 ? Or shall we add new symbol, CONFIG_ARMV7 and make
> CONFIG_CPU_V7
> select CONFIG_ARMV7 to avoid changing the system.h header, which is
> most likely
> taken from Linux ?
>
I would opt for CONFIG_CPU_V7 as its specific to ARMV7 cache feature.
Thanks
Chin Liang
> Best regards,
> Marek Vasut
prev parent reply other threads:[~2015-12-09 13:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 15:30 [U-Boot] [PATCH] arm: socfpga: Fix cache configuration Stefan Roese
2015-09-17 15:37 ` Marek Vasut
2015-09-18 6:16 ` Pavel Machek
2015-09-18 6:24 ` Stefan Roese
2015-09-18 6:34 ` Pavel Machek
2015-09-18 6:41 ` Stefan Roese
2015-11-09 0:10 ` Marek Vasut
2015-11-09 11:42 ` Stefan Roese
2015-11-09 13:49 ` Marek Vasut
2015-11-09 15:46 ` Stefan Roese
2015-11-09 16:02 ` Marek Vasut
2015-11-12 0:49 ` Chin Liang See
2015-11-12 0:53 ` Marek Vasut
2015-11-12 2:33 ` Chin Liang See
2015-11-12 3:48 ` Marek Vasut
2015-12-03 0:10 ` Marek Vasut
2015-12-03 16:11 ` Chin Liang See
2015-12-03 16:22 ` Marek Vasut
2015-12-07 14:37 ` Chin Liang See
2015-12-07 14:44 ` Marek Vasut
2015-12-07 14:47 ` Chin Liang See
2015-12-08 11:13 ` Pavel Machek
2015-12-08 12:04 ` Stefan Roese
2015-12-08 12:54 ` Marek Vasut
2015-12-09 13:48 ` Chin Liang See
2015-12-09 14:12 ` Marek Vasut
2015-12-08 12:53 ` Marek Vasut
2015-12-09 13:50 ` Chin Liang See [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=1449669001.2573.4.camel@altera.com \
--to=clsee@altera.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox