net/mlx5: Fix failing fw tracer allocation on s390
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 9 Apr 2020 07:46:20 +0000 (09:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 May 2020 06:48:52 +0000 (08:48 +0200)
commit040287785f4279e08199e0525bc83938e9a157bf
tree2b2b4e1d4eb967829db0e9b76663a865b03cad6b
parenta8b5611ffee38226e00e683c9ca70dc565fdf1a9
net/mlx5: Fix failing fw tracer allocation on s390

commit a019b36123aec9700b21ae0724710f62928a8bc1 upstream.

On s390 FORCE_MAX_ZONEORDER is 9 instead of 11, thus a larger kzalloc()
allocation as done for the firmware tracer will always fail.

Looking at mlx5_fw_tracer_save_trace(), it is actually the driver itself
that copies the debug data into the trace array and there is no need for
the allocation to be contiguous in physical memory. We can therefor use
kvzalloc() instead of kzalloc() and get rid of the large contiguous
allcoation.

Fixes: f53aaa31cce7 ("net/mlx5: FW tracer, implement tracer logic")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c