From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 30 Aug 2011 15:58:07 -0400 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> <20110830195238.CC16118C46FE@gemini.denx.de> Message-ID: <201108301558.08010.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, August 30, 2011 15:52:38 Wolfgang Denk wrote: > Simon Glass 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? > > > 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. i'm pretty sure if you define CONFIG_PRE_CON_BUF_SZ as a power of 2 value, you get nice & simple assembly code. so if the generated code is undesirable, pick a CONFIG value that is power-of-2 ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110830/a22cef35/attachment.pgp