No users are left, delete it.
Showing the changes to drivers/net (2 of 4 files). Show all
Unified · Split
| @@ -837,8 +837,6 @@ static int mlx5_init_once(struct mlx5_core_dev *dev) · 836 unmodified lines | ||
| 837 | 837 | |
| 838 | 838 | mlx5_init_qp_table(dev); |
| 839 | 839 | |
| 840 | − mlx5_init_mkey_table(dev); | |
| 841 | − | |
| 842 | 840 | mlx5_init_reserved_gids(dev); |
| 843 | 841 | |
| 844 | 842 | mlx5_init_clock(dev); |
| @@ -896,7 +894,6 @@ err_rl_cleanup: · 51 unmodified lines | ||
| 896 | 894 | err_tables_cleanup: |
| 897 | 895 | mlx5_geneve_destroy(dev->geneve); |
| 898 | 896 | mlx5_vxlan_destroy(dev->vxlan); |
| 899 | − mlx5_cleanup_mkey_table(dev); | |
| 900 | 897 | mlx5_cleanup_qp_table(dev); |
| 901 | 898 | mlx5_cq_debugfs_cleanup(dev); |
| 902 | 899 | mlx5_events_cleanup(dev); |
| @@ -924,7 +921,6 @@ static void mlx5_cleanup_once(struct mlx5_core_dev *dev) · 21 unmodified lines | ||
| 924 | 921 | mlx5_vxlan_destroy(dev->vxlan); |
| 925 | 922 | mlx5_cleanup_clock(dev); |
| 926 | 923 | mlx5_cleanup_reserved_gids(dev); |
| 927 | − mlx5_cleanup_mkey_table(dev); | |
| 928 | 924 | mlx5_cleanup_qp_table(dev); |
| 929 | 925 | mlx5_cq_debugfs_cleanup(dev); |
| 930 | 926 | mlx5_events_cleanup(dev); |
| @@ -36,16 +36,6 @@ · 35 unmodified lines | ||
| 36 | 36 | #include <linux/mlx5/cmd.h> |
| 37 | 37 | #include "mlx5_core.h" |
| 38 | 38 | |
| 39 | −void mlx5_init_mkey_table(struct mlx5_core_dev *dev) | |
| 40 | −{ | |
| 41 | − xa_init_flags(&dev->priv.mkey_table, XA_FLAGS_LOCK_IRQ); | |
| 42 | −} | |
| 43 | − | |
| 44 | −void mlx5_cleanup_mkey_table(struct mlx5_core_dev *dev) | |
| 45 | −{ | |
| 46 | − WARN_ON(!xa_empty(&dev->priv.mkey_table)); | |
| 47 | −} | |
| 48 | − | |
| 49 | 39 | int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev, |
| 50 | 40 | struct mlx5_core_mkey *mkey, |
| 51 | 41 | struct mlx5_async_ctx *async_ctx, u32 *in, |
| @@ -54,7 +44,6 @@ int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev, · 2 unmodified lines | ||
| 54 | 44 | struct mlx5_async_work *context) |
| 55 | 45 | { |
| 56 | 46 | u32 lout[MLX5_ST_SZ_DW(create_mkey_out)] = {0}; |
| 57 | − struct xarray *mkeys = &dev->priv.mkey_table; | |
| 58 | 47 | u32 mkey_index; |
| 59 | 48 | void *mkc; |
| 60 | 49 | int err; |
| @@ -84,16 +73,7 @@ int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev, · 23 unmodified lines | ||
| 84 | 73 | |
| 85 | 74 | mlx5_core_dbg(dev, "out 0x%x, key 0x%x, mkey 0x%x\n", |
| 86 | 75 | mkey_index, key, mkey->key); |
| 87 | − | |
| 88 | − err = xa_err(xa_store_irq(mkeys, mlx5_base_mkey(mkey->key), mkey, | |
| 89 | − GFP_KERNEL)); | |
| 90 | − if (err) { | |
| 91 | − mlx5_core_warn(dev, "failed xarray insert of mkey 0x%x, %d\n", | |
| 92 | − mlx5_base_mkey(mkey->key), err); | |
| 93 | − mlx5_core_destroy_mkey(dev, mkey); | |
| 94 | − } | |
| 95 | − | |
| 96 | − return err; | |
| 76 | + return 0; | |
| 97 | 77 | } |
| 98 | 78 | EXPORT_SYMBOL(mlx5_core_create_mkey_cb); |
| 99 | 79 | |
| @@ -111,12 +91,6 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, · 11 unmodified lines | ||
| 111 | 91 | { |
| 112 | 92 | u32 out[MLX5_ST_SZ_DW(destroy_mkey_out)] = {0}; |
| 113 | 93 | u32 in[MLX5_ST_SZ_DW(destroy_mkey_in)] = {0}; |
| 114 | − struct xarray *mkeys = &dev->priv.mkey_table; | |
| 115 | − unsigned long flags; | |
| 116 | − | |
| 117 | − xa_lock_irqsave(mkeys, flags); | |
| 118 | − __xa_erase(mkeys, mlx5_base_mkey(mkey->key)); | |
| 119 | − xa_unlock_irqrestore(mkeys, flags); | |
| 120 | 94 | |
| 121 | 95 | MLX5_SET(destroy_mkey_in, in, opcode, MLX5_CMD_OP_DESTROY_MKEY); |
| 122 | 96 | MLX5_SET(destroy_mkey_in, in, mkey_index, mlx5_mkey_to_idx(mkey->key)); |