[U-Boot] [PATCH] mtest: Disable dcache during test

Mike Frysinger vapier at gentoo.org
Sat Aug 11 19:50:10 CEST 2012


On Saturday 11 August 2012 10:17:04 Benoît Thébaudeau wrote:
> On 08/11/2012 05:18 AM, Mike Frysinger wrote:
> > On Friday 10 August 2012 15:16:15 Benoît Thébaudeau wrote:
> > > mtest is supposed to test many types of memory accesses in many
> > > different
> > > conditions. If dcache is enabled, memory accesses are likely
> > > bursts, and
> > > some memory accesses are simply skipped. Hence, dcache should be
> > > disabled
> > > during mtest operation so that what mtest actually tests is not
> > > masked by
> > > dcache.
> > 
> > if you want dcache disabled, then why don't you run `dcache off`
> > first ?  i
> > think it's useful to be able to do both, and forcing it one way is
> > wrong.
> > 
> > thus, NAK from me.
> 
> Because you will very likely trust mtest and forget about running `dcache
> off` first, so you may then be happy about falsely positive mtest results.

there are a lot of commands in u-boot that people could "easily forget" to 
tweak and have it do the wrong thing.  imo, mtest running in the active 
cache/memory settings is the *expected* behavior rather than having it 
silently reconfigure the system behind the back of the user.

> Moreover, I can't find any sense or usefulness in running mtest with
> dcache enabled.

it can be useful to stress test the system with cache enabled.  i recall 
during some early porting work that being able to test both caught bugs that 
we might have missed otherwise.

> If there is really a need for running mtest with dcache enabled, an option
> (disabled by default) could be added to the command line to tell mtest not
> to disable dcache.

we already have such an option: dcache off; mtest; dcache on
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120811/f85ea029/attachment.pgp>


More information about the U-Boot mailing list