public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7] FAT: get_cluster: Add buffer bouncing
Date: Fri, 20 Jul 2012 01:32:57 +0200 (CEST)	[thread overview]
Message-ID: <232652762.295681.1342740777134.JavaMail.root@advansee.com> (raw)
In-Reply-To: <201207191848.27881.vapier@gentoo.org>

On Friday 20 July 2012 00:48:26 Mike Frysinger wrote:
> On Thursday 19 July 2012 18:02:37 Beno?t Th?baudeau wrote:
> > +	if ((unsigned long)buffer & (ARCH_DMA_MINALIGN - 1)) {
> >  		ALLOC_CACHE_ALIGN_BUFFER(__u8, tmpbuf, mydata->sect_size);
> > 
> > +		debug("FAT: Misaligned buffer address (%p)\n", buffer);
> 
> i'd suggest making this a printf.

OK. I chose debug to do like mmc.c. I'll switch to printf if you prefer.
However, debug is better here IMHO to avoid visual pollution on stdout because
this bouncing can still occur in normal conditions with perfectly aligned
buffers, in the case data is read from an unaligned position relative to the
file to an aligned offset relative to the buffer. This can be avoided by
improving the file format by aligning its data structures, but one can not
always change a file format. debug would allow to detect misaligned buffers or
to optimize file formats while not being bothering for the compelled file
formats containing misaligned data structures.

> bounce buffers are not cheap.

Indeed.

Anything else before I post a v2 of the series?

Regards,
Beno?t

  reply	other threads:[~2012-07-19 23:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 22:02 [U-Boot] [PATCH 5/7] FAT: get_cluster: Add buffer bouncing Benoît Thébaudeau
2012-07-19 22:48 ` Mike Frysinger
2012-07-19 23:32   ` Benoît Thébaudeau [this message]
2012-07-20 13:21     ` [U-Boot] [PATCH v2 6/8] " Benoît Thébaudeau
2012-09-02 15:22       ` 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=232652762.295681.1342740777134.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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