Unverified Commit 500214f8 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 4e729553 c08f6dd3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -293,7 +293,6 @@ struct hns_roce_hem_table {
	/* Single obj size */
	unsigned long	obj_size;
	unsigned long	table_chunk_size;
	int		lowmem;
	struct mutex	mutex;
	struct hns_roce_hem **hem;
	u64		**bt_l1;
@@ -795,7 +794,7 @@ struct hns_roce_caps {
	u32		max_sq_sg;
	u32		max_sq_inline;
	u32		max_rq_sg;
	u32		max_extend_sg;
	u32		rsv0;
	u32		num_qps;
	u32		reserved_qps;
	int		num_qpc_timer;
@@ -818,7 +817,7 @@ struct hns_roce_caps {
	int		num_comp_vectors;
	int		num_other_vectors;
	u32		num_mtpts;
	u32		num_mtt_segs;
	u32		rsv1;
	u32		num_srqwqe_segs;
	u32		num_idx_segs;
	int		reserved_mrws;
+3 −9
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ static int alloc_mhop_hem(struct hns_roce_dev *hr_dev,
	 * alloc bt space chunk for MTT/CQE.
	 */
	size = table->type < HEM_TYPE_MTT ? mhop->buf_chunk_size : bt_size;
	flag = (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | __GFP_NOWARN;
	flag = GFP_KERNEL | __GFP_NOWARN;
	table->hem[index->buf] = hns_roce_alloc_hem(hr_dev, size >> PAGE_SHIFT,
						    size, flag);
	if (!table->hem[index->buf]) {
@@ -588,8 +588,7 @@ int hns_roce_table_get(struct hns_roce_dev *hr_dev,
	table->hem[i] = hns_roce_alloc_hem(hr_dev,
				       table->table_chunk_size >> PAGE_SHIFT,
				       table->table_chunk_size,
				       (table->lowmem ? GFP_KERNEL :
					GFP_HIGHUSER) | __GFP_NOWARN);
				       GFP_KERNEL | __GFP_NOWARN);
	if (!table->hem[i]) {
		ret = -ENOMEM;
		goto out;
@@ -738,9 +737,6 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev,
	int length;
	int i, j;

	if (!table->lowmem)
		return NULL;

	mutex_lock(&table->mutex);

	if (!hns_roce_check_whether_mhop(hr_dev, table->type)) {
@@ -796,8 +792,7 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev,

int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
			    struct hns_roce_hem_table *table, u32 type,
			    unsigned long obj_size, unsigned long nobj,
			    int use_lowmem)
			    unsigned long obj_size, unsigned long nobj)
{
	unsigned long obj_per_chunk;
	unsigned long num_hem;
@@ -874,7 +869,6 @@ int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
	table->type = type;
	table->num_hem = num_hem;
	table->obj_size = obj_size;
	table->lowmem = use_lowmem;
	mutex_init(&table->mutex);

	return 0;
+1 −2
Original line number Diff line number Diff line
@@ -111,8 +111,7 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev,
			  dma_addr_t *dma_handle);
int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
			    struct hns_roce_hem_table *table, u32 type,
			    unsigned long obj_size, unsigned long nobj,
			    int use_lowmem);
			    unsigned long obj_size, unsigned long nobj);
void hns_roce_cleanup_hem_table(struct hns_roce_dev *hr_dev,
				struct hns_roce_hem_table *table);
void hns_roce_cleanup_hem(struct hns_roce_dev *hr_dev);
+0 −2
Original line number Diff line number Diff line
@@ -2257,7 +2257,6 @@ static void apply_func_caps(struct hns_roce_dev *hr_dev)
	caps->qpc_timer_hop_num = HNS_ROCE_HOP_NUM_0;
	caps->cqc_timer_hop_num = HNS_ROCE_HOP_NUM_0;

	caps->num_mtt_segs = HNS_ROCE_V2_MAX_MTT_SEGS;
	caps->num_srqwqe_segs = HNS_ROCE_V2_MAX_SRQWQE_SEGS;
	caps->num_idx_segs = HNS_ROCE_V2_MAX_IDX_SEGS;

@@ -2347,7 +2346,6 @@ static int hns_roce_query_caps(struct hns_roce_dev *hr_dev)
	caps->max_sq_inline = le16_to_cpu(resp_a->max_sq_inline);
	caps->max_rq_sg = le16_to_cpu(resp_a->max_rq_sg);
	caps->max_rq_sg = roundup_pow_of_two(caps->max_rq_sg);
	caps->max_extend_sg = le32_to_cpu(resp_a->max_extend_sg);
	caps->num_qpc_timer = le16_to_cpu(resp_a->num_qpc_timer);
	caps->max_srq_sges = le16_to_cpu(resp_a->max_srq_sges);
	caps->max_srq_sges = roundup_pow_of_two(caps->max_srq_sges);
+1 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@
#define HNS_ROCE_V2_MTT_ENTRY_SZ		64
#define HNS_ROCE_V2_AEQE_VEC_NUM		1
#define HNS_ROCE_V2_ABNORMAL_VEC_NUM		1
#define HNS_ROCE_V2_MAX_MTT_SEGS		0x1000000
#define HNS_ROCE_V2_MAX_SRQWQE_SEGS		0x1000000
#define HNS_ROCE_V2_MAX_IDX_SEGS		0x1000000

@@ -1153,7 +1152,7 @@ struct hns_roce_query_pf_caps_a {
	__le16 max_sq_sg;
	__le16 max_sq_inline;
	__le16 max_rq_sg;
	__le32 max_extend_sg;
	__le32 rsv0;
	__le16 num_qpc_timer;
	__le16 num_cqc_timer;
	__le16 max_srq_sges;
Loading