public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] Pre-console buffer for ARM
Date: Tue, 30 Aug 2011 19:37:49 +1000	[thread overview]
Message-ID: <4E5CAF6D.5070905@gmail.com> (raw)
In-Reply-To: <20110830092934.24BF118C46FC@gemini.denx.de>

Hi Wolfgang,

On 30/08/11 19:29, Wolfgang Denk wrote:
> Dear Graeme Russ,
> 
> In message <CALButC+t=OUL9XgQnfyAdZmgPJRp7mdRwEE9LKogYHEg1D+m4g@mail.gmail.com> you wrote:
>>
>>> If you want to support arbitrary buffer sizes, then just use
>>>
>>>        #define CIRC_BUF_IDX(idx) ((idx) % CONFIG_SYS_TMP_CON_BUF_SZ)
>>
>> I know, but I was concerned that you wouldn't like the use of modulo
>> arithmetic for every putc() - But I suppose thats cheaper than a compare
>> plus branch...
> 
> Well, the difference of "i & (CONFIG_SYS_TMP_CON_BUF_SZ-1)" versus
> "i % CONFIG_SYS_TMP_CON_BUF_SZ" is 1 versus 4 assembler instructions
> on Power, and 2 versus 5 assembler instructions on ARM.  I think we
> can tolerate this.

And it's only hit during printf() before console is initialised :)

Respinning now

Regards,

Graeme

  reply	other threads:[~2011-08-30  9:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 17:21 [U-Boot] [RFC PATCH] Pre-console buffer for ARM Simon Glass
2011-08-29 19:20 ` Mike Frysinger
2011-08-29 19:42   ` Simon Glass
2011-08-29 20:10     ` Mike Frysinger
2011-08-29 23:00       ` Graeme Russ
2011-08-30  1:32         ` Mike Frysinger
2011-08-30  1:49           ` Graeme Russ
2011-08-30  2:50             ` Mike Frysinger
2011-08-30  3:12               ` Graeme Russ
2011-08-30  5:17             ` Wolfgang Denk
2011-08-30  5:28               ` Graeme Russ
2011-08-30  9:29                 ` Wolfgang Denk
2011-08-30  9:37                   ` Graeme Russ [this message]
2011-08-29 22:49 ` Graeme Russ
2011-08-29 23:01   ` Simon Glass

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=4E5CAF6D.5070905@gmail.com \
    --to=graeme.russ@gmail.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