diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2018-03-13 15:29:27 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-15 10:59:58 -0400 |
commit | c985bd0ed732c8ce7a2e3d91988a09c5a9c1c0c9 (patch) | |
tree | 9256e9d9d3cf7269cb55ef5e1c866278503caf22 /drivers/infiniband/hw | |
parent | 4638a3b2428a66db6e2d934ff200e254763f78a7 (diff) | |
download | linux-c985bd0ed732c8ce7a2e3d91988a09c5a9c1c0c9.tar.gz linux-c985bd0ed732c8ce7a2e3d91988a09c5a9c1c0c9.tar.bz2 linux-c985bd0ed732c8ce7a2e3d91988a09c5a9c1c0c9.zip |
RDMA/mlx5: Guard ODP specific assignments with specific CONFIG
"live" is needed for ODP only and is better to be guarded
by appropriate CONFIG.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 413f90af1bcb..e520b941fc4d 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -1296,7 +1296,9 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, } } +#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING mr->live = 1; +#endif return &mr->ibmr; error: ib_umem_release(umem); @@ -1405,7 +1407,9 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start, } mr->allocated_from_cache = 0; +#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING mr->live = 1; +#endif } else { /* * Send a UMR WQE |