summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@marvell.com>2016-04-01 11:11:05 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-01 20:36:47 +0200
commit4a0a12d27ca5e892579f3c61c18c8dcfebf425d4 (patch)
tree93fbf0b39a009bf0f2097edeb126e8fd613caf84 /drivers/net/ethernet/marvell
parentnet: mvpp2: fix maybe-uninitialized warning (diff)
downloadlinux-4a0a12d27ca5e892579f3c61c18c8dcfebf425d4.tar.xz
linux-4a0a12d27ca5e892579f3c61c18c8dcfebf425d4.zip
net: mvpp2: use cache_line_size() to get cacheline size
L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size to determine the cacheline size in runtime. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Suggested-by: Marcin Wojtas <mw@semihalf.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 2750cb978f42..868a957f24bb 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -376,7 +376,7 @@
#define MVPP2_RX_PKT_SIZE(mtu) \
ALIGN((mtu) + MVPP2_MH_SIZE + MVPP2_VLAN_TAG_LEN + \
- ETH_HLEN + ETH_FCS_LEN, L1_CACHE_BYTES)
+ ETH_HLEN + ETH_FCS_LEN, cache_line_size())
#define MVPP2_RX_BUF_SIZE(pkt_size) ((pkt_size) + NET_SKB_PAD)
#define MVPP2_RX_TOTAL_SIZE(buf_size) ((buf_size) + MVPP2_SKB_SHINFO_SIZE)