* [U-Boot] [PATCH] part_iso: Cache align read buffer
@ 2017-03-22 13:43 Martin Hundebøll
2017-03-22 14:50 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Martin Hundebøll @ 2017-03-22 13:43 UTC (permalink / raw)
To: u-boot
The global 'tmpbuf' variable in part_iso triggers invalid cache
alignment warnings when not being aligned to ARCH_DMA_MINALIGN:
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4ffbb6ac
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4ffbbeac
The quick fix here is to align the global 'tmpbuf' variable using
DEFINE_CACHE_ALIGN_BUFFER. A real fix would be to change part_iso.c to
use function local buffers defined with ALLOC_CACHE_ALIGN_BUFFER.
Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
---
disk/part_iso.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/disk/part_iso.c b/disk/part_iso.c
index bb8ed658f2..970a27bf67 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <asm/unaligned.h>
+#include <memalign.h>
#include "part_iso.h"
#ifdef HAVE_BLOCK_DEVICE
@@ -24,7 +25,7 @@
#undef CHECK_FOR_POWERPC_PLATTFORM
#define CD_SECTSIZE 2048
-static unsigned char tmpbuf[CD_SECTSIZE];
+DEFINE_CACHE_ALIGN_BUFFER(unsigned char, tmpbuf, CD_SECTSIZE);
unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start,
lbaint_t blkcnt, void *buffer)
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] part_iso: Cache align read buffer
2017-03-22 13:43 [U-Boot] [PATCH] part_iso: Cache align read buffer Martin Hundebøll
@ 2017-03-22 14:50 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2017-03-22 14:50 UTC (permalink / raw)
To: u-boot
On Wed, Mar 22, 2017 at 02:43:24PM +0100, Martin Hundebøll wrote:
> The global 'tmpbuf' variable in part_iso triggers invalid cache
> alignment warnings when not being aligned to ARCH_DMA_MINALIGN:
>
> ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4ffbb6ac
> ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4ffbbeac
>
> The quick fix here is to align the global 'tmpbuf' variable using
> DEFINE_CACHE_ALIGN_BUFFER. A real fix would be to change part_iso.c to
> use function local buffers defined with ALLOC_CACHE_ALIGN_BUFFER.
Can we try and do the real fix please? The merge window isn't even
closed just yet, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170322/d77c98a8/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-22 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 13:43 [U-Boot] [PATCH] part_iso: Cache align read buffer Martin Hundebøll
2017-03-22 14:50 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.