All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PATCH for cmd_mem.c:do_mem_mtest()
Date: Tue, 13 Sep 2005 14:43:35 -0400	[thread overview]
Message-ID: <43271DD7.1050003@smiths-aerospace.com> (raw)
In-Reply-To: <20050913182731.6D1F23529BB@atlas.denx.de>

Wolfgang Denk wrote:
> In message <c166aa9f05091309552efac7d@mail.gmail.com> you wrote:
> 
>>Not on MIPS (unless someone was daft enough to map it
>>with the TLB).  The code causes a TLB store miss exception.
>>Since this is in 'common' code, I think it's a bug.
> 
> 
> OK.
> 
> But all you need to do is #define CFG_MEMTEST_SCRATCH in  your  board
> config file, right?
> 
> 
>>With a static define of the scratch address I can't test one of the
>>memories correctly becuase the scratch address is pointing to the
>>other memory, so the scratch writes don't serve their purpose.
> 
> 
> OK, but this is a special case, isn't it? 
> 
> Would it be acceptable for you if we just move the initialization
> 
> 	dummy = (vu_long*)CFG_MEMTEST_SCRATCH;
> 
> below the computation of "end", so that you can use
> 
> 	#define CFG_MEMTEST_SCRATCH (--end)
> 
> in your board config file?
> 
> Best regards,
> 
> Wolfgang Denk

I'm not sure you want that, exactly.  You are affecting the variable 
"end" as a side effect in a macro which is generally a bad idea.  A no 
side effect version would be:
#define CFG_MEMTEST_SCRATCH (end - 1)

You are also making assumptions on the type of end (the variable, that 
is).  I'm assuming this is a 32 bit wide memory test, sorry for not 
verifying that.  You may want to coerce "end" to make sure the "- 1" 
subtracts the proper number of bytes:
#define CFG_MEMTEST_SCRATCH ((void *)end - 1)

gvb

  reply	other threads:[~2005-09-13 18:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 16:09 [U-Boot-Users] PATCH for cmd_mem.c:do_mem_mtest() Andrew Dyer
2005-09-13 16:18 ` Wolfgang Denk
2005-09-13 16:31   ` Ladislav Michl
2005-09-13 18:04     ` Wolfgang Denk
2005-09-13 19:26       ` [U-Boot-Users] ppcboot_stage2 manju mahajan
2005-10-03 16:52         ` Sam Pham
2005-10-03 19:37           ` Wolfgang Denk
2005-10-04 15:49             ` Sam Pham
2005-09-14  8:09       ` [U-Boot-Users] PATCH for cmd_mem.c:do_mem_mtest() Ladislav Michl
2006-07-22 19:03         ` Wolfgang Denk
2005-09-13 16:55   ` Andrew Dyer
2005-09-13 18:27     ` Wolfgang Denk
2005-09-13 18:43       ` Jerry Van Baren [this message]
2005-09-13 19:54         ` Wolfgang Denk
2005-09-13 20:08           ` Jerry Van Baren
2005-09-13 20:26       ` Andrew Dyer
2005-09-13 21:08         ` Wolfgang Denk

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=43271DD7.1050003@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.