[openib-general] [PATCH][2/19] kDAPL: Remove typedefs DAT_VLEN & DAT_VADDR
Tom Duffy
Tom.Duffy at Sun.COM
Sun May 15 11:27:15 PDT 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat/dat.h linux-kernel2/dat/dat.h
--- linux-kernel/dat/dat.h 2005-05-13 11:13:02.563002000 -0700
+++ linux-kernel2/dat/dat.h 2005-05-15 10:35:47.731003000 -0700
@@ -503,9 +503,6 @@ typedef enum dat_psp_flags {
typedef u32 DAT_LMR_CONTEXT;
typedef u32 DAT_RMR_CONTEXT;
-typedef u64 DAT_VLEN;
-typedef u64 DAT_VADDR;
-
/* It is legal for the Consumer to specify zero for segment_length
* of the dat_lmr_triplet. When 0 is specified for the
* segment_length then the other two elements of the
@@ -515,15 +512,15 @@ typedef u64 DAT_VADDR;
struct dat_lmr_triplet {
DAT_LMR_CONTEXT lmr_context;
u32 pad; /* align structure on 64-bit boundry */
- DAT_VADDR virtual_address;
- DAT_VLEN segment_length;
+ u64 virtual_address;
+ u64 segment_length;
};
struct dat_rmr_triplet {
DAT_RMR_CONTEXT rmr_context;
u32 pad; /* align structure on 64-bit boundry */
- DAT_VADDR target_address;
- DAT_VLEN segment_length;
+ u64 target_address;
+ u64 segment_length;
};
typedef enum dat_mem_type {
@@ -561,8 +558,8 @@ struct dat_rmr_param {
/* Endpoint attributes */
struct dat_ep_attr {
- DAT_VLEN max_message_size;
- DAT_VLEN max_rdma_size;
+ u64 max_message_size;
+ u64 max_rdma_size;
DAT_QOS qos;
DAT_COMPLETION_FLAGS recv_completion_flags;
DAT_COMPLETION_FLAGS request_completion_flags;
@@ -767,7 +764,7 @@ struct dat_dto_completion_event_data {
DAT_EP_HANDLE ep_handle;
DAT_DTO_COOKIE user_cookie;
DAT_DTO_COMPLETION_STATUS status;
- DAT_VLEN transfered_length;
+ u64 transfered_length;
};
/* RMR bind completion event data */
@@ -983,13 +980,13 @@ struct dat_lmr_param {
DAT_IA_HANDLE ia_handle;
DAT_MEM_TYPE mem_type;
DAT_REGION_DESCRIPTION region_desc;
- DAT_VLEN length;
+ u64 length;
DAT_PZ_HANDLE pz_handle;
DAT_MEM_PRIV_FLAGS mem_priv;
DAT_LMR_CONTEXT lmr_context;
DAT_RMR_CONTEXT rmr_context;
- DAT_VLEN registered_size;
- DAT_VADDR registered_address;
+ u64 registered_size;
+ u64 registered_address;
};
/* General Interface Adapter attributes.*/
@@ -1009,13 +1006,13 @@ struct dat_ia_attr {
int max_evd_qlen;
int max_iov_segments_per_dto;
int max_lmrs;
- DAT_VLEN max_lmr_block_size;
- DAT_VADDR max_lmr_virtual_address;
+ u64 max_lmr_block_size;
+ u64 max_lmr_virtual_address;
int max_pzs;
- DAT_VLEN max_message_size;
- DAT_VLEN max_rdma_size;
+ u64 max_message_size;
+ u64 max_rdma_size;
int max_rmrs;
- DAT_VADDR max_rmr_target_address;
+ u64 max_rmr_target_address;
int max_srqs;
int max_ep_per_srq;
int max_recv_per_srq;
@@ -1193,11 +1190,11 @@ typedef u32 (*DAT_LMR_QUERY_FUNC)(DAT_LM
typedef u32 (*DAT_LMR_SYNC_RDMA_READ_FUNC)(DAT_IA_HANDLE,
const struct dat_lmr_triplet *,
- DAT_VLEN);
+ u64);
typedef u32 (*DAT_LMR_SYNC_RDMA_WRITE_FUNC)(DAT_IA_HANDLE,
const struct dat_lmr_triplet *,
- DAT_VLEN);
+ u64);
typedef u32 (*DAT_RMR_CREATE_FUNC)(DAT_PZ_HANDLE, DAT_RMR_HANDLE *);
@@ -1249,15 +1246,15 @@ typedef u32 (*DAT_SRQ_POST_RECV_FUNC)(DA
struct dat_lmr_triplet *, DAT_DTO_COOKIE);
typedef u32 (*DAT_LMR_KCREATE_FUNC)(DAT_IA_HANDLE, DAT_MEM_TYPE,
- DAT_REGION_DESCRIPTION, DAT_VLEN,
+ DAT_REGION_DESCRIPTION, u64,
DAT_PZ_HANDLE, DAT_MEM_PRIV_FLAGS,
DAT_MEM_OPTIMIZE_FLAGS, DAT_LMR_HANDLE *,
DAT_LMR_CONTEXT *, DAT_RMR_CONTEXT *,
- DAT_VLEN *, DAT_VADDR *);
+ u64 *, u64 *);
-typedef u32 (*DAT_IA_MEMTYPE_HINT_FUNC)(DAT_IA_HANDLE, DAT_MEM_TYPE, DAT_VLEN,
- DAT_MEM_OPTIMIZE_FLAGS, DAT_VLEN *,
- DAT_VADDR *);
+typedef u32 (*DAT_IA_MEMTYPE_HINT_FUNC)(DAT_IA_HANDLE, DAT_MEM_TYPE, u64,
+ DAT_MEM_OPTIMIZE_FLAGS, u64 *,
+ u64 *);
typedef u32 (*DAT_EVD_KCREATE_FUNC) (DAT_IA_HANDLE, int, DAT_UPCALL_POLICY,
const struct dat_upcall_object *,
@@ -1411,10 +1408,10 @@ static inline u32 dat_get_handle_type(DA
}
static inline u32 dat_ia_memtype_hint(DAT_IA_HANDLE ia, DAT_MEM_TYPE mem_type,
- DAT_VLEN length,
+ u64 length,
DAT_MEM_OPTIMIZE_FLAGS mem_optimize,
- DAT_VLEN *preferred_length,
- DAT_VADDR *preferred_alignment)
+ u64 *preferred_length,
+ u64 *preferred_alignment)
{
return DAT_CALL_PROVIDER_FUNC(ia_memtype_hint_func, ia, mem_type,
length, mem_optimize, preferred_length,
@@ -1635,7 +1632,7 @@ static inline u32 dat_lmr_free(DAT_LMR_H
static inline u32 dat_lmr_sync_rdma_read(DAT_IA_HANDLE ia,
const struct dat_lmr_triplet *iovs,
- DAT_VLEN num_iovs)
+ u64 num_iovs)
{
return DAT_CALL_PROVIDER_FUNC(lmr_sync_rdma_read_func, ia, iovs,
num_iovs);
@@ -1643,7 +1640,7 @@ static inline u32 dat_lmr_sync_rdma_read
static inline u32 dat_lmr_sync_rdma_write(DAT_IA_HANDLE ia,
const struct dat_lmr_triplet *iovs,
- DAT_VLEN num_iovs)
+ u64 num_iovs)
{
return DAT_CALL_PROVIDER_FUNC(lmr_sync_rdma_write_func, ia, iovs,
num_iovs);
@@ -1770,15 +1767,15 @@ static inline u32 dat_srq_set_lw(DAT_SRQ
}
static inline u32 dat_lmr_kcreate(DAT_IA_HANDLE ia, DAT_MEM_TYPE type,
- DAT_REGION_DESCRIPTION region, DAT_VLEN len,
+ DAT_REGION_DESCRIPTION region, u64 len,
DAT_PZ_HANDLE pz,
DAT_MEM_PRIV_FLAGS privileges,
DAT_MEM_OPTIMIZE_FLAGS optimization,
DAT_LMR_HANDLE *lmr_handle,
DAT_LMR_CONTEXT *lmr_context,
DAT_RMR_CONTEXT *rmr_context,
- DAT_VLEN *registered_length,
- DAT_VADDR *registered_address)
+ u64 *registered_length,
+ u64 *registered_address)
{
return DAT_CALL_PROVIDER_FUNC(lmr_kcreate_func, ia, type, region, len,
pz, privileges, optimization, lmr_handle,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_adapter_util.h linux-kernel2/dat-provider/dapl_adapter_util.h
--- linux-kernel/dat-provider/dapl_adapter_util.h 2005-05-13 11:10:25.781004000 -0700
+++ linux-kernel2/dat-provider/dapl_adapter_util.h 2005-05-13 11:38:08.141004000 -0700
@@ -103,10 +103,10 @@ u32 dapl_ib_pd_alloc(DAPL_IA *ia_ptr, DA
u32 dapl_ib_pd_free(DAPL_PZ *pz);
u32 dapl_ib_mr_register(DAPL_IA *ia_ptr, DAPL_LMR *lmr, void *virt_addr,
- DAT_VLEN length, DAT_MEM_PRIV_FLAGS privileges);
+ u64 length, DAT_MEM_PRIV_FLAGS privileges);
u32 dapl_ib_mr_register_physical(DAPL_IA *ia_ptr, DAPL_LMR *lmr,
- void *phys_addr, DAT_VLEN length,
+ void *phys_addr, u64 length,
DAT_MEM_PRIV_FLAGS privileges);
u32 dapl_ib_mr_deregister(DAPL_LMR *lmr);
@@ -119,8 +119,8 @@ u32 dapl_ib_mw_alloc(DAPL_RMR *rmr);
u32 dapl_ib_mw_free(DAPL_RMR *rmr);
u32 dapl_ib_mw_bind(DAPL_RMR *rmr, DAPL_LMR *lmr, DAPL_EP *ep,
- DAPL_COOKIE *cookie, DAT_VADDR virtual_address,
- DAT_VLEN length, DAT_MEM_PRIV_FLAGS mem_priv,
+ DAPL_COOKIE *cookie, u64 virtual_address,
+ u64 length, DAT_MEM_PRIV_FLAGS mem_priv,
boolean_t is_signaled);
u32 dapl_ib_mw_unbind(DAPL_RMR *rmr, DAPL_EP *ep, DAPL_COOKIE *cookie,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl.h linux-kernel2/dat-provider/dapl.h
--- linux-kernel/dat-provider/dapl.h 2005-05-13 11:10:25.777002000 -0700
+++ linux-kernel2/dat-provider/dapl.h 2005-05-13 11:38:08.137002000 -0700
@@ -505,9 +505,9 @@ extern u32 dapl_cr_handoff(DAT_CR_HANDLE
/* EVD Functions */
extern u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
- DAT_VLEN length, DAT_MEM_OPT mem_optimization,
- DAT_VLEN *suggested_length,
- DAT_VADDR *suggested_alignment);
+ u64 length, DAT_MEM_OPT mem_optimization,
+ u64 *suggested_length,
+ u64 *suggested_alignment);
extern u32 dapl_evd_kcreate(DAT_IA_HANDLE ia_handle, int evd_min_qlen,
DAT_UPCALL_POLICY upcall_policy,
@@ -624,14 +624,14 @@ extern u32 dapl_ep_set_watermark(DAT_EP_
extern u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
DAT_REGION_DESCRIPTION region_description,
- DAT_VLEN length, DAT_PZ_HANDLE pz_handle,
+ u64 length, DAT_PZ_HANDLE pz_handle,
DAT_MEM_PRIV_FLAGS privileges,
DAT_MEM_OPT optimization,
DAT_LMR_HANDLE *lmr_handle,
DAT_LMR_CONTEXT *lmr_context,
DAT_RMR_CONTEXT *rmr_context,
- DAT_VLEN *registered_length,
- DAT_VADDR *registered_address);
+ u64 *registered_length,
+ u64 *registered_address);
extern u32 dapl_lmr_query(DAT_LMR_HANDLE, struct dat_lmr_param *);
@@ -639,11 +639,11 @@ extern u32 dapl_lmr_free(DAT_LMR_HANDLE)
extern u32 dapl_lmr_sync_rdma_read(DAT_IA_HANDLE ia_handle,
const struct dat_lmr_triplet *local_segments,
- DAT_VLEN num_segments);
+ u64 num_segments);
extern u32 dapl_lmr_sync_rdma_write(DAT_IA_HANDLE ia_handle,
const struct dat_lmr_triplet *local_segments,
- DAT_VLEN num_segments);
+ u64 num_segments);
/* RMR Functions */
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_ia_memtype_hint.c linux-kernel2/dat-provider/dapl_ia_memtype_hint.c
--- linux-kernel/dat-provider/dapl_ia_memtype_hint.c 2005-05-12 09:28:46.812024000 -0700
+++ linux-kernel2/dat-provider/dapl_ia_memtype_hint.c 2005-05-13 11:38:08.145005000 -0700
@@ -64,9 +64,9 @@
* DAT_MODEL_NOT_SUPPORTED
*/
u32 dapl_ia_memtype_hint(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
- DAT_VLEN length, DAT_MEM_OPT mem_optimization,
- DAT_VLEN *suggested_length,
- DAT_VADDR *suggested_alignment)
+ u64 length, DAT_MEM_OPT mem_optimization,
+ u64 *suggested_length,
+ u64 *suggested_alignment)
{
DAPL_IA *ia_ptr;
u32 dat_status = DAT_SUCCESS;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_lmr_kcreate.c linux-kernel2/dat-provider/dapl_lmr_kcreate.c
--- linux-kernel/dat-provider/dapl_lmr_kcreate.c 2005-05-12 09:28:48.900014000 -0700
+++ linux-kernel2/dat-provider/dapl_lmr_kcreate.c 2005-05-13 12:25:34.349006000 -0700
@@ -38,13 +38,13 @@
#include "dapl_adapter_util.h"
static inline u32 dapl_lmr_create_virtual(DAPL_IA *ia, void *virt_addr,
- DAT_VLEN length, DAPL_PZ *pz,
+ u64 length, DAPL_PZ *pz,
DAT_MEM_PRIV_FLAGS privileges,
DAT_LMR_HANDLE *lmr_handle,
DAT_LMR_CONTEXT *lmr_context,
DAT_RMR_CONTEXT *rmr_context,
- DAT_VLEN *registered_length,
- DAT_VADDR *registered_address)
+ u64 *registered_length,
+ u64 *registered_address)
{
DAPL_LMR *lmr;
DAT_REGION_DESCRIPTION reg_desc;
@@ -98,41 +98,35 @@ static inline u32 dapl_lmr_create_virtua
atomic_inc(&pz->pz_ref_count);
- if (NULL != lmr_handle) {
+ if (lmr_handle)
*lmr_handle = (DAT_LMR_HANDLE) lmr;
- }
- if (NULL != lmr_context) {
+ if (lmr_context)
*lmr_context = (DAT_LMR_CONTEXT) lmr->param.lmr_context;
- }
- if (NULL != rmr_context) {
+ if (rmr_context)
*rmr_context = (DAT_LMR_CONTEXT) lmr->param.rmr_context;
- }
- if (NULL != registered_address) {
- *registered_address = (DAT_VADDR) (uintptr_t) virt_addr;
- }
- if (NULL != registered_length) {
+ if (registered_address)
+ *registered_address = (u64) virt_addr;
+ if (registered_length)
*registered_length = length;
- }
- bail:
+bail:
return dat_status;
}
static inline u32 dapl_lmr_create_physical(DAPL_IA *ia,
DAT_REGION_DESCRIPTION phys_addr,
- DAT_VLEN page_count, DAPL_PZ *pz,
+ u64 page_count, DAPL_PZ *pz,
DAT_MEM_PRIV_FLAGS privileges,
DAT_LMR_HANDLE *lmr_handle,
DAT_LMR_CONTEXT *lmr_context,
DAT_RMR_CONTEXT *rmr_context,
- DAT_VLEN *registered_length,
- DAT_VADDR *registered_address)
+ u64 *registered_length,
+ u64 *registered_address)
{
DAPL_LMR *lmr;
u32 dat_status = DAT_SUCCESS;
- u64 *array;
- array = (u64 *) phys_addr.for_array;
+ u64 *array = phys_addr.for_array;
lmr = dapl_lmr_alloc(ia,
DAT_MEM_TYPE_PHYSICAL,
@@ -145,9 +139,7 @@ static inline u32 dapl_lmr_create_physic
goto bail;
}
- dat_status = dapl_ib_mr_register_physical(ia,
- lmr,
- phys_addr.for_array,
+ dat_status = dapl_ib_mr_register_physical(ia, lmr, phys_addr.for_array,
page_count, privileges);
if (DAT_SUCCESS != dat_status) {
@@ -183,23 +175,18 @@ static inline u32 dapl_lmr_create_physic
atomic_inc(&pz->pz_ref_count);
- if (NULL != lmr_handle) {
+ if (lmr_handle)
*lmr_handle = (DAT_LMR_HANDLE) lmr;
- }
- if (NULL != lmr_context) {
+ if (lmr_context)
*lmr_context = (DAT_LMR_CONTEXT) lmr->param.lmr_context;
- }
- if (NULL != rmr_context) {
+ if (rmr_context)
*rmr_context = (DAT_LMR_CONTEXT) lmr->param.rmr_context;
- }
- if (NULL != registered_address) {
- *registered_address = (DAT_VADDR) array[0];
- }
- if (NULL != registered_length) {
+ if (registered_address)
+ *registered_address = array[0];
+ if (registered_length)
*registered_length = page_count * PAGE_SIZE;
- }
- bail:
+bail:
return dat_status;
}
@@ -209,8 +196,8 @@ static inline u32 dapl_lmr_create_lmr(DA
DAT_LMR_HANDLE *lmr_handle,
DAT_LMR_CONTEXT *lmr_context,
DAT_RMR_CONTEXT *rmr_context,
- DAT_VLEN *registered_length,
- DAT_VADDR *registered_address)
+ u64 *registered_length,
+ u64 *registered_address)
{
DAPL_LMR *lmr;
DAT_REGION_DESCRIPTION reg_desc;
@@ -271,24 +258,17 @@ static inline u32 dapl_lmr_create_lmr(DA
atomic_inc(&pz->pz_ref_count);
- if (NULL != lmr_handle) {
+ if (lmr_handle)
*lmr_handle = (DAT_LMR_HANDLE) lmr;
- }
- if (NULL != lmr_context) {
+ if (lmr_context)
*lmr_context = (DAT_LMR_CONTEXT) lmr->param.lmr_context;
- }
- if (NULL != rmr_context) {
+ if (rmr_context)
*rmr_context = (DAT_LMR_CONTEXT) lmr->param.rmr_context;
- }
- if (NULL != registered_address) {
- *registered_address =
- (DAT_VADDR) (uintptr_t) original_lmr->param.region_desc.
- for_va;
- }
- if (NULL != registered_length) {
+ if (registered_address)
+ *registered_address = (u64)original_lmr->param.region_desc.for_va;
+ if (registered_length)
*registered_length = original_lmr->param.length;
- }
- bail:
+bail:
return dat_status;
}
@@ -322,10 +302,10 @@ static inline u32 dapl_lmr_create_lmr(DA
*
*/
u32 dapl_lmr_kcreate(DAT_IA_HANDLE ia_handle, DAT_MEM_TYPE mem_type,
- DAT_REGION_DESCRIPTION region_description, DAT_VLEN length,
+ DAT_REGION_DESCRIPTION region_description, u64 length,
DAT_PZ_HANDLE pz_handle, DAT_MEM_PRIV_FLAGS privileges,
DAT_MEM_OPT optimization, DAT_LMR_HANDLE *lmr_handle,
- DAT_LMR_CONTEXT *lmr_context, DAT_RMR_CONTEXT *rmr_context, DAT_VLEN *registered_length, DAT_VADDR *registered_address)
+ DAT_LMR_CONTEXT *lmr_context, DAT_RMR_CONTEXT *rmr_context, u64 *registered_length, u64 *registered_address)
{
DAPL_IA *ia;
DAPL_PZ *pz;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_lmr_sync_rdma_read.c linux-kernel2/dat-provider/dapl_lmr_sync_rdma_read.c
--- linux-kernel/dat-provider/dapl_lmr_sync_rdma_read.c 2005-05-12 09:28:46.987010000 -0700
+++ linux-kernel2/dat-provider/dapl_lmr_sync_rdma_read.c 2005-05-13 11:38:08.152012000 -0700
@@ -58,7 +58,7 @@
*/
u32 dapl_lmr_sync_rdma_read(DAT_IA_HANDLE ia_handle,
const struct dat_lmr_triplet *local_segments,
- DAT_VLEN num_segments)
+ u64 num_segments)
{
DAPL_IA *ia_ptr;
u32 dat_status = DAT_SUCCESS;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_lmr_sync_rdma_write.c linux-kernel2/dat-provider/dapl_lmr_sync_rdma_write.c
--- linux-kernel/dat-provider/dapl_lmr_sync_rdma_write.c 2005-05-12 09:28:48.503024000 -0700
+++ linux-kernel2/dat-provider/dapl_lmr_sync_rdma_write.c 2005-05-13 11:38:08.155001000 -0700
@@ -43,7 +43,7 @@
*/
u32 dapl_lmr_sync_rdma_write(DAT_IA_HANDLE ia_handle,
const struct dat_lmr_triplet *local_segments,
- DAT_VLEN num_segments)
+ u64 num_segments)
{
DAPL_IA *ia_ptr;
u32 dat_status = DAT_SUCCESS;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_lmr_util.c linux-kernel2/dat-provider/dapl_lmr_util.c
--- linux-kernel/dat-provider/dapl_lmr_util.c 2005-04-27 11:38:34.874000000 -0700
+++ linux-kernel2/dat-provider/dapl_lmr_util.c 2005-05-13 11:38:08.157005000 -0700
@@ -41,7 +41,7 @@
DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
DAT_MEM_TYPE mem_type,
DAT_REGION_DESCRIPTION region_desc,
- DAT_VLEN length,
+ u64 length,
DAT_PZ_HANDLE pz_handle, DAT_MEM_PRIV_FLAGS mem_priv)
{
DAPL_LMR *lmr;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_lmr_util.h linux-kernel2/dat-provider/dapl_lmr_util.h
--- linux-kernel/dat-provider/dapl_lmr_util.h 2005-04-20 12:42:06.921005000 -0700
+++ linux-kernel2/dat-provider/dapl_lmr_util.h 2005-05-13 11:38:08.160008000 -0700
@@ -48,7 +48,7 @@
extern DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
DAT_MEM_TYPE mem_type,
DAT_REGION_DESCRIPTION region_desc,
- DAT_VLEN length,
+ u64 length,
DAT_PZ_HANDLE pz_handle,
DAT_MEM_PRIV_FLAGS mem_priv);
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_mr_util.c linux-kernel2/dat-provider/dapl_mr_util.c
--- linux-kernel/dat-provider/dapl_mr_util.c 2005-04-20 12:42:07.252004000 -0700
+++ linux-kernel2/dat-provider/dapl_mr_util.c 2005-05-13 12:17:35.132016000 -0700
@@ -56,37 +56,29 @@
*
*/
-DAT_VADDR dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type)
+u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type)
{
+ DAPL_LMR *lmr;
+
switch (type) {
case DAT_MEM_TYPE_VIRTUAL:
- {
- return (DAT_VADDR) (uintptr_t) desc.for_va;
- }
+ return (u64)desc.for_va;
case DAT_MEM_TYPE_LMR:
- {
- DAPL_LMR *lmr;
-
- lmr = (DAPL_LMR *) desc.for_lmr_handle;
+ lmr = (DAPL_LMR *) desc.for_lmr_handle;
- /* Since this function is recoursive we cannot inline it */
- return dapl_mr_get_address(lmr->param.region_desc,
- lmr->param.mem_type);
- }
+ /* Since this function is recoursive we cannot inline it */
+ return dapl_mr_get_address(lmr->param.region_desc,
+ lmr->param.mem_type);
case DAT_MEM_TYPE_PHYSICAL:
- {
- return desc.for_pa;
- }
+ return desc.for_pa;
default:
- {
- /*
- * The following kDAPL memory types have not been implemented:
- * DAT_MEM_TYPE_PLATFORM
- * DAT_MEM_TYPE_IA
- * DAT_MEM_TYPE_BYPASS
- */
- dapl_os_assert(0);
- return 0;
- }
+ /*
+ * The following kDAPL memory types have not been implemented:
+ * DAT_MEM_TYPE_PLATFORM
+ * DAT_MEM_TYPE_IA
+ * DAT_MEM_TYPE_BYPASS
+ */
+ dapl_os_assert(0);
+ return 0;
}
}
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_mr_util.h linux-kernel2/dat-provider/dapl_mr_util.h
--- linux-kernel/dat-provider/dapl_mr_util.h 2005-05-11 08:28:11.969010000 -0700
+++ linux-kernel2/dat-provider/dapl_mr_util.h 2005-05-13 12:14:14.433011000 -0700
@@ -40,24 +40,7 @@
#include "dapl.h"
#include "dapl_hash.h"
-/*********************************************************************
- * *
- * Function Prototypes *
- * *
- *********************************************************************/
-
-extern DAT_VADDR
-dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type);
-
-static __inline__ boolean_t
-dapl_mr_bounds_check(DAT_VADDR addr_a,
- DAT_VLEN length_a, DAT_VADDR addr_b, DAT_VLEN length_b);
-
-/*********************************************************************
- * *
- * Inline Functions *
- * *
- *********************************************************************/
+extern u64 dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type);
/*
* dapl_mr_bounds_check
@@ -67,15 +50,13 @@ dapl_mr_bounds_check(DAT_VADDR addr_a,
*
*/
-static __inline__ boolean_t
-dapl_mr_bounds_check(DAT_VADDR addr_a,
- DAT_VLEN length_a, DAT_VADDR addr_b, DAT_VLEN length_b)
+static inline boolean_t dapl_mr_bounds_check(u64 addr_a, u64 length_a,
+ u64 addr_b, u64 length_b)
{
- if ((addr_a <= addr_b) && (addr_b + length_b) <= (addr_a + length_a)) {
+ if ((addr_a <= addr_b) && (addr_b + length_b) <= (addr_a + length_a))
return TRUE;
- } else {
+ else
return FALSE;
- }
}
#endif /* DAPL_MR_UTIL_H */
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/dat-provider/dapl_openib_util.c linux-kernel2/dat-provider/dapl_openib_util.c
--- linux-kernel/dat-provider/dapl_openib_util.c 2005-05-13 11:22:30.684000000 -0700
+++ linux-kernel2/dat-provider/dapl_openib_util.c 2005-05-13 11:38:08.167002000 -0700
@@ -391,14 +391,14 @@ u32 dapl_ib_pd_free(DAPL_PZ *pz)
*
*/
u32 dapl_ib_mr_register(DAPL_IA *ia, DAPL_LMR *lmr, void *virt_addr,
- DAT_VLEN length, DAT_MEM_PRIV_FLAGS privileges)
+ u64 length, DAT_MEM_PRIV_FLAGS privileges)
{
/* ITBD virtual memory registration ??? */
return (DAT_SUCCESS);
}
u32 dapl_ib_mr_register_physical(DAPL_IA *ia_ptr, DAPL_LMR *lmr,
- void *phys_addr, DAT_VLEN length,
+ void *phys_addr, u64 length,
DAT_MEM_PRIV_FLAGS privileges)
{
int ib_status;
@@ -577,8 +577,8 @@ u32 dapl_ib_mw_free(DAPL_RMR *rmr)
*
*/
u32 dapl_ib_mw_bind(DAPL_RMR *rmr, DAPL_LMR *lmr, DAPL_EP *ep,
- DAPL_COOKIE *cookie, DAT_VADDR virtual_address,
- DAT_VLEN length, DAT_MEM_PRIV_FLAGS mem_priv,
+ DAPL_COOKIE *cookie, u64 virtual_address,
+ u64 length, DAT_MEM_PRIV_FLAGS mem_priv,
boolean_t is_signaled)
{
int ib_status;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/include/dapl_bpool.h linux-kernel2/test/dapltest/include/dapl_bpool.h
--- linux-kernel/test/dapltest/include/dapl_bpool.h 2005-05-12 09:34:59.295003000 -0700
+++ linux-kernel2/test/dapltest/include/dapl_bpool.h 2005-05-13 11:38:08.177004000 -0700
@@ -42,9 +42,9 @@ struct Bpool_tag {
int seg_size;
int num_segs; /* num segments */
unsigned char *buffer_start; /* Start of buffer area */
- DAT_VLEN buffer_size; /* Size of data buffer (rounded) */
- DAT_VADDR reg_addr; /* start of registered area */
- DAT_VLEN reg_size; /* size of registered area */
+ u64 buffer_size; /* Size of data buffer (rounded) */
+ u64 reg_addr; /* start of registered area */
+ u64 reg_size; /* size of registered area */
DAT_EP_HANDLE ep_handle; /* EP area is registered to */
DAT_LMR_HANDLE lmr_handle; /* local access */
DAT_LMR_CONTEXT lmr_context;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/include/dapl_performance_test.h linux-kernel2/test/dapltest/include/dapl_performance_test.h
--- linux-kernel/test/dapltest/include/dapl_performance_test.h 2005-05-13 11:10:25.821009000 -0700
+++ linux-kernel2/test/dapltest/include/dapl_performance_test.h 2005-05-13 11:37:44.334000000 -0700
@@ -49,7 +49,7 @@ typedef struct {
/* RDMA info */
DAT_RMR_CONTEXT Rdma_Context;
- DAT_VADDR Rdma_Address;
+ u64 Rdma_Address;
} Performance_Test_Op_t;
typedef struct
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/include/dapl_proto.h linux-kernel2/test/dapltest/include/dapl_proto.h
--- linux-kernel/test/dapltest/include/dapl_proto.h 2005-05-13 11:10:25.827001000 -0700
+++ linux-kernel2/test/dapltest/include/dapl_proto.h 2005-05-13 11:37:44.339003000 -0700
@@ -96,7 +96,7 @@ boolean_t DT_Bpool_Destroy (P
Bpool * bpool_ptr);
unsigned char *DT_Bpool_GetBuffer (Bpool * bpool_ptr, int index);
-DAT_VADDR DT_Bpool_GetRegBuff (Bpool * bpool_ptr, int index);
+u64 DT_Bpool_GetRegBuff (Bpool * bpool_ptr, int index);
int DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index);
struct dat_lmr_triplet *DT_Bpool_GetIOV (Bpool * bpool_ptr, int index);
DAT_LMR_CONTEXT DT_Bpool_GetLMR (Bpool * bpool_ptr, int index);
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/include/dapl_transaction_test.h linux-kernel2/test/dapltest/include/dapl_transaction_test.h
--- linux-kernel/test/dapltest/include/dapl_transaction_test.h 2005-05-13 11:10:25.830004000 -0700
+++ linux-kernel2/test/dapltest/include/dapl_transaction_test.h 2005-05-13 11:37:44.342006000 -0700
@@ -44,7 +44,7 @@ typedef struct
/* RDMA info */
DAT_RMR_CONTEXT Rdma_Context;
- DAT_VADDR Rdma_Address;
+ u64 Rdma_Address;
} Transaction_Test_Op_t;
typedef struct
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_bpool.c linux-kernel2/test/dapltest/test/dapl_bpool.c
--- linux-kernel/test/dapltest/test/dapl_bpool.c 2005-05-12 09:34:59.340003000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_bpool.c 2005-05-13 11:38:08.187002000 -0700
@@ -40,8 +40,8 @@
static void DTs_CreateIovec (
void **region_addr,
u64 *buf_region,
- DAT_VLEN buffer_size,
- DAT_VLEN *bp_len)
+ u64 buffer_size,
+ u64 *bp_len)
{
int ii;
u_int64_t ptr_addr;
@@ -102,7 +102,7 @@ DT_BpoolAlloc (
int alloc_size, bpool_size;
DAT_REGION_DESCRIPTION region;
u32 ret = DAT_SUCCESS;
- DAT_VLEN bp_len;
+ u64 bp_len;
DAT_MEM_TYPE DT_mem_type;
u64 buf_region[10];
if (pt_ptr != NULL) {
@@ -385,7 +385,7 @@ DT_Bpool_GetBuffer (Bpool * bpool_ptr, i
}
/*****************************************************************************/
-DAT_VADDR
+u64
DT_Bpool_GetRegBuff (Bpool * bpool_ptr, int index)
{
return ( bpool_ptr->reg_addr + index * bpool_ptr->seg_size );
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_fft_mem.c linux-kernel2/test/dapltest/test/dapl_fft_mem.c
--- linux-kernel/test/dapltest/test/dapl_fft_mem.c 2005-05-12 09:28:43.415002000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_fft_mem.c 2005-05-13 11:38:08.191004000 -0700
@@ -36,13 +36,13 @@ int DT_mem_generic (Params_t *params_ptr
u32 rc, expect;
FFT_Connection_t conn;
DAT_REGION_DESCRIPTION region;
- DAT_VLEN reg_size;
+ u64 reg_size;
DAT_LMR_HANDLE lmr_handle;
DAT_LMR_CONTEXT lmr_context;
- DAT_VADDR reg_addr;
+ u64 reg_addr;
unsigned char *alloc_ptr;
int res;
- DAT_VLEN buffer_size;
+ u64 buffer_size;
DAT_IA_HANDLE ia_handle;
DAT_PZ_HANDLE pz_handle;
DT_Tdep_Print_Head *phead;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_fft_queryinfo.c linux-kernel2/test/dapltest/test/dapl_fft_queryinfo.c
--- linux-kernel/test/dapltest/test/dapl_fft_queryinfo.c 2005-05-13 11:01:18.714000000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_fft_queryinfo.c 2005-05-13 11:38:08.195001000 -0700
@@ -64,9 +64,9 @@ int DT_queryinfo_basic (Params_t *params
DAT_RMR_HANDLE rmr_handle;
struct dat_rmr_param rmr_param;
DAT_REGION_DESCRIPTION region;
- DAT_VLEN reg_size;
- DAT_VADDR reg_addr;
- DAT_VLEN buffer_size;
+ u64 reg_size;
+ u64 reg_addr;
+ u64 buffer_size;
unsigned char *alloc_ptr;
DT_Tdep_Print_Head *phead;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_limit.c linux-kernel2/test/dapltest/test/dapl_limit.c
--- linux-kernel/test/dapltest/test/dapl_limit.c 2005-05-12 09:34:59.354000000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_limit.c 2005-05-13 11:38:08.203004000 -0700
@@ -885,8 +885,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
for (w = 0; w < cmd->width; w++)
{
DAT_REGION_DESCRIPTION region;
- DAT_VLEN reg_size;
- DAT_VADDR reg_addr;
+ u64 reg_size;
+ u64 reg_addr;
hdl_sets[w].lmr_buffer = DT_Mdep_Malloc (DFLT_BUFFSZ);
if (!hdl_sets[w].lmr_buffer)
@@ -1045,7 +1045,7 @@ limit_test ( DT_Tdep_Print_Head *phead,
struct dat_lmr_triplet *iovp = &hdlptr[w * cmd->width + i];
DAT_DTO_COOKIE cookie;
- iovp->virtual_address = (DAT_VADDR) (uintptr_t)
+ iovp->virtual_address = (u64) (uintptr_t)
hdl_sets[i].lmr_buffer;
iovp->segment_length = DFLT_BUFFSZ;
iovp->lmr_context = hdl_sets[i].lmr_context;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_performance_client.c linux-kernel2/test/dapltest/test/dapl_performance_client.c
--- linux-kernel/test/dapltest/test/dapl_performance_client.c 2005-05-13 11:10:25.841005000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_performance_client.c 2005-05-13 11:37:44.366001000 -0700
@@ -278,7 +278,7 @@ DT_Performance_Test_Client_Phase2 (
for (i = 0; i < op->num_segs; i++)
{
iov[i].pad = 0U;
- iov[i].virtual_address = /*(DAT_VADDR) (uintptr_t) */
+ iov[i].virtual_address = /*(u64) (uintptr_t) */
DT_Bpool_GetRegBuff (op->bp, i);
iov[i].segment_length = op->seg_size;
iov[i].lmr_context = DT_Bpool_GetLMR (op->bp, i);
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_performance_server.c linux-kernel2/test/dapltest/test/dapl_performance_server.c
--- linux-kernel/test/dapltest/test/dapl_performance_server.c 2005-05-13 11:13:02.570005000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_performance_server.c 2005-05-13 11:37:44.370004000 -0700
@@ -305,7 +305,7 @@ DT_Performance_Test_Server_Exchange (
test_ptr->ep_context.op.Rdma_Context =
DT_Bpool_GetRMR (test_ptr->ep_context.op.bp, 0);
- test_ptr->ep_context.op.Rdma_Address = /*(DAT_VADDR) (uintptr_t)*/
+ test_ptr->ep_context.op.Rdma_Address = /*(u64) (uintptr_t)*/
DT_Bpool_GetRegBuff (test_ptr->ep_context.op.bp, 0);
/*
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_performance_util.c linux-kernel2/test/dapltest/test/dapl_performance_util.c
--- linux-kernel/test/dapltest/test/dapl_performance_util.c 2005-05-13 11:10:25.846002000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_performance_util.c 2005-05-13 11:37:44.374000000 -0700
@@ -438,7 +438,7 @@ DT_performance_post_rdma_op (
for (j = 0; j < op->num_segs; j++)
{
iov[j].pad = 0U;
- iov[j].virtual_address = /*(DAT_VADDR) (uintptr_t)*/
+ iov[j].virtual_address = /*(u64) (uintptr_t)*/
DT_Bpool_GetRegBuff (op->bp, j);
iov[j].segment_length = op->seg_size;
iov[j].lmr_context = DT_Bpool_GetLMR (op->bp, j);
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_test_util.c linux-kernel2/test/dapltest/test/dapl_test_util.c
--- linux-kernel/test/dapltest/test/dapl_test_util.c 2005-05-12 09:34:59.364000000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_test_util.c 2005-05-13 11:37:44.379003000 -0700
@@ -175,7 +175,7 @@ DT_post_recv_buffer (DT_Tdep_Print_Head
* Prep the inputs
*/
iov->virtual_address = DT_Bpool_GetRegBuff(bp,index);
- /* iov->virtual_address = (DAT_VADDR) (uintptr_t) buff; */
+ /* iov->virtual_address = (u64) (uintptr_t) buff; */
iov->segment_length = size;
iov->lmr_context = lmr_c;
cookie.as_64 = (u64)0UL;
@@ -220,7 +220,7 @@ DT_post_send_buffer (DT_Tdep_Print_Head
* Prep the inputs
*/
iov->virtual_address = DT_Bpool_GetRegBuff(bp,index);
- /* iov->virtual_address = (DAT_VADDR) (uintptr_t) buff; */
+ /* iov->virtual_address = (u64) (uintptr_t) buff; */
iov->segment_length = size;
iov->lmr_context = lmr_c;
cookie.as_64 = (u64)0UL;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_transaction_test.c linux-kernel2/test/dapltest/test/dapl_transaction_test.c
--- linux-kernel/test/dapltest/test/dapl_transaction_test.c 2005-05-13 11:13:02.581001000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_transaction_test.c 2005-05-13 11:37:44.390001000 -0700
@@ -858,7 +858,7 @@ retry:
test_ptr->ep_context[i].op[j].Rdma_Context =
DT_Bpool_GetRMR (test_ptr->ep_context[i].op[j].bp, 0);
test_ptr->ep_context[i].op[j].Rdma_Address =
- /* (DAT_VADDR) (uintptr_t) */
+ /* (u64) (uintptr_t) */
DT_Bpool_GetRegBuff (test_ptr->ep_context[i].op[j].bp,0);
DT_Tdep_PT_Debug (3, (phead,
"not-us: RDMA/RD [ va=" F64x ", ctxt=%x ]\n",
@@ -894,7 +894,7 @@ retry:
test_ptr->ep_context[i].op[j].Rdma_Context =
DT_Bpool_GetRMR (test_ptr->ep_context[i].op[j].bp, 0);
test_ptr->ep_context[i].op[j].Rdma_Address =
- /* (DAT_VADDR)(uintptr_t)*/DT_Bpool_GetRegBuff (test_ptr->ep_context[i].op[j].bp,0);
+ /* (u64)(uintptr_t)*/DT_Bpool_GetRegBuff (test_ptr->ep_context[i].op[j].bp,0);
DT_Tdep_PT_Debug (3, (phead,
"not-us: RDMA/WR [ va=" F64x ", ctxt=%x ]\n",
test_ptr->ep_context[i].op[j].Rdma_Address,
diff -Nurp -X /home/tduffy/dontdiff linux-kernel/test/dapltest/test/dapl_transaction_util.c linux-kernel2/test/dapltest/test/dapl_transaction_util.c
--- linux-kernel/test/dapltest/test/dapl_transaction_util.c 2005-05-12 09:28:43.551016000 -0700
+++ linux-kernel2/test/dapltest/test/dapl_transaction_util.c 2005-05-13 11:37:44.396002000 -0700
@@ -49,7 +49,7 @@ DT_handle_post_recv_buf (DT_Tdep_Print_H
for (j = 0; j < op->num_segs; j++)
{
iov[j].pad = 0U;
- iov[j].virtual_address = /*(DAT_VADDR) (uintptr_t) */
+ iov[j].virtual_address = /*(u64) (uintptr_t) */
DT_Bpool_GetRegBuff (op->bp, j);
iov[j].segment_length = op->seg_size;
iov[j].lmr_context = DT_Bpool_GetLMR (op->bp, j);
@@ -112,7 +112,7 @@ DT_handle_send_op (DT_Tdep_Print_Head *p
{
iov[j].pad = 0U;
- iov[j].virtual_address = /*(DAT_VADDR) (uintptr_t)*/
+ iov[j].virtual_address = /*(u64) (uintptr_t)*/
DT_Bpool_GetRegBuff (op->bp, j);
iov[j].segment_length = op->seg_size;
iov[j].lmr_context = DT_Bpool_GetLMR (op->bp, j);
@@ -492,7 +492,7 @@ DT_handle_rdma_op (DT_Tdep_Print_Head *p
for (j = 0; j < op->num_segs; j++)
{
iov[j].pad = 0U;
- iov[j].virtual_address = /*(DAT_VADDR) (uintptr_t)*/
+ iov[j].virtual_address = /*(u64) (uintptr_t)*/
DT_Bpool_GetRegBuff (op->bp, j);
iov[j].segment_length = op->seg_size;
iov[j].lmr_context = DT_Bpool_GetLMR (op->bp, j);
@@ -502,7 +502,7 @@ DT_handle_rdma_op (DT_Tdep_Print_Head *p
| (((uintptr_t) DT_Bpool_GetBuffer (op->bp, 0)) & 0xffffffffUL));
rmr_triplet.pad = 0U;
- rmr_triplet.target_address = /*(DAT_VADDR) (uintptr_t)*/ op->Rdma_Address;
+ rmr_triplet.target_address = /*(u64) (uintptr_t)*/ op->Rdma_Address;
rmr_triplet.segment_length = op->seg_size * op->num_segs;
rmr_triplet.rmr_context = op->Rdma_Context;
More information about the general
mailing list