diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2017-06-19 22:50:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-22 18:03:00 +0300 |
commit | b381f783baa5b755f065df347f738f303b62e948 (patch) | |
tree | 275757e905e256e4257fa60eca97cb39aa8616ff /drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c | |
parent | 3d09198243b89457649241fb63f809a96a22a8ce (diff) | |
download | linux-b381f783baa5b755f065df347f738f303b62e948.tar.xz |
liquidio: stop using huge static buffer, save 4096k in .data
Only compile-tested - I don't have the hardware.
>From code inspection, octeon_pci_write_core_mem() appears to be safe wrt
unaligned source. In any case, u8 fbuf[] was not guaranteed to be aligned
anyway.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Felix Manlunas <felix.manlunas@cavium.com>
CC: Prasad Kanneganti <prasad.kanneganti@cavium.com>
CC: Derek Chickles <derek.chickles@cavium.com>
CC: David Miller <davem@davemloft.net>
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c b/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c index 5cd96e7d426c..4c85ae643b7b 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c @@ -167,10 +167,10 @@ octeon_pci_read_core_mem(struct octeon_device *oct, void octeon_pci_write_core_mem(struct octeon_device *oct, u64 coreaddr, - u8 *buf, + const u8 *buf, u32 len) { - __octeon_pci_rw_core_mem(oct, coreaddr, buf, len, 0); + __octeon_pci_rw_core_mem(oct, coreaddr, (u8 *)buf, len, 0); } u64 octeon_read_device_mem64(struct octeon_device *oct, u64 coreaddr) |