[U-Boot] [PATCH 5/7] FAT: get_cluster: Add buffer bouncing
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Fri Jul 20 01:32:57 CEST 2012
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
More information about the U-Boot
mailing list