diff mbox

[U-Boot] mtest: Print dcache state

Message ID 1973885042.2352779.1344855552091.JavaMail.root@advansee.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Benoît Thébaudeau Aug. 13, 2012, 10:59 a.m. UTC
mtest tests 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, mtest results may change depending on dcache state.

This patch prints the dcache state at the beginning of mtest so as to keep the
user informed of the test conditions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 .../common/cmd_mem.c                               |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tom Rini Oct. 3, 2012, 10:05 p.m. UTC | #1
On Mon, Aug 13, 2012 at 12:59:12AM -0000, Beno??t Th??baudeau wrote:

> mtest tests 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, mtest results may change depending on dcache state.
> 
> This patch prints the dcache state at the beginning of mtest so as to keep the
> user informed of the test conditions.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> Tested-by: Beno??t Th??baudeau <benoit.thebaudeau@advansee.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Mike Frysinger <vapier@gentoo.org>

NAK, this breaks x86 which has no dcache_status.
Albert ARIBAUD Oct. 4, 2012, 11:03 a.m. UTC | #2
Hi Tom,

On Wed, 3 Oct 2012 15:05:21 -0700, Tom Rini <trini@ti.com> wrote:

> On Mon, Aug 13, 2012 at 12:59:12AM -0000, Beno??t Th??baudeau wrote:
> 
> > mtest tests 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, mtest results may change depending on dcache state.
> > 
> > This patch prints the dcache state at the beginning of mtest so as to keep the
> > user informed of the test conditions.
> > 
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > Tested-by: Beno??t Th??baudeau <benoit.thebaudeau@advansee.com>
> > Cc: Wolfgang Denk <wd@denx.de>
> > Cc: Mike Frysinger <vapier@gentoo.org>
> 
> NAK, this breaks x86 which has no dcache_status.
> 

IIRC the general idea of printing the cache status in mtest had already
been NAKed (though not formally) by Wolfgang.

Amicalement,
Benoît Thébaudeau Oct. 4, 2012, 11:13 a.m. UTC | #3
Hi Albert, Tom,

On Thursday, October 4, 2012 1:03:48 PM, Albert ARIBAUD wrote:
> Hi Tom,
> 
> On Wed, 3 Oct 2012 15:05:21 -0700, Tom Rini <trini@ti.com> wrote:
> 
> > On Mon, Aug 13, 2012 at 12:59:12AM -0000, Beno??t Th??baudeau
> > wrote:
> > 
> > > mtest tests 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, mtest results may change depending on
> > > dcache state.
> > > 
> > > This patch prints the dcache state at the beginning of mtest so
> > > as to keep the
> > > user informed of the test conditions.
> > > 
> > > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > > Tested-by: Beno??t Th??baudeau <benoit.thebaudeau@advansee.com>
> > > Cc: Wolfgang Denk <wd@denx.de>
> > > Cc: Mike Frysinger <vapier@gentoo.org>
> > 
> > NAK, this breaks x86 which has no dcache_status.
> > 
> 
> IIRC the general idea of printing the cache status in mtest had
> already
> been NAKed (though not formally) by Wolfgang.

Indeed. This subject has already been closed. Perhaps the patch status had just
not been updated in Patchwork.

Best regards,
Benoît
Tom Rini Oct. 4, 2012, 2:15 p.m. UTC | #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/04/12 04:13, Benoît Thébaudeau wrote:
> Hi Albert, Tom,
> 
> On Thursday, October 4, 2012 1:03:48 PM, Albert ARIBAUD wrote:
>> Hi Tom,
>> 
>> On Wed, 3 Oct 2012 15:05:21 -0700, Tom Rini <trini@ti.com>
>> wrote:
>> 
>>> On Mon, Aug 13, 2012 at 12:59:12AM -0000, Beno??t Th??baudeau 
>>> wrote:
>>> 
>>>> mtest tests 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,
>>>> mtest results may change depending on dcache state.
>>>> 
>>>> This patch prints the dcache state at the beginning of mtest
>>>> so as to keep the user informed of the test conditions.
>>>> 
>>>> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by:
>>>> Beno??t Th??baudeau <benoit.thebaudeau@advansee.com> Cc:
>>>> Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger
>>>> <vapier@gentoo.org>
>>> 
>>> NAK, this breaks x86 which has no dcache_status.
>>> 
>> 
>> IIRC the general idea of printing the cache status in mtest had 
>> already been NAKed (though not formally) by Wolfgang.
> 
> Indeed. This subject has already been closed. Perhaps the patch
> status had just not been updated in Patchwork.

OK, thanks guys.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQbZoJAAoJENk4IS6UOR1WIdQQAIIAUt0PU0r4VFcTCX6/X4sz
ZprsyLtoqZrP4NI3cdO0bWELrOlyniEVwXrw4gNs+c86M+W76o/6XI62ug/JZGeP
g10F9KCjpiQm4Uy3nV6PsmpPTN0uHxeiFbZUlmS4lqsPCFGOW2wAUIIgHbnfykv6
a8CSuO1ATHF5rNFw+Kgj2TX+NbI2Rjf/83cJoawLKqznONJVDHcIW02hS0YDi+c9
yHiqkRVu3RcrJO19zVcWYMeBo+2GejzeioV2W3F+O5d3XXr/AusBdOkotAasDlrF
1hv4ty2CWXpS6jardevdT/awD2zBI6ofd/lGUc9eHsjCJBVc5YPKK77A1AYyEWuq
eJ2K9rHGiGdWf50TPIkyxtupfzNWMmtDlKOhUFiSwkLexjIbIRpRxHoa6Aj9BW7G
PyYjo45P2iXAahUkhijZuF23g2rVQTq+7dBFA/Saz0GA5GwPoavolfu5UAkuYtpO
rNZoYcN/LNHWZ/NIto6o2oqcTIvlcr2NfV9vQmGm31fHxjFOTznprTT/8YfhTKlX
Lnsav21HI/UE5KNYDVlVyXLzxUiBubEFj/jxC7b31g3sYF0fTZKZyEO3b+ZoqKB2
hNsF6S3uiMGAtArUB3PaSavncQaI/kabZLKTBbzXTMx0UMDNuCSutJTzqcmlY9wC
aVi1eIjjEZt2JTHPHFIn
=OpC9
-----END PGP SIGNATURE-----
diff mbox

Patch

diff --git u-boot-4d3c95f.orig/common/cmd_mem.c u-boot-4d3c95f/common/cmd_mem.c
index 18f0a3f..5628f6a 100644
--- u-boot-4d3c95f.orig/common/cmd_mem.c
+++ u-boot-4d3c95f/common/cmd_mem.c
@@ -651,8 +651,10 @@  int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	else
 		iteration_limit = 0;
 
+	printf("Testing %08x ... %08x (dcache: %s):\n", (uint)start, (uint)end,
+		dcache_status() ? "on" : "off");
+
 #if defined(CONFIG_SYS_ALT_MEMTEST)
-	printf ("Testing %08x ... %08x:\n", (uint)start, (uint)end);
 	debug("%s:%d: start 0x%p end 0x%p\n",
 		__FUNCTION__, __LINE__, start, end);