From patchwork Sat Aug 11 20:15:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 176736 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 75A812C0093 for ; Sun, 12 Aug 2012 06:15:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 50C0A2807F; Sat, 11 Aug 2012 22:15:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z+36mj4rR+EK; Sat, 11 Aug 2012 22:15:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D02F628080; Sat, 11 Aug 2012 22:15:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 50A6A28080 for ; Sat, 11 Aug 2012 22:15:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D-+-CvO55eQ0 for ; Sat, 11 Aug 2012 22:15:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 08CDF2807F for ; Sat, 11 Aug 2012 22:15:22 +0200 (CEST) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id C86F51B400C; Sat, 11 Aug 2012 20:15:16 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: =?iso-8859-1?q?Beno=EEt_Th=E9baudeau?= Date: Sat, 11 Aug 2012 16:15:16 -0400 User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) References: <1565957817.2304803.1344715536780.JavaMail.root@advansee.com> In-Reply-To: <1565957817.2304803.1344715536780.JavaMail.root@advansee.com> MIME-Version: 1.0 Message-Id: <201208111615.17567.vapier@gentoo.org> Cc: u-boot@lists.denx.de, Andrew Dyer Subject: Re: [U-Boot] [PATCH] mtest: Disable dcache during test X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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);