Skip to contentSkip to conversation

cmd: load: align cache flush

PATCH In review Chris Packham 3 participants 3 messages Oct 25, 2016 – Nov 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: load: align cache flush

Prevent cache misalignment message by ensuring that a whole cache line is flushed.

---

 cmd/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/load.c +1 -1
index 65557e4f9ec3..77c3359b29b7 100644
@@ -997,7 +997,7 @@ static ulong load_serial_ymodem(ulong offset, int mode)
 	xyzModem_stream_terminate(false, &getcxmodem);
 
 
-	flush_cache(offset, size);
+	flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN));
 
 	printf("## Total Size      = 0x%08x = %d Bytes\n", size, size);
 	setenv_hex("filesize", size);
Signature · 1 line
2.10.1
#1 lore raw

PATCH 1/1 cmd: load: align cache flush

Quoted 15 lines · Chris Packham

Prevent cache misalignment message by ensuring that a whole cache line is flushed.

---

 cmd/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/load.c +0 -0
index 65557e4f9ec3..77c3359b29b7 100644

cmd/load.c static ulong load_serial_ymodem(ulong offset, int mode) · line 1003

Quoted 8 lines
cmd/load.c +1 -1
@@ -997,7 +997,7 @@ static ulong load_serial_ymodem(ulong offset, int mode)
 	xyzModem_stream_terminate(false, &getcxmodem);
 
 
-	flush_cache(offset, size);
+	flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN));
 
 	printf("## Total Size      = 0x%08x = %d Bytes\n", size, size);
 	setenv_hex("filesize", size);

Thanks,
Stefan

#2 lore raw
In reply to Chris Packham
Quoted 5 lines · Chris Packham

Prevent cache misalignment message by ensuring that a whole cache line is flushed.

Applied to u-boot/master (before v2016.11-rc3), thanks!

Signature · 8 lines
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/20161102/9bc1cf69/attachment.sig>