net: mvpp2: use cache_line_size() to get cacheline size
authorJisheng Zhang <jszhang@marvell.com>
Fri, 1 Apr 2016 09:11:05 +0000 (17:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Apr 2016 18:36:47 +0000 (14:36 -0400)
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>
drivers/net/ethernet/marvell/mvpp2.c

index 2750cb978f423f56528ce9d2aee1156c1e4446ee..868a957f24bbc03749968b9847d5c4601e1a792c 100644 (file)
 
 #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)