From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Wed, 22 Mar 2017 14:43:24 +0100 Subject: [U-Boot] [PATCH] part_iso: Cache align read buffer Message-ID: <20170322134324.27189-1-mnhu@prevas.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de 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 - 0x4ffb= b6ac ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4ffbb= eac 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=C3=B8ll --- 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 #include #include +#include #include "part_iso.h" =20 #ifdef HAVE_BLOCK_DEVICE @@ -24,7 +25,7 @@ #undef CHECK_FOR_POWERPC_PLATTFORM #define CD_SECTSIZE 2048 =20 -static unsigned char tmpbuf[CD_SECTSIZE]; +DEFINE_CACHE_ALIGN_BUFFER(unsigned char, tmpbuf, CD_SECTSIZE); =20 unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *buffer) --=20 2.12.0