[ptr64] Remove #pragma warning( disable :4305)
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 6 May 2008 07:57:23 +0000 (07:57 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 6 May 2008 07:57:23 +0000 (07:57 +0000)
Signed by:XaleX

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1132 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

13 files changed:
core/al/al_qp.c
core/al/al_verbs.h
core/al/kernel/al_ndi_cm.c
core/al/kernel/al_proxy.c
core/al/kernel/al_proxy_verbs.c
core/al/user/ual_cm_cep.c
core/al/user/ual_mcast.c
core/al/user/ual_mw.c
core/al/user/ual_qp.c
inc/iba/ib_types.h
ulp/opensm/user/include/iba/ib_types.h
ulp/opensm/user/include/iba/ib_types_extended.h
ulp/wsd/user/ibsp_iblow.c

index 3bd869b..838dc1e 100644 (file)
@@ -62,6 +62,7 @@
 #include "al_verbs.h"\r
 \r
 #include "ib_common.h"\r
+#include "basetsd.h"\r
 \r
 \r
 #define UNBOUND_PORT_GUID              0\r
index 37ac14e..2f7f3c6 100644 (file)
@@ -402,7 +402,7 @@ verbs_ci_call(
 \r
 #define verbs_check_av(h_av)   ((h_av)->h_ci_av || (h_av)->obj.hdl)\r
 #define convert_av_handle(h_qp, h_av) \\r
-       ((h_qp)->h_ci_qp?(h_av)->h_ci_av:(ib_av_handle_t VOID_PTR64)(h_av)->obj.hdl)\r
+       ((h_qp)->h_ci_qp?(h_av)->h_ci_av:(ib_av_handle_t VOID_PTR64)HDL_TO_PTR((h_av)->obj.hdl))\r
 #define verbs_destroy_av(h_av) \\r
        ual_destroy_av(h_av)\r
 \r
index 46d5f03..91a0452 100644 (file)
@@ -891,7 +891,7 @@ __ndi_pr_query_cb(
        ib_qp_mod_t qp_mod;
        ib_path_rec_t *p_path_rec;
        ual_ndi_req_cm_ioctl_in_t *p_req = (ual_ndi_req_cm_ioctl_in_t* VOID_PTR64)p_query_rec->query_context;
-       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)p_req->h_qp;
+       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(p_req->h_qp);
        net32_t cid, old_cid;
 
        AL_ENTER( AL_DBG_NDI );
@@ -994,7 +994,7 @@ __ndi_pr_query(
        ib_gid_pair_t user_query;
        ib_query_req_t query_req;
        ib_api_status_t status;
-       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)p_req->h_qp;
+       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(p_req->h_qp);
 
        AL_ENTER( AL_DBG_NDI );
 
@@ -1041,7 +1041,7 @@ __ndi_ats_query_cb(
        cl_ioctl_handle_t h_ioctl;
        ib_service_record_t *service_record;
        ual_ndi_req_cm_ioctl_in_t *p_req = (ual_ndi_req_cm_ioctl_in_t* VOID_PTR64)p_query_rec->query_context;
-       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)p_req->h_qp;
+       ib_qp_handle_t VOID_PTR64 h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(p_req->h_qp);
 
        AL_ENTER( AL_DBG_NDI );
 
@@ -1583,3 +1583,4 @@ exit:
 }
 
 
+
index 899d426..b381127 100644 (file)
@@ -862,7 +862,7 @@ __proxy_pnp_cb(
                break;\r
        }\r
 \r
-       p_evt_rec->pnp.h_pnp = (ib_pnp_handle_t VOID_PTR64)p_pnp_rec->h_pnp->obj.hdl;\r
+       p_evt_rec->pnp.h_pnp = (ib_pnp_handle_t VOID_PTR64)HDL_TO_PTR(p_pnp_rec->h_pnp->obj.hdl);\r
        p_pnp_rec->h_pnp->obj.hdl_valid = TRUE;\r
 \r
        hdl =\r
index e0f4422..af1964d 100644 (file)
@@ -352,7 +352,7 @@ proxy_ca_err_cb(
        cb_info.rec_type = CA_ERROR_REC;\r
        /* Return the Proxy's open_ca handle and the user's context */\r
        cb_info.ioctl_rec.event_rec = *p_err_rec;\r
-       cb_info.ioctl_rec.event_rec.handle.h_ca = (ib_ca_handle_t VOID_PTR64)h_ca->obj.hdl;\r
+       cb_info.ioctl_rec.event_rec.handle.h_ca = (ib_ca_handle_t VOID_PTR64)HDL_TO_PTR(h_ca->obj.hdl);\r
 \r
        /* The proxy handle must be valid now. */\r
        if( !h_ca->obj.hdl_valid )\r
@@ -987,7 +987,7 @@ proxy_srq_err_cb(
        cb_info.rec_type = SRQ_ERROR_REC;\r
        /* Return the Proxy's SRQ handle and the user's context */\r
        cb_info.ioctl_rec.event_rec = *p_err_rec;\r
-       cb_info.ioctl_rec.event_rec.handle.h_srq = (ib_srq_handle_t VOID_PTR64)h_srq->obj.hdl;\r
+       cb_info.ioctl_rec.event_rec.handle.h_srq = (ib_srq_handle_t VOID_PTR64) HDL_TO_PTR(h_srq->obj.hdl);\r
 \r
        /* The proxy handle must be valid now. */\r
        if( !h_srq->obj.hdl_valid )\r
@@ -1291,7 +1291,7 @@ proxy_qp_err_cb(
        cb_info.rec_type = QP_ERROR_REC;\r
        /* Return the Proxy's QP handle and the user's context */\r
        cb_info.ioctl_rec.event_rec = *p_err_rec;\r
-       cb_info.ioctl_rec.event_rec.handle.h_qp = (ib_qp_handle_t VOID_PTR64)h_qp->obj.hdl;\r
+       cb_info.ioctl_rec.event_rec.handle.h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(h_qp->obj.hdl);\r
 \r
        /* The proxy handle must be valid now. */\r
        if( !h_qp->obj.hdl_valid )\r
@@ -1491,7 +1491,7 @@ proxy_query_qp(
                if( p_ioctl->out.attr.h_pd )\r
                {\r
                        p_ioctl->out.attr.h_pd =\r
-                               (ib_pd_handle_t VOID_PTR64)p_ioctl->out.attr.h_pd->obj.hdl;\r
+                               (ib_pd_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);\r
                }\r
                else\r
                {\r
@@ -1500,7 +1500,7 @@ proxy_query_qp(
                if( p_ioctl->out.attr.h_sq_cq )\r
                {\r
                        p_ioctl->out.attr.h_sq_cq =\r
-                               (ib_cq_handle_t VOID_PTR64)p_ioctl->out.attr.h_sq_cq->obj.hdl;\r
+                               (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_sq_cq->obj.hdl);\r
                }\r
                else\r
                {\r
@@ -1509,7 +1509,7 @@ proxy_query_qp(
                if( p_ioctl->out.attr.h_rq_cq )\r
                {\r
                        p_ioctl->out.attr.h_rq_cq =\r
-                               (ib_cq_handle_t VOID_PTR64)p_ioctl->out.attr.h_rq_cq->obj.hdl;\r
+                               (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_rq_cq->obj.hdl);\r
                }\r
                else\r
                {\r
@@ -1518,7 +1518,7 @@ proxy_query_qp(
                if( p_ioctl->out.attr.h_srq )\r
                {\r
                        p_ioctl->out.attr.h_srq =\r
-                               (ib_srq_handle_t VOID_PTR64)p_ioctl->out.attr.h_srq->obj.hdl;\r
+                               (ib_srq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_srq->obj.hdl);\r
                }\r
                else\r
                {\r
@@ -2063,7 +2063,7 @@ proxy_cq_err_cb(
        cb_info.rec_type = CQ_ERROR_REC;\r
        /* Return the Proxy's cq handle and the user's context */\r
        cb_info.ioctl_rec.event_rec = *p_err_rec;\r
-       cb_info.ioctl_rec.event_rec.handle.h_cq = (ib_cq_handle_t VOID_PTR64)h_cq->obj.hdl;\r
+       cb_info.ioctl_rec.event_rec.handle.h_cq = (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(h_cq->obj.hdl);\r
 \r
        /* The proxy handle must be valid now. */\r
        if( !h_cq->obj.hdl_valid )\r
@@ -3059,7 +3059,7 @@ proxy_query_mr(
        {\r
                /* Replace the pd handle with proxy's handle */\r
                p_ioctl->out.attr.h_pd =\r
-                       (ib_pd_handle_t VOID_PTR64)p_ioctl->out.attr.h_pd->obj.hdl;\r
+                       (ib_pd_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);\r
        }\r
        else\r
        {\r
index 90d9a41..0ceab33 100644 (file)
@@ -506,7 +506,7 @@ al_cep_pre_req(
     cl_memclr(&ioctl, sizeof(ioctl));\r
        ioctl.in.cid = cid;\r
        ioctl.in.cm_req = *p_cm_req;\r
-       ioctl.in.cm_req.h_qp = (ib_qp_handle_t VOID_PTR64)p_cm_req->h_qp->obj.hdl;\r
+       ioctl.in.cm_req.h_qp = (ib_qp_handle_t VOID_PTR64) HDL_TO_PTR(p_cm_req->h_qp->obj.hdl);\r
        ioctl.in.paths[0] = *(p_cm_req->p_primary_path);\r
        if( p_cm_req->p_alt_path )\r
                ioctl.in.paths[1] = *(p_cm_req->p_alt_path);\r
@@ -633,7 +633,7 @@ al_cep_pre_rep(
        ioctl.in.context = context;\r
        ioctl.in.cid = cid;\r
        ioctl.in.cm_rep = *p_cm_rep;\r
-       ioctl.in.cm_rep.h_qp = (ib_qp_handle_t VOID_PTR64)p_cm_rep->h_qp->obj.hdl;\r
+       ioctl.in.cm_rep.h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(p_cm_rep->h_qp->obj.hdl);\r
        /* Copy private data, if any. */\r
        if( p_cm_rep->p_rep_pdata )\r
        {\r
@@ -981,7 +981,7 @@ al_cep_lap(
     cl_memclr(&ioctl,sizeof (ioctl));\r
        ioctl.cid = cid;\r
        ioctl.cm_lap = *p_cm_lap;\r
-       ioctl.cm_lap.h_qp = (ib_qp_handle_t VOID_PTR64)p_cm_lap->h_qp->obj.hdl;\r
+       ioctl.cm_lap.h_qp = (ib_qp_handle_t VOID_PTR64) HDL_TO_PTR(p_cm_lap->h_qp->obj.hdl);\r
        ioctl.alt_path = *(p_cm_lap->p_alt_path);\r
        /* Copy private data, if any. */\r
        if( p_cm_lap->p_lap_pdata )\r
@@ -1037,7 +1037,7 @@ al_cep_pre_apr(
     cl_memclr(&ioctl, sizeof (ioctl));\r
        ioctl.in.cid = cid;\r
        ioctl.in.cm_apr = *p_cm_apr;\r
-       ioctl.in.cm_apr.h_qp = (ib_qp_handle_t VOID_PTR64)p_cm_apr->h_qp->obj.hdl;\r
+       ioctl.in.cm_apr.h_qp = (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(p_cm_apr->h_qp->obj.hdl);\r
        if( p_cm_apr->p_info )\r
        {\r
                if( p_cm_apr->info_length > IB_APR_INFO_SIZE )\r
index 9f5707e..9fb7378 100644 (file)
@@ -98,7 +98,7 @@ ual_attach_mcast(
                status = ioctl_buf.out.status;\r
                if( status == IB_SUCCESS ){\r
                        h_mcast->obj.hdl = ioctl_buf.out.h_attach;\r
-                       h_mcast->h_ci_mcast = (ib_mcast_handle_t VOID_PTR64)ioctl_buf.out.h_attach;\r
+                       h_mcast->h_ci_mcast = (ib_mcast_handle_t VOID_PTR64) HDL_TO_PTR(ioctl_buf.out.h_attach);\r
                }\r
        }\r
 \r
index 93ed1c9..a98479a 100644 (file)
@@ -278,7 +278,7 @@ ual_bind_mw(
        mw_ioctl.in.h_mw = h_mw->obj.hdl;\r
        mw_ioctl.in.h_qp = h_qp->obj.hdl;\r
        mw_ioctl.in.mw_bind = *p_mw_bind;\r
-       mw_ioctl.in.mw_bind.h_mr = (ib_mr_handle_t VOID_PTR64)p_mw_bind->h_mr->obj.hdl;\r
+       mw_ioctl.in.mw_bind.h_mr = (ib_mr_handle_t VOID_PTR64) HDL_TO_PTR(p_mw_bind->h_mr->obj.hdl);\r
 \r
        cl_status = do_al_dev_ioctl( UAL_BIND_MW,\r
                &mw_ioctl.in, sizeof(mw_ioctl.in), &mw_ioctl.out, sizeof(mw_ioctl.out),\r
index 0163245..fb369a6 100644 (file)
@@ -313,12 +313,12 @@ ual_create_qp(
        qp_ioctl.in.h_pd = h_pd->obj.hdl;\r
        qp_ioctl.in.qp_create = *p_qp_create;\r
        qp_ioctl.in.qp_create.h_rq_cq =\r
-               (ib_cq_handle_t VOID_PTR64)p_qp_create->h_rq_cq->obj.hdl;\r
+               (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_qp_create->h_rq_cq->obj.hdl);\r
        qp_ioctl.in.qp_create.h_sq_cq =\r
-               (ib_cq_handle_t VOID_PTR64)p_qp_create->h_sq_cq->obj.hdl;\r
+               (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_qp_create->h_sq_cq->obj.hdl);\r
        if (p_qp_create->h_srq)\r
                qp_ioctl.in.qp_create.h_srq =\r
-                       (ib_srq_handle_t VOID_PTR64)p_qp_create->h_srq->obj.hdl;\r
+                       (ib_srq_handle_t VOID_PTR64)HDL_TO_PTR(p_qp_create->h_srq->obj.hdl);\r
        qp_ioctl.in.context = h_qp;\r
        qp_ioctl.in.ev_notify = (h_qp->pfn_event_cb != NULL) ? TRUE : FALSE;\r
 \r
index 8a2dc31..6a6392e 100644 (file)
 #define STRUCT_PTR64\r
 #endif\r
 \r
+#define HDL_TO_PTR(hdl) Handle64ToHandle( (void * __ptr64) (hdl))\r
 \r
-#pragma warning( disable : 4201)\r
-#pragma warning( disable :4305)\r
+#pragma warning( disable : 4201) //nameless union/structure\r
 \r
 \r
-#define CONCAT(str1, str2) str1##str2\r
+#define IB_CONCAT(str1, str2) str1##str2\r
 \r
 #define TO_LONG_PTR(type,member_name) \\r
-    union { type member_name;  uint64_t CONCAT(member_name,_padding) ; }\r
+    union { type member_name;  uint64_t IB_CONCAT(member_name,_padding) ; }\r
 \r
 \r
 \r
@@ -8966,7 +8966,6 @@ ib_get_async_event_str(
 */\r
 typedef struct _ib_event_rec\r
 {\r
-#pragma warning( disable : 4201)\r
 \r
        TO_LONG_PTR(void* ,     context) ;\r
        ib_async_event_t                type;\r
@@ -11422,3 +11421,4 @@ typedef struct _ib_cm_rdma_req
 #endif /* __IB_TYPES_H__ */\r
 \r
 \r
+\r
index 3d1c630..91cebce 100644 (file)
@@ -81,10 +81,10 @@ BEGIN_C_DECLS
 #define STRUCT_PTR64
 #endif
 
-#define CONCAT(str1, str2) str1##str2
+#define IB_CONCAT(str1, str2) str1##str2
 
 #define TO_LONG_PTR(type,member_name) \
-    union { type member_name;  uint64_t CONCAT(member_name,_padding) ; }
+    union { type member_name;  uint64_t IB_CONCAT(member_name,_padding) ; }
 
 
 
@@ -10422,3 +10422,4 @@ END_C_DECLS
 
 #endif /* __IB_TYPES_H__ */
 
+
index 62ae056..cfad271 100644 (file)
        #define __ptr64\r
 #endif\r
 \r
-#ifndef FUNC_PTR64\r
-#define FUNC_PTR64\r
-#endif\r
-\r
-#ifndef TYPEDEF_PTR64\r
-#define TYPEDEF_PTR64\r
-#endif\r
-\r
-#ifndef VOID_PTR64\r
-#define VOID_PTR64\r
-#endif\r
-\r
-#ifndef STRUCT_PTR64\r
-#define STRUCT_PTR64\r
-#endif\r
-\r
-\r
-//#ifndef CONCAT\r
-#define CONCAT(str1, str2) str1##str2\r
-//#endif\r
-\r
-//#ifndef T0_LONG_PTR\r
-#define TO_LONG_PTR(type,member_name) \\r
-    union { type member_name;  uint64_t CONCAT(member_name,_padding) ; }\r
-//#endif\r
-\r
 /*\r
  *     Defines the size of user available data in communication management MADs\r
  */\r
index d5d0e13..f6c9ca2 100644 (file)
@@ -66,8 +66,8 @@ complete_wq(
 \r
        IBSP_ENTER( IBSP_DBG_IO );\r
 \r
-       wr = (struct _wr * VOID_PTR64)wc->wr_id;\r
-       p_recv_wr = (struct _recv_wr * VOID_PTR64)wc->wr_id;\r
+       wr = (struct _wr * VOID_PTR64)HDL_TO_PTR(wc->wr_id);\r
+       p_recv_wr = (struct _recv_wr * VOID_PTR64)HDL_TO_PTR(wc->wr_id);\r
 \r
        CL_ASSERT( wr );\r
 \r