net/mlx5: Fix failing fw tracer allocation on s390
commita019b36123upstream. 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:f53aaa31cc("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>
This commit is contained in:
parent
1fc9f6c1b5
commit
66c03e4d33
1 changed files with 3 additions and 3 deletions
|
|
@ -796,7 +796,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
|
||||
tracer = kvzalloc(sizeof(*tracer), GFP_KERNEL);
|
||||
if (!tracer)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
|
@ -842,7 +842,7 @@ destroy_workqueue:
|
|||
tracer->dev = NULL;
|
||||
destroy_workqueue(tracer->work_queue);
|
||||
free_tracer:
|
||||
kfree(tracer);
|
||||
kvfree(tracer);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer)
|
|||
mlx5_fw_tracer_destroy_log_buf(tracer);
|
||||
flush_workqueue(tracer->work_queue);
|
||||
destroy_workqueue(tracer->work_queue);
|
||||
kfree(tracer);
|
||||
kvfree(tracer);
|
||||
}
|
||||
|
||||
void mlx5_fw_tracer_event(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue