main.c (c13cac2a21b44c6d18a2cf5485f26eee0fb686f6) | main.c (91b74bf5310b22ac3286d8e9b5354b77f41af178) |
---|---|
1/* 2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 6531 unchanged lines hidden (view full) --- 6540 log_doorbell_bar_size); 6541 log_doorbell_stride = MLX5_CAP_DEV_VDPA_EMULATION(mdev, 6542 log_doorbell_stride); 6543 var_table->hw_start_addr = dev->mdev->bar_addr + 6544 MLX5_CAP64_DEV_VDPA_EMULATION(mdev, 6545 doorbell_bar_offset); 6546 bar_size = (1ULL << log_doorbell_bar_size) * 4096; 6547 var_table->stride_size = 1ULL << log_doorbell_stride; | 1/* 2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 6531 unchanged lines hidden (view full) --- 6540 log_doorbell_bar_size); 6541 log_doorbell_stride = MLX5_CAP_DEV_VDPA_EMULATION(mdev, 6542 log_doorbell_stride); 6543 var_table->hw_start_addr = dev->mdev->bar_addr + 6544 MLX5_CAP64_DEV_VDPA_EMULATION(mdev, 6545 doorbell_bar_offset); 6546 bar_size = (1ULL << log_doorbell_bar_size) * 4096; 6547 var_table->stride_size = 1ULL << log_doorbell_stride; |
6548 var_table->num_var_hw_entries = div64_u64(bar_size, var_table->stride_size); | 6548 var_table->num_var_hw_entries = div_u64(bar_size, 6549 var_table->stride_size); |
6549 mutex_init(&var_table->bitmap_lock); 6550 var_table->bitmap = bitmap_zalloc(var_table->num_var_hw_entries, 6551 GFP_KERNEL); 6552 return (var_table->bitmap) ? 0 : -ENOMEM; 6553} 6554 6555static void mlx5_ib_stage_caps_cleanup(struct mlx5_ib_dev *dev) 6556{ --- 705 unchanged lines hidden --- | 6550 mutex_init(&var_table->bitmap_lock); 6551 var_table->bitmap = bitmap_zalloc(var_table->num_var_hw_entries, 6552 GFP_KERNEL); 6553 return (var_table->bitmap) ? 0 : -ENOMEM; 6554} 6555 6556static void mlx5_ib_stage_caps_cleanup(struct mlx5_ib_dev *dev) 6557{ --- 705 unchanged lines hidden --- |