public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cmd: net: flush cache cacheline aligned
@ 2016-08-02  7:20 Stefan Agner
  2016-08-03 20:56 ` Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stefan Agner @ 2016-08-02  7:20 UTC (permalink / raw)
  To: u-boot

From: Stefan Agner <stefan.agner@toradex.com>

Flush loaded data cacheline aligned. This avoids warnings such as
CACHE: Misaligned operation at range [81000000, 816d0fa8]

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
Why do we actually have to flush caches after load? It seems to
have worked so far despite the caches did not get flushed (due to
missalignment).

--
Stefan

 cmd/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/net.c b/cmd/net.c
index b2f3c7b..540daeb 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -244,7 +244,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
 	}
 
 	/* flush cache */
-	flush_cache(load_addr, size);
+	flush_cache(load_addr, ALIGN(size, CONFIG_SYS_CACHELINE_SIZE));
 
 	bootstage_mark(BOOTSTAGE_ID_NET_LOADED);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-08-15 15:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02  7:20 [U-Boot] [PATCH] cmd: net: flush cache cacheline aligned Stefan Agner
2016-08-03 20:56 ` Fabio Estevam
2016-08-03 22:00 ` Simon Glass
2016-08-03 23:18 ` Joe Hershberger
2016-08-04  1:17   ` Simon Glass
2016-08-04 16:14     ` Joe Hershberger
2016-08-04 17:05       ` Stefan Agner
2016-08-04  2:43   ` Stefan Agner
2016-08-04 17:46     ` Tom Rini
2016-08-07 17:31       ` Stefan Agner
2016-08-14 20:06 ` [U-Boot] " Tom Rini
2016-08-15  4:40   ` Stefan Agner
2016-08-15 15:57   ` Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox