Skip to contentSkip to conversation

drivers: net: cpsw: always flush cache of size aligned to PKTALIGN

PATCH New Lokesh Vutla 3 participants 4 messages Aug 11, 2016 – Aug 12, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 drivers: net: cpsw: always flush cache of size aligned to PKTALIGN

cpsw tries to flush dcache which is not in the range of PKTALIGN. Because of this the following warning comes while flushing:

CACHE: Misaligned operation at range [dffecec0, dffed016]

Fix it by flushing cache of size aligned to PKTALIGN.

---
 drivers/net/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/cpsw.c +1 -1
index 2ce4ec6..300a534 100644
@@ -907,7 +907,7 @@ static int _cpsw_send(struct cpsw_priv *priv, void *packet, int length)
 	int timeout = CPDMA_TIMEOUT;
 
 	flush_dcache_range((unsigned long)packet,
-			   (unsigned long)packet + length);
+			   (unsigned long)packet + ALIGN(length, PKTALIGN));
 
 	/* first reap completed packets */
 	while (timeout-- &&
Signature · 1 line
2.9.2
#1 lore raw

PATCH v3 1/1 drivers: net: cpsw: always flush cache of size aligned to PKTALIGN

Quoted 8 lines · Lokesh Vutla

cpsw tries to flush dcache which is not in the range of PKTALIGN. Because of this the following warning comes while flushing:

CACHE: Misaligned operation at range [dffecec0, dffed016]

Fix it by flushing cache of size aligned to PKTALIGN.

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/20160811/da4cc1f8/attachment.sig>
#2 lore raw

PATCH v3 1/1 drivers: net: cpsw: always flush cache of size aligned to PKTALIGN

In reply to Lokesh Vutla
Quoted 9 lines · Lokesh Vutla

cpsw tries to flush dcache which is not in the range of PKTALIGN. Because of this the following warning comes while flushing:

CACHE: Misaligned operation at range [dffecec0, dffed016]

Fix it by flushing cache of size aligned to PKTALIGN.

---

Regards
Mugunthan V N

#3 lore raw

PATCH v3 1/1 drivers: net: cpsw: always flush cache of size aligned to PKTALIGN

In reply to Lokesh Vutla
Quoted 8 lines · Lokesh Vutla

cpsw tries to flush dcache which is not in the range of PKTALIGN. Because of this the following warning comes while flushing:

CACHE: Misaligned operation at range [dffecec0, dffed016]

Fix it by flushing cache of size aligned to PKTALIGN.

Applied to u-boot/master, 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/20160812/046d8c91/attachment.sig>