public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MIPS: Add CONFIG_SKIP_LOWLEVEL_INIT and flush dcache upon relocation
Date: Tue, 18 Nov 2008 11:31:08 +0900	[thread overview]
Message-ID: <492228EC.1060201@necel.com> (raw)
In-Reply-To: <200811171454.32665.sr@denx.de>

Stefan Roese wrote:
>>> @@ -243,9 +243,11 @@ reset:
>>>  	mtc0	zero, CP0_COUNT
>>>  	mtc0	zero, CP0_COMPARE
>>>
>>> +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT)
>>>  	/* CONFIG0 register */
>>>  	li	t0, CONF_CM_UNCACHED
>>>  	mtc0	t0, CP0_CONFIG
>>> +#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */
>>>
>>>  	/* Initialize $gp.
>>>  	 */
>> It might be preferable to remove the /* CONFIG_SKIP_LOWLEVEL_INIT */
>> comment for better readability, IMHO.
> 
> Hmmm. I usually prefer to add those comments to the #else and #endif since it 
> makes the code better readable.

We have just 3 lines within #if-endif, then it looks better without the
latter comment in this case, IMHO.

> Especially when the chunks of code in-between 
> gets bigger. So I would prefer to keep this comment. OK?

Fully agreed, of course.  Thanks for the explanation, and it's up to
you.

>> - Could we separate this flush_cache patch from this patch?
> 
> OK, will do.
> 
>> - Please use save register, s[0-7], instead of t7, since t7 register
>>   might be overwritten with another value in flush_cache().
>>   Furthermore, in this case, a2 should be saved as well.
> 
> I'm still new to MIPS so thanks for your suggestions. I'll try to provide a 
> fixed up patch today.

      reply	other threads:[~2008-11-18  2:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 12:17 [U-Boot] [PATCH] MIPS: Add CONFIG_SKIP_LOWLEVEL_INIT and flush dcache upon relocation Stefan Roese
2008-11-16  6:45 ` Shinya Kuribayashi
2008-11-17 13:54   ` Stefan Roese
2008-11-18  2:31     ` Shinya Kuribayashi [this message]

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=492228EC.1060201@necel.com \
    --to=shinya.kuribayashi@necel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox