From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 30 Aug 2011 13:07:05 -0700 Subject: [U-Boot] [PATCH V2] console: Implement pre-console buffer In-Reply-To: <20110830195238.CC16118C46FE@gemini.denx.de> References: <1314620046-26187-3-git-send-email-graeme.russ@gmail.com> <1314708581-13678-1-git-send-email-graeme.russ@gmail.com> <20110830195238.CC16118C46FE@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Tue, Aug 30, 2011 at 12:52 PM, Wolfgang Denk wrote: > Dear Simon Glass, > > In message you wrote: >> > ... >> > +#define CIRC_BUF_IDX(idx) ((idx) % CONFIG_PRE_CON_BUF_SZ) >> >> The division here sticks in the craw, but unless we go with > > Does it? ?Why? Only because of the division. But as Mike mentions later, the compiler will avoid it for powers of two. So all is well. > >> CONFIG_PRE_CON_BUF_SZ_LOG2 then I don't see an easy way around it, and >> since this is serial output we can't honestly claim to worry much >> about performance. > > Please see my previous posting > (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/106810) > > I don't think 3 additional addembler instructions really play a big > role here. Yes I saw it, thanks. Regards, Simon > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > Every time history repeats itself the price goes up. >