Skip to contentSkip to conversation

Fix cache misalignment after network load operations

PATCH Superseded Peter.Chubb at data61.csiro.au 2 participants 3 messages Sep 14, 2016

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix cache misalignment after network load operations

After any operation that downloads a file (e.g., pxe get, or dhcp), the buffer containing the downloaded data is flushed. This patch rounds up the flushed size to a cacheline boundary, preventing a cache misalignment message from u-boot.

---
 cmd/net.c |    3 ---
 1 file changed, 3 deletions(-)
cmd/net.c +0 -3
Index: u-boot/cmd/net.c
===================================================================
@@ -243,9 +243,6 @@ static int netboot_common(enum proto_t p
 		return CMD_RET_SUCCESS;
 	}
 
-	/* flush cache */
-	flush_cache(load_addr, size);
-
 	bootstage_mark(BOOTSTAGE_ID_NET_LOADED);
 
 	rcode = bootm_maybe_autostart(cmdtp, argv[0]);
#1 lore raw

PATCH v2 1/1 Fix cache misalignment after network load operations

Quoted 4 lines · On Tue, Sep 13, 2016 at 10:30 PM, <[email protected]> wrote:

After any operation that downloads a file (e.g., pxe get, or dhcp), the buffer containing the downloaded data is flushed. This patch rounds up the flushed size to a cacheline boundary, preventing a cache misalignment message from u-boot.

Looks like you missed to update the commit log for v2 as you are no longer flushing the cache :-)

Also, in the Subject line it is always good practice to start with the subsystem name, so something like:
net: Remove flush_cache() operation

#2 lore raw

PATCH v2 1/1 Fix cache misalignment after network load operations

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabio" == Fabio Estevam <[email protected]> writes:

Fabio> On Tue, Sep 13, 2016 at 10:30 PM, <[email protected]>

Quoted 4 lines · Fabio> wrote:
Quoted 4 lines

After any operation that downloads a file (e.g., pxe get, or dhcp), the buffer containing the downloaded data is flushed. This patch rounds up the flushed size to a cacheline boundary, preventing a cache misalignment message from u-boot.

Fabio> Looks like you missed to update the commit log for v2 as you Fabio> are no longer flushing the cache :-)

Arrgh. Thanks for this -- will respin and resubmit.

Fabio> Also, in the Subject line it is always good practice to start Fabio> with the subsystem name, so something like: net: Remove Fabio> flush_cache() operation

Will do.

Peter C

Signature · 2 lines
Dr Peter Chubb         Tel: +61 2 9490 5852      http://ts.data61.csiro.au/
Trustworthy Systems Group                           Data61 (formerly NICTA)