All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: sh-eth: Fix misaligned cache operation warning
@ 2017-12-01  4:56 Nobuhiro Iwamatsu
  2017-12-05 20:47 ` Joe Hershberger
  2018-01-22 16:54 ` [U-Boot] " Joe Hershberger
  0 siblings, 2 replies; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2017-12-01  4:56 UTC (permalink / raw)
  To: u-boot

When we using network on board using sh-eth, it prints a lot of
"CACHE: Misaligned operation at range" messages.
This commit fixes this problem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 drivers/net/sh_eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index cb000dd18e..b7a0f413c6 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -29,7 +29,7 @@
 
 #if defined(CONFIG_SH_ETHER_CACHE_WRITEBACK) && !defined(CONFIG_SYS_DCACHE_OFF)
 #define flush_cache_wback(addr, len)    \
-		flush_dcache_range((u32)addr, (u32)(addr + len - 1))
+		flush_dcache_range((u32)addr, (u32)(addr + ALIGN(len, CONFIG_SH_ETHER_ALIGNE_SIZE)))
 #else
 #define flush_cache_wback(...)
 #endif
@@ -205,7 +205,7 @@ static int sh_eth_tx_desc_init(struct sh_eth_dev *eth)
 		goto err;
 	}
 
-	flush_cache_wback((u32)port_info->tx_desc_alloc, alloc_desc_size);
+	flush_cache_wback(port_info->tx_desc_alloc, alloc_desc_size);
 
 	/* Make sure we use a P2 address (non-cacheable) */
 	port_info->tx_desc_base =
-- 
2.15.0

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

* [U-Boot] [PATCH] net: sh-eth: Fix misaligned cache operation warning
  2017-12-01  4:56 [U-Boot] [PATCH] net: sh-eth: Fix misaligned cache operation warning Nobuhiro Iwamatsu
@ 2017-12-05 20:47 ` Joe Hershberger
  2018-01-22 16:54 ` [U-Boot] " Joe Hershberger
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2017-12-05 20:47 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 30, 2017 at 10:56 PM, Nobuhiro Iwamatsu
<iwamatsu@nigauri.org> wrote:
> When we using network on board using sh-eth, it prints a lot of
> "CACHE: Misaligned operation at range" messages.
> This commit fixes this problem.
>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] net: sh-eth: Fix misaligned cache operation warning
  2017-12-01  4:56 [U-Boot] [PATCH] net: sh-eth: Fix misaligned cache operation warning Nobuhiro Iwamatsu
  2017-12-05 20:47 ` Joe Hershberger
@ 2018-01-22 16:54 ` Joe Hershberger
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2018-01-22 16:54 UTC (permalink / raw)
  To: u-boot

Hi Nobuhiro,

https://patchwork.ozlabs.org/patch/843323/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

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

end of thread, other threads:[~2018-01-22 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01  4:56 [U-Boot] [PATCH] net: sh-eth: Fix misaligned cache operation warning Nobuhiro Iwamatsu
2017-12-05 20:47 ` Joe Hershberger
2018-01-22 16:54 ` [U-Boot] " Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.