Browse Source

Remove the last remaining visible hack.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
95498fa038
2 changed files with 11 additions and 10 deletions
  1. 9
    10
      src/drivers/infiniband/arbel.c
  2. 2
    0
      src/drivers/infiniband/arbel.h

+ 9
- 10
src/drivers/infiniband/arbel.c View File

1692
 	struct arbelprm_scalar_parameter icm_aux_size;
1692
 	struct arbelprm_scalar_parameter icm_aux_size;
1693
 	struct arbelprm_virtual_physical_mapping map_icm_aux;
1693
 	struct arbelprm_virtual_physical_mapping map_icm_aux;
1694
 	struct arbelprm_virtual_physical_mapping map_icm;
1694
 	struct arbelprm_virtual_physical_mapping map_icm;
1695
+	union arbelprm_doorbell_record *db_rec;
1695
 	size_t icm_offset = 0;
1696
 	size_t icm_offset = 0;
1696
 	unsigned int log_num_qps, log_num_srqs, log_num_ees, log_num_cqs;
1697
 	unsigned int log_num_qps, log_num_srqs, log_num_ees, log_num_cqs;
1697
 	unsigned int log_num_mtts, log_num_mpts, log_num_rdbs, log_num_eqs;
1698
 	unsigned int log_num_mtts, log_num_mpts, log_num_rdbs, log_num_eqs;
1848
 		goto err_map_icm;
1849
 		goto err_map_icm;
1849
 	}
1850
 	}
1850
 
1851
 
1852
+	/* Initialise UAR context */
1853
+	arbel->db_rec = phys_to_virt ( user_to_phys ( arbel->icm, 0 ) +
1854
+				       ( arbel->limits.reserved_uars *
1855
+					 ARBEL_PAGE_SIZE ) );
1856
+	memset ( arbel->db_rec, 0, ARBEL_PAGE_SIZE );
1857
+	db_rec = &arbel->db_rec[ARBEL_GROUP_SEPARATOR_DOORBELL];
1858
+	MLX_FILL_1 ( &db_rec->qp, 1, res, ARBEL_UAR_RES_GROUP_SEP );
1859
+
1851
 	return 0;
1860
 	return 0;
1852
 
1861
 
1853
 	arbel_cmd_unmap_icm ( arbel, ( arbel->icm_len / 4096 ) );
1862
 	arbel_cmd_unmap_icm ( arbel, ( arbel->icm_len / 4096 ) );
2026
 	if ( ( rc = arbel_alloc_icm ( arbel, &init_hca ) ) != 0 )
2035
 	if ( ( rc = arbel_alloc_icm ( arbel, &init_hca ) ) != 0 )
2027
 		goto err_alloc_icm;
2036
 		goto err_alloc_icm;
2028
 
2037
 
2029
-	
2030
-	unsigned long uar_offset = ( arbel->limits.reserved_uars * 4096 );
2031
-	arbel->db_rec = phys_to_virt ( user_to_phys ( arbel->icm,
2032
-						      uar_offset ) );
2033
-	memset ( arbel->db_rec, 0, 4096 );
2034
-	union arbelprm_doorbell_record *db_rec;
2035
-	db_rec = &arbel->db_rec[ARBEL_GROUP_SEPARATOR_DOORBELL];
2036
-	MLX_FILL_1 ( &db_rec->qp, 1, res, ARBEL_UAR_RES_GROUP_SEP );
2037
-
2038
-
2039
 	/* Initialise HCA */
2038
 	/* Initialise HCA */
2040
 	MLX_FILL_1 ( &init_hca, 74, uar_parameters.log_max_uars, 1 );
2039
 	MLX_FILL_1 ( &init_hca, 74, uar_parameters.log_max_uars, 1 );
2041
 	if ( ( rc = arbel_cmd_init_hca ( arbel, &init_hca ) ) != 0 ) {
2040
 	if ( ( rc = arbel_cmd_init_hca ( arbel, &init_hca ) ) != 0 ) {

+ 2
- 0
src/drivers/infiniband/arbel.h View File

79
 
79
 
80
 #define ARBEL_INVALID_LKEY		0x00000100UL
80
 #define ARBEL_INVALID_LKEY		0x00000100UL
81
 
81
 
82
+#define ARBEL_PAGE_SIZE			4096
83
+
82
 #define ARBEL_DB_POST_SND_OFFSET	0x10
84
 #define ARBEL_DB_POST_SND_OFFSET	0x10
83
 
85
 
84
 /*
86
 /*

Loading…
Cancel
Save