Commit 88468311 authored by Tariq Toukan's avatar Tariq Toukan Committed by Saeed Mahameed

net/mlx5: Allocate virtually contiguous memory in pci_irq.c

Physical continuity is not necessary, and requested allocation size might
be larger than PAGE_SIZE.
Hence, use v-alloc/free API.
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 773c104d
...@@ -94,8 +94,8 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id, ...@@ -94,8 +94,8 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id,
if (msix_vec_count > max_msix) if (msix_vec_count > max_msix)
return -EOVERFLOW; return -EOVERFLOW;
query_cap = kzalloc(query_sz, GFP_KERNEL); query_cap = kvzalloc(query_sz, GFP_KERNEL);
hca_cap = kzalloc(set_sz, GFP_KERNEL); hca_cap = kvzalloc(set_sz, GFP_KERNEL);
if (!hca_cap || !query_cap) { if (!hca_cap || !query_cap) {
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
...@@ -118,8 +118,8 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id, ...@@ -118,8 +118,8 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id,
MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE << 1); MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE << 1);
ret = mlx5_cmd_exec_in(dev, set_hca_cap, hca_cap); ret = mlx5_cmd_exec_in(dev, set_hca_cap, hca_cap);
out: out:
kfree(hca_cap); kvfree(hca_cap);
kfree(query_cap); kvfree(query_cap);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment