public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mtest: Disable dcache during test
       [not found] <CANYL96C2=fYHoTAp0SQird-Yz1W2JPq22U=3q4ZFKgwomXxODA@mail.gmail.com>
@ 2012-08-11 20:05 ` Benoît Thébaudeau
  2012-08-11 20:15   ` Mike Frysinger
  0 siblings, 1 reply; 9+ messages in thread
From: Benoît Thébaudeau @ 2012-08-11 20:05 UTC (permalink / raw)
  To: u-boot

On 08/11/2012 21:47, Andrew Dyer wrote:
> I agree with Mike, use the current dcache settings. U-boot has always
> assumed the user knew what they were doing.
> If you want to print a small message with the dcache setting that
> makes sense to me, but no big warning.

Then, something like the following at runtime in the first lines printed my
mtest?

dcache state: on

Best regards,
Beno?t

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] mtest: Disable dcache during test
  2012-08-11 20:05 ` [U-Boot] [PATCH] mtest: Disable dcache during test Benoît Thébaudeau
@ 2012-08-11 20:15   ` Mike Frysinger
  2012-08-11 20:25     ` Benoît Thébaudeau
  2012-08-14  6:27     ` [U-Boot] [PATCH] mtest: Disable dcache during test Albert ARIBAUD
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Frysinger @ 2012-08-11 20:15 UTC (permalink / raw)
  To: u-boot

On Saturday 11 August 2012 16:05:36 Beno?t Th?baudeau wrote:
> On 08/11/2012 21:47, Andrew Dyer wrote:
> > I agree with Mike, use the current dcache settings. U-boot has always
> > assumed the user knew what they were doing.
> > If you want to print a small message with the dcache setting that
> > makes sense to me, but no big warning.
> 
> Then, something like the following at runtime in the first lines printed my
> mtest?
> 
> dcache state: on

i'd be fine with that.  something like below (if you want to test & post,
that'd be good).
-mike

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 18f0a3f..5628f6a 100644
--- a/common/cmd_mem.c
+++ b/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);
 
-------------- 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/5c64e75b/attachment.pgp>

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] mtest: Disable dcache during test
  2012-08-11 20:15   ` Mike Frysinger
@ 2012-08-11 20:25     ` Benoît Thébaudeau
  2012-08-13 10:59       ` [U-Boot] [PATCH] mtest: Print dcache state Benoît Thébaudeau
  2012-08-14  6:27     ` [U-Boot] [PATCH] mtest: Disable dcache during test Albert ARIBAUD
  1 sibling, 1 reply; 9+ messages in thread
From: Benoît Thébaudeau @ 2012-08-11 20:25 UTC (permalink / raw)
  To: u-boot

On Saturday 11 August 2012 22:15:16 Mike Frysinger wrote:
> On Saturday 11 August 2012 16:05:36 Beno?t Th?baudeau wrote:
> > On 08/11/2012 21:47, Andrew Dyer wrote:
> > > I agree with Mike, use the current dcache settings. U-boot has
> > > always
> > > assumed the user knew what they were doing.
> > > If you want to print a small message with the dcache setting that
> > > makes sense to me, but no big warning.
> > 
> > Then, something like the following at runtime in the first lines
> > printed my
> > mtest?
> > 
> > dcache state: on
> 
> i'd be fine with that.  something like below (if you want to test &
> post,
> that'd be good).
> -mike
> 
> diff --git a/common/cmd_mem.c b/common/cmd_mem.c
> index 18f0a3f..5628f6a 100644
> --- a/common/cmd_mem.c
> +++ b/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);

OK, I'll do that next week.

Best regards,
Beno?t

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] mtest: Print dcache state
  2012-08-11 20:25     ` Benoît Thébaudeau
@ 2012-08-13 10:59       ` Benoît Thébaudeau
  2012-10-03 22:05         ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Benoît Thébaudeau @ 2012-08-13 10:59 UTC (permalink / raw)
  To: u-boot

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(-)

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);
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] mtest: Disable dcache during test
  2012-08-11 20:15   ` Mike Frysinger
  2012-08-11 20:25     ` Benoît Thébaudeau
@ 2012-08-14  6:27     ` Albert ARIBAUD
  1 sibling, 0 replies; 9+ messages in thread
From: Albert ARIBAUD @ 2012-08-14  6:27 UTC (permalink / raw)
  To: u-boot

Hi Mike,

On Sat, 11 Aug 2012 16:15:16 -0400, Mike Frysinger <vapier@gentoo.org>
wrote:
> On Saturday 11 August 2012 16:05:36 Beno?t Th?baudeau wrote:
> > On 08/11/2012 21:47, Andrew Dyer wrote:
> > > I agree with Mike, use the current dcache settings. U-boot has
> > > always assumed the user knew what they were doing.
> > > If you want to print a small message with the dcache setting that
> > > makes sense to me, but no big warning.
> > 
> > Then, something like the following at runtime in the first lines
> > printed my mtest?
> > 
> > dcache state: on
> 
> i'd be fine with that.  something like below (if you want to test &
> post, that'd be good).
> -mike

I'd disagree with this solution; one can easily overlook casual test
messages like these. To me it is better that the person doing mtest not
trust the cache state at all and check / set it.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mtest: Print dcache state
  2012-08-13 10:59       ` [U-Boot] [PATCH] mtest: Print dcache state Benoît Thébaudeau
@ 2012-10-03 22:05         ` Tom Rini
  2012-10-04 11:03           ` Albert ARIBAUD
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2012-10-03 22:05 UTC (permalink / raw)
  To: u-boot

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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121003/0ef4b6fb/attachment.pgp>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mtest: Print dcache state
  2012-10-03 22:05         ` [U-Boot] " Tom Rini
@ 2012-10-04 11:03           ` Albert ARIBAUD
  2012-10-04 11:13             ` Benoît Thébaudeau
  0 siblings, 1 reply; 9+ messages in thread
From: Albert ARIBAUD @ 2012-10-04 11:03 UTC (permalink / raw)
  To: u-boot

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,
-- 
Albert.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mtest: Print dcache state
  2012-10-04 11:03           ` Albert ARIBAUD
@ 2012-10-04 11:13             ` Benoît Thébaudeau
  2012-10-04 14:15               ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Benoît Thébaudeau @ 2012-10-04 11:13 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] mtest: Print dcache state
  2012-10-04 11:13             ` Benoît Thébaudeau
@ 2012-10-04 14:15               ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-10-04 14:15 UTC (permalink / raw)
  To: u-boot

-----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-----

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-04 14:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CANYL96C2=fYHoTAp0SQird-Yz1W2JPq22U=3q4ZFKgwomXxODA@mail.gmail.com>
2012-08-11 20:05 ` [U-Boot] [PATCH] mtest: Disable dcache during test Benoît Thébaudeau
2012-08-11 20:15   ` Mike Frysinger
2012-08-11 20:25     ` Benoît Thébaudeau
2012-08-13 10:59       ` [U-Boot] [PATCH] mtest: Print dcache state Benoît Thébaudeau
2012-10-03 22:05         ` [U-Boot] " Tom Rini
2012-10-04 11:03           ` Albert ARIBAUD
2012-10-04 11:13             ` Benoît Thébaudeau
2012-10-04 14:15               ` Tom Rini
2012-08-14  6:27     ` [U-Boot] [PATCH] mtest: Disable dcache during test Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox