[ofw] RE: [PATCH] First pass at cleaning up XXX_PTR64 from IBAL

Fab Tillier ftillier at windows.microsoft.com
Mon Jun 30 14:48:11 PDT 2008


Hi Leo,

Here's an updated patch that should hopefully apply for you.  It was created using GNU diff, and applies cleanly to my tree (1310).  You need to apply this patch before the deadcode patch (coming shortly).

To apply:
patch -p 1 < ibal_cleanup.patch

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al.c trunk\core\al\al.c
--- old\core\al\al.c    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al.c  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -68,11 +69,11 @@ free_al(
 #ifdef CL_KERNEL
 ib_api_status_t
 ib_close_al(
-       IN              const   ib_al_handle_t  FUNC_PTR64      h_al )
+       IN              const   ib_al_handle_t                          h_al )
 #else
 ib_api_status_t
 do_close_al(
-       IN              const   ib_al_handle_t  FUNC_PTR64      h_al )
+       IN              const   ib_al_handle_t                          h_al )
 #endif
 {
        AL_ENTER( AL_DBG_MGR );
@@ -96,7 +97,7 @@ void
 destroying_al(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        cl_list_item_t                  *p_list_item;
        al_sa_req_t                             *p_sa_req;

@@ -124,7 +125,7 @@ destroying_al(

 static void
 __free_mads(
-       IN                              const   ib_al_handle_t VOID_PTR64               h_al )
+       IN                              const   ib_al_handle_t          h_al )
 {
        cl_list_item_t                  *p_list_item;
        al_mad_element_t                *p_mad_element;
@@ -153,7 +154,7 @@ void
 free_al(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;

        CL_ASSERT( p_obj );
        h_al = PARENT_STRUCT( p_obj, ib_al_t, obj );
@@ -178,7 +179,7 @@ ib_query_ca_by_guid(
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size )
 {
-       ib_ca_handle_t VOID_PTR64               h_ca;
+       ib_ca_handle_t          h_ca;
        ib_api_status_t         status;

        AL_ENTER( AL_DBG_CA );
@@ -210,7 +211,7 @@ ib_query_ca_by_guid(

 void
 al_insert_mad(
-       IN              const   ib_al_handle_t VOID_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_mad_element_t*       const   p_mad )
 {
        /* Assert that the MAD does not already have an owner. */
@@ -250,7 +251,7 @@ al_remove_mad(

 void
 al_handoff_mad(
-       IN              const   ib_al_handle_t VOID_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              ib_mad_element_t*       const   p_mad_element )
 {
        al_mad_element_t                *p_mad;
@@ -272,7 +273,7 @@ al_handoff_mad(

 void
 al_insert_key(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_pool_key_t* const            p_pool_key )
 {
        ref_al_obj( &h_al->obj );
@@ -313,8 +314,8 @@ al_remove_key(

 void
 al_dereg_pool(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN                              ib_pool_handle_t FUNC_PTR64 const               h_pool )
+       IN              const   ib_al_handle_t                          h_al,
+       IN                              ib_pool_handle_t const          h_pool )
 {
        cl_qlist_t                              destroy_list;
        cl_list_item_t                  *p_list_item, *p_next_item;
@@ -366,7 +367,7 @@ al_dereg_pool(

 void
 al_insert_query(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_query_t* const                       p_query )
 {
        p_query->h_al = h_al;
@@ -407,8 +408,8 @@ __match_query(

 void
 ib_cancel_query(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   ib_query_handle_t FUNC_PTR64                    h_query )
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   ib_query_handle_t                       h_query )
 {
        cl_list_item_t  *p_item;

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al.h trunk\core\al\al.h
--- old\core\al\al.h    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al.h  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -99,7 +100,7 @@ typedef struct _ib_al
 ib_api_status_t
 init_al(
        IN                              al_obj_t                                        *p_parent_obj,
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al );
+       IN              const   ib_al_handle_t                          h_al );


 void
@@ -118,21 +119,21 @@ free_al(
  */
 ib_api_status_t
 al_insert_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_pnp );
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   ib_pnp_handle_t                         h_pnp );

 /*
  * Remove a pnp registration from the PnP vector.
  */
 void
 al_remove_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_pnp );
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   ib_pnp_handle_t                         h_pnp );


 void
 al_insert_mad(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_mad_element_t*       const   p_mad );


@@ -143,13 +144,13 @@ al_remove_mad(

 void
 al_handoff_mad(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              ib_mad_element_t*       const   p_mad_element );


 void
 al_insert_key(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_pool_key_t* const            p_pool_key );


@@ -160,13 +161,13 @@ al_remove_key(

 void
 al_dereg_pool(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN                              ib_pool_handle_t FUNC_PTR64 const               h_pool );
+       IN              const   ib_al_handle_t                          h_al,
+       IN                              ib_pool_handle_t const          h_pool );


 void
 al_insert_query(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              al_query_t* const                       p_query );


@@ -176,7 +177,7 @@ al_remove_query(

 void
 al_insert_conn(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_cm_handle_t                          h_conn );

 void
@@ -188,14 +189,14 @@ al_remove_conn(
 // TODO: we can remove the type parameter.
 uint64_t
 al_hdl_insert(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              void* const                                     p_obj,
        IN              const   uint32_t                                        type );


 static inline uint64_t
 al_hdl_lock_insert(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              void* const                                     p_obj,
        IN              const   uint32_t                                        type )
 {
@@ -209,10 +210,10 @@ al_hdl_lock_insert(

 void
 al_hdl_free(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl );

-//static inline size_t  //NEW_SIZE_T
+
 static inline uint64_t
 al_hdl_insert_obj(
        IN                              al_obj_t* const                         p_obj )
@@ -247,34 +248,29 @@ al_hdl_free_obj(

 al_obj_t*
 al_hdl_ref(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
-       //IN            const   size_t                                  hdl, //NEW_SIZE_T
        IN              const   uint32_t                                        type );

 /* Validate an object. */
 void*
 al_hdl_chk(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
-       //IN            const   size_t                                  hdl, //NEW_SIZE_T
        IN              const   uint32_t                                        type );

 /* Validate and remove an object. */
 void*
 al_hdl_get(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
-       //IN            const   size_t                                  hdl, //NEW_SIZE_T
        IN              const   uint32_t                                        type );

 /* Validate and removes a MAD element. */
 static inline ib_mad_element_t*
 al_hdl_get_mad(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   uint64_t                                        hdl
-       //IN            const   size_t                                  hdl //NEW_SIZE_T
-       )
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   uint64_t                                        hdl )
 {
        return (ib_mad_element_t*)al_hdl_get( h_al, hdl, AL_OBJ_TYPE_H_MAD );
 }
@@ -282,17 +278,15 @@ al_hdl_get_mad(
 /* Validate and reference a connection.  Used for MRA */
 struct _al_conn*
 al_hdl_ref_conn(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
-       //IN            const   size_t                                  hdl, //NEW_SIZE_T
        IN              const   uint32_t                                        sub_type );

 /* Validate, reference, and remove a connection. */
 struct _al_conn*
 al_hdl_get_conn(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
-       //IN            const   size_t                                  hdl, //NEW_SIZE_T
        IN              const   uint32_t                                        sub_type );

 #endif /* CL_KERNEL */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_av.c trunk\core\al\al_av.c
--- old\core\al\al_av.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_av.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -66,11 +67,11 @@ av_ctor(
                OUT                     cl_pool_item_t** const          pp_pool_item )
 {
        ib_api_status_t                 status;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;

        UNUSED_PARAM( context );

-       h_av = (ib_av_handle_t VOID_PTR64)p_object;
+       h_av = (ib_av_handle_t)p_object;
        cl_memclr( h_av, sizeof( ib_av_t ) );

        construct_al_obj( &h_av->obj, AL_OBJ_TYPE_H_AV );
@@ -81,7 +82,7 @@ av_ctor(
                return CL_ERROR;
        }

-       *pp_pool_item = &((ib_av_handle_t VOID_PTR64)p_object)->obj.pool_item;
+       *pp_pool_item = &((ib_av_handle_t)p_object)->obj.pool_item;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &h_av->obj );
@@ -114,13 +115,13 @@ av_dtor(

 ib_api_status_t
 create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_av_handle_t FUNC_PTR64* const                ph_av,
+               OUT                     ib_av_handle_t* const           ph_av,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        ib_api_status_t                 status;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;

        CL_ASSERT( h_pd );

@@ -167,7 +168,7 @@ create_av(

 ib_api_status_t
 ib_destroy_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av )
+       IN              const   ib_av_handle_t                          h_av )
 {
        AL_ENTER( AL_DBG_AV );

@@ -191,7 +192,7 @@ __cleanup_av(
        IN                              struct _al_obj                          *p_obj )
 {
        ib_api_status_t                 status;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;

        CL_ASSERT( p_obj );
        h_av = PARENT_STRUCT( p_obj, ib_av_t, obj );
@@ -214,7 +215,7 @@ static void
 __return_av(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;

        h_av = PARENT_STRUCT( p_obj, ib_av_t, obj );
        reset_al_obj( p_obj );
@@ -225,9 +226,9 @@ __return_av(

 ib_api_status_t
 ib_query_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
                OUT                     ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd )
+               OUT                     ib_pd_handle_t* const           ph_pd )
 {
        return query_av( h_av, p_av_attr, ph_pd, NULL );
 }
@@ -236,9 +237,9 @@ ib_query_av(

 ib_api_status_t
 query_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
                OUT                     ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+               OUT                     ib_pd_handle_t* const           ph_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        ib_api_status_t                 status;
@@ -273,7 +274,7 @@ query_av(

 ib_api_status_t
 ib_modify_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
        IN              const   ib_av_attr_t* const                     p_av_mod )
 {
        return modify_av( h_av, p_av_mod, NULL );
@@ -282,7 +283,7 @@ ib_modify_av(

 ib_api_status_t
 modify_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
        IN              const   ib_av_attr_t* const                     p_av_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_av.h trunk\core\al\al_av.h
--- old\core\al\al_av.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_av.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -42,7 +43,7 @@
 typedef struct _ib_av
 {
        al_obj_t                                        obj;
-TO_LONG_PTR(   ib_av_handle_t ,                                h_ci_av) ;              /* Actual HW CI AV. */
+       ib_av_handle_t                          h_ci_av;                /* Actual HW CI AV. */

        ib_av_attr_t                            av_attr;

@@ -66,23 +67,23 @@ av_dtor(

 ib_api_status_t
 create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_av_handle_t FUNC_PTR64* const                ph_av,
+               OUT                     ib_av_handle_t* const           ph_av,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 query_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
                OUT                     ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+               OUT                     ib_pd_handle_t* const           ph_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 modify_av(
-       IN              const   ib_av_handle_t FUNC_PTR64                               h_av,
+       IN              const   ib_av_handle_t                          h_av,
        IN              const   ib_av_attr_t* const                     p_av_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_ca.c trunk\core\al\al_ca.c
--- old\core\al\al_ca.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_ca.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -71,11 +72,11 @@ __free_ca(

 ib_api_status_t
 ib_open_ca(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_net64_t                                      ca_guid,
        IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,
        IN              const   void* const                                     ca_context,
-               OUT                     ib_ca_handle_t FUNC_PTR64* const                ph_ca )
+               OUT                     ib_ca_handle_t* const           ph_ca )
 {
        ib_api_status_t status;

@@ -97,14 +98,14 @@ ib_open_ca(

 ib_api_status_t
 open_ca(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_net64_t                                      ca_guid,
        IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,
        IN              const   void* const                                     ca_context,
-               OUT                     ib_ca_handle_t FUNC_PTR64* const                ph_ca,
+               OUT                     ib_ca_handle_t* const           ph_ca,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf OPTIONAL )
 {
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_api_status_t                 status;
        al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_CA;

@@ -116,7 +117,7 @@ open_ca(
        }

        /* Allocate a CA instance. */
-       h_ca = (ib_ca_handle_t VOID_PTR64)cl_zalloc( sizeof( ib_ca_t ) );
+       h_ca = (ib_ca_handle_t)cl_zalloc( sizeof( ib_ca_t ) );
        if( !h_ca )
        {
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
@@ -183,7 +184,7 @@ open_ca(
  */
 ib_api_status_t
 ib_close_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_CA );
@@ -210,7 +211,7 @@ __cleanup_ca(
        IN                              struct _al_obj                          *p_obj )
 {
 #if defined(CL_KERNEL)
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;

        CL_ASSERT( p_obj );
        h_ca = PARENT_STRUCT( p_obj, ib_ca_t, obj );
@@ -232,7 +233,7 @@ static void
 __free_ca(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;

        CL_ASSERT( p_obj );
        h_ca = PARENT_STRUCT( p_obj, ib_ca_t, obj );
@@ -245,7 +246,7 @@ __free_ca(

 ib_api_status_t
 ib_query_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size )
 {
@@ -256,7 +257,7 @@ ib_query_ca(

 ib_api_status_t
 query_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
@@ -286,7 +287,7 @@ query_ca(

 ib_api_status_t
 ib_modify_ca(
-       IN              const ib_ca_handle_t FUNC_PTR64                         h_ca,
+       IN              const ib_ca_handle_t                            h_ca,
        IN              const uint8_t                                           port_num,
        IN              const ib_ca_mod_t                                       ca_mod,
        IN              const ib_port_attr_mod_t* const         p_port_attr_mod )
@@ -319,10 +320,10 @@ ib_modify_ca(
  */
 ib_api_status_t
 ib_alloc_pd(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   ib_pd_type_t                            pd_type,
        IN              const   void * const                            pd_context,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd )
+               OUT                     ib_pd_handle_t* const           ph_pd )
 {
        ib_api_status_t                 status;

@@ -348,11 +349,11 @@ ib_alloc_pd(

 ib_api_status_t
 ib_create_cq(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN      OUT                     ib_cq_create_t* const           p_cq_create,
        IN              const   void* const                                     cq_context,
        IN              const   ib_pfn_event_cb_t                       pfn_cq_event_cb OPTIONAL,
-               OUT                     ib_cq_handle_t FUNC_PTR64* const                ph_cq )
+               OUT                     ib_cq_handle_t* const           ph_cq )
 {
        ib_api_status_t                 status;

@@ -378,8 +379,8 @@ ib_create_cq(

 ib_api_status_t
 al_convert_to_ci_handles(
-       IN                              void* FUNC_PTR64 *              const   dst_handle_array,
-       IN              const   void* FUNC_PTR64 *              const   src_handle_array,
+       IN                              void**                          const   dst_handle_array,
+       IN              const   void**                          const   src_handle_array,
        IN                              uint32_t                                        num_handles )
 {
        uint32_t                i;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_ca.h trunk\core\al\al_ca.h
--- old\core\al\al_ca.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_ca.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -48,7 +49,7 @@ typedef struct _ib_ca
        ib_pfn_event_cb_t               pfn_event_cb;
        cl_list_item_t                  list_item;
 #if defined(CL_KERNEL)
-TO_LONG_PTR(   ib_ca_handle_t ,                        h_um_ca) ;
+       ib_ca_handle_t                  h_um_ca;
 #endif

 }      ib_ca_t;
@@ -56,17 +57,17 @@ TO_LONG_PTR(        ib_ca_handle_t ,                        h_um_ca)

 ib_api_status_t
 open_ca(
-       IN              const   ib_al_handle_t  FUNC_PTR64                              h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_net64_t                                      ca_guid,
        IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,
        IN              const   void* const                                     ca_context,
-               OUT                     ib_ca_handle_t FUNC_PTR64* const                ph_ca,
+               OUT                     ib_ca_handle_t* const           ph_ca,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf OPTIONAL );


 ib_api_status_t
 query_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );
@@ -74,8 +75,8 @@ query_ca(

 ib_api_status_t
 al_convert_to_ci_handles(
-       IN                              void* FUNC_PTR64 *              const   dst_handle_array,
-       IN              const   void* FUNC_PTR64 *              const   src_handle_array,
+       IN                              void**                          const   dst_handle_array,
+       IN              const   void**                          const   src_handle_array,
        IN                              uint32_t                                        num_handles );


diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_ci_ca.h trunk\core\al\al_ci_ca.h
--- old\core\al\al_ci_ca.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_ci_ca.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -59,7 +60,7 @@ create_ci_ca(

 DEVICE_OBJECT*
 get_ca_dev(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );
 #endif


@@ -73,11 +74,11 @@ typedef struct _al_ci_ca

        verbs_interface_t                       verbs;

-TO_LONG_PTR(   ib_ca_handle_t ,                                h_ci_ca) ;              /* CI handle */
-TO_LONG_PTR(   ib_ca_handle_t ,                                h_ca) ;                         /* AL handle */
-TO_LONG_PTR(   ib_pd_handle_t ,                                h_pd) ;                         /* AL handle */
-TO_LONG_PTR(   ib_pd_handle_t ,                                h_pd_alias) ;           /* AL handle */
-TO_LONG_PTR(   ib_pool_key_t ,                         pool_key) ;             /* AL handle */
+       ib_ca_handle_t                          h_ci_ca;                /* CI handle */
+       ib_ca_handle_t                          h_ca;                   /* AL handle */
+       ib_pd_handle_t                          h_pd;                   /* AL handle */
+       ib_pd_handle_t                          h_pd_alias;             /* AL handle */
+       ib_pool_key_t                           pool_key;               /* AL handle */

        /* Opened instances of this CA. */
        cl_qlist_t                                      ca_list;
@@ -122,11 +123,11 @@ typedef struct _event_item
 void
 add_ca(
        IN                              al_ci_ca_t* const                       p_ci_ca,
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );

 void
 remove_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );


 void
@@ -200,8 +201,8 @@ ci_ca_unlock_attr(

 ib_api_status_t
 ci_call(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   void* FUNC_PTR64 *              const   handle_array    OPTIONAL,
+       IN                              ib_ca_handle_t                          h_ca,
+       IN              const   void**                          const   handle_array    OPTIONAL,
        IN                              uint32_t                                        num_handles,
        IN                              ib_ci_op_t*                     const   p_ci_op,
        IN                              ci_umv_buf_t*           const   p_umv_buf OPTIONAL );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_ci_ca_shared.c trunk\core\al\al_ci_ca_shared.c
--- old\core\al\al_ci_ca_shared.c       Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_ci_ca_shared.c     Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -88,7 +89,7 @@ free_ci_ca(
 void
 add_ca(
        IN                              al_ci_ca_t* const                       p_ci_ca,
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        cl_spinlock_acquire( &p_ci_ca->obj.lock );
        cl_qlist_insert_tail( &p_ci_ca->ca_list, &h_ca->list_item );
@@ -100,7 +101,7 @@ add_ca(

 void
 remove_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        al_ci_ca_t                      *p_ci_ca;

@@ -204,7 +205,7 @@ ci_ca_async_event(

        CL_ASSERT( p_event_rec );

-       p_obj = (al_obj_t* VOID_PTR64)p_event_rec->context;
+       p_obj = (al_obj_t*)p_event_rec->context;

        /* Block the destruction of the object until a reference is taken. */
        cl_spinlock_acquire( &p_obj->lock );
@@ -272,7 +273,7 @@ ci_ca_process_event_cb(
        p_event_item = PARENT_STRUCT( p_async_item, event_item_t,
                async_item.pool_item );

-       p_obj = (al_obj_t* VOID_PTR64)p_event_item->event_rec.context;
+       p_obj = (al_obj_t*)p_event_item->event_rec.context;

        switch( p_event_item->event_rec.code )
        {
@@ -362,11 +363,11 @@ ca_process_async_event_cb(
 {
        al_ci_ca_t*                             p_ci_ca;
        cl_list_item_t*                 p_list_item;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_async_event_rec_t    event_rec;

        CL_ASSERT( p_event_rec );
-       p_ci_ca = (al_ci_ca_t* VOID_PTR64)p_event_rec->context;
+       p_ci_ca = (al_ci_ca_t*)p_event_rec->context;

        /* Report the CA event to all clients. */
        cl_spinlock_acquire( &p_ci_ca->obj.lock );
@@ -396,7 +397,7 @@ void
 ca_async_event_cb(
        IN                              ib_async_event_rec_t* const     p_event_rec )
 {
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;

        CL_ASSERT( p_event_rec );
        h_ca = p_event_rec->handle.h_ca;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_cm_cep.h trunk\core\al\al_cm_cep.h
--- old\core\al\al_cm_cep.h     Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_cm_cep.h   Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -60,7 +61,7 @@

 typedef void
 (*al_pfn_cep_cb_t)(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   net32_t                                         cid );
 /* PARAMETERS
 *      h_al
@@ -89,7 +90,7 @@ create_cep_mgr(

 void
 al_cep_cleanup_al(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al );
+       IN              const   ib_al_handle_t                          h_al );


 ib_api_status_t
@@ -118,14 +119,14 @@ al_destroy_cep(

 ib_api_status_t
 al_cep_listen(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_cep_listen_t* const          p_listen_info );


 ib_api_status_t
 al_cep_pre_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_req_t* const                      p_cm_req,
                OUT                     ib_qp_mod_t* const                      p_init );
@@ -133,50 +134,50 @@ al_cep_pre_req(

 ib_api_status_t
 al_cep_send_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_pre_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init );

 ib_api_status_t
 al_cep_pre_rep_ex(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init );

 ib_api_status_t
 al_cep_send_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_get_rtr_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rtr );


 ib_api_status_t
 al_cep_get_rts_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rts );


 ib_api_status_t
 al_cep_rtu(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t*                                        p_pdata OPTIONAL,
        IN                              uint8_t                                         pdata_len );
@@ -184,7 +185,7 @@ al_cep_rtu(

 ib_api_status_t
 al_cep_rej(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_rej_status_t                         rej_status,
        IN              const   uint8_t* const                          p_ari,
@@ -195,21 +196,21 @@ al_cep_rej(

 ib_api_status_t
 al_cep_mra(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_mra_t* const                      p_cm_mra );


 ib_api_status_t
 al_cep_lap(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_lap_t* const                      p_cm_lap );


 ib_api_status_t
 al_cep_pre_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_apr_t* const                      p_cm_apr,
                OUT                     ib_qp_mod_t* const                      p_apr );
@@ -217,13 +218,13 @@ al_cep_pre_apr(

 ib_api_status_t
 al_cep_send_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_dreq(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t* const                          p_pdata OPTIONAL,
        IN              const   uint8_t                                         pdata_len );
@@ -231,35 +232,35 @@ al_cep_dreq(

 ib_api_status_t
 al_cep_drep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_drep_t* const                     p_cm_drep );


 ib_api_status_t
 al_cep_get_timewait(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     uint64_t* const                         p_timewait_us );


 ib_api_status_t
 al_cep_migrate(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_established(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_poll(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-               OUT                     void* FUNC_PTR64 *                              p_context,
+               OUT                     void**                                          p_context,
                OUT                     net32_t* const                          p_new_cid,
                OUT                     ib_mad_element_t** const        pp_mad );

@@ -268,20 +269,20 @@ al_cep_poll(

 NTSTATUS
 al_cep_queue_irp(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              IRP* const                                      p_irp );

 NTSTATUS
 al_cep_get_cid(
-       IN              ib_al_handle_t FUNC_PTR64                                               h_al,
+       IN              ib_al_handle_t                                          h_al,
        IN              net32_t                 const                           cid,
        IN              PIRP                                                            h_ioctl
        );

 ib_api_status_t
 al_cep_get_pdata(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN      OUT                     uint8_t                                         *p_psize,
                OUT                     uint8_t*                                        pdata );
@@ -309,9 +310,9 @@ typedef struct _al_cep_sreq
 {
        ib_net64_t                                      svc_id;

-       TO_LONG_PTR(ib_path_rec_t* ,            p_path) ;
+       ib_path_rec_t*                          p_path;

-       TO_LONG_PTR(const uint8_t* ,            p_pdata) ;
+       const uint8_t*                          p_pdata;
        uint8_t                                         pdata_len;

        uint8_t                                         max_cm_retries;
@@ -352,7 +353,7 @@ typedef struct _al_cep_sreq

 ib_api_status_t
 al_cep_sreq(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   al_cep_sreq_t* const            p_sreq );

@@ -371,8 +372,8 @@ typedef struct _al_cep_srep
        net32_t                                         qp_num;
        net32_t                                         qkey;

-       TO_LONG_PTR(const uint8_t*,     p_pdata);
-       TO_LONG_PTR(const void*, p_info);
+       const uint8_t*                          p_pdata;
+       const void*                                     p_info;

        uint8_t                                         pdata_len;
        uint8_t                                         info_len;
@@ -410,7 +411,7 @@ typedef struct _al_cep_srep

 ib_api_status_t
 al_cep_srep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   al_cep_srep_t* const            p_sreq );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_cm_qp.c trunk\core\al\al_cm_qp.c
--- old\core\al\al_cm_qp.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_cm_qp.c    Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -55,7 +56,7 @@ typedef struct _al_listen
        ib_pfn_cm_req_cb_t                      pfn_cm_req_cb;

        /* valid for ud qp_type only */
-       TO_LONG_PTR(const void* , sidr_context);
+       const void*                                     sidr_context;

 }      al_listen_t;

@@ -69,7 +70,7 @@ typedef struct _al_listen
 typedef struct _cep_async_mad
 {
        cl_async_proc_item_t    item;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        net32_t                                 cid;

 }      cep_async_mad_t;
@@ -86,7 +87,7 @@ typedef struct _cep_async_mad
  */
 static void
 __cep_timewait_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        uint64_t                        timewait = 0;
        ib_qp_mod_t                     qp_mod;
@@ -298,7 +299,7 @@ __proc_listen(
  */
 static void
 __proc_conn_timeout(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        ib_cm_rej_rec_t         rej_rec;
        net32_t                         cid;
@@ -341,7 +342,7 @@ __proc_conn_timeout(
  */
 static void
 __proc_lap_timeout(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        ib_cm_apr_rec_t         apr_rec;

@@ -369,7 +370,7 @@ __proc_lap_timeout(
  */
 static void
 __proc_dconn_timeout(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        ib_cm_drep_rec_t        drep_rec;
        net32_t                         cid;
@@ -872,11 +873,11 @@ __process_cep_cb(
 static void
 __cm_handler(
 #endif
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   net32_t                                         cid )
 {
        ib_api_status_t         status;
-       void* VOID_PTR64                context;
+       void*                           context;
        net32_t                         new_cid;
        ib_mad_element_t        *p_mad;
        ib_cm_handle_t          h_cm;
@@ -890,20 +891,20 @@ __cm_handler(
                /* Something to do - WOOT!!! */
                if( new_cid != AL_INVALID_CID )
                {
-                       __proc_listen( (al_listen_t* VOID_PTR64)context,
+                       __proc_listen( (al_listen_t*)context,
                                new_cid, ib_get_mad_buf( p_mad ) );
                }
                else if( p_mad->status != IB_SUCCESS )
                {
                        /* Context is a QP handle, and a sent MAD timed out. */
                        __proc_failed_send(
-                               (ib_qp_handle_t VOID_PTR64)context, ib_get_mad_buf( p_mad ) );
+                               (ib_qp_handle_t)context, ib_get_mad_buf( p_mad ) );
                }
                else
                {
                        h_cm.h_al = h_al;
                        h_cm.cid = cid;
-                       h_cm.h_qp = (ib_qp_handle_t VOID_PTR64)context;
+                       h_cm.h_qp = (ib_qp_handle_t)context;
                        __proc_conn( &h_cm, ib_get_mad_buf( p_mad ) );
                }
                ib_put_mad( p_mad );
@@ -938,7 +939,7 @@ __process_cep_async(
  */
 static void
 __cm_handler(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   net32_t                                         cid )
 {
        cep_async_mad_t *p_async_mad;
@@ -972,7 +973,7 @@ __cm_handler(
  */
 ib_api_status_t
 __cep_init_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_qp_mod_t* const                      p_init )
 {
        ib_qp_mod_t                     qp_mod;
@@ -1051,7 +1052,7 @@ __cep_pre_req(

 static ib_api_status_t
 __cep_conn_req(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_cm_req_t* const                      p_cm_req )
 {
        ib_api_status_t         status;
@@ -1201,7 +1202,7 @@ ib_cm_req(
 static ib_api_status_t
 __cep_rts_qp(
        IN              const   ib_cm_handle_t                          h_cm,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_access_t                                     access_ctrl,
        IN              const   uint32_t                                        sq_depth,
        IN              const   uint32_t                                        rq_depth )
@@ -1292,7 +1293,7 @@ __cep_pre_rep(
        if( p_cm_rep->p_recv_wr )
        {
                status = ib_post_recv( p_cm_rep->h_qp, p_cm_rep->p_recv_wr,
-                       (ib_recv_wr_t** VOID_PTR64)p_cm_rep->pp_recv_failure );
+                       (ib_recv_wr_t**)p_cm_rep->pp_recv_failure );
                if( status != IB_SUCCESS )
                {
                        AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
@@ -1854,7 +1855,7 @@ ib_cm_apr(

 ib_api_status_t
 ib_force_apm(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        ib_api_status_t status;
        al_conn_qp_t    *p_conn_qp;
@@ -1915,11 +1916,11 @@ __free_listen(

 static ib_api_status_t
 __cep_listen(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_cm_listen_t* const           p_cm_listen,
        IN              const   ib_pfn_listen_err_cb_t          pfn_listen_err_cb,
        IN              const   void* const                                     listen_context,
-               OUT                     ib_listen_handle_t FUNC_PTR64* const    ph_cm_listen )
+               OUT                     ib_listen_handle_t* const       ph_cm_listen )
 {
        ib_api_status_t         status;
        al_listen_t                     *p_listen;
@@ -2003,11 +2004,11 @@ __cep_listen(

 ib_api_status_t
 ib_cm_listen(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_cm_listen_t* const           p_cm_listen,
        IN              const   ib_pfn_listen_err_cb_t          pfn_listen_err_cb,
        IN              const   void* const                                     listen_context,
-               OUT                     ib_listen_handle_t FUNC_PTR64* const    ph_cm_listen )
+               OUT                     ib_listen_handle_t* const       ph_cm_listen )
 {
        ib_api_status_t         status;

@@ -2034,7 +2035,7 @@ ib_cm_listen(

 ib_api_status_t
 ib_cm_cancel(
-       IN              const   ib_listen_handle_t FUNC_PTR64                   h_cm_listen,
+       IN              const   ib_listen_handle_t                      h_cm_listen,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_CM );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_common.h trunk\core\al\al_common.h
--- old\core\al\al_common.h     Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_common.h   Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -227,7 +228,7 @@ typedef struct _al_obj
        cl_state_t                                      state;

        uint64_t                                        hdl;    /* User Handle. */
-    TO_LONG_PTR(       ib_al_handle_t,                         h_al) ;         /* Owning AL instance. */
+       ib_al_handle_t                          h_al;   /* Owning AL instance. */

 #ifdef CL_KERNEL
        /*
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_cq.c trunk\core\al\al_cq.c
--- old\core\al\al_cq.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_cq.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -71,14 +72,14 @@ free_cq(
  */
 ib_api_status_t
 create_cq(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN      OUT                     ib_cq_create_t* const           p_cq_create,
        IN              const   void* const                                     cq_context,
        IN              const   ib_pfn_event_cb_t                       pfn_cq_event_cb,
-               OUT                     ib_cq_handle_t FUNC_PTR64* const                ph_cq,
+               OUT                     ib_cq_handle_t* const           ph_cq,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        ib_api_status_t                 status;
        al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_CQ;

@@ -169,7 +170,7 @@ create_cq(

 ib_api_status_t
 ib_destroy_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_CQ );
@@ -193,10 +194,10 @@ void
 destroying_cq(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_cq_handle_t VOID_PTR64               h_cq;
+       ib_cq_handle_t          h_cq;
        cl_list_item_t          *p_item;
        cl_obj_rel_t            *p_rel;
-       ib_qp_handle_t VOID_PTR64               h_qp;
+       ib_qp_handle_t          h_qp;

        CL_ASSERT( p_obj );
        h_cq = PARENT_STRUCT( p_obj, ib_cq_t, obj );
@@ -209,7 +210,7 @@ destroying_cq(
        {
                p_rel = PARENT_STRUCT( p_item, cl_obj_rel_t, pool_item.list_item );
                p_rel->p_parent_obj = NULL;
-               h_qp = (ib_qp_handle_t VOID_PTR64)p_rel->p_child_obj;
+               h_qp = (ib_qp_handle_t)p_rel->p_child_obj;
                if( h_qp )
                {
                        /* Take a reference to prevent the QP from being destroyed. */
@@ -234,7 +235,7 @@ void
 cleanup_cq(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        ib_api_status_t                 status;

        CL_ASSERT( p_obj );
@@ -257,7 +258,7 @@ void
 free_cq(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;

        CL_ASSERT( p_obj );
        h_cq = PARENT_STRUCT( p_obj, ib_cq_t, obj );
@@ -269,7 +270,7 @@ free_cq(

 void
 cq_attach_qp(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              cl_obj_rel_t* const                     p_qp_rel )
 {
        p_qp_rel->p_parent_obj = (cl_obj_t*)h_cq;
@@ -282,7 +283,7 @@ cq_attach_qp(

 void
 cq_detach_qp(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              cl_obj_rel_t* const                     p_qp_rel )
 {
        if( p_qp_rel->p_parent_obj )
@@ -298,7 +299,7 @@ cq_detach_qp(

 ib_api_status_t
 ib_modify_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     uint32_t* const                         p_size )
 {
        return modify_cq( h_cq, p_size, NULL );
@@ -307,7 +308,7 @@ ib_modify_cq(

 ib_api_status_t
 modify_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -336,7 +337,7 @@ modify_cq(

 ib_api_status_t
 ib_query_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
                OUT                     uint32_t* const                         p_size )
 {
        return query_cq( h_cq, p_size, NULL );
@@ -346,7 +347,7 @@ ib_query_cq(

 ib_api_status_t
 query_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
                OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -375,7 +376,7 @@ query_cq(

 ib_api_status_t
 ib_peek_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        OUT                             uint32_t* const                         p_n_cqes )
 {
        ib_api_status_t                 status;
@@ -403,7 +404,7 @@ ib_peek_cq(

 ib_api_status_t
 ib_poll_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     ib_wc_t** const                         pp_free_wclist,
                OUT                     ib_wc_t** const                         pp_done_wclist )
 {
@@ -438,7 +439,7 @@ ib_poll_cq(

 ib_api_status_t
 ib_rearm_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   boolean_t                                       solicited )
 {
        ib_api_status_t                 status;
@@ -461,7 +462,7 @@ ib_rearm_cq(

 ib_api_status_t
 ib_rearm_n_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   uint32_t                                        n_cqes )
 {
        ib_api_status_t                 status;
@@ -494,10 +495,10 @@ void
 cq_async_event_cb(
        IN                              ib_async_event_rec_t* const     p_event_rec )
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;

        CL_ASSERT( p_event_rec );
-       h_cq = (ib_cq_handle_t VOID_PTR64)p_event_rec->context;
+       h_cq = (ib_cq_handle_t)p_event_rec->context;

        p_event_rec->context = (void*)h_cq->obj.context;
        p_event_rec->handle.h_cq = h_cq;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_cq.h trunk\core\al\al_cq.h
--- old\core\al\al_cq.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_cq.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -37,27 +38,27 @@

 typedef void
 (*pfn_proc_comp_t)(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq );
+       IN              const   ib_cq_handle_t                          h_cq );

 typedef ib_api_status_t
 (*pfn_peek_cq_t)(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        OUT                             uint32_t* const                         p_n_cqes );

 typedef ib_api_status_t
 (*pfn_poll_cq_t)(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     ib_wc_t**       const                   pp_free_wclist,
                OUT                     ib_wc_t**       const                   pp_done_wclist );

 typedef ib_api_status_t
 (*pfn_rearm_cq_t)(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   boolean_t                                       solicited );

 typedef ib_api_status_t
 (*pfn_rearm_n_cq_t)(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   uint32_t                                        n_cqes );

 #ifdef CL_KERNEL
@@ -86,21 +87,21 @@ typedef struct _ib_cq
        ib_pfn_comp_cb_t                        pfn_user_comp_cb;
        cl_waitobj_handle_t                     h_wait_obj;

-TO_LONG_PTR(   ib_cq_handle_t ,                                h_ci_cq) ;
+       ib_cq_handle_t                          h_ci_cq;

        /* Function pointers for the various speed path operations. */
 #ifndef CL_KERNEL
        pfn_peek_cq_t                           pfn_peek;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_peek_cq) ;
+       ib_cq_handle_t                          h_peek_cq;

        pfn_poll_cq_t                           pfn_poll;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_poll_cq) ;
+       ib_cq_handle_t                          h_poll_cq;

        pfn_rearm_cq_t                          pfn_rearm;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_rearm_cq) ;
+       ib_cq_handle_t                          h_rearm_cq;

        pfn_rearm_n_cq_t                        pfn_rearm_n;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_rearm_n_cq) ;
+       ib_cq_handle_t                          h_rearm_n_cq;
 #endif

        ib_pfn_event_cb_t                       pfn_event_cb;
@@ -117,24 +118,24 @@ TO_LONG_PTR(      ib_cq_handle_t ,                                h_rearm

 ib_api_status_t
 create_cq(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN OUT                  ib_cq_create_t* const           p_cq_create,
        IN              const   void* const                                     cq_context,
        IN              const   ib_pfn_event_cb_t                       pfn_cq_event_cb,
-               OUT                     ib_cq_handle_t FUNC_PTR64* const                ph_cq,
+               OUT                     ib_cq_handle_t* const           ph_cq,
        IN OUT                  ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 modify_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 query_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
                OUT                     uint32_t* const                         p_size,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

@@ -146,13 +147,13 @@ cq_async_event_cb(

 void
 cq_attach_qp(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              cl_obj_rel_t* const                     p_qp_rel );


 void
 cq_detach_qp(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              cl_obj_rel_t* const                     p_qp_rel );

 #endif /* __AL_CQ_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_dm.c trunk\core\al\al_dm.c
--- old\core\al\al_dm.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_dm.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -83,20 +84,20 @@ acquire_iou(

 al_iou_t*
 get_iou(
-       IN              const   ib_ioc_handle_t FUNC_PTR64                              h_ioc );
+       IN              const   ib_ioc_handle_t                         h_ioc );

-ib_ioc_handle_t VOID_PTR64
+ib_ioc_handle_t
 get_ioc(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );

 ib_api_status_t
 add_ioc(
        IN                              al_iou_t*                                       p_iou,
-       IN                              ib_ioc_handle_t FUNC_PTR64                              h_ioc );
+       IN                              ib_ioc_handle_t                         h_ioc );

 void
 ioc_change(
-       IN                              ib_ioc_handle_t FUNC_PTR64                              h_ioc );
+       IN                              ib_ioc_handle_t                         h_ioc );

 void
 iou_change(
@@ -121,7 +122,7 @@ free_dm_agent(
 ib_api_status_t
 dm_agent_reg_pnp(
        IN                              ib_pnp_class_t                          pnp_class,
-       IN                              ib_pnp_handle_t FUNC_PTR64*                     ph_pnp );
+       IN                              ib_pnp_handle_t *                       ph_pnp );

 ib_api_status_t
 dm_agent_pnp_cb(
@@ -157,13 +158,13 @@ iou_port_event_cb(

 void
 dm_agent_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_response );

 void
 dm_agent_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_request );

@@ -208,11 +209,11 @@ get_svc_entries(

 ib_api_status_t
 ib_create_ioc(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   ib_ioc_profile_t* const         p_ioc_profile,
-               OUT                     ib_ioc_handle_t FUNC_PTR64* const               ph_ioc )
+               OUT                     ib_ioc_handle_t* const          ph_ioc )
 {
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;

        AL_ENTER( AL_DBG_IOC );

@@ -249,7 +250,7 @@ ib_create_ioc(

 ib_api_status_t
 ib_destroy_ioc(
-       IN              const   ib_ioc_handle_t FUNC_PTR64                              h_ioc )
+       IN              const   ib_ioc_handle_t                         h_ioc )
 {
        AL_ENTER( AL_DBG_IOC );

@@ -275,7 +276,7 @@ void
 free_ioc(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;

        CL_ASSERT( p_obj );

@@ -307,7 +308,7 @@ free_ioc(

 ib_api_status_t
 ib_reg_ioc(
-       IN              const   ib_ioc_handle_t FUNC_PTR64                              h_ioc )
+       IN              const   ib_ioc_handle_t                         h_ioc )
 {
        al_iou_t*                               p_iou;
        ib_api_status_t                 status;
@@ -336,11 +337,11 @@ ib_reg_ioc(

 ib_api_status_t
 ib_add_svc_entry(
-       IN              const   ib_ioc_handle_t FUNC_PTR64                              h_ioc,
+       IN              const   ib_ioc_handle_t                         h_ioc,
        IN              const   ib_svc_entry_t* const           p_svc_entry,
-               OUT                     ib_svc_handle_t FUNC_PTR64* const               ph_svc )
+               OUT                     ib_svc_handle_t* const          ph_svc )
 {
-       ib_svc_handle_t VOID_PTR64                      h_svc;
+       ib_svc_handle_t                 h_svc;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_IOC );
@@ -379,7 +380,7 @@ ib_add_svc_entry(
                AL_EXIT( AL_DBG_IOC );
                return IB_INSUFFICIENT_RESOURCES;
        }
-       h_svc = cl_zalloc( sizeof( ib_svc_handle_t VOID_PTR64 ) );
+       h_svc = cl_zalloc( sizeof( ib_svc_handle_t ) );
        if( !h_svc )
        {
                AL_EXIT( AL_DBG_IOC );
@@ -434,9 +435,9 @@ ib_add_svc_entry(

 ib_api_status_t
 ib_remove_svc_entry(
-       IN              const   ib_svc_handle_t FUNC_PTR64                              h_svc )
+       IN              const   ib_svc_handle_t                         h_svc )
 {
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;

        AL_ENTER( AL_DBG_IOC );

@@ -493,7 +494,7 @@ void
 free_svc_entry(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_svc_handle_t VOID_PTR64                      h_svc;
+       ib_svc_handle_t                 h_svc;

        CL_ASSERT( p_obj );
        h_svc = PARENT_STRUCT( p_obj, al_svc_entry_t, obj );
@@ -546,7 +547,7 @@ acquire_iou(
  */
 al_iou_t*
 get_iou(
-       IN              const   ib_ioc_handle_t FUNC_PTR64                              h_ioc )
+       IN              const   ib_ioc_handle_t                         h_ioc )
 {
        CL_ASSERT( h_ioc );

@@ -560,13 +561,13 @@ get_iou(



-ib_ioc_handle_t VOID_PTR64
+ib_ioc_handle_t
 get_ioc(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        cl_list_item_t*                 p_ioc_item;
        al_iou_t*                               p_iou;
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;
        boolean_t                               found;
        ib_api_status_t                 status;

@@ -640,7 +641,7 @@ get_ioc(
 ib_api_status_t
 add_ioc(
        IN                              al_iou_t*                                       p_iou,
-       IN                              ib_ioc_handle_t FUNC_PTR64                              h_ioc )
+       IN                              ib_ioc_handle_t                         h_ioc )
 {
        cl_list_item_t*                 p_list_item;
        al_obj_t*                               p_obj;
@@ -708,7 +709,7 @@ add_ioc(

 void
 ioc_change(
-       IN                              ib_ioc_handle_t FUNC_PTR64                              h_ioc )
+       IN                              ib_ioc_handle_t                         h_ioc )
 {
        CL_ASSERT( h_ioc );

@@ -801,7 +802,7 @@ iou_port_svc_reg_cb(

        CL_ASSERT( p_reg_svc_rec );

-       p_iou_port = (al_iou_port_t* VOID_PTR64)p_reg_svc_rec->svc_context;
+       p_iou_port = (al_iou_port_t*)p_reg_svc_rec->svc_context;

        if( p_reg_svc_rec->req_status != IB_SUCCESS )
                deref_al_obj( &p_iou_port->obj );
@@ -945,7 +946,7 @@ free_dm_agent(
 ib_api_status_t
 dm_agent_reg_pnp(
        IN                              ib_pnp_class_t                          pnp_class,
-       IN                              ib_pnp_handle_t FUNC_PTR64*                     ph_pnp )
+       IN                              ib_pnp_handle_t *                       ph_pnp )
 {
        ib_api_status_t                 status;
        ib_pnp_req_t                    pnp_req;
@@ -1027,7 +1028,7 @@ create_iou(
        IN                              ib_pnp_rec_t*                           p_pnp_rec )
 {
        al_iou_t*                               p_iou;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_api_status_t                 status;

        CL_ASSERT( p_pnp_rec );
@@ -1107,7 +1108,7 @@ cleanup_iou(
 {
        al_iou_t*                               p_iou;
        cl_list_item_t*                 p_ioc_item;
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;

        CL_ASSERT( p_obj );
        p_iou = PARENT_STRUCT( p_obj, al_iou_t, obj );
@@ -1350,7 +1351,7 @@ iou_port_event_cb(
  */
 void
 dm_agent_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_response )
 {
@@ -1375,7 +1376,7 @@ dm_agent_send_cb(
  */
 void
 dm_agent_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_request )
 {
@@ -1594,7 +1595,7 @@ get_io_unit_info(
 {
        ib_iou_info_t*                  p_iou_info;
        cl_list_item_t*                 p_ioc_item;
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;
        uint8_t                                 slot;

        CL_ASSERT( p_iou );
@@ -1651,7 +1652,7 @@ get_ioc_profile(
 {
        ib_ioc_profile_t*               p_ioc_profile;
        cl_list_item_t*                 p_ioc_item;
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;

        CL_ASSERT( p_iou );
        CL_ASSERT( p_dm_mad );
@@ -1710,7 +1711,7 @@ get_svc_entries(
        ib_svc_entries_t*               p_svc_entries;
        cl_list_item_t*                 p_ioc_item;
        cl_list_item_t*                 p_list_item;
-       ib_ioc_handle_t VOID_PTR64                      h_ioc;
+       ib_ioc_handle_t                 h_ioc;
        al_obj_t*                               p_obj;
        al_svc_entry_t*                 p_svc_entry;
        uint8_t                                 i, j, k;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_dm.h trunk\core\al\al_dm.h
--- old\core\al\al_dm.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_dm.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -40,8 +41,8 @@
 typedef struct _dm_agent               /* Global device management agent struct */
 {
        al_obj_t                                        obj;            /* Child of al_mgr_t */
-TO_LONG_PTR(   ib_pnp_handle_t ,                               h_ca_pnp) ;     /* Handle for CA PnP events */
-TO_LONG_PTR(   ib_pnp_handle_t ,                               h_port_pnp) ;   /* Handle for Port PnP events */
+       ib_pnp_handle_t                         h_ca_pnp;       /* Handle for CA PnP events */
+       ib_pnp_handle_t                         h_port_pnp;     /* Handle for Port PnP events */

        /*
         * Lock and state to synchronize user-mode device management
@@ -71,10 +72,10 @@ typedef struct _al_iou_port         /* Per-port
        net64_t                                         port_guid;
        ib_gid_t                                        port_gid;
        ib_net16_t                                      port_pkey;
-TO_LONG_PTR(   ib_qp_handle_t ,                                h_qp_alias) ;
-TO_LONG_PTR(   ib_mad_svc_handle_t ,                   h_mad_svc) ;
+       ib_qp_handle_t                          h_qp_alias;
+       ib_mad_svc_handle_t                     h_mad_svc;

-TO_LONG_PTR(   struct _al_pool_key* ,                          pool_key) ;
+       ib_pool_key_t                           pool_key;

        ib_reg_svc_handle_t                     svc_handle;     /* Service registration handle */

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mad.c trunk\core\al\al_mad.c
--- old\core\al\al_mad.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mad.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -139,7 +140,7 @@ __send_timer_cb(

 static void
 __check_send_queue(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc );
+       IN                              ib_mad_svc_handle_t                     h_mad_svc );

 static void
 __recv_timer_cb(
@@ -147,8 +148,8 @@ __recv_timer_cb(

 static ib_api_status_t
 __init_send_mad(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN              const   ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN              const   ib_mad_send_handle_t            h_send,
        IN                              ib_mad_element_t* const         p_mad_element );

 static boolean_t
@@ -160,57 +161,57 @@ __does_send_req_rmpp(
 static void
 __queue_mad_wr(
        IN              const   al_mad_reg_handle_t                     h_mad_reg,
-       IN              const   ib_mad_send_handle_t FUNC_PTR64         h_send );
+       IN              const   ib_mad_send_handle_t            h_send );

 static void
 __queue_rmpp_seg(
        IN              const   al_mad_reg_handle_t                     h_mad_reg,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send );
+       IN                              ib_mad_send_handle_t            h_send );

 static ib_api_status_t
 __create_send_av(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send );
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send );

 static void
 __cleanup_mad_send(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send );
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send );

 static __inline void
 __set_retry_time(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send );
+       IN                              ib_mad_send_handle_t            h_send );

 static void
 __mad_svc_send_done(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_wr_t                                     *p_mad_wr,
        IN                              ib_wc_t                                         *p_wc );

 static boolean_t
 __is_send_mad_done(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_send_handle_t            h_send,
        IN                              ib_wc_t                                         *p_wc );

 static void
 __notify_send_comp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send,
        IN                              ib_wc_status_t                          wc_status );

 static void
 __mad_svc_recv_done(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );

 static void
 __process_recv_resp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );

 static cl_status_t
 __do_rmpp_recv(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element );

 static __inline boolean_t
@@ -225,39 +226,39 @@ __is_internal_send(

 static cl_status_t
 __process_rmpp_data(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element );

 static void
 __process_rmpp_ack(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );

 static void
 __process_rmpp_nack(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );

 static cl_status_t
 __process_segment(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_rmpp_t                           *p_rmpp,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element,
                OUT                     ib_mad_element_t                        **pp_rmpp_resp_mad );

 static al_mad_rmpp_t*
 __find_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        *p_mad_element );

 static al_mad_rmpp_t*
 __get_mad_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );

 static void
 __put_mad_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_rmpp_t                           *p_rmpp );

 static void
@@ -271,7 +272,7 @@ __get_rmpp_ack(

 ib_net64_t
 __get_send_tid(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN                              ib_mad_send_handle_t            h_send )
 {
        return ((ib_mad_t*)ib_get_mad_buf( h_send->p_send_mad ))->trans_id;
 }
@@ -281,7 +282,7 @@ ib_mad_t*
 get_mad_hdr_from_wr(
        IN                              al_mad_wr_t* const                      p_mad_wr )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        CL_ASSERT( p_mad_wr );

@@ -353,7 +354,7 @@ build_mad_recv(
 ib_api_status_t
 create_mad_disp(
        IN                              al_obj_t* const                         p_parent_obj,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_disp_handle_t* const     ph_mad_disp )
 {
        al_mad_disp_handle_t    h_mad_disp;
@@ -465,7 +466,7 @@ __free_mad_disp(
 static al_mad_reg_handle_t
 __mad_disp_reg(
        IN              const   al_mad_disp_handle_t            h_mad_disp,
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN              const   ib_mad_svc_t                            *p_mad_svc,
        IN              const   pfn_mad_svc_send_done_t         pfn_send_done,
        IN              const   pfn_mad_svc_recv_done_t         pfn_recv_done )
@@ -881,8 +882,8 @@ mad_disp_recv_done(
 {
        ib_mad_t                                *p_mad_hdr;
        al_mad_reg_handle_t             h_mad_reg;
-       ib_al_handle_t  VOID_PTR64                      h_al;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_al_handle_t                  h_al;
+       ib_mad_svc_handle_t             h_mad_svc;

        cl_vector_t                             *p_class_vector;
        cl_ptr_vector_t                 *p_method_ptr_vector;
@@ -1007,7 +1008,7 @@ mad_disp_recv_done(
        cl_spinlock_release( &h_mad_disp->obj.lock );

        /* Handoff the MAD to the correct AL instance. */
-       h_al = qp_get_al( (ib_qp_handle_t VOID_PTR64)(h_mad_svc->obj.p_parent_obj) );
+       h_al = qp_get_al( (ib_qp_handle_t)(h_mad_svc->obj.p_parent_obj) );
        al_handoff_mad( h_al, p_mad_element );

        h_mad_reg->pfn_recv_done( h_mad_svc, p_mad_element );
@@ -1097,13 +1098,13 @@ __use_tid_routing(
  */
 ib_api_status_t
 reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc )
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc )
 {
        ib_api_status_t         status;
        cl_status_t                     cl_status;
-       ib_mad_svc_handle_t VOID_PTR64  h_mad_svc;
+       ib_mad_svc_handle_t     h_mad_svc;
        al_qp_alias_t           *p_qp_alias;
        ib_qp_attr_t            qp_attr;

@@ -1212,9 +1213,9 @@ static void
 __destroying_mad_svc(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_qp_handle_t                  h_qp;
+       ib_mad_svc_handle_t             h_mad_svc;
+       ib_mad_send_handle_t    h_send;
        cl_list_item_t                  *p_list_item;
        int32_t                                 timeout_ms;
 #ifdef CL_KERNEL
@@ -1226,7 +1227,7 @@ __destroying_mad_svc(
        h_mad_svc = PARENT_STRUCT( p_obj, al_mad_svc_t, obj );

        /* Deregister the MAD service. */
-       h_qp = (ib_qp_handle_t VOID_PTR64)p_obj->p_parent_obj;
+       h_qp = (ib_qp_handle_t)p_obj->p_parent_obj;
        if( h_qp->pfn_dereg_mad_svc )
                h_qp->pfn_dereg_mad_svc( h_mad_svc );

@@ -1316,7 +1317,7 @@ static void
 __cleanup_mad_svc(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_mad_svc_handle_t             h_mad_svc;
        al_mad_rmpp_t                   *p_rmpp;
        cl_list_item_t                  *p_list_item;

@@ -1348,7 +1349,7 @@ void
 free_mad_svc(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mad_svc_handle_t VOID_PTR64  h_mad_svc;
+       ib_mad_svc_handle_t     h_mad_svc;

        CL_ASSERT( p_obj );
        h_mad_svc = PARENT_STRUCT( p_obj, al_mad_svc_t, obj );
@@ -1361,13 +1362,13 @@ free_mad_svc(

 ib_api_status_t
 ib_send_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element_list,
                OUT                     ib_mad_element_t                        **pp_mad_failure OPTIONAL )
 {
        ib_api_status_t                         status = IB_SUCCESS;
 #ifdef CL_KERNEL
-       ib_mad_send_handle_t VOID_PTR64         h_send;
+       ib_mad_send_handle_t            h_send;
        ib_mad_element_t                        *p_cur_mad, *p_next_mad;
 #endif

@@ -1456,8 +1457,8 @@ ib_send_mad(

 static ib_api_status_t
 __init_send_mad(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN              const   ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN              const   ib_mad_send_handle_t            h_send,
        IN                              ib_mad_element_t* const         p_mad_element )
 {
        ib_rmpp_mad_t           *p_rmpp_hdr;
@@ -1533,8 +1534,8 @@ __init_send_mad(

 static ib_api_status_t
 __create_send_av(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send )
 {
        ib_av_attr_t            av_attr;
        ib_mad_element_t        *p_mad_element;
@@ -1611,7 +1612,7 @@ __does_send_req_rmpp(
 static void
 __queue_rmpp_seg(
        IN              const   al_mad_reg_handle_t                     h_mad_reg,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN                              ib_mad_send_handle_t            h_send )
 {
        ib_rmpp_mad_t           *p_rmpp_hdr;

@@ -1690,7 +1691,7 @@ __queue_rmpp_seg(
 static void
 __queue_mad_wr(
        IN              const   al_mad_reg_handle_t                     h_mad_reg,
-       IN              const   ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN              const   ib_mad_send_handle_t            h_send )
 {
        ib_send_wr_t            *p_send_wr;
        al_mad_element_t        *p_al_element;
@@ -1717,7 +1718,7 @@ __queue_mad_wr(
 #else
                p_rmpp_dst = (uint8_t*)(uintn_t)p_al_element->mad_ds.vaddr;
 #endif
-               p_rmpp_src = (uint8_t* VOID_PTR64)h_send->p_send_mad->p_mad_buf;
+               p_rmpp_src = (uint8_t*)h_send->p_send_mad->p_mad_buf;
                p_rmpp_hdr = (ib_rmpp_mad_t*)p_rmpp_src;

                if( h_send->p_send_mad->p_mad_buf->mgmt_class == IB_MCLASS_SUBN_ADM )
@@ -1771,7 +1772,7 @@ __mad_svc_find_send(
        IN              const   cl_list_item_t* const           p_list_item,
        IN                              void*                                           context )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        h_send = PARENT_STRUCT( p_list_item, al_mad_send_t, pool_item );

@@ -1785,12 +1786,12 @@ __mad_svc_find_send(

 ib_api_status_t
 ib_cancel_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element )
 {
 #ifdef CL_KERNEL
        cl_list_item_t                  *p_list_item;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;
 #else
        ib_api_status_t                 status;
 #endif
@@ -1846,13 +1847,13 @@ ib_cancel_mad(

 ib_api_status_t
 ib_delay_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element,
        IN              const   uint32_t                                        delay_ms )
 {
 #ifdef CL_KERNEL
        cl_list_item_t                  *p_list_item;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;
 #endif

        AL_ENTER( AL_DBG_MAD_SVC );
@@ -1907,11 +1908,11 @@ ib_delay_mad(
  */
 static void
 __mad_svc_send_done(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_wr_t                                     *p_mad_wr,
        IN                              ib_wc_t                                         *p_wc )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        AL_ENTER( AL_DBG_MAD_SVC );
        CL_ASSERT( h_mad_svc && p_mad_wr && !p_wc->p_next );
@@ -1991,8 +1992,8 @@ __mad_svc_send_done(
  */
 static void
 __notify_send_comp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send,
        IN                              ib_wc_status_t                          wc_status )
 {
        AL_ENTER( AL_DBG_MAD_SVC );
@@ -2026,8 +2027,8 @@ __notify_send_comp(
  */
 static void
 __cleanup_mad_send(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
+       IN                              ib_mad_send_handle_t            h_send )
 {
        /* Release any address vectors that we may have created. */
        if( h_send->h_av )
@@ -2046,7 +2047,7 @@ __cleanup_mad_send(

 static boolean_t
 __is_send_mad_done(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send,
+       IN                              ib_mad_send_handle_t            h_send,
        IN                              ib_wc_t                                         *p_wc )
 {
        AL_ENTER( AL_DBG_MAD_SVC );
@@ -2106,14 +2107,14 @@ __is_send_mad_done(
  * Try to find a send that matches the received response.  This call must
  * be synchronized with access to the MAD service send_list.
  */
-static ib_mad_send_handle_t VOID_PTR64
+static ib_mad_send_handle_t
 __mad_svc_match_recv(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_recv_mad )
 {
        ib_mad_t                                *p_recv_hdr;
        cl_list_item_t                  *p_list_item;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        AL_ENTER( AL_DBG_MAD_SVC );

@@ -2142,7 +2143,7 @@ __mad_svc_match_recv(

 static void
 __mad_svc_recv_done(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
        ib_mad_t                                *p_mad_hdr;
@@ -2227,11 +2228,11 @@ __mad_svc_recv_done(
  */
 static void
 __process_recv_resp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
        ib_mad_t                                *p_mad_hdr;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        /*
         * Try to find the send.  The send may have already timed out or
@@ -2256,8 +2257,8 @@ __process_recv_resp(
        h_send->p_send_mad->status = IB_WCS_SUCCESS;

        /* Record the send contexts with the receive. */
-       p_mad_element->send_context1 = (void* VOID_PTR64)h_send->p_send_mad->context1;
-       p_mad_element->send_context2 = (void* VOID_PTR64)h_send->p_send_mad->context2;
+       p_mad_element->send_context1 = (void*)h_send->p_send_mad->context1;
+       p_mad_element->send_context2 = (void*)h_send->p_send_mad->context2;

        if( h_send->retry_time == MAX_TIME )
        {
@@ -2366,7 +2367,7 @@ __is_internal_send(
  */
 static cl_status_t
 __do_rmpp_recv(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element )
 {
        ib_rmpp_mad_t           *p_rmpp_mad;
@@ -2418,7 +2419,7 @@ __do_rmpp_recv(
  */
 static cl_status_t
 __process_rmpp_data(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element )
 {
        ib_mad_element_t        *p_rmpp_resp_mad = NULL;
@@ -2515,7 +2516,7 @@ __process_rmpp_data(
  */
 static al_mad_rmpp_t*
 __find_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN      OUT                     ib_mad_element_t                        *p_mad_element )
 {
        al_mad_rmpp_t                   *p_rmpp;
@@ -2559,7 +2560,7 @@ __find_rmpp(
  */
 static al_mad_rmpp_t*
 __get_mad_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
        al_mad_rmpp_t           *p_rmpp;
@@ -2593,7 +2594,7 @@ __get_mad_rmpp(
  */
 static void
 __put_mad_rmpp(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_rmpp_t                           *p_rmpp )
 {
        /* Remove the tracking structure from the reassembly list. */
@@ -2612,7 +2613,7 @@ __put_mad_rmpp(
  */
 static cl_status_t
 __process_segment(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_rmpp_t                           *p_rmpp,
        IN      OUT                     ib_mad_element_t                        **pp_mad_element,
                OUT                     ib_mad_element_t                        **pp_rmpp_resp_mad )
@@ -2647,18 +2648,18 @@ __process_segment(
                if( (*pp_mad_element)->p_mad_buf->mgmt_class == IB_MCLASS_SUBN_ADM )
                {
                        /* Copy the received data into our reassembly buffer. */
-                       p_src_seg = ((uint8_t* VOID_PTR64)(*pp_mad_element)->p_mad_buf) +
+                       p_src_seg = ((uint8_t*)(*pp_mad_element)->p_mad_buf) +
                                IB_SA_MAD_HDR_SIZE;
-                       p_dst_seg = ((uint8_t* VOID_PTR64)p_rmpp->p_mad_element->p_mad_buf) +
+                       p_dst_seg = ((uint8_t*)p_rmpp->p_mad_element->p_mad_buf) +
                                IB_SA_MAD_HDR_SIZE + IB_SA_DATA_SIZE * (cur_seg - 1);
                        cl_memcpy( p_dst_seg, p_src_seg, IB_SA_DATA_SIZE );
                }
                else
                {
                        /* Copy the received data into our reassembly buffer. */
-                       p_src_seg = ((uint8_t* VOID_PTR64)(*pp_mad_element)->p_mad_buf) +
+                       p_src_seg = ((uint8_t*)(*pp_mad_element)->p_mad_buf) +
                                MAD_RMPP_HDR_SIZE;
-                       p_dst_seg = ((uint8_t* VOID_PTR64)p_rmpp->p_mad_element->p_mad_buf) +
+                       p_dst_seg = ((uint8_t*)p_rmpp->p_mad_element->p_mad_buf) +
                                MAD_RMPP_HDR_SIZE + MAD_RMPP_DATA_SIZE * (cur_seg - 1);
                        cl_memcpy( p_dst_seg, p_src_seg, MAD_RMPP_DATA_SIZE );
                }
@@ -2815,10 +2816,10 @@ __init_reply_element(
  */
 static void
 __process_rmpp_ack(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;
        ib_rmpp_mad_t                   *p_rmpp_mad;
        boolean_t                               send_done = FALSE;
        ib_wc_status_t                  wc_status = IB_WCS_SUCCESS;
@@ -2919,10 +2920,10 @@ __process_rmpp_ack(
  */
 static void
 __process_rmpp_nack(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;
        ib_rmpp_mad_t                   *p_rmpp_mad;

        AL_ENTER( AL_DBG_MAD_SVC );
@@ -2959,7 +2960,7 @@ __process_rmpp_nack(

 static __inline void
 __set_retry_time(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_send )
+       IN                              ib_mad_send_handle_t            h_send )
 {
        h_send->retry_time =
                (uint64_t)(h_send->p_send_mad->timeout_ms + h_send->delay) * 1000Ui64 +
@@ -2975,7 +2976,7 @@ __send_timer_cb(
 {
        AL_ENTER( AL_DBG_MAD_SVC );

-       __check_send_queue( (ib_mad_svc_handle_t VOID_PTR64)context );
+       __check_send_queue( (ib_mad_svc_handle_t)context );

        AL_EXIT( AL_DBG_MAD_SVC );
 }
@@ -2988,9 +2989,9 @@ __send_timer_cb(
  */
 static void
 __check_send_queue(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc )
+       IN                              ib_mad_svc_handle_t                     h_mad_svc )
 {
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;
        cl_list_item_t                  *p_list_item, *p_next_item;
        uint64_t                                cur_time;
        cl_qlist_t                              timeout_list;
@@ -3121,14 +3122,14 @@ static void
 __recv_timer_cb(
        IN                              void                                            *context )
 {
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_mad_svc_handle_t             h_mad_svc;
        al_mad_rmpp_t                   *p_rmpp;
        cl_list_item_t                  *p_list_item, *p_next_item;
        boolean_t                               restart_timer;

        AL_ENTER( AL_DBG_MAD_SVC );

-       h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)context;
+       h_mad_svc = (ib_mad_svc_handle_t)context;

        cl_spinlock_acquire( &h_mad_svc->obj.lock );

@@ -3165,7 +3166,7 @@ __recv_timer_cb(

 ib_api_status_t
 ib_local_mad(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   uint8_t                                         port_num,
        IN              const   void* const                                     p_mad_in,
        IN                              void*                                           p_mad_out )
@@ -3193,7 +3194,7 @@ ib_local_mad(

 ib_api_status_t
 al_local_mad(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   uint8_t                                         port_num,
        IN              const   ib_av_attr_t*                                   p_src_av_attr,
        IN              const   void* const                                     p_mad_in,
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mad.h trunk\core\al\al_mad.h
--- old\core\al\al_mad.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mad.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -57,7 +58,7 @@
 typedef struct _al_mad_disp
 {
        al_obj_t                                        obj;
-TO_LONG_PTR(   ib_qp_handle_t ,                                h_qp) ;
+       ib_qp_handle_t                          h_qp;

        /* Client information. */
        cl_vector_t                                     client_vector;
@@ -76,19 +77,19 @@ typedef al_mad_disp_t                       *al_mad_disp_han

 typedef void
 (*pfn_mad_svc_send_done_t)(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              al_mad_wr_t                                     *p_mad_wr,
        IN                              ib_wc_t                                         *p_wc );

 typedef void
 (*pfn_mad_svc_recv_done_t)(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t                        *p_mad_element );


 typedef struct _al_mad_disp_reg
 {
-TO_LONG_PTR(   ib_mad_svc_handle_t ,                   h_mad_svc) ;
+       ib_mad_svc_handle_t                     h_mad_svc;
        al_mad_disp_handle_t            h_mad_disp;
        uint32_t                                        client_id;
        atomic32_t                                      ref_cnt;
@@ -114,7 +115,7 @@ typedef     al_mad_disp_reg_t*              al_mad_reg_h
 ib_api_status_t
 create_mad_disp(
        IN                              al_obj_t* const                         p_parent_obj,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_disp_handle_t* const     ph_mad_disp );

 void
@@ -154,7 +155,7 @@ typedef struct _al_mad_svc
        cl_timer_t                                      recv_timer;

        /* The PD and port number are used to create address vectors on sends. */
-TO_LONG_PTR(   ib_pd_handle_t ,                                h_pd) ;
+       ib_pd_handle_t                          h_pd;
        uint8_t                                         port_num;

 }      al_mad_svc_t;
@@ -170,14 +171,14 @@ free_mad_svc(
  */
 ib_api_status_t
 reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc );
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc );


 ib_api_status_t
 al_local_mad(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   uint8_t                                         port_num,
        IN              const   ib_av_attr_t*                                   p_av_attr,
        IN              const   void* const                                     p_mad_in,
@@ -228,7 +229,7 @@ get_mad_hdr_from_wr(

 ib_api_status_t
 ib_delay_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element,
        IN              const   uint32_t                                        delay_ms );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mad_pool.h trunk\core\al\al_mad_pool.h
--- old\core\al\al_mad_pool.h   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mad_pool.h Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -40,7 +41,7 @@

 typedef struct _al_pool
 {
-       al_obj_t                                obj;                    /* Child of ib_al_handle_t VOID_PTR64 */
+       al_obj_t                                obj;                    /* Child of ib_al_handle_t */
 #if defined( CL_KERNEL )
        NPAGED_LOOKASIDE_LIST   mad_stack;
 #else
@@ -87,15 +88,15 @@ typedef struct _al_pool_key
         * pool key with the AL instance in order to synchronize destruction.
         */
        boolean_t                               in_al_list;
-TO_LONG_PTR(   ib_al_handle_t ,                        h_al) ;
+       ib_al_handle_t                  h_al;
        cl_list_item_t                  al_item;                /* Chain in ib_al_t for dereg */
        cl_list_item_t                  pool_item;              /* Chain in al_pool_t for grow */

-TO_LONG_PTR(   ib_pool_handle_t ,              h_pool) ;
+       ib_pool_handle_t                h_pool;
 #ifndef CL_KERNEL
-TO_LONG_PTR(   ib_pd_handle_t ,                        h_pd) ;
+       ib_pd_handle_t                  h_pd;
 #else
-TO_LONG_PTR(   ib_mr_handle_t ,                        h_mr) ;
+       ib_mr_handle_t                  h_mr;
        net32_t                                 lkey;
 #endif

@@ -103,27 +104,23 @@ TO_LONG_PTR(      ib_mr_handle_t ,                        h_mr) ;
        atomic32_t                              mad_cnt;

        /* For alias keys, maintain a reference to the actual pool key. */
-TO_LONG_PTR(   ib_pool_key_t ,                 pool_key) ;
+       ib_pool_key_t                   pool_key;

 }      al_pool_key_t;


 ib_api_status_t
 reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key );
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+               OUT                     ib_pool_key_t* const            pp_pool_key );

 /* Deregister a MAD pool key if it is of the expected type. */
 ib_api_status_t
 dereg_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
        IN              const   al_key_type_t                           expected_type );

-
-typedef void
-(* VOID_PTR64 pfn_mad_dbg_t)(void);
-
 typedef struct _al_mad_element
 {
        /*
@@ -131,10 +128,10 @@ typedef struct _al_mad_element
         * the SMI and MAD QPs to track received MADs.
         */
        cl_list_item_t                  list_item;
-TO_LONG_PTR(   ib_al_handle_t ,                        h_al) ;                         /* Track out-of-pool MAD owner */
+       ib_al_handle_t                  h_al;                   /* Track out-of-pool MAD owner */
        cl_list_item_t                  al_item;                /* Out-of-pool MAD owner chain */
        ib_mad_element_t                element;
-TO_LONG_PTR(   ib_pool_key_t ,                 pool_key) ;             /* For getting mads for RMPP ACK */
+       ib_pool_key_t                   pool_key;               /* For getting mads for RMPP ACK */
        ib_local_ds_t                   grh_ds;                 /* GRH + 256 byte buffer. */
        ib_local_ds_t                   mad_ds;                 /* Registered 256-byte buffer. */
        ib_mad_t                                *p_al_mad_buf;  /* Allocated send/recv buffer. */
@@ -160,7 +157,7 @@ al_resize_mad(
 typedef struct _mad_array
 {
        al_obj_t                                obj;                    /* Child of al_pool_t */
-TO_LONG_PTR(   ib_pool_handle_t ,              h_pool) ;
+       ib_pool_handle_t                h_pool;
        size_t                                  sizeof_array;
        void*                                   p_data;

@@ -172,7 +169,7 @@ typedef struct _mad_item
 {
        al_mad_element_t                al_mad_element;
 #if defined( CL_KERNEL )
-TO_LONG_PTR(   ib_pool_key_t ,                 pool_key) ;
+       ib_pool_key_t                   pool_key;
 #else
        mad_array_t*                    p_mad_array;
 #endif
@@ -208,7 +205,7 @@ typedef struct _al_mad_send
 {
        cl_pool_item_t                          pool_item;
        ib_mad_element_t                        *p_send_mad;
-TO_LONG_PTR(   ib_av_handle_t ,                                h_av) ;
+       ib_av_handle_t                          h_av;

        al_mad_wr_t                                     mad_wr;

@@ -258,14 +255,14 @@ typedef struct _al_mad_rmpp



-ib_mad_send_handle_t FUNC_PTR64
+ib_mad_send_handle_t
 get_mad_send(
        IN              const   al_mad_element_t                        *p_mad_element );


 void
 put_mad_send(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_mad_send );
+       IN                              ib_mad_send_handle_t            h_mad_send );


 al_mad_rmpp_t*
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mcast.c trunk\core\al\al_mcast.c
--- old\core\al\al_mcast.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mcast.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -102,10 +103,10 @@ __free_attach(

 ib_api_status_t
 al_join_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mcast_req_t* const           p_mcast_req )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;
        ib_api_status_t                 status;
        cl_status_t                             cl_status;
        boolean_t                               sync;
@@ -227,13 +228,13 @@ static void
 __destroying_mcast(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;
        ib_user_query_t                 sa_mad_data;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MCAST );

-       h_mcast = PARENT_STRUCT( p_obj, ib_mcast_t, obj ); /// !!!!
+       h_mcast = PARENT_STRUCT( p_obj, ib_mcast_t, obj );

        if( h_mcast->state != SA_REG_STARTING && h_mcast->state != SA_REG_ACTIVE )
        {
@@ -284,7 +285,7 @@ static void
 __cleanup_mcast(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MCAST );
@@ -317,7 +318,7 @@ static void
 __free_mcast(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;

        h_mcast = PARENT_STRUCT( p_obj, ib_mcast_t, obj );

@@ -418,7 +419,7 @@ join_req_cb(
        IN                              al_sa_req_t                                     *p_sa_req,
        IN                              ib_mad_element_t                        *p_mad_response )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;
        ib_sa_mad_t                             *p_sa_mad;

        AL_ENTER( AL_DBG_MCAST );
@@ -464,7 +465,7 @@ join_async_cb(
        IN                              cl_async_proc_item_t            *p_item )
 {
        ib_api_status_t                 status;
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;
        ib_mcast_rec_t                  mcast_rec;
        boolean_t                               sync;

@@ -547,7 +548,7 @@ join_async_cb(

 ib_api_status_t
 ib_leave_mcast(
-       IN              const   ib_mcast_handle_t FUNC_PTR64                    h_mcast,
+       IN              const   ib_mcast_handle_t                       h_mcast,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {

@@ -576,7 +577,7 @@ leave_req_cb(
        IN                              al_sa_req_t                                     *p_sa_req,
        IN                              ib_mad_element_t                        *p_mad_response )
 {
-       ib_mcast_handle_t VOID_PTR64            h_mcast;
+       ib_mcast_handle_t               h_mcast;

        AL_ENTER( AL_DBG_MCAST );
        h_mcast = PARENT_STRUCT( p_sa_req, ib_mcast_t, sa_dereg_req );
@@ -601,7 +602,7 @@ leave_req_cb(
  */
 ib_api_status_t
 al_attach_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_gid_t                                        *p_mcast_gid,
        IN              const   ib_net16_t                                      mcast_lid,
                OUT                     al_attach_handle_t                      *ph_attach,
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mcast.h trunk\core\al\al_mcast.h
--- old\core\al\al_mcast.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mcast.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -47,9 +48,9 @@
 typedef struct _al_attach
 {
        al_obj_t                                        obj;
-TO_LONG_PTR(   ib_mcast_handle_t ,                     h_ci_mcast) ;           /* CI CA handle from attach */
+       ib_mcast_handle_t                       h_ci_mcast;             /* CI CA handle from attach */

-}      al_attach_t, * VOID_PTR64 al_attach_handle_t;
+}      al_attach_t, *al_attach_handle_t;


 typedef struct _ib_mcast
@@ -59,7 +60,7 @@ typedef struct _ib_mcast
        al_sa_req_t                                     sa_reg_req;
        al_sa_req_t                                     sa_dereg_req;

-TO_LONG_PTR(   ib_mcast_handle_t ,                     h_ci_mcast) ;
+       ib_mcast_handle_t                       h_ci_mcast;

        cl_async_proc_item_t            async;

@@ -87,12 +88,12 @@ TO_LONG_PTR(        ib_mcast_handle_t ,                     h_ci_

 void
 al_cancel_mcast(
-       IN              const   ib_mcast_handle_t FUNC_PTR64                    h_mcast );
+       IN              const   ib_mcast_handle_t                       h_mcast );


 ib_api_status_t
 al_join_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mcast_req_t* const           p_mcast_req );


@@ -102,7 +103,7 @@ al_join_mcast(
  */
 ib_api_status_t
 al_attach_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_gid_t                                        *p_mcast_gid,
        IN              const   ib_net16_t                                      mcast_lid,
                OUT                     al_attach_handle_t                      *ph_attach,
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mgr.h trunk\core\al\al_mgr.h
--- old\core\al\al_mgr.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mgr.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -68,11 +69,11 @@ typedef struct _al_mgr
  * Note that the exported symbols are only exported for the bus driver
  * (loader) and are not intended for use by any normal AL clients.
  */
-AL_EXPORT cl_async_proc_t      *gp_async_proc_mgr;
-AL_EXPORT cl_async_proc_t      *gp_async_pnp_mgr;
-AL_EXPORT al_mgr_t                     *gp_al_mgr;
-AL_EXPORT ib_al_handle_t VOID_PTR64    gh_al ;
-ib_pool_handle_t                       gh_mad_pool ;
+cl_async_proc_t                *gp_async_proc_mgr;
+cl_async_proc_t                *gp_async_pnp_mgr;
+al_mgr_t                       *gp_al_mgr;
+ib_al_handle_t         gh_al;
+ib_pool_handle_t       gh_mad_pool;


 ib_api_status_t
@@ -81,7 +82,7 @@ create_al_mgr( void );

 void
 print_al_objs(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al );
+       IN              const   ib_al_handle_t                          h_al );

 void
 print_al_obj(
@@ -94,14 +95,14 @@ print_tail_al_objs( void );
 al_ci_ca_t*
 acquire_ci_ca(
        IN              const   ib_net64_t                                      ci_ca_guid,
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );

 void
 release_ci_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca );
+       IN              const   ib_ca_handle_t                          h_ca );


-AL_EXPORT ib_ca_handle_t FUNC_PTR64 AL_API
+ib_ca_handle_t
 acquire_ca(
        IN              const   ib_net64_t                                      ci_ca_guid );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mgr_shared.c trunk\core\al\al_mgr_shared.c
--- old\core\al\al_mgr_shared.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mgr_shared.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -44,8 +45,8 @@
 #include "al_mgr.h"
 #include "al_pnp.h"

-ib_al_handle_t VOID_PTR64                      gh_al = NULL;
-ib_pool_handle_t VOID_PTR64            gh_mad_pool = NULL;
+ib_al_handle_t                 gh_al = NULL;
+ib_pool_handle_t               gh_mad_pool = NULL;
 al_mgr_t                               *gp_al_mgr = NULL;
 cl_async_proc_t                        *gp_async_proc_mgr = NULL;
 cl_async_proc_t                        *gp_async_pnp_mgr = NULL;
@@ -69,7 +70,7 @@ print_al_obj(

 void
 print_al_objs(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al )
+       IN              const   ib_al_handle_t                          h_al )
 {
        al_obj_t                *p_obj;
        cl_list_item_t  *p_list_item;
@@ -150,7 +151,7 @@ find_ci_ca(
 al_ci_ca_t*
 acquire_ci_ca(
        IN              const   ib_net64_t                                      ci_ca_guid,
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        al_ci_ca_t                      *p_ci_ca;

@@ -171,7 +172,7 @@ acquire_ci_ca(

 void
 release_ci_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        AL_ENTER( AL_DBG_MGR );
        remove_ca( h_ca );
@@ -207,7 +208,7 @@ remove_ci_ca(



-ib_ca_handle_t VOID_PTR64
+ib_ca_handle_t
 acquire_ca(
        IN              const   ib_net64_t                                      ci_ca_guid )
 {
@@ -237,7 +238,7 @@ acquire_ca(

 static ib_api_status_t
 __get_guid_by_gid (
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN              const   ib_gid_t* const                         p_gid,
        IN              const   uintn_t                                         type,
                OUT                     ib_net64_t* const                       p_guid )
@@ -344,7 +345,7 @@ end:

 ib_api_status_t
 ib_get_ca_by_gid(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN              const   ib_gid_t* const                         p_gid,
                OUT                     ib_net64_t* const                       p_ca_guid )
 {
@@ -373,7 +374,7 @@ ib_get_ca_by_gid(

 ib_api_status_t
 ib_get_port_by_gid(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN              const   ib_gid_t* const                         p_gid,
                OUT                     ib_net64_t* const                       p_port_guid )
 {
@@ -405,7 +406,7 @@ ib_get_port_by_gid(
  */
 ib_api_status_t
 ib_get_ca_guids(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
                OUT                     ib_net64_t* const                       p_guid_array OPTIONAL,
        IN      OUT                     size_t* const                           p_guid_cnt )
 {
@@ -624,7 +625,7 @@ __get_port_guid(

 ib_api_status_t
 ib_get_guid(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN              const   uint32_t                                        index,
        IN              const   ib_pnp_class_t                          device_type,
        IN              const   uint64_t                                        attr_mask,
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mr.h trunk\core\al\al_mr.h
--- old\core\al\al_mr.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mr.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -59,7 +60,7 @@ typedef struct _al_shmid
 typedef struct _ib_mr
 {
        al_obj_t                                        obj;
-TO_LONG_PTR(   ib_mr_handle_t ,                                h_ci_mr) ;      /* Actual HW handle. */
+       ib_mr_handle_t                          h_ci_mr;        /* Actual HW handle. */

        /* Reference to any memory registrations shared between processes. */
        al_shmid_t                                      *p_shmid;
@@ -82,81 +83,81 @@ mr_dtor(

 ib_api_status_t
 reg_mem(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr,
+               OUT                     ib_mr_handle_t* const           ph_mr,
        IN                              boolean_t                                       um_call );


 ib_api_status_t
 reg_phys(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_phys_create_t* const         p_phys_create,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr,
+               OUT                     ib_mr_handle_t* const           ph_mr,
        IN                              boolean_t                                       um_call );


 ib_api_status_t
 reg_shared(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_mr_handle_t                          h_mr,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_access_t                                     access_ctrl,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr,
+               OUT                     ib_mr_handle_t* const           ph_mr,
        IN                              boolean_t                                       um_call );


 ib_api_status_t
 rereg_mem(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_mr_create_t* const           p_mr_create OPTIONAL,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL,
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL,
        IN                              boolean_t                                       um_call );


 ib_api_status_t
 rereg_phys(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_phys_create_t* const         p_phys_create OPTIONAL,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL,
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL,
        IN                              boolean_t                                       um_call );


 ib_api_status_t
 dereg_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr );
+       IN              const   ib_mr_handle_t                          h_mr );

 ib_api_status_t
 reg_shmid(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_shmid_t                                      shmid,
        IN              const   ib_mr_create_t* const           p_mr_create,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr );
+               OUT                     ib_mr_handle_t* const           ph_mr );


 #ifdef CL_KERNEL
 typedef struct _mlnx_fmr
 {
        al_obj_t                                        obj;
-TO_LONG_PTR(   struct _mlnx_fmr *,                     h_ci_fmr) ;     /* Actual HW handle. */
-       TO_LONG_PTR(struct _mlnx_fmr *   ,      p_next) ;
+       mlnx_fmr_handle_t                       h_ci_fmr;       /* Actual HW handle. */
+       struct _mlnx_fmr*                       p_next;
 }      mlnx_fmr_t;


diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mr_shared.c trunk\core\al\al_mr_shared.c
--- old\core\al\al_mr_shared.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mr_shared.c        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -63,11 +64,11 @@ mr_ctor(
                OUT                     cl_pool_item_t** const          pp_pool_item )
 {
        ib_api_status_t                 status;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;

        UNUSED_PARAM( context );

-       h_mr = (ib_mr_handle_t VOID_PTR64)p_object;
+       h_mr = (ib_mr_handle_t)p_object;
        cl_memclr( h_mr, sizeof( ib_mr_t ) );

        construct_al_obj( &h_mr->obj, AL_OBJ_TYPE_H_MR );
@@ -78,7 +79,7 @@ mr_ctor(
                return CL_ERROR;
        }

-       *pp_pool_item = &((ib_mr_handle_t VOID_PTR64)p_object)->obj.pool_item;
+       *pp_pool_item = &((ib_mr_handle_t)p_object)->obj.pool_item;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &h_mr->obj );
@@ -115,7 +116,7 @@ __cleanup_mr(
        IN                              struct _al_obj                          *p_obj )
 {
        ib_api_status_t                 status;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;

        CL_ASSERT( p_obj );
        h_mr = PARENT_STRUCT( p_obj, ib_mr_t, obj );
@@ -146,7 +147,7 @@ static void
 __return_mr(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;

        h_mr = PARENT_STRUCT( p_obj, ib_mr_t, obj );
        reset_al_obj( p_obj );
@@ -157,11 +158,11 @@ __return_mr(

 ib_api_status_t
 ib_reg_mem(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        ib_api_status_t                 status;

@@ -187,14 +188,14 @@ ib_reg_mem(

 ib_api_status_t
 reg_mem(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr,
+               OUT                     ib_mr_handle_t* const           ph_mr,
        IN                              boolean_t                                       um_call )
 {
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -243,14 +244,14 @@ reg_mem(

 ib_api_status_t
 ib_reg_phys(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_phys_create_t* const         p_phys_create,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -308,12 +309,12 @@ ib_reg_phys(

 ib_api_status_t
 ib_rereg_mem(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_mr_create_t* const           p_mr_create OPTIONAL,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL )
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL )
 {
        if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
        {
@@ -328,12 +329,12 @@ ib_rereg_mem(

 ib_api_status_t
 rereg_mem(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_mr_create_t* const           p_mr_create OPTIONAL,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL,
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL,
        IN                              boolean_t                                       um_call )
 {
        ib_api_status_t         status;
@@ -381,13 +382,13 @@ rereg_mem(

 ib_api_status_t
 ib_rereg_phys(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_phys_create_t* const         p_phys_create OPTIONAL,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL )
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL )
 {
        ib_api_status_t         status;

@@ -439,13 +440,13 @@ ib_rereg_phys(

 ib_api_status_t
 ib_reg_shared(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_mr_handle_t                          h_mr,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_access_t                                     access_ctrl,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        ib_api_status_t                 status;

@@ -474,16 +475,16 @@ ib_reg_shared(

 ib_api_status_t
 reg_shared(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_mr_handle_t                          h_mr,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_access_t                                     access_ctrl,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr,
+               OUT                     ib_mr_handle_t* const           ph_mr,
        IN                              boolean_t                                       um_call )
 {
-       ib_mr_handle_t VOID_PTR64                       h_new_mr;
+       ib_mr_handle_t                  h_new_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -533,7 +534,7 @@ reg_shared(

 ib_api_status_t
 ib_dereg_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr )
+       IN              const   ib_mr_handle_t                          h_mr )
 {
        ib_api_status_t         status;

@@ -559,7 +560,7 @@ ib_dereg_mr(

 ib_api_status_t
 dereg_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr )
+       IN              const   ib_mr_handle_t                          h_mr )
 {
        ib_api_status_t         status;

@@ -598,7 +599,7 @@ dereg_mr(

 ib_api_status_t
 ib_query_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
                OUT                     ib_mr_attr_t* const                     p_mr_attr )
 {
        ib_api_status_t                 status;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mw.c trunk\core\al\al_mw.c
--- old\core\al\al_mw.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mw.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -61,12 +62,12 @@ free_mw(

 ib_api_status_t
 create_mw(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mw_handle_t FUNC_PTR64* const                ph_mw,
+               OUT                     ib_mw_handle_t* const           ph_mw,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_mw_handle_t                  h_mw;
        ib_api_status_t                 status;
        al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_MW;

@@ -125,7 +126,7 @@ create_mw(

 ib_api_status_t
 ib_destroy_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN              const   ib_mw_handle_t                          h_mw )
 {
        ib_api_status_t         status;

@@ -152,7 +153,7 @@ ib_destroy_mw(

 ib_api_status_t
 destroy_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN              const   ib_mw_handle_t                          h_mw )
 {
        ib_api_status_t         status;

@@ -183,7 +184,7 @@ void
 destroying_mw(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_mw_handle_t                  h_mw;

        CL_ASSERT( p_obj );
        h_mw = PARENT_STRUCT( p_obj, ib_mw_t, obj );
@@ -201,7 +202,7 @@ void
 free_mw(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_mw_handle_t                  h_mw;

        CL_ASSERT( p_obj );
        h_mw = PARENT_STRUCT( p_obj, ib_mw_t, obj );
@@ -214,8 +215,8 @@ free_mw(

 ib_api_status_t
 ib_query_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+       IN              const   ib_mw_handle_t                          h_mw,
+               OUT                     ib_pd_handle_t* const           ph_pd,
                OUT                     net32_t* const                          p_rkey )
 {
        return query_mw( h_mw, ph_pd, p_rkey, NULL );
@@ -224,12 +225,12 @@ ib_query_mw(

 ib_api_status_t
 query_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+       IN              const   ib_mw_handle_t                          h_mw,
+               OUT                     ib_pd_handle_t* const           ph_pd,
                OUT                     net32_t* const                          p_rkey,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
-       ib_pd_handle_t VOID_PTR64                       h_ci_pd;
+       ib_pd_handle_t                  h_ci_pd;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MW );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_mw.h trunk\core\al\al_mw.h
--- old\core\al\al_mw.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_mw.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -46,7 +47,7 @@ typedef struct _ib_mw

        /* List item used to store MW in PD list for proper destruction order. */
        cl_list_item_t                          pd_list_item;
-TO_LONG_PTR(   ib_mw_handle_t ,                                h_ci_mw) ;      /* Actual HW handle. */
+       ib_mw_handle_t                          h_ci_mw;        /* Actual HW handle. */

 }      ib_mw_t;

@@ -54,21 +55,21 @@ TO_LONG_PTR(        ib_mw_handle_t ,                                h_ci_mw

 ib_api_status_t
 create_mw(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
                OUT                     uint32_t* const                         p_rkey,
-               OUT                     ib_mw_handle_t FUNC_PTR64* const                ph_mw,
+               OUT                     ib_mw_handle_t* const           ph_mw,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 query_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+       IN              const   ib_mw_handle_t                          h_mw,
+               OUT                     ib_pd_handle_t* const           ph_pd,
                OUT                     uint32_t* const                         p_rkey,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

 ib_api_status_t
 destroy_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw );
+       IN              const   ib_mw_handle_t                          h_mw );

 #endif /* __AL_MW_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_pd.c trunk\core\al\al_pd.c
--- old\core\al\al_pd.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_pd.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -72,13 +73,13 @@ free_pd(

 ib_api_status_t
 alloc_pd(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   ib_pd_type_t                            pd_type,
        IN              const   void * const                            pd_context,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+               OUT                     ib_pd_handle_t* const           ph_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_pd_handle_t                  h_pd;
        ib_api_status_t                 status;
        al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_PD;

@@ -91,7 +92,7 @@ alloc_pd(
        }

        /* Allocate a protection domain. */
-       h_pd = (ib_pd_handle_t VOID_PTR64)cl_zalloc( sizeof( ib_pd_t ) );
+       h_pd = (ib_pd_handle_t)cl_zalloc( sizeof( ib_pd_t ) );
        if( !h_pd )
        {
                return IB_INSUFFICIENT_MEMORY;
@@ -155,7 +156,7 @@ alloc_pd(

 ib_api_status_t
 ib_dealloc_pd(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_PD );
@@ -182,10 +183,10 @@ void
 destroying_pd(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_al_handle_t VOID_PTR64                       h_al;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_al_handle_t                  h_al;
+       ib_ca_handle_t                  h_ca;
+       ib_pd_handle_t                  h_pd;
+       ib_mw_handle_t                  h_mw;
        cl_list_item_t                  *p_list_item;
        ib_api_status_t                 status;

@@ -220,7 +221,7 @@ void
 cleanup_pd(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_pd_handle_t                  h_pd;
        ib_api_status_t                 status;

        CL_ASSERT( p_obj );
@@ -251,7 +252,7 @@ void
 free_pd(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_pd_handle_t                  h_pd;

        CL_ASSERT( p_obj );
        h_pd = PARENT_STRUCT( p_obj, ib_pd_t, obj );
@@ -262,11 +263,11 @@ free_pd(

 ib_api_status_t
 ib_create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                       h_pd,
+       IN              const   ib_pd_handle_t                  h_pd,
        IN              const   ib_srq_attr_t* const            p_srq_attr,
        IN              const   void* const                                     srq_context,
        IN              const   ib_pfn_event_cb_t                       pfn_srq_event_cb OPTIONAL,
-               OUT                     ib_srq_handle_t FUNC_PTR64* const               ph_srq )
+               OUT                     ib_srq_handle_t* const          ph_srq )
 {
        ib_api_status_t                 status;

@@ -318,11 +319,11 @@ ib_create_srq(

 ib_api_status_t
 ib_create_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb OPTIONAL,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp )
+               OUT                     ib_qp_handle_t* const           ph_qp )
 {
        ib_api_status_t                 status;

@@ -333,14 +334,11 @@ ib_create_qp(
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_PD_HANDLE\n") );
                return IB_INVALID_PD_HANDLE;
        }
-
        if( !p_qp_create || !ph_qp )
        {
-
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n") );
                return IB_INVALID_PARAMETER;
        }
-
        if (h_pd->obj.p_ci_ca && h_pd->obj.p_ci_ca->p_pnp_attr)
        {
                if ((p_qp_create->rq_depth > h_pd->obj.p_ci_ca->p_pnp_attr->max_wrs) ||
@@ -371,13 +369,13 @@ ib_create_qp(

 ib_api_status_t
 ib_get_spl_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb OPTIONAL,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         p_pool_key OPTIONAL,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp )
+               OUT                     ib_pool_key_t* const            p_pool_key OPTIONAL,
+               OUT                     ib_qp_handle_t* const           ph_qp )
 {
        ib_api_status_t                 status;

@@ -404,9 +402,9 @@ ib_get_spl_qp(

 ib_api_status_t
 ib_create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_av_handle_t FUNC_PTR64* const                ph_av )
+               OUT                     ib_av_handle_t* const           ph_av )
 {
        ib_api_status_t                 status;

@@ -432,9 +430,9 @@ ib_create_av(

 ib_api_status_t
 ib_create_mw(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mw_handle_t FUNC_PTR64* const                ph_mw )
+               OUT                     ib_mw_handle_t* const           ph_mw )
 {
        ib_api_status_t                 status;

@@ -459,9 +457,9 @@ ib_create_mw(

 void
 pd_insert_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN              const   ib_mw_handle_t                          h_mw )
 {
-       ib_pd_handle_t VOID_PTR64               h_pd;
+       ib_pd_handle_t          h_pd;

        CL_ASSERT( h_mw );
        h_pd = PARENT_STRUCT( h_mw->obj.p_parent_obj, ib_pd_t, obj );
@@ -475,9 +473,9 @@ pd_insert_mw(

 void
 pd_remove_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN              const   ib_mw_handle_t                          h_mw )
 {
-       ib_pd_handle_t VOID_PTR64               h_pd;
+       ib_pd_handle_t          h_pd;

        CL_ASSERT( h_mw );
        h_pd = PARENT_STRUCT( h_mw->obj.p_parent_obj, ib_pd_t, obj );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_pd.h trunk\core\al\al_pd.h
--- old\core\al\al_pd.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_pd.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -53,7 +54,7 @@ typedef struct _ib_pd
        cl_qlist_t                                      mw_list;

        ib_pd_type_t                            type;
-TO_LONG_PTR(   ib_pd_handle_t ,                                h_ci_pd) ;              /* Actual CI PD handle. */
+       ib_pd_handle_t                          h_ci_pd;                /* Actual CI PD handle. */

 }      ib_pd_t;

@@ -61,20 +62,20 @@ TO_LONG_PTR(        ib_pd_handle_t ,                                h_ci_pd

 ib_api_status_t
 alloc_pd(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   ib_pd_type_t                            pd_type,
        IN              const   void * const                            pd_context,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd,
+               OUT                     ib_pd_handle_t* const           ph_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 void
 pd_insert_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw );
+       IN              const   ib_mw_handle_t                          h_mw );

 void
 pd_remove_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw );
+       IN              const   ib_mw_handle_t                          h_mw );


 #endif /* __AL_PD_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_pnp.h trunk\core\al\al_pnp.h
--- old\core\al\al_pnp.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_pnp.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -210,10 +211,10 @@ pnp_reg_complete(

 ib_api_status_t
 al_reg_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_pnp_req_t* const                     p_pnp_req,
        IN                              KEVENT                                          *p_sync_event,
-               OUT                     ib_pnp_handle_t FUNC_PTR64* const               ph_pnp );
+               OUT                     ib_pnp_handle_t* const          ph_pnp );

 #endif /* CL_KERNEL */

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_proxy.h trunk\core\al\al_proxy.h
--- old\core\al\al_proxy.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_proxy.h    Mon Jun 30 14:32:52 2008
@@ -114,7 +114,7 @@ typedef struct _al_dev_open_context
        cl_ioctl_handle_t       h_misc_ioctl;

        /* Per-process AL handle. */
-TO_LONG_PTR(   ib_al_handle_t  ,               h_al) ;
+       ib_al_handle_t          h_al;

 }      al_dev_open_context_t;

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_qp.c trunk\core\al\al_qp.c
--- old\core\al\al_qp.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_qp.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -62,13 +63,12 @@
 #include "al_verbs.h"

 #include "ib_common.h"
-#include "basetsd.h"


 #define UNBOUND_PORT_GUID              0


-extern ib_pool_handle_t VOID_PTR64                     gh_mad_pool;
+extern ib_pool_handle_t                        gh_mad_pool;


 /*
@@ -97,8 +97,8 @@ init_base_qp(

 ib_api_status_t
 init_raw_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_qp_handle_t                          h_qp,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid OPTIONAL,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );
@@ -106,54 +106,54 @@ init_raw_qp(
 ib_api_status_t
 init_conn_qp(
        IN                              al_conn_qp_t* const                     p_conn_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

 ib_api_status_t
 init_dgrm_qp(
        IN                              al_dgrm_qp_t* const                     p_dgrm_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

 ib_api_status_t
 init_special_qp(
        IN                              al_special_qp_t* const          p_special_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create );

 ib_api_status_t
 init_qp_alias(
        IN                              al_qp_alias_t* const            p_qp_alias,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create );

 ib_api_status_t
 init_mad_qp(
        IN                              al_mad_qp_t* const                      p_mad_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb );

 ib_api_status_t
 init_mad_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info );


 ib_api_status_t
 al_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 init_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info );

 ib_api_status_t
@@ -162,24 +162,24 @@ mad_qp_post_recvs(

 ib_api_status_t
 ud_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure );

 ib_api_status_t
 special_qp_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure );

 void
 mad_qp_queue_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr );

 void
 mad_qp_resume_sends(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp );
+       IN                              ib_qp_handle_t                          h_qp );

 void
 mad_qp_flush_send(
@@ -188,18 +188,18 @@ mad_qp_flush_send(

 void
 mad_recv_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context );

 void
 mad_send_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context );

 void
 mad_qp_comp(
        IN                              al_mad_qp_t*                            p_mad_qp,
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              ib_wc_type_t                            wc_type );

 void
@@ -214,38 +214,38 @@ mad_qp_cq_event_cb(
 ib_api_status_t
 alloc_qp(
        IN              const   ib_qp_type_t                            qp_type,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp )
+               OUT                     ib_qp_handle_t* const           ph_qp )
 {
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;

        switch( qp_type )
        {
        case IB_QPT_RELIABLE_CONN:
        case IB_QPT_UNRELIABLE_CONN:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( al_conn_qp_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( al_conn_qp_t ) );
                break;

        case IB_QPT_UNRELIABLE_DGRM:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( al_dgrm_qp_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( al_dgrm_qp_t ) );
                break;

        case IB_QPT_QP0:
        case IB_QPT_QP1:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( al_special_qp_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( al_special_qp_t ) );
                break;

        case IB_QPT_RAW_IPV6:
        case IB_QPT_RAW_ETHER:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( ib_qp_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( ib_qp_t ) );
                break;

        case IB_QPT_MAD:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( al_mad_qp_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( al_mad_qp_t ) );
                break;

        case IB_QPT_QP0_ALIAS:
        case IB_QPT_QP1_ALIAS:
-               h_qp = (ib_qp_handle_t VOID_PTR64)cl_zalloc( sizeof( al_qp_alias_t ) );
+               h_qp = (ib_qp_handle_t)cl_zalloc( sizeof( al_qp_alias_t ) );
                break;

        default:
@@ -280,15 +280,15 @@ alloc_qp(
  */
 ib_api_status_t
 create_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp,
+               OUT                     ib_qp_handle_t* const           ph_qp,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        ib_api_status_t                 status;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;

        if( !p_qp_create || !ph_qp )
        {
@@ -382,17 +382,17 @@ create_qp(

 ib_api_status_t
 get_spl_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         p_pool_key OPTIONAL,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp,
+               OUT                     ib_pool_key_t* const            p_pool_key OPTIONAL,
+               OUT                     ib_qp_handle_t* const           ph_qp,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        ib_api_status_t                 status;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;

        if( !p_qp_create || !ph_qp )
        {
@@ -509,7 +509,7 @@ get_spl_qp(

 static ib_api_status_t
 al_bad_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -522,7 +522,7 @@ al_bad_modify_qp(

 static ib_api_status_t
 al_bad_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
        IN                              ib_send_wr_t                            **pp_send_failure OPTIONAL )
 {
@@ -535,7 +535,7 @@ al_bad_post_send(

 static ib_api_status_t
 al_bad_post_recv(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
        IN                              ib_recv_wr_t                            **p_recv_failure OPTIONAL )
 {
@@ -548,7 +548,7 @@ al_bad_post_recv(

 static ib_api_status_t
 al_bad_init_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info )
 {
        UNUSED_PARAM( h_qp );
@@ -559,9 +559,9 @@ al_bad_init_dgrm_svc(

 static ib_api_status_t
 al_bad_reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc )
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc )
 {
        UNUSED_PARAM( h_qp );
        UNUSED_PARAM( p_mad_svc );
@@ -572,7 +572,7 @@ al_bad_reg_mad_svc(

 static ib_api_status_t
 al_bad_dereg_mad_svc(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc )
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc )
 {
        UNUSED_PARAM( h_mad_svc );
        return IB_INVALID_PARAMETER;
@@ -581,7 +581,7 @@ al_bad_dereg_mad_svc(

 static void
 al_bad_queue_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr )
 {
        UNUSED_PARAM( h_qp );
@@ -591,7 +591,7 @@ al_bad_queue_mad(

 static void
 al_bad_resume_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        UNUSED_PARAM( h_qp );
        return;
@@ -600,7 +600,7 @@ al_bad_resume_mad(

 static ib_api_status_t
 al_bad_join_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mcast_req_t* const           p_mcast_req )
 {
        UNUSED_PARAM( h_qp );
@@ -662,8 +662,8 @@ init_base_qp(

 ib_api_status_t
 init_raw_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_qp_handle_t                          h_qp,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid OPTIONAL,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
@@ -749,7 +749,7 @@ init_raw_qp(
 ib_api_status_t
 init_conn_qp(
        IN                              al_conn_qp_t* const                     p_conn_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -760,7 +760,6 @@ init_conn_qp(
        status = init_raw_qp( &p_conn_qp->qp, h_pd, UNBOUND_PORT_GUID,
                p_qp_create, p_umv_buf );

-
        return status;
 }

@@ -769,7 +768,7 @@ init_conn_qp(
 ib_api_status_t
 init_dgrm_qp(
        IN                              al_dgrm_qp_t* const                     p_dgrm_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -796,7 +795,7 @@ init_dgrm_qp(
 ib_api_status_t
 init_special_qp(
        IN                              al_special_qp_t* const          p_special_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create )
 {
@@ -826,7 +825,7 @@ init_special_qp(
 ib_api_status_t
 init_qp_alias(
        IN                              al_qp_alias_t* const            p_qp_alias,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create )
 {
@@ -879,14 +878,14 @@ init_qp_alias(
 ib_api_status_t
 init_mad_qp(
        IN                              al_mad_qp_t* const                      p_mad_qp,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb )
 {
        ib_cq_create_t                          cq_create;
        ib_qp_create_t                          qp_create;
-       ib_al_handle_t VOID_PTR64                               h_al;
-       ib_ca_handle_t VOID_PTR64                               h_ca;
+       ib_al_handle_t                          h_al;
+       ib_ca_handle_t                          h_ca;
        ib_api_status_t                         status;

        CL_ASSERT( p_mad_qp );
@@ -1018,7 +1017,7 @@ init_mad_qp(

 ib_api_status_t
 ib_destroy_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_QP );
@@ -1046,7 +1045,7 @@ void
 destroying_qp(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;
        al_mad_qp_t                             *p_mad_qp;
        al_qp_alias_t                   *p_qp_alias;
        net32_t                                 cid;
@@ -1153,7 +1152,7 @@ void
 cleanup_qp(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;
        al_mad_qp_t*                    p_mad_qp;
        al_mad_wr_t*                    p_mad_wr;
        cl_list_item_t*                 p_list_item;
@@ -1244,7 +1243,7 @@ void
 free_qp(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;

        CL_ASSERT( p_obj );
        h_qp = PARENT_STRUCT( p_obj, ib_qp_t, obj );
@@ -1261,7 +1260,7 @@ free_qp(

 ib_api_status_t
 ib_query_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
                OUT                     ib_qp_attr_t* const                     p_qp_attr )
 {
        return query_qp( h_qp, p_qp_attr, NULL );
@@ -1270,7 +1269,7 @@ ib_query_qp(

 ib_api_status_t
 query_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
                OUT                     ib_qp_attr_t* const                     p_qp_attr,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -1311,7 +1310,7 @@ query_qp(

 ib_api_status_t
 ib_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod )
 {
        return modify_qp( h_qp, p_qp_mod, NULL );
@@ -1321,7 +1320,7 @@ ib_modify_qp(

 ib_api_status_t
 modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -1350,7 +1349,7 @@ modify_qp(

 ib_api_status_t
 al_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -1387,7 +1386,7 @@ al_modify_qp(

 ib_api_status_t
 ndi_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN              const   uint32_t                                        buf_size,
        IN                              uint8_t* const                          p_outbuf)
@@ -1411,7 +1410,7 @@ ndi_modify_qp(

 ib_api_status_t
 ib_init_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info OPTIONAL )
 {
        ib_api_status_t                 status;
@@ -1460,7 +1459,7 @@ ib_init_dgrm_svc(
  */
 ib_api_status_t
 init_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info OPTIONAL )
 {
        al_dgrm_qp_t                    *p_dgrm_qp;
@@ -1534,7 +1533,7 @@ init_dgrm_svc(

 ib_api_status_t
 init_mad_dgrm_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info )
 {
        al_mad_qp_t                             *p_mad_qp;
@@ -1567,9 +1566,9 @@ init_mad_dgrm_svc(

 ib_api_status_t
 ib_reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc )
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc )
 {
        ib_api_status_t                 status;

@@ -1594,7 +1593,7 @@ ib_reg_mad_svc(

 ib_api_status_t
 ib_join_mcast(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mcast_req_t* const           p_mcast_req )
 {
        ib_api_status_t                 status;
@@ -1625,7 +1624,7 @@ ib_join_mcast(
  */
 ib_api_status_t
 ib_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure OPTIONAL )
 {
@@ -1661,7 +1660,7 @@ ib_post_send(

 ib_api_status_t
 ud_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure )
 {
@@ -1683,7 +1682,7 @@ ud_post_send(

        /* Restore all AV handles. */
        for( p_wr = p_send_wr; p_wr; p_wr = p_wr->p_next )
-               p_wr->dgrm.ud.h_av = (ib_av_handle_t VOID_PTR64)p_wr->dgrm.ud.rsvd;
+               p_wr->dgrm.ud.h_av = (ib_av_handle_t)p_wr->dgrm.ud.rsvd;

        return status;
 }
@@ -1698,7 +1697,7 @@ ud_post_send(
  */
 void
 special_qp_queue_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr )
 {
        al_special_qp_t*                p_special_qp;
@@ -1718,7 +1717,7 @@ special_qp_queue_mad(

 void
 special_qp_resume_sends(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        al_special_qp_t*                p_special_qp;
        cl_list_item_t*                 p_list_item;
@@ -1754,7 +1753,7 @@ special_qp_resume_sends(

 void
 mad_qp_queue_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr )
 {
        al_mad_qp_t                             *p_mad_qp;
@@ -1772,7 +1771,7 @@ mad_qp_queue_mad(

 void
 mad_qp_resume_sends(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN                              ib_qp_handle_t                          h_qp )
 {
        al_mad_qp_t                             *p_mad_qp;
        cl_list_item_t*                 p_list_item;
@@ -1840,7 +1839,7 @@ mad_qp_flush_send(

 ib_api_status_t
 ib_post_recv(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure OPTIONAL )
 {
@@ -1927,7 +1926,7 @@ mad_qp_post_recvs(

 void
 mad_recv_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context )
 {
        al_mad_qp_t                             *p_mad_qp;
@@ -1943,7 +1942,7 @@ mad_recv_comp_cb(

 void
 mad_send_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context )
 {
        al_mad_qp_t                             *p_mad_qp;
@@ -1963,7 +1962,7 @@ mad_send_comp_cb(
 void
 mad_qp_comp(
        IN                              al_mad_qp_t*                            p_mad_qp,
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              ib_wc_type_t                            wc_type )
 {
        ib_wc_t                                 wc;
@@ -2063,7 +2062,7 @@ mad_qp_cq_event_cb(
        if( p_event_rec->code == IB_AE_SQ_DRAINED )
                return;

-       p_mad_qp = (al_mad_qp_t* VOID_PTR64)p_event_rec->context;
+       p_mad_qp = (al_mad_qp_t*)p_event_rec->context;

        /* Nothing to do here. */
 }
@@ -2077,10 +2076,10 @@ void
 qp_async_event_cb(
        IN                              ib_async_event_rec_t* const     p_event_rec )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;

        CL_ASSERT( p_event_rec );
-       h_qp = (ib_qp_handle_t VOID_PTR64)p_event_rec->context;
+       h_qp = (ib_qp_handle_t)p_event_rec->context;

 #if defined(CL_KERNEL)
        switch( p_event_rec->code )
@@ -2113,12 +2112,12 @@ qp_async_event_cb(

 ib_api_status_t
 ib_bind_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_mw_handle_t                          h_mw,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_bind_wr_t * const            p_mw_bind,
                OUT                     net32_t * const                         p_rkey )
 {
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MW );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_qp.h trunk\core\al\al_qp.h
--- old\core\al\al_qp.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_qp.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -50,54 +51,54 @@

 typedef ib_api_status_t
 (*ib_pfn_modify_qp_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );

 typedef ib_api_status_t
 (*ib_pfn_post_send_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
        IN                              ib_send_wr_t                            **pp_send_failure OPTIONAL );

 typedef ib_api_status_t
 (*ib_pfn_post_recv_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
        IN                              ib_recv_wr_t                            **p_recv_failure OPTIONAL );

 typedef ib_api_status_t
 (*ib_pfn_init_dgrm_svc_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_dgrm_info_t* const           p_dgrm_info );

 typedef ib_api_status_t
 (*ib_pfn_reg_mad_svc_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc );
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc );

 typedef ib_api_status_t
 (*ib_pfn_dereg_mad_svc_t)(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc );
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc );

 typedef void
 (*ib_pfn_queue_mad_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr );

 typedef void
 (*ib_pfn_resume_mad_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp );
+       IN              const   ib_qp_handle_t                          h_qp );

 typedef ib_api_status_t
 (*ib_pfn_join_mcast_t)(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mcast_req_t* const           p_mcast_req );

 typedef ib_api_status_t
 (*ib_pfn_leave_mcast_t)(
-       IN              const   ib_mcast_handle_t FUNC_PTR64                    h_mcast );
+       IN              const   ib_mcast_handle_t                       h_mcast );


 /*
@@ -110,7 +111,7 @@ typedef struct _ib_qp
 {
        al_obj_t                                        obj;                    /* Must be first. */

-TO_LONG_PTR(   struct _ib_qp* ,                                h_ci_qp) ;
+       ib_qp_handle_t                          h_ci_qp;
        ib_qp_type_t                            type;
        ib_net32_t                                      num;
        ib_qp_state_t                           state;
@@ -122,23 +123,23 @@ TO_LONG_PTR(      struct _ib_qp* ,                                h_ci_qp
 #endif /* CL_KERNEL */

        /* Handles to pass to post_send and post_recv. */
-TO_LONG_PTR(   struct _ib_qp* ,                                h_recv_qp) ;
-TO_LONG_PTR(   struct _ib_qp* ,                                h_send_qp) ;
+       ib_qp_handle_t                          h_recv_qp;
+       ib_qp_handle_t                          h_send_qp;

        /*
         * For UD QPs, we have to mess with AV handles.  This is
         * where we store the actual post send function and appropriate
         * handle.
         */
-TO_LONG_PTR(   ib_qp_handle_t ,                                h_ud_send_qp) ;
-       ib_pfn_post_send_t                      pfn_ud_post_send; //TODO LONG POINTER TO FUNCTION?
+       ib_qp_handle_t                          h_ud_send_qp;
+       ib_pfn_post_send_t                      pfn_ud_post_send;

-TO_LONG_PTR(   struct _ib_cq* ,                                h_recv_cq) ;
-TO_LONG_PTR(   struct _ib_cq* ,                                h_send_cq) ;
+       ib_cq_handle_t                          h_recv_cq;
+       ib_cq_handle_t                          h_send_cq;
        cl_obj_rel_t                            recv_cq_rel;
        cl_obj_rel_t                            send_cq_rel;

-TO_LONG_PTR(   struct _ib_srq* ,                               h_srq) ;
+       ib_srq_handle_t                         h_srq;
        cl_obj_rel_t                            srq_rel;

        ib_pfn_event_cb_t                       pfn_event_cb;
@@ -210,7 +211,7 @@ typedef struct _al_qp_alias
 {
        ib_qp_t                                         qp;                             /* Must be first. */
        al_mad_disp_handle_t            h_mad_disp;
-TO_LONG_PTR(   ib_pool_key_t ,                         pool_key) ;             /* Global MAD pool. */
+       ib_pool_key_t                           pool_key;               /* Global MAD pool. */

 }      al_qp_alias_t;

@@ -221,11 +222,11 @@ TO_LONG_PTR(      ib_pool_key_t ,                         pool_key
 typedef struct _al_mad_qp
 {
        ib_qp_t                                         qp;                             /* Must be first. */
-TO_LONG_PTR(   ib_qp_handle_t ,                                h_dgrm_qp) ;
+       ib_qp_handle_t                          h_dgrm_qp;
        al_mad_disp_handle_t            h_mad_disp;

-TO_LONG_PTR(   ib_cq_handle_t ,                                h_recv_cq) ;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_send_cq) ;
+       ib_cq_handle_t                          h_recv_cq;
+       ib_cq_handle_t                          h_send_cq;

        cl_qlist_t                                      to_send_queue;  /* Waiting to be posted         */
        cl_qlist_t                                      send_queue;             /* Posted sends                         */
@@ -233,8 +234,8 @@ TO_LONG_PTR(        ib_cq_handle_t ,                                h_send_
        uint32_t                                        max_rq_depth;   /* Maximum recv queue depth     */
        atomic32_t                                      cur_rq_depth;   /* Current recv queue depth */

-TO_LONG_PTR(   ib_pool_handle_t ,                      h_pool) ;
-TO_LONG_PTR(   ib_pool_key_t ,                         pool_key) ;
+       ib_pool_handle_t                        h_pool;
+       ib_pool_key_t                           pool_key;

 }      al_mad_qp_t;

@@ -242,42 +243,42 @@ TO_LONG_PTR(      ib_pool_key_t ,                         pool_key

 ib_api_status_t
 create_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp,
+               OUT                     ib_qp_handle_t* const           ph_qp,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 query_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
                OUT                     ib_qp_attr_t* const                     p_qp_attr,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 get_spl_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN              const   void* const                                     qp_context,
        IN              const   ib_pfn_event_cb_t                       pfn_qp_event_cb,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         p_pool_key OPTIONAL,
-               OUT                     ib_qp_handle_t FUNC_PTR64* const                ph_qp,
+               OUT                     ib_pool_key_t* const            p_pool_key OPTIONAL,
+               OUT                     ib_qp_handle_t* const           ph_qp,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );



-ib_mad_send_handle_t FUNC_PTR64
+ib_mad_send_handle_t
 get_send_mad_wp(
        IN              const   al_qp_alias_t                           *p_qp_alias );

@@ -286,17 +287,17 @@ get_send_mad_wp(
 void
 put_send_mad_wp(
        IN              const   al_qp_alias_t                           *p_qp_alias,
-       IN              const   ib_mad_send_handle_t FUNC_PTR64         h_send_mad );
+       IN              const   ib_mad_send_handle_t            h_send_mad );


 void
 special_qp_resume_sends(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp );
+       IN              const   ib_qp_handle_t                          h_qp );


 void
 special_qp_queue_mad(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              al_mad_wr_t* const                      p_mad_wr );


@@ -306,9 +307,9 @@ qp_async_event_cb(


 /* Return the AL instance associated with this QP. */
-static inline ib_al_handle_t FUNC_PTR64
+static inline ib_al_handle_t
 qp_get_al(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        return h_qp->obj.h_al;
 }
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_query.c trunk\core\al\al_query.c
--- old\core\al\al_query.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_query.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -66,9 +67,9 @@ query_req_cb(

 ib_api_status_t
 ib_query(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_query_req_t* const           p_query_req,
-               OUT                     ib_query_handle_t FUNC_PTR64* const     ph_query OPTIONAL )
+               OUT                     ib_query_handle_t* const        ph_query OPTIONAL )
 {
        al_query_t                              *p_query;
        ib_api_status_t                 status;
@@ -166,7 +167,7 @@ query_sa(
        {
        case IB_QUERY_USER_DEFINED:
                AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_QUERY, ("USER_DEFINED\n") );
-               p_sa_req = (ib_user_query_t* VOID_PTR64)p_query_req->p_query_input;
+               p_sa_req = (ib_user_query_t*)p_query_req->p_query_input;
                if( !p_sa_req->method )
                {
                        AL_EXIT( AL_DBG_QUERY );
@@ -198,7 +199,7 @@ query_sa(
                sa_req.attr_size = sizeof( ib_service_record_t );
                sa_req.comp_mask = IB_SR_COMPMASK_SID;
                sa_req.p_attr = &rec.svc;
-               rec.svc.service_id = *(ib_net64_t* VOID_PTR64)(p_query_req->p_query_input);
+               rec.svc.service_id = *(ib_net64_t*)(p_query_req->p_query_input);
                break;

        case IB_QUERY_CLASS_PORT_INFO:
@@ -222,7 +223,7 @@ query_sa(
                sa_req.comp_mask = IB_NR_COMPMASK_NODEGUID;
                sa_req.p_attr = &rec.node;
                rec.node.node_info.node_guid =
-                       *(ib_net64_t* VOID_PTR64)(p_query_req->p_query_input);
+                       *(ib_net64_t*)(p_query_req->p_query_input);
                break;

        case IB_QUERY_PORT_REC_BY_LID:
@@ -232,7 +233,7 @@ query_sa(
                sa_req.comp_mask = IB_PIR_COMPMASK_BASELID;
                sa_req.p_attr = &rec.portinfo;
                rec.portinfo.port_info.base_lid =
-                       *(ib_net16_t* VOID_PTR64)(p_query_req->p_query_input);
+                       *(ib_net16_t*)(p_query_req->p_query_input);
                break;

        case IB_QUERY_PATH_REC_BY_PORT_GUIDS:
@@ -242,9 +243,9 @@ query_sa(
                sa_req.comp_mask = (IB_PR_COMPMASK_DGID |
                        IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUM_PATH);
                sa_req.p_attr = &rec.path;
-               ib_gid_set_default( &rec.path.dgid, ((ib_guid_pair_t* VOID_PTR64)
+               ib_gid_set_default( &rec.path.dgid, ((ib_guid_pair_t*)
                        (p_query_req->p_query_input))->dest_guid );
-               ib_gid_set_default( &rec.path.sgid, ((ib_guid_pair_t* VOID_PTR64)
+               ib_gid_set_default( &rec.path.sgid, ((ib_guid_pair_t*)
                        (p_query_req->p_query_input))->src_guid );
                rec.path.num_path = 1;
                break;
@@ -256,9 +257,9 @@ query_sa(
                sa_req.comp_mask = (IB_PR_COMPMASK_DGID |
                        IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUM_PATH);
                sa_req.p_attr = &rec.path;
-               cl_memcpy( &rec.path.dgid, &((ib_gid_pair_t* VOID_PTR64)
+               cl_memcpy( &rec.path.dgid, &((ib_gid_pair_t*)
                        (p_query_req->p_query_input))->dest_gid, sizeof( ib_gid_t ) );
-               cl_memcpy( &rec.path.sgid, &((ib_gid_pair_t* VOID_PTR64)
+               cl_memcpy( &rec.path.sgid, &((ib_gid_pair_t*)
                        (p_query_req->p_query_input))->src_gid, sizeof( ib_gid_t ) );
                rec.path.num_path = 1;
                break;
@@ -273,9 +274,9 @@ query_sa(
                        (IB_PR_COMPMASK_DLID | IB_PR_COMPMASK_SLID);
                sa_req.p_attr = &rec.path;
                rec.path.dlid =
-                       ((ib_lid_pair_t* VOID_PTR64)(p_query_req->p_query_input))->dest_lid;
+                       ((ib_lid_pair_t*)(p_query_req->p_query_input))->dest_lid;
                rec.path.slid =
-                       ((ib_lid_pair_t* VOID_PTR64)(p_query_req->p_query_input))->src_lid;
+                       ((ib_lid_pair_t*)(p_query_req->p_query_input))->src_lid;
 #ifdef PR102982
                rec.path.num_path = 1;
 #endif
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_query.h trunk\core\al\al_query.h
--- old\core\al\al_query.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_query.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -49,11 +50,11 @@ typedef struct _sa_req_svc
        ib_net16_t                                      sm_lid;
        uint8_t                                         sm_sl;

-TO_LONG_PTR(   ib_qp_handle_t ,                                h_qp) ;
-TO_LONG_PTR(   ib_mad_svc_handle_t ,                   h_mad_svc) ;
-TO_LONG_PTR(   ib_av_handle_t ,                                h_av) ;
+       ib_qp_handle_t                          h_qp;
+       ib_mad_svc_handle_t                     h_mad_svc;
+       ib_av_handle_t                          h_av;

-TO_LONG_PTR(   ib_pool_key_t ,                         pool_key) ;
+       ib_pool_key_t                           pool_key;
        atomic32_t                                      trans_id;

 }      sa_req_svc_t;
@@ -109,7 +110,7 @@ typedef struct _al_query
 {
        al_sa_req_t                                     sa_req;         /* Must be first. */

-TO_LONG_PTR(   ib_al_handle_t ,                                h_al) ;
+       ib_al_handle_t                          h_al;
        ib_pfn_query_cb_t                       pfn_query_cb;
        ib_query_type_t                         query_type;

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_reg_svc.c trunk\core\al\al_reg_svc.c
--- old\core\al\al_reg_svc.c    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_reg_svc.c  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -257,7 +258,7 @@ sa_reg_svc(

 ib_api_status_t
 ib_reg_svc(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_reg_svc_req_t* const         p_reg_svc_req,
                OUT                     ib_reg_svc_handle_t* const      ph_reg_svc )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_res_mgr.c trunk\core\al\al_res_mgr.c
--- old\core\al\al_res_mgr.c    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_res_mgr.c  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -163,7 +164,7 @@ free_res_mgr(
 /*
  * Get a memory region structure to track registration requests.
  */
-struct _ib_mr* VOID_PTR64
+ib_mr_handle_t
 alloc_mr()
 {
        al_obj_t                                *p_obj;
@@ -197,7 +198,7 @@ alloc_mr()
  */
 void
 put_mr(
-       IN                              struct _ib_mr* FUNC_PTR64                               h_mr )
+       IN                              ib_mr_handle_t                          h_mr )
 {
        cl_spinlock_acquire( &gp_res_mgr->obj.lock );
        cl_qpool_put( &gp_res_mgr->mr_pool, &h_mr->obj.pool_item );
@@ -210,7 +211,7 @@ put_mr(
 /*
  * Get a fast memory region structure to track registration requests.
  */
-mlnx_fmr_handle_t VOID_PTR64
+mlnx_fmr_handle_t
 alloc_mlnx_fmr()
 {
        al_obj_t                                *p_obj;
@@ -244,7 +245,7 @@ alloc_mlnx_fmr()
  */
 void
 put_mlnx_fmr(
-       IN                              mlnx_fmr_handle_t FUNC_PTR64                    h_fmr )
+       IN                              mlnx_fmr_handle_t                       h_fmr )
 {
        cl_spinlock_acquire( &gp_res_mgr->obj.lock );
        cl_qpool_put( &gp_res_mgr->fmr_pool, &h_fmr->obj.pool_item );
@@ -257,7 +258,7 @@ put_mlnx_fmr(
 /*
  * Get an address vector from the available pool.
  */
-ib_av_handle_t VOID_PTR64
+ib_av_handle_t
 alloc_av()
 {
        al_obj_t                                *p_obj;
@@ -290,7 +291,7 @@ alloc_av()
  */
 void
 put_av(
-       IN                              ib_av_handle_t FUNC_PTR64                               h_av )
+       IN                              ib_av_handle_t                          h_av )
 {
        cl_spinlock_acquire( &gp_res_mgr->obj.lock );
        cl_qpool_put( &gp_res_mgr->av_pool, &h_av->obj.pool_item );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_res_mgr.h trunk\core\al\al_res_mgr.h
--- old\core\al\al_res_mgr.h    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_res_mgr.h  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -67,31 +68,31 @@ create_res_mgr(
        IN                              al_obj_t                                        *p_parent_obj );


-struct _ib_mr* FUNC_PTR64
+ib_mr_handle_t
 alloc_mr(void);


 void
 put_mr(
-       IN                              struct _ib_mr* FUNC_PTR64                               h_mr );
+       IN                              ib_mr_handle_t                          h_mr );

 #ifdef CL_KERNEL
-mlnx_fmr_handle_t FUNC_PTR64
+mlnx_fmr_handle_t
 alloc_mlnx_fmr(void);


 void
 put_mlnx_fmr(
-       IN                              mlnx_fmr_handle_t FUNC_PTR64                    h_fmr );
+       IN                              mlnx_fmr_handle_t                       h_fmr );
 #endif

-ib_av_handle_t FUNC_PTR64
+ib_av_handle_t
 alloc_av(void);


 void
 put_av(
-       IN                              ib_av_handle_t FUNC_PTR64                               h_av );
+       IN                              ib_av_handle_t                          h_av );


 #endif /* __AL_RES_MGR_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_srq.c trunk\core\al\al_srq.c
--- old\core\al\al_srq.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_srq.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -68,7 +69,7 @@ free_srq(


 ib_destroy_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_SRQ );
@@ -101,10 +102,10 @@ void
 destroying_srq(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_srq_handle_t VOID_PTR64              h_srq;
+       ib_srq_handle_t         h_srq;
        cl_list_item_t          *p_item;
        cl_obj_rel_t            *p_rel;
-       ib_qp_handle_t VOID_PTR64               h_qp;
+       ib_qp_handle_t          h_qp;

        CL_ASSERT( p_obj );
        h_srq = PARENT_STRUCT( p_obj, ib_srq_t, obj );
@@ -117,7 +118,7 @@ destroying_srq(
        {
                p_rel = PARENT_STRUCT( p_item, cl_obj_rel_t, pool_item.list_item );
                p_rel->p_parent_obj = NULL;
-               h_qp = (ib_qp_handle_t VOID_PTR64)p_rel->p_child_obj;
+               h_qp = (ib_qp_handle_t)p_rel->p_child_obj;
                if( h_qp )
                {
                        /* Take a reference to prevent the QP from being destroyed. */
@@ -134,7 +135,7 @@ void
 cleanup_srq(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;
        ib_api_status_t                 status;

        CL_ASSERT( p_obj );
@@ -156,7 +157,7 @@ void
 free_srq(
        IN                              al_obj_t                                        *p_obj )
 {
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;

        CL_ASSERT( p_obj );
        h_srq = PARENT_STRUCT( p_obj, ib_srq_t, obj );
@@ -168,7 +169,7 @@ free_srq(

 void
 srq_attach_qp(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              cl_obj_rel_t* const                     p_qp_rel )
 {
        p_qp_rel->p_parent_obj = (cl_obj_t*)h_srq;
@@ -181,7 +182,7 @@ srq_attach_qp(

 void
 srq_detach_qp(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              cl_obj_rel_t* const                     p_qp_rel )
 {
        if( p_qp_rel->p_parent_obj )
@@ -197,7 +198,7 @@ srq_detach_qp(

 ib_api_status_t
 ib_modify_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64              h_srq,
+       IN              const   ib_srq_handle_t         h_srq,
        IN              const   ib_srq_attr_t* const            p_srq_attr,
        IN              const   ib_srq_attr_mask_t                      srq_attr_mask )
 {
@@ -207,7 +208,7 @@ ib_modify_srq(

 ib_api_status_t
 modify_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64              h_srq,
+       IN              const   ib_srq_handle_t         h_srq,
        IN              const   ib_srq_attr_t* const            p_srq_attr,
        IN              const   ib_srq_attr_mask_t                      srq_attr_mask,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
@@ -269,7 +270,7 @@ modify_srq(

 ib_api_status_t
 ib_query_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64                      h_srq,
+       IN              const   ib_srq_handle_t                 h_srq,
                OUT             ib_srq_attr_t* const                    p_srq_attr )
 {
        return query_srq( h_srq, p_srq_attr, NULL );
@@ -279,7 +280,7 @@ ib_query_srq(

 ib_api_status_t
 query_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64                      h_srq,
+       IN              const   ib_srq_handle_t                 h_srq,
                OUT             ib_srq_attr_t* const                    p_srq_attr,
        IN      OUT             ci_umv_buf_t* const             p_umv_buf )
 {
@@ -310,14 +311,14 @@ query_srq(
  */
 ib_api_status_t
 create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_srq_attr_t* const                    p_srq_attr,
        IN              const   void* const                                     srq_context,
        IN              const   ib_pfn_event_cb_t                               pfn_srq_event_cb,
-               OUT                     ib_srq_handle_t FUNC_PTR64* const                       ph_srq,
+               OUT                     ib_srq_handle_t* const                  ph_srq,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;
        ib_api_status_t                 status;
        al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_SRQ;

@@ -376,10 +377,10 @@ void
 srq_async_event_cb(
        IN                              ib_async_event_rec_t* const     p_event_rec )
 {
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;

        CL_ASSERT( p_event_rec );
-       h_srq = (ib_srq_handle_t VOID_PTR64)p_event_rec->context;
+       h_srq = (ib_srq_handle_t)p_event_rec->context;

 #if defined(CL_KERNEL)
        switch( p_event_rec->code )
@@ -408,7 +409,7 @@ srq_async_event_cb(

 ib_api_status_t
 ib_post_srq_recv(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure OPTIONAL )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_srq.h trunk\core\al\al_srq.h
--- old\core\al\al_srq.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_srq.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -44,7 +45,7 @@

 typedef ib_api_status_t
 (*ib_pfn_post_srq_recv_t)(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
        IN                              ib_recv_wr_t                            **p_recv_failure OPTIONAL );

@@ -57,9 +58,9 @@ typedef struct _ib_srq
 {
        al_obj_t                                        obj;                    /* Must be first. */

-TO_LONG_PTR(   struct _ib_srq* ,                       h_ci_srq) ;     /* kernel SRQ handle */
+       ib_srq_handle_t                 h_ci_srq;       /* kernel SRQ handle */
        ib_pfn_post_srq_recv_t          pfn_post_srq_recv;      /* post_srq_recv call */
-TO_LONG_PTR(   struct _ib_srq* ,                       h_recv_srq) ;   /* srq handle for the post_srq_recv call */
+       ib_srq_handle_t                 h_recv_srq;     /* srq handle for the post_srq_recv call */
        ib_pfn_event_cb_t                       pfn_event_cb;   /* user async event handler */
        cl_qlist_t                                      qp_list;        /* List of QPs bound to this CQ. */

@@ -67,24 +68,24 @@ TO_LONG_PTR(        struct _ib_srq* ,                       h_recv_

 ib_api_status_t
 create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_srq_attr_t* const                    p_srq_attr,
        IN              const   void* const                                     srq_context,
        IN              const   ib_pfn_event_cb_t                               pfn_srq_event_cb,
-               OUT                     ib_srq_handle_t FUNC_PTR64* const                       ph_srq,
+               OUT                     ib_srq_handle_t* const                  ph_srq,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 query_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
                OUT                     ib_srq_attr_t* const                    p_srq_attr,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );


 ib_api_status_t
 modify_srq(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN              const   ib_srq_attr_t* const                    p_srq_attr,
        IN              const   ib_srq_attr_mask_t                              srq_attr_mask,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );
@@ -96,12 +97,12 @@ srq_async_event_cb(

 void
 srq_attach_qp(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              cl_obj_rel_t* const                     p_qp_rel );

 void
 srq_detach_qp(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              cl_obj_rel_t* const                     p_qp_rel );

 #endif /* __AL_QP_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_sub.c trunk\core\al\al_sub.c
--- old\core\al\al_sub.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_sub.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -45,9 +46,9 @@

 ib_api_status_t
 ib_subscribe(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_sub_req_t* const                     p_sub_req,
-               OUT                     ib_sub_handle_t FUNC_PTR64* const               ph_sub )
+               OUT                     ib_sub_handle_t* const          ph_sub )
 {
        ib_api_status_t         status;

@@ -73,7 +74,7 @@ ib_subscribe(

 ib_api_status_t
 ib_unsubscribe(
-       IN              const   ib_sub_handle_t FUNC_PTR64                              h_sub,
+       IN              const   ib_sub_handle_t                         h_sub,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_SUB );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\al_verbs.h trunk\core\al\al_verbs.h
--- old\core\al\al_verbs.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\al_verbs.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -74,9 +75,9 @@

 static inline ib_api_status_t
 verbs_create_cq(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN      OUT                     ib_cq_create_t* const           p_cq_create,
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                              ib_cq_handle_t                          h_cq,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        return h_ca->obj.p_ci_ca->verbs.create_cq(
@@ -195,8 +196,8 @@ verbs_create_cq(

 static inline ib_api_status_t
 verbs_allocate_pd(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_ca_handle_t                          h_ca,
+       IN                              ib_pd_handle_t                          h_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        return h_ca->obj.p_ci_ca->verbs.allocate_pd(
@@ -209,8 +210,8 @@ verbs_allocate_pd(
  */
 static inline ib_api_status_t
 allocate_pd_alias(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd )
+       IN              const   ib_ca_handle_t                          h_ca,
+       IN              const   ib_pd_handle_t                          h_pd )
 {
        UNUSED_PARAM( h_ca );
        h_pd->h_ci_pd = h_pd->obj.p_ci_ca->h_pd->h_ci_pd;
@@ -220,7 +221,7 @@ allocate_pd_alias(

 static inline void
 deallocate_pd_alias(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd )
+       IN              const   ib_pd_handle_t                          h_pd )
 {
        deref_al_obj( &h_pd->obj.p_ci_ca->h_pd->obj );
 }
@@ -233,8 +234,8 @@ deallocate_pd_alias(

 static inline ib_api_status_t
 verbs_create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN                              ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN                              ib_srq_handle_t                         h_srq,
        IN              const   ib_srq_attr_t* const                    p_srq_attr,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
@@ -277,9 +278,9 @@ verbs_create_srq(

 static inline ib_api_status_t
 verbs_get_spl_qp(
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN                              ib_pd_handle_t                          h_pd,
        IN                              uint8_t                                         port_num,
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                              ib_qp_handle_t                          h_qp,
        IN                              ib_qp_create_t                          *p_qp_create,
        IN                              ib_qp_attr_t                            *p_qp_attr )
 {
@@ -300,8 +301,8 @@ verbs_get_spl_qp(

 static inline ib_api_status_t
 verbs_create_qp(
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                              ib_pd_handle_t                          h_pd,
+       IN                              ib_qp_handle_t                          h_qp,
        IN                              ib_qp_create_t                          *p_qp_create,
        IN                              ib_qp_attr_t                            *p_qp_attr,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
@@ -367,7 +368,7 @@ verbs_create_qp(

 #define verbs_attach_mcast(h_mcast)    \
        h_mcast->obj.p_ci_ca->verbs.attach_mcast(       \
-                       ((ib_qp_handle_t VOID_PTR64)h_mcast->obj.p_parent_obj)->h_ci_qp, &h_mcast->member_rec.mgid,     \
+                       ((ib_qp_handle_t)h_mcast->obj.p_parent_obj)->h_ci_qp, &h_mcast->member_rec.mgid,        \
                        h_mcast->member_rec.mlid, &h_mcast->h_ci_mcast, \
                        NULL)

@@ -377,8 +378,8 @@ verbs_create_qp(

 static inline ib_api_status_t
 verbs_ci_call(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   void* FUNC_PTR64 *              const   handle_array    OPTIONAL,
+       IN                              ib_ca_handle_t                          h_ca,
+       IN              const   void**                          const   handle_array    OPTIONAL,
        IN                              uint32_t                                        num_handles,
        IN                              ib_ci_op_t*                     const   p_ci_op,
        IN                              ci_umv_buf_t*           const   p_umv_buf OPTIONAL )
@@ -402,7 +403,7 @@ verbs_ci_call(

 #define verbs_check_av(h_av)   ((h_av)->h_ci_av || (h_av)->obj.hdl)
 #define convert_av_handle(h_qp, h_av) \
-       ((h_qp)->h_ci_qp?(h_av)->h_ci_av:(ib_av_handle_t VOID_PTR64)HDL_TO_PTR((h_av)->obj.hdl))
+       ((h_qp)->h_ci_qp?(h_av)->h_ci_av:(ib_av_handle_t)(ULONG_PTR)(h_av)->obj.hdl)
 #define verbs_destroy_av(h_av) \
        ual_destroy_av(h_av)

@@ -423,9 +424,9 @@ verbs_ci_call(

 static inline ib_api_status_t
 verbs_create_cq(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN      OUT                     ib_cq_create_t* const           p_cq_create,
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                              ib_cq_handle_t                          h_cq,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        UNUSED_PARAM( p_umv_buf );
@@ -522,8 +523,8 @@ verbs_create_cq(

 static inline ib_api_status_t
 verbs_allocate_pd(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_ca_handle_t                          h_ca,
+       IN                              ib_pd_handle_t                          h_pd,
        IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )
 {
        UNUSED_PARAM( p_umv_buf );
@@ -535,8 +536,8 @@ verbs_allocate_pd(
  */
 static inline ib_api_status_t
 allocate_pd_alias(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd )
+       IN              const   ib_ca_handle_t                          h_ca,
+       IN              const   ib_pd_handle_t                          h_pd )
 {
        return ual_allocate_pd( h_ca, h_pd->type, h_pd );
 }
@@ -600,7 +601,7 @@ allocate_pd_alias(

 static inline ib_api_status_t
 verbs_local_mad(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
        IN              const   uint8_t                                         port_num,
        IN              const   ib_av_attr_t*                                   p_src_av_attr,
        IN              const   void* const                                     p_mad_in,
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\ib_common.c trunk\core\al\ib_common.c
--- old\core\al\ib_common.c     Mon Jun 30 12:28:07 2008
+++ trunk\core\al\ib_common.c   Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -98,19 +99,19 @@ ib_fixup_ca_attr(

        /* Fix up the pointers to point within the destination buffer. */
        p_dest->p_page_size =
-               (uint32_t* VOID_PTR64)(((uint8_t* VOID_PTR64)p_dest->p_page_size) + offset);
+               (uint32_t*)(((uint8_t*)p_dest->p_page_size) + offset);

        p_tmp_port_attr =
-               (ib_port_attr_t* VOID_PTR64)(((uint8_t* VOID_PTR64)p_dest->p_port_attr) + offset);
+               (ib_port_attr_t*)(((uint8_t*)p_dest->p_port_attr) + offset);

        /* Fix up each port attribute's gid and pkey table pointers. */
        for( i = 0; i < p_dest->num_ports; i++ )
        {
-               p_tmp_port_attr[i].p_gid_table = (ib_gid_t* VOID_PTR64)
-                       (((uint8_t* VOID_PTR64)p_tmp_port_attr[i].p_gid_table) + offset);
+               p_tmp_port_attr[i].p_gid_table = (ib_gid_t*)
+                       (((uint8_t*)p_tmp_port_attr[i].p_gid_table) + offset);

-               p_tmp_port_attr[i].p_pkey_table =(ib_net16_t* VOID_PTR64)
-                       (((uint8_t* VOID_PTR64)p_tmp_port_attr[i].p_pkey_table) + offset);
+               p_tmp_port_attr[i].p_pkey_table =(ib_net16_t*)
+                       (((uint8_t*)p_tmp_port_attr[i].p_pkey_table) + offset);
        }
        p_dest->p_port_attr = p_tmp_port_attr;
 }
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ci_ca.c trunk\core\al\kernel\al_ci_ca.c
--- old\core\al\kernel\al_ci_ca.c       Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_ci_ca.c     Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -320,7 +321,7 @@ void
 ci_ca_comp_cb(
        IN                              void                                            *cq_context )
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq = (ib_cq_handle_t VOID_PTR64)cq_context;
+       ib_cq_handle_t                  h_cq = (ib_cq_handle_t)cq_context;

        if( h_cq->h_wait_obj )
                KeSetEvent( h_cq->h_wait_obj, IO_NETWORK_INCREMENT, FALSE );
@@ -441,8 +442,8 @@ release_shmid(

 ib_api_status_t
 ib_ci_call(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   void* FUNC_PTR64 *              const   handle_array    OPTIONAL,
+       IN                              ib_ca_handle_t                          h_ca,
+       IN              const   void**                          const   handle_array    OPTIONAL,
        IN                              uint32_t                                        num_handles,
        IN                              ib_ci_op_t*                     const   p_ci_op )
 {
@@ -453,13 +454,13 @@ ib_ci_call(

 ib_api_status_t
 ci_call(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   void* FUNC_PTR64 *              const   handle_array    OPTIONAL,
+       IN                              ib_ca_handle_t                          h_ca,
+       IN              const   void**                          const   handle_array    OPTIONAL,
        IN                              uint32_t                                        num_handles,
        IN                              ib_ci_op_t*                     const   p_ci_op,
        IN                              ci_umv_buf_t*           const   p_umv_buf OPTIONAL )
 {
-       void* VOID_PTR64 *              p_handle_array;
+       void**                  p_handle_array;
        ib_api_status_t status;

        AL_ENTER( AL_DBG_CA );
@@ -477,7 +478,7 @@ ci_call(
        p_handle_array = NULL;
        if ( num_handles )
        {
-               p_handle_array = cl_zalloc( sizeof(void* VOID_PTR64) * num_handles );
+               p_handle_array = cl_zalloc( sizeof(void*) * num_handles );
                if( !p_handle_array )
                        return IB_INSUFFICIENT_MEMORY;

@@ -511,7 +512,7 @@ ci_call(

 DEVICE_OBJECT*
 get_ca_dev(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca )
+       IN              const   ib_ca_handle_t                          h_ca )
 {
        ASSERT( h_ca );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_cm_cep.c trunk\core\al\kernel\al_cm_cep.c
--- old\core\al\kernel\al_cm_cep.c      Mon Jun 30 12:28:06 2008
+++ trunk\core\al\kernel\al_cm_cep.c    Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -111,7 +112,7 @@ typedef struct _al_cep_mgr
        cl_timer_t                              timewait_timer;
        cl_qlist_t                              timewait_list;

-       ib_pnp_handle_t VOID_PTR64                      h_pnp;
+       ib_pnp_handle_t                 h_pnp;

 }      al_cep_mgr_t;

@@ -123,11 +124,11 @@ typedef struct _cep_port_agent

        cl_map_item_t           item;

-       ib_ca_handle_t VOID_PTR64               h_ca;
-       ib_pd_handle_t VOID_PTR64               h_pd;
-       ib_qp_handle_t VOID_PTR64               h_qp;
-       ib_pool_key_t VOID_PTR64                pool_key;
-       ib_mad_svc_handle_t VOID_PTR64  h_mad_svc;
+       ib_ca_handle_t          h_ca;
+       ib_pd_handle_t          h_pd;
+       ib_qp_handle_t          h_qp;
+       ib_pool_key_t           pool_key;
+       ib_mad_svc_handle_t     h_mad_svc;

        net64_t                         port_guid;
        uint8_t                         port_num;
@@ -235,7 +236,7 @@ typedef struct _al_kcep
        /* Port guid for filtering incoming requests. */
        net64_t                                         port_guid;

-       TO_LONG_PTR(uint8_t* ,                  p_cmp_buf) ;
+       uint8_t*                                        p_cmp_buf;
        uint8_t                                         cmp_offset;
        uint8_t                                         cmp_len;

@@ -328,7 +329,7 @@ typedef struct _al_kcep
         * problem since all outstanding sends should be completed before the
         * mad service completes its destruction and the handle becomes invalid.
         */
-       ib_mad_svc_handle_t VOID_PTR64                  h_mad_svc;
+       ib_mad_svc_handle_t                     h_mad_svc;
        ib_mad_element_t                        *p_send_mad;

        /* Number of outstanding MADs.  Delays destruction of CEP destruction. */
@@ -382,7 +383,7 @@ typedef struct _al_kcep
 typedef struct _cep_cid
 {
        /* Owning AL handle.  NULL if invalid. */
-       ib_al_handle_t VOID_PTR64       h_al;
+       ib_al_handle_t  h_al;
        /* Pointer to CEP, or index of next free entry if h_al is NULL. */
        kcep_t                  *p_cep;
        /* For REJ Retry support */
@@ -433,9 +434,9 @@ __destroy_cep(
 static inline void
 __bind_cep(
        IN                              kcep_t* const                           p_cep,
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context );
+       IN                              void*                                           context );

 static inline void
 __unbind_cep(
@@ -458,7 +459,7 @@ __lookup_listen(

 static inline kcep_t*
 __lookup_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al OPTIONAL,
+       IN                              ib_al_handle_t                          h_al OPTIONAL,
        IN                              net32_t                                         cid );

 static inline kcep_t*
@@ -1963,7 +1964,7 @@ done:

 static void
 __cep_mad_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *context,
        IN                              ib_mad_element_t                        *p_mad )
 {
@@ -2177,7 +2178,7 @@ __cep_send_retry(

 static void
 __cep_mad_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *context,
        IN                              ib_mad_element_t                        *p_mad )
 {
@@ -2196,7 +2197,7 @@ __cep_mad_send_cb(

        p_port_cep = (cep_agent_t*)context;

-       p_cep = (kcep_t* VOID_PTR64)p_mad->context1;
+       p_cep = (kcep_t*)p_mad->context1;

        /*
         * The connection context is not set when performing immediate responses,
@@ -2592,7 +2593,7 @@ __get_lcid(

 static inline kcep_t*
 __lookup_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al OPTIONAL,
+       IN                              ib_al_handle_t                          h_al OPTIONAL,
        IN                              net32_t                                         cid )
 {
        size_t                          idx;
@@ -3022,9 +3023,9 @@ __cep_pnp_cb(
                CL_ASSERT( p_pnp_rec->context );

                /* Destroy the port agent. */
-               ref_al_obj( &((cep_agent_t* VOID_PTR64)p_pnp_rec->context)->obj );
-               ((cep_agent_t* VOID_PTR64)p_pnp_rec->context)->obj.pfn_destroy(
-                       &((cep_agent_t* VOID_PTR64)p_pnp_rec->context)->obj, NULL );
+               ref_al_obj( &((cep_agent_t*)p_pnp_rec->context)->obj );
+               ((cep_agent_t*)p_pnp_rec->context)->obj.pfn_destroy(
+                       &((cep_agent_t*)p_pnp_rec->context)->obj, NULL );
                break;

        default:
@@ -3369,14 +3370,12 @@ __complete_ndi_irp(
        IN                              PIRP                                            p_irp,
        IN                              ib_mad_element_t*                       p_mad )
 {
-       NTSTATUS nt_status;
        net32_t* p_new_cid = (net32_t*)cl_ioctl_out_buf( p_irp );
-       kcep_t* p_cep = (kcep_t* VOID_PTR64)p_mad->send_context1;
+       kcep_t* p_cep = (kcep_t*)p_mad->send_context1;

        *p_new_cid = p_cep->cid;
-       nt_status = STATUS_SUCCESS;
        p_irp->IoStatus.Information = sizeof(uint32_t);
-       p_irp->IoStatus.Status = nt_status;
+       p_irp->IoStatus.Status = STATUS_SUCCESS;
        IoCompleteRequest( p_irp, IO_NETWORK_INCREMENT );
        ib_put_mad( p_mad );
 }
@@ -3450,7 +3449,7 @@ __cep_queue_mad(
                /* get a pending IRP */
                if ( !IsListEmpty( &p_cep->irp_que ) )
                {
-                       kcep_t* p_new_cep = (kcep_t* VOID_PTR64)p_mad->send_context1;
+                       kcep_t* p_new_cep = (kcep_t*)p_mad->send_context1;

                        // get IRP
                        p_list_entry = RemoveHeadList( &p_cep->irp_que );
@@ -3463,7 +3462,7 @@ __cep_queue_mad(
                        AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
                                ("set %d of REQ pdata to CEP with cid %d, h_al %p\n",
                                sizeof(p_req->pdata), p_new_cep->cid,
-                               (ib_al_handle_t VOID_PTR64)p_irp->Tail.Overlay.DriverContext[1] ));
+                               (ib_al_handle_t)p_irp->Tail.Overlay.DriverContext[1] ));

                        // complete GetConnectionReq IRP
 #pragma warning(push, 3)
@@ -3660,9 +3659,9 @@ __create_cep()
 static inline void
 __bind_cep(
        IN                              kcep_t* const                           p_cep,
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context )
+       IN                              void*                                           context )
 {
        CL_ASSERT( p_cep );
        CL_ASSERT( p_cep->p_cid );
@@ -3958,7 +3957,7 @@ __cleanup_cep(
                p_mad->p_next = NULL;
                if( p_mad->send_context1 )
                {
-                       p_new_cep = (kcep_t* VOID_PTR64)p_mad->send_context1;
+                       p_new_cep = (kcep_t*)p_mad->send_context1;

                        __unbind_cep( p_new_cep );
                        __cleanup_cep( p_new_cep );
@@ -4086,9 +4085,9 @@ __destroy_cep(

 ib_api_status_t
 al_create_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
                OUT                     net32_t* const                          p_cid )
 {
        kcep_t                          *p_cep;
@@ -4123,7 +4122,7 @@ al_create_cep(

 ib_api_status_t
 al_destroy_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_pfn_destroy_cb_t                     pfn_destroy_cb )
 {
@@ -4168,7 +4167,7 @@ al_destroy_cep(
                pfn_destroy_cb( context );

        AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
-               ("Destroeyd CEP with cid %d, h_al %p, context %p \n",
+               ("Destroyed CEP with cid %d, h_al %p, context %p \n",
                cid, h_al, context ));

        AL_EXIT( AL_DBG_CM );
@@ -4178,7 +4177,7 @@ al_destroy_cep(

 ib_api_status_t
 al_cep_listen(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_cep_listen_t* const          p_listen_info )
 {
@@ -4665,7 +4664,7 @@ __save_user_req(

 ib_api_status_t
 al_cep_pre_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_req_t* const                      p_cm_req,
                OUT                     ib_qp_mod_t* const                      p_init )
@@ -4752,7 +4751,7 @@ al_cep_pre_req(

 ib_api_status_t
 al_cep_send_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -4925,7 +4924,7 @@ __format_rep(
 ib_api_status_t
 __al_cep_pre_rep(
        IN                              kcep_t                                          *p_cep,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init )
 {
@@ -4990,9 +4989,9 @@ __al_cep_pre_rep(

 ib_api_status_t
 al_cep_pre_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init )
 {
@@ -5025,10 +5024,10 @@ al_cep_pre_rep(

 ib_api_status_t
 al_cep_pre_rep_ex(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init )
 {
@@ -5065,7 +5064,7 @@ al_cep_pre_rep_ex(

 ib_api_status_t
 al_cep_send_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -5156,7 +5155,7 @@ __format_rtu(

 ib_api_status_t
 al_cep_rtu(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t*                                        p_pdata OPTIONAL,
        IN                              uint8_t                                         pdata_len )
@@ -5218,7 +5217,7 @@ al_cep_rtu(

 ib_api_status_t
 al_cep_rej(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_rej_status_t                         rej_status,
        IN              const   uint8_t* const                          p_ari,
@@ -5312,7 +5311,7 @@ __format_mra(

 ib_api_status_t
 al_cep_mra(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_mra_t* const                      p_cm_mra )
 {
@@ -5450,7 +5449,7 @@ __format_lap(

 ib_api_status_t
 al_cep_lap(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_lap_t* const                      p_cm_lap )
 {
@@ -5581,7 +5580,7 @@ __format_apr(

 ib_api_status_t
 al_cep_pre_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_apr_t* const                      p_cm_apr,
                OUT                     ib_qp_mod_t* const                      p_apr )
@@ -5671,7 +5670,7 @@ al_cep_pre_apr(

 ib_api_status_t
 al_cep_send_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -5727,7 +5726,7 @@ al_cep_send_apr(

 ib_api_status_t
 al_cep_dreq(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t* const                          p_pdata,
        IN              const   uint8_t                                         pdata_len )
@@ -5797,7 +5796,7 @@ al_cep_dreq(

 ib_api_status_t
 al_cep_drep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_drep_t* const                     p_cm_drep )
 {
@@ -5810,7 +5809,6 @@ al_cep_drep(
        AL_ENTER( AL_DBG_CM );

        CL_ASSERT( h_al );
-       CL_ASSERT( p_cm_drep );

        KeAcquireInStackQueuedSpinLock( &gp_cep_mgr->lock, &hdl );
        p_cep = __lookup_cep( h_al, cid );
@@ -5852,7 +5850,7 @@ al_cep_drep(

 ib_api_status_t
 al_cep_migrate(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -5904,7 +5902,7 @@ al_cep_migrate(

 ib_api_status_t
 al_cep_established(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -5949,7 +5947,7 @@ al_cep_established(

 ib_api_status_t
 al_cep_get_rtr_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rtr )
 {
@@ -6015,7 +6013,7 @@ al_cep_get_rtr_attr(

 ib_api_status_t
 al_cep_get_rts_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rts )
 {
@@ -6090,7 +6088,7 @@ al_cep_get_rts_attr(

 ib_api_status_t
 al_cep_get_timewait(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     uint64_t* const                         p_timewait_us )
 {
@@ -6119,9 +6117,9 @@ al_cep_get_timewait(

 ib_api_status_t
 al_cep_poll(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-               OUT                     void* FUNC_PTR64 *                              p_context,
+               OUT                     void**                                          p_context,
                OUT                     net32_t* const                          p_new_cid,
                OUT                     ib_mad_element_t** const        pp_mad )
 {
@@ -6159,7 +6157,7 @@ al_cep_poll(
        (*pp_mad)->p_next = NULL;

        /* We're done with the input CEP.  Reuse the variable */
-       p_cep = (kcep_t* VOID_PTR64)(*pp_mad)->send_context1;
+       p_cep = (kcep_t*)(*pp_mad)->send_context1;
        if( p_cep )
                *p_new_cid = p_cep->cid;
        else
@@ -6180,7 +6178,7 @@ __cep_cancel_irp(
        IN                              IRP*                                            p_irp )
 {
        net32_t                                 cid;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        KLOCK_QUEUE_HANDLE              hdl;
        kcep_t                                  *p_cep;

@@ -6190,7 +6188,7 @@ __cep_cancel_irp(
        CL_ASSERT( p_irp );

        cid = (net32_t)(size_t)p_irp->Tail.Overlay.DriverContext[0];
-       h_al = (ib_al_handle_t VOID_PTR64)p_irp->Tail.Overlay.DriverContext[1];
+       h_al = (ib_al_handle_t)p_irp->Tail.Overlay.DriverContext[1];
        CL_ASSERT( h_al );

        KeAcquireInStackQueuedSpinLock( &gp_cep_mgr->lock, &hdl );
@@ -6208,7 +6206,7 @@ __cep_cancel_irp(

 NTSTATUS
 al_cep_queue_irp(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              IRP* const                                      p_irp )
 {
@@ -6257,7 +6255,7 @@ al_cep_queue_irp(

 void
 al_cep_cleanup_al(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al )
+       IN              const   ib_al_handle_t                          h_al )
 {
        cl_list_item_t          *p_item;
        net32_t                         cid;
@@ -6322,7 +6320,7 @@ __cep_cancel_ndi_irp(

 NTSTATUS
 al_cep_get_cid(
-       IN              ib_al_handle_t FUNC_PTR64                                               h_al,
+       IN              ib_al_handle_t                                          h_al,
        IN              net32_t                 const                           cid,
        IN              PIRP                                                            p_irp
        )
@@ -6367,7 +6365,7 @@ al_cep_get_cid(

        /* store REQ private data */
        p_req = (mad_cm_req_t*)ib_get_mad_buf( p_mad );
-       p_new_cep = (kcep_t* VOID_PTR64)p_mad->send_context1;
+       p_new_cep = (kcep_t*)p_mad->send_context1;
        __cep_set_pdata( h_al, p_new_cep->cid,
                sizeof(p_req->pdata), (uint8_t*)p_req->pdata );
        AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
@@ -6387,7 +6385,7 @@ exit:

 ib_api_status_t
 al_cep_get_pdata(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN      OUT                     uint8_t                                         *p_psize,
                OUT                     uint8_t*                                        pdata )
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_dev.c trunk\core\al\kernel\al_dev.c
--- old\core\al\kernel\al_dev.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_dev.c       Mon Jun 30 14:32:52 2008
@@ -234,7 +234,7 @@ __proxy_reg_pnp(
        IN              al_dev_open_context_t                   *p_context )
 {
        ib_pnp_req_t                    pnp_req;
-       ib_pnp_handle_t VOID_PTR64                      h_pnp;
+       ib_pnp_handle_t                 h_pnp;
        ib_api_status_t                 status;

        /* Register for PnP events. */
@@ -447,21 +447,21 @@ al_dev_ioctl(

        /* Process the ioctl command. */
        if( IS_AL_PROXY_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = proxy_ioctl( h_ioctl, &ret_bytes ); //check_done
+               cl_status = proxy_ioctl( h_ioctl, &ret_bytes );
        else if( IS_VERBS_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = verbs_ioctl( h_ioctl, &ret_bytes ); //check_done
+               cl_status = verbs_ioctl( h_ioctl, &ret_bytes );
        //else if( IS_CM_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
        //      cl_status = cm_ioctl( h_ioctl, &ret_bytes );
        else if( IS_CEP_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = cep_ioctl( h_ioctl, &ret_bytes ); //check_done
+               cl_status = cep_ioctl( h_ioctl, &ret_bytes );
        else if( IS_AL_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = al_ioctl( h_ioctl, &ret_bytes ); //check_done
+               cl_status = al_ioctl( h_ioctl, &ret_bytes );
        else if( IS_SUBNET_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = subnet_ioctl( h_ioctl, &ret_bytes ); //check_done
+               cl_status = subnet_ioctl( h_ioctl, &ret_bytes );
        else if( IS_IOC_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = ioc_ioctl( h_ioctl, &ret_bytes ); //check_done, no IOCTLS
+               cl_status = ioc_ioctl( h_ioctl, &ret_bytes );
        else if( IS_NDI_IOCTL(cl_ioctl_ctl_code( h_ioctl )) )
-               cl_status = ndi_ioctl( h_ioctl, &ret_bytes ); //check_done, on IN ioctls
+               cl_status = ndi_ioctl( h_ioctl, &ret_bytes );
        else
                cl_status = CL_INVALID_REQUEST;

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_fmr_pool.c trunk\core\al\kernel\al_fmr_pool.c
--- old\core\al\kernel\al_fmr_pool.c    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_fmr_pool.c  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -107,7 +108,7 @@ static inline mlnx_fmr_pool_element_t *_
                         page_list_len == p_fmr_el->page_list_len &&
                         !memcmp(page_list, p_fmr_el->page_list, page_list_len * sizeof *page_list))
                         return p_fmr_el;
-       }
+       }

        return NULL;
 }
@@ -118,7 +119,7 @@ __fmr_pool_batch_release(mlnx_fmr_pool_t
 {
        ib_api_status_t                 status;
        mlnx_fmr_pool_element_t *p_fmr_el;
-       mlnx_fmr_handle_t VOID_PTR64                    h_fmr = NULL;
+       mlnx_fmr_handle_t                       h_fmr = NULL;
        cl_qlist_t                                      unmap_list;
        cl_list_item_t                          *p_list_item;
        cl_qlist_t *bucket;
@@ -190,7 +191,7 @@ __fmr_cleanup_thread(void * p_pool_ptr)
                        }

                        if (p_pool->flush_function)
-                               p_pool->flush_function( (mlnx_fmr_pool_handle_t VOID_PTR64)p_pool, p_pool->flush_arg);
+                               p_pool->flush_function( (mlnx_fmr_pool_handle_t)p_pool, p_pool->flush_arg);
                }

                if (!flush_req)
@@ -320,9 +321,9 @@ __free_fmr_pool(

 ib_api_status_t
 mlnx_create_fmr_pool(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   mlnx_fmr_pool_create_t          *p_fmr_pool_attr,
-       OUT             mlnx_fmr_pool_handle_t FUNC_PTR64* const                        ph_pool )
+       OUT             mlnx_fmr_pool_handle_t* const                   ph_pool )
 {
        ib_api_status_t         status = IB_SUCCESS;
        mlnx_fmr_pool_t         *p_pool;
@@ -472,7 +473,7 @@ mlnx_create_fmr_pool(
                                goto err_alloc_cache_el;
                        }

-                       p_fmr_el->h_pool = (mlnx_fmr_pool_handle_t VOID_PTR64)p_pool;
+                       p_fmr_el->h_pool = (mlnx_fmr_pool_handle_t)p_pool;
                        p_fmr_el->remap_count = 0;
                        p_fmr_el->ref_count = 0;

@@ -550,7 +551,7 @@ end:
  */
 ib_api_status_t
 mlnx_destroy_fmr_pool(
-       IN              const   mlnx_fmr_pool_handle_t FUNC_PTR64        h_pool)
+       IN              const   mlnx_fmr_pool_handle_t   h_pool)
 {
        mlnx_fmr_pool_t                 *p_pool = (mlnx_fmr_pool_t*)h_pool;

@@ -572,7 +573,7 @@ mlnx_destroy_fmr_pool(


 ib_api_status_t
-mlnx_flush_fmr_pool(mlnx_fmr_pool_handle_t VOID_PTR64  h_pool)
+mlnx_flush_fmr_pool(mlnx_fmr_pool_handle_t     h_pool)
 {

        ib_api_status_t                 status = IB_SUCCESS;
@@ -598,13 +599,13 @@ mlnx_flush_fmr_pool(mlnx_fmr_pool_handle

 ib_api_status_t
 mlnx_map_phys_fmr_pool(
-       IN              const   mlnx_fmr_pool_handle_t FUNC_PTR64               h_pool ,
+       IN              const   mlnx_fmr_pool_handle_t          h_pool ,
        IN              const   uint64_t* const                         page_list,
        IN              const   int                                                     list_len,
        IN      OUT                     uint64_t* const                         p_vaddr,
-       OUT             net32_t* const                                  p_lkey,
-       OUT             net32_t* const                                  p_rkey,
-       OUT                             mlnx_fmr_pool_el_t FUNC_PTR64           *pp_fmr_el)
+       OUT             net32_t* const                                  p_lkey,
+       OUT             net32_t* const                                  p_rkey,
+       OUT                             mlnx_fmr_pool_el_t              *pp_fmr_el)
 {

        ib_api_status_t                 status = IB_SUCCESS;
@@ -688,7 +689,7 @@ mlnx_map_phys_fmr_pool(
        }

 end:
-       *pp_fmr_el = (mlnx_fmr_pool_el_t VOID_PTR64)p_fmr_el;
+       *pp_fmr_el = (mlnx_fmr_pool_el_t)p_fmr_el;
        *p_lkey = p_fmr_el->lkey;
        *p_rkey = p_fmr_el->rkey;
        *p_vaddr = p_fmr_el->io_virtual_address;
@@ -702,13 +703,13 @@ exit:

 ib_api_status_t
 mlnx_unmap_fmr_pool(
-       IN              mlnx_fmr_pool_el_t FUNC_PTR64                   p_fmr_el )
+       IN              mlnx_fmr_pool_el_t                      p_fmr_el )
 {
        mlnx_fmr_pool_t                 *p_pool;

        p_pool = (mlnx_fmr_pool_t*)p_fmr_el->h_pool;

-       if( AL_OBJ_INVALID_HANDLE( (mlnx_fmr_pool_handle_t FUNC_PTR64)p_pool, AL_OBJ_TYPE_H_FMR_POOL ) )
+       if( AL_OBJ_INVALID_HANDLE( (mlnx_fmr_pool_handle_t)p_pool, AL_OBJ_TYPE_H_FMR_POOL ) )
        {
                AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
                return IB_INVALID_HANDLE;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_fmr_pool.h trunk\core\al\kernel\al_fmr_pool.h
--- old\core\al\kernel\al_fmr_pool.h    Mon Jun 30 12:28:06 2008
+++ trunk\core\al\kernel\al_fmr_pool.h  Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -69,18 +70,18 @@

 #pragma warning( disable : 4200)
 typedef struct _mlnx_fmr_pool_element {
-TO_LONG_PTR(   mlnx_fmr_handle_t ,                     h_fmr) ;
-TO_LONG_PTR(   struct _mlnx_fmr_pool* ,        h_pool) ;
+       mlnx_fmr_handle_t                       h_fmr;
+       mlnx_fmr_pool_handle_t  h_pool;
        cl_list_item_t                          list_item;
        cl_qlist_t                                      *p_cur_list;
        cl_list_item_t                          cache_node;
        boolean_t                               in_cash;
        int                                             ref_count;
        int                                             remap_count;
-       uint64_t                                        io_virtual_address;
+       uint64_t                                        io_virtual_address;
        net32_t                                 lkey;
        net32_t                                 rkey;
-       int                                             page_list_len;
+       int                                             page_list_len;
        uint64_t                                        page_list[0];
 } mlnx_fmr_pool_element_t;
 #pragma warning( default  : 4200)
@@ -88,7 +89,7 @@ TO_LONG_PTR(  struct _mlnx_fmr_pool* ,        h_

 typedef struct _mlnx_fmr_pool {

-       al_obj_t                                                obj;                    /* Child of ib_al_handle_t  */
+       al_obj_t                                                obj;                    /* Child of ib_al_handle_t */
        cl_spinlock_t                                   pool_lock;

        int                                                     pool_size;
@@ -101,15 +102,14 @@ typedef struct _mlnx_fmr_pool {
        cl_qlist_t                                              rest_list;      /* those, that not in free and not in dirty */
        cl_qlist_t                                              *cache_bucket;

-//TO_LONG_PTR( void                                                    (*flush_function) (mlnx_fmr_pool_handle_t , h_pool,void* arg)) ;
-    void                                                       (*flush_function) (mlnx_fmr_pool_handle_t h_pool ,void* arg) ; //this struct isn't used in ioctls
+       void                                                    (*flush_function) (mlnx_fmr_pool_handle_t h_pool,void* arg);
        void                                                    *flush_arg;

        cl_thread_t                                     thread;
        cl_event_t                                      do_flush_event;
        cl_event_t                                      flush_done_event;
-       atomic32_t                                      flush_req;
-       atomic32_t                                      should_stop;
+       atomic32_t                                      flush_req;
+       atomic32_t                                      should_stop;
 } mlnx_fmr_pool_t;


diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ioc_pnp.c trunk\core\al\kernel\al_ioc_pnp.c
--- old\core\al\kernel\al_ioc_pnp.c     Mon Jun 30 12:28:06 2008
+++ trunk\core\al\kernel\al_ioc_pnp.c   Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -109,7 +110,7 @@ typedef struct _ioc_pnp_mgr
        cl_qlist_t                              iou_reg_list;
        cl_qlist_t                              ioc_reg_list;

-       ib_pnp_handle_t VOID_PTR64                      h_pnp;
+       ib_pnp_handle_t                 h_pnp;

        cl_async_proc_item_t    async_item;
        boolean_t                               async_item_is_busy;
@@ -137,13 +138,13 @@ typedef struct _ioc_pnp_svc
        net64_t                                 ca_guid;
        net64_t                                 port_guid;

-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_pool_key_t VOID_PTR64                        pool_key;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_qp_handle_t                  h_qp;
+       ib_pool_key_t                   pool_key;
+       ib_mad_svc_handle_t             h_mad_svc;

        atomic32_t                              query_cnt;
-       ib_query_handle_t VOID_PTR64            h_node_query;
-       ib_query_handle_t VOID_PTR64            h_path_query;
+       ib_query_handle_t               h_node_query;
+       ib_query_handle_t               h_path_query;
        ib_mad_element_t                *p_node_element;
        ib_mad_element_t                *p_path_element;
        uint32_t                                num_nodes;
@@ -448,13 +449,13 @@ __free_ioc_pnp_svc(
 ******************************************************************************/
 static void
 __ioc_pnp_recv_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_request_mad );

 static void
 __ioc_pnp_send_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_response );

@@ -1254,9 +1255,9 @@ __ioc_pnp_cb(

        case IB_PNP_PORT_REMOVE:
                /* Destroy the port service. */
-               ref_al_obj( &((ioc_pnp_svc_t* VOID_PTR64)p_pnp_rec->context)->obj );
-               ((ioc_pnp_svc_t* VOID_PTR64)p_pnp_rec->context)->obj.pfn_destroy(
-                       &((ioc_pnp_svc_t* VOID_PTR64)p_pnp_rec->context)->obj, NULL );
+               ref_al_obj( &((ioc_pnp_svc_t*)p_pnp_rec->context)->obj );
+               ((ioc_pnp_svc_t*)p_pnp_rec->context)->obj.pfn_destroy(
+                       &((ioc_pnp_svc_t*)p_pnp_rec->context)->obj, NULL );
                p_pnp_rec->context = NULL;

        default:
@@ -1274,7 +1275,7 @@ __init_ioc_pnp_svc(
        IN              const   ib_pnp_rec_t* const                     p_pnp_rec )
 {
        ib_api_status_t         status;
-       ib_ca_handle_t VOID_PTR64               h_ca;
+       ib_ca_handle_t          h_ca;
        ib_qp_create_t          qp_create;
        ib_mad_svc_t            mad_svc;
        ib_pnp_port_rec_t       *p_pnp_port_rec;
@@ -1609,7 +1610,7 @@ __node_rec_cb(

        AL_ENTER( AL_DBG_PNP );

-       p_svc = (ioc_pnp_svc_t* VOID_PTR64)p_query_rec->query_context;
+       p_svc = (ioc_pnp_svc_t*)p_query_rec->query_context;

        if( p_svc->obj.state != CL_DESTROYING &&
                p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )
@@ -1647,7 +1648,7 @@ __path_rec_cb(

        AL_ENTER( AL_DBG_PNP );

-       p_svc = (ioc_pnp_svc_t* VOID_PTR64)p_query_rec->query_context;
+       p_svc = (ioc_pnp_svc_t*)p_query_rec->query_context;

        if( p_svc->obj.state != CL_DESTROYING &&
                p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )
@@ -2048,7 +2049,7 @@ __query_ious(

 static void
 __ioc_pnp_recv_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_response )
 {
@@ -2062,26 +2063,26 @@ __ioc_pnp_recv_cb(
        UNUSED_PARAM( mad_svc_context );
        CL_ASSERT( !p_mad_response->p_next );

-       p_results = (ioc_sweep_results_t* VOID_PTR64)p_mad_response->send_context1;
+       p_results = (ioc_sweep_results_t*)p_mad_response->send_context1;
        if( !p_mad_response->p_mad_buf->status )
        {
                /* Query was successful */
                switch( p_mad_response->p_mad_buf->attr_id )
                {
                case IB_MAD_ATTR_IO_UNIT_INFO:
-                       p_iou = (iou_node_t* VOID_PTR64)p_mad_response->send_context2;
+                       p_iou = (iou_node_t*)p_mad_response->send_context2;
                        __iou_info_resp( p_iou,
                                (ib_dm_mad_t*)p_mad_response->p_mad_buf );
                        break;

                case IB_MAD_ATTR_IO_CONTROLLER_PROFILE:
-                       p_iou = (iou_node_t* VOID_PTR64)p_mad_response->send_context2;
+                       p_iou = (iou_node_t*)p_mad_response->send_context2;
                        __ioc_profile_resp( p_iou,
                                (ib_dm_mad_t*)p_mad_response->p_mad_buf );
                        break;

                case IB_MAD_ATTR_SERVICE_ENTRIES:
-                       p_ioc = (iou_ioc_t* VOID_PTR64)p_mad_response->send_context2;
+                       p_ioc = (iou_ioc_t*)p_mad_response->send_context2;
                        __svc_entry_resp( p_ioc,
                                (ib_dm_mad_t*)p_mad_response->p_mad_buf );
                        break;
@@ -2163,7 +2164,7 @@ __svc_entry_resp(

 static void
 __ioc_pnp_send_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_request_mad )
 {
@@ -2180,14 +2181,14 @@ __ioc_pnp_send_cb(

        CL_ASSERT( p_request_mad->p_next == NULL );

-       p_results = (ioc_sweep_results_t* VOID_PTR64)p_request_mad->context1;
+       p_results = (ioc_sweep_results_t*)p_request_mad->context1;

        if( p_request_mad->status != IB_WCS_SUCCESS )
        {
                switch( p_request_mad->p_mad_buf->attr_id )
                {
                case IB_MAD_ATTR_IO_UNIT_INFO:
-                       p_iou = (iou_node_t* VOID_PTR64)p_request_mad->context2;
+                       p_iou = (iou_node_t*)p_request_mad->context2;
                        if( p_request_mad->status == IB_WCS_TIMEOUT_RETRY_ERR )
                        {
                                /* Move to the next path for the node and try the query again. */
@@ -2211,7 +2212,7 @@ __ioc_pnp_send_cb(
                        break;

                case IB_MAD_ATTR_SERVICE_ENTRIES:
-                       p_ioc = (iou_ioc_t* VOID_PTR64)p_request_mad->context2;
+                       p_ioc = (iou_ioc_t*)p_request_mad->context2;
                        cl_spinlock_acquire( &p_ioc->p_iou->lock );
                        cl_qmap_remove_item( &p_ioc->p_iou->ioc_map, &p_ioc->map_item );
                        cl_spinlock_release( &p_ioc->p_iou->lock );
@@ -2517,7 +2518,7 @@ __query_svc_entries(
                {
                        p_mad_list = p_mad->p_next;
                        p_mad->p_next = NULL;
-                       p_ioc = (iou_ioc_t* VOID_PTR64)p_mad->context2;
+                       p_ioc = (iou_ioc_t*)p_mad->context2;
                        cl_atomic_dec( &p_ioc->ref_cnt );
                        ib_put_mad( p_mad );
                        if( !cl_atomic_dec( &p_results->p_svc->query_cnt ) &&
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_mad_pool.c trunk\core\al\kernel\al_mad_pool.c
--- old\core\al\kernel\al_mad_pool.c    Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_mad_pool.c  Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -49,7 +50,7 @@
 typedef struct _mad_send
 {
        al_mad_send_t                   mad_send;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

 }      mad_send_t;

@@ -59,7 +60,7 @@ typedef struct _mad_send
 typedef struct _mad_rmpp
 {
        al_mad_rmpp_t                   mad_rmpp;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

 }      mad_rmpp_t;

@@ -107,13 +108,13 @@ __mad_rmpp_init(
  */
 ib_api_status_t
 ib_create_mad_pool(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   size_t                                          min,
        IN              const   size_t                                          max,
        IN              const   size_t                                          grow_size,
-               OUT                     ib_pool_handle_t FUNC_PTR64* const              ph_pool )
+               OUT                     ib_pool_handle_t* const         ph_pool )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MAD_POOL );
@@ -194,8 +195,8 @@ static void
 __destroying_pool(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_pool_handle_t                h_pool;
+       ib_al_handle_t                  h_al;

        AL_ENTER( AL_DBG_MAD_POOL );

@@ -221,7 +222,7 @@ static void
 __free_pool(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

        CL_ASSERT( p_obj );
        h_pool = PARENT_STRUCT( p_obj, al_pool_t, obj );
@@ -240,7 +241,7 @@ __free_pool(
  */
 ib_api_status_t
 ib_destroy_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool )
+       IN              const   ib_pool_handle_t                        h_pool )
 {
        cl_list_item_t*                 p_array_item;
        al_obj_t*                               p_obj;
@@ -270,7 +271,7 @@ ib_destroy_mad_pool(
        if( busy )
        {
                AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
-                       ("h_pool (0x%016I64x) is busy!.\n", (LONG64)h_pool) );
+                       ("h_pool (0x%016I64x) is busy!.\n", (ULONG64)(ULONG_PTR)h_pool) );
                return IB_RESOURCE_BUSY;
        }

@@ -288,9 +289,9 @@ ib_destroy_mad_pool(
  */
 ib_api_status_t
 ib_reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key )
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+               OUT                     ib_pool_key_t* const            pp_pool_key )
 {
        ib_api_status_t                 status;

@@ -320,12 +321,12 @@ ib_reg_mad_pool(

 ib_api_status_t
 reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key )
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+               OUT                     ib_pool_key_t* const            pp_pool_key )
 {
        al_pool_key_t*                  p_pool_key;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        ib_api_status_t                 status;
        al_key_type_t                   key_type;

@@ -434,7 +435,7 @@ reg_mad_pool(
        }

        /* Return the pool key. */
-       *pp_pool_key = (ib_pool_key_t VOID_PTR64)p_pool_key;
+       *pp_pool_key = (ib_pool_key_t)p_pool_key;

        AL_EXIT( AL_DBG_MAD_POOL );
        return IB_SUCCESS;
@@ -567,7 +568,7 @@ __free_pool_key(
  */
 ib_api_status_t
 ib_dereg_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key )
+       IN              const   ib_pool_key_t                           pool_key )
 {
        ib_api_status_t         status;

@@ -596,7 +597,7 @@ ib_dereg_mad_pool(
  */
 ib_api_status_t
 dereg_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
        IN              const   al_key_type_t                           expected_type )
 {
        AL_ENTER( AL_DBG_MAD_POOL );
@@ -627,7 +628,7 @@ dereg_mad_pool(
  */
 static ib_api_status_t
 __get_mad_element(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
                OUT                     al_mad_element_t**                      pp_mad_element )
 {
        mad_item_t*                             p_mad_item;
@@ -677,7 +678,7 @@ __get_mad_element(
        ref_al_obj( &pool_key->obj );
        cl_atomic_inc( &pool_key->mad_cnt );

-       p_mad_item->al_mad_element.pool_key = (ib_pool_key_t VOID_PTR64)pool_key;
+       p_mad_item->al_mad_element.pool_key = (ib_pool_key_t)pool_key;
        /* Return the MAD element. */
        *pp_mad_element = &p_mad_item->al_mad_element;

@@ -695,7 +696,7 @@ __put_mad_element(
        IN                              al_mad_element_t*                       p_mad_element )
 {
        mad_item_t*                             p_mad_item;
-       ib_pool_key_t VOID_PTR64                        pool_key;
+       ib_pool_key_t                   pool_key;

        CL_ASSERT( p_mad_element );
        p_mad_item = PARENT_STRUCT( p_mad_element, mad_item_t, al_mad_element );
@@ -716,7 +717,7 @@ __put_mad_element(



-ib_mad_send_handle_t VOID_PTR64
+ib_mad_send_handle_t
 get_mad_send(
        IN              const   al_mad_element_t                        *p_mad_element )
 {
@@ -752,10 +753,10 @@ get_mad_send(

 void
 put_mad_send(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_mad_send )
+       IN                              ib_mad_send_handle_t            h_mad_send )
 {
        mad_send_t                      *p_mad_send;
-       ib_pool_handle_t VOID_PTR64     h_pool;
+       ib_pool_handle_t        h_pool;

        p_mad_send = PARENT_STRUCT( h_mad_send, mad_send_t, mad_send );
        h_pool = p_mad_send->h_pool;
@@ -798,7 +799,7 @@ put_mad_rmpp(
        IN                              al_mad_rmpp_t*                          h_mad_rmpp )
 {
        mad_rmpp_t                      *p_mad_rmpp;
-       ib_pool_handle_t VOID_PTR64     h_pool;
+       ib_pool_handle_t        h_pool;

        p_mad_rmpp = PARENT_STRUCT( h_mad_rmpp, mad_rmpp_t, mad_rmpp );

@@ -812,7 +813,7 @@ put_mad_rmpp(

 ib_api_status_t
 ib_get_mad(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
        IN              const   size_t                                          buf_size,
                OUT                     ib_mad_element_t                        **pp_mad_element )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_mgr.c trunk\core\al\kernel\al_mgr.c
--- old\core\al\kernel\al_mgr.c Mon Jun 30 12:28:06 2008
+++ trunk\core\al\kernel\al_mgr.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -347,7 +348,7 @@ __init_hdl(
        p_h = (al_handle_t*)p_element;

        /* Chain free entries one after another. */
-       p_h->p_obj = (al_obj_t*)(uintn_t)++(((ib_al_handle_t VOID_PTR64)context)->free_hdl);
+       p_h->p_obj = (al_obj_t*)(uintn_t)++(((ib_al_handle_t)context)->free_hdl);
        p_h->type = AL_OBJ_TYPE_UNKNOWN;

        return CL_SUCCESS;
@@ -360,9 +361,9 @@ __init_hdl(
  */
 ib_api_status_t
 ib_open_al(
-               OUT                     ib_al_handle_t  FUNC_PTR64* const               ph_al )
+               OUT                     ib_al_handle_t* const           ph_al )
 {
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        ib_api_status_t                 status;
        cl_status_t                             cl_status;

@@ -447,7 +448,7 @@ ib_open_al(

 uint64_t
 al_hdl_insert(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN                              void* const                                     p_obj,
        IN              const   uint32_t                                        type )
 {
@@ -493,7 +494,7 @@ al_hdl_insert(

 void
 al_hdl_free(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl )
 {
        al_handle_t                     *p_h;
@@ -509,7 +510,7 @@ al_hdl_free(

 al_obj_t*
 al_hdl_ref(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
        IN              const   uint32_t                                        type )
 {
@@ -560,7 +561,7 @@ al_hdl_ref(

 void*
 al_hdl_chk(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
        IN              const   uint32_t                                        type )
 {
@@ -583,7 +584,7 @@ al_hdl_chk(

 void*
 al_hdl_get(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   uint64_t                                        hdl,
        IN              const   uint32_t                                        type )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_mr.c trunk\core\al\kernel\al_mr.c
--- old\core\al\kernel\al_mr.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_mr.c        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -72,11 +73,11 @@ mlnx_fmr_ctor(
                OUT                     cl_pool_item_t** const          pp_pool_item )
 {
        ib_api_status_t                 status;
-       mlnx_fmr_handle_t VOID_PTR64                    h_fmr;
+       mlnx_fmr_handle_t                       h_fmr;

        UNUSED_PARAM( context );

-       h_fmr = (mlnx_fmr_handle_t VOID_PTR64)p_object;
+       h_fmr = (mlnx_fmr_handle_t)p_object;
        cl_memclr( h_fmr, sizeof(mlnx_fmr_t) );

        construct_al_obj( &h_fmr->obj, AL_OBJ_TYPE_H_FMR );
@@ -87,7 +88,7 @@ mlnx_fmr_ctor(
                return CL_ERROR;
        }

-       *pp_pool_item = &((mlnx_fmr_handle_t VOID_PTR64)p_object)->obj.pool_item;
+       *pp_pool_item = &((mlnx_fmr_handle_t)p_object)->obj.pool_item;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &h_fmr->obj );
@@ -124,7 +125,7 @@ __cleanup_mlnx_fmr(
        IN                              struct _al_obj                          *p_obj )
 {
        ib_api_status_t                 status;
-       mlnx_fmr_handle_t VOID_PTR64                    h_fmr;
+       mlnx_fmr_handle_t                       h_fmr;

        CL_ASSERT( p_obj );
        h_fmr = PARENT_STRUCT( p_obj, mlnx_fmr_t, obj );
@@ -146,7 +147,7 @@ static void
 __return_mlnx_fmr(
        IN                              al_obj_t                                        *p_obj )
 {
-       mlnx_fmr_handle_t VOID_PTR64                    h_fmr;
+       mlnx_fmr_handle_t                       h_fmr;

        h_fmr = PARENT_STRUCT( p_obj, mlnx_fmr_t, obj );
        reset_al_obj( p_obj );
@@ -157,11 +158,11 @@ __return_mlnx_fmr(

 ib_api_status_t
 mlnx_create_fmr(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN              const   mlnx_fmr_create_t*      const   p_fmr_create,
-       OUT                             mlnx_fmr_handle_t FUNC_PTR64*   const   ph_fmr )
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN              const   mlnx_fmr_create_t*      const   p_fmr_create,
+       OUT                             mlnx_fmr_handle_t*      const   ph_fmr )
 {
-       mlnx_fmr_handle_t VOID_PTR64            h_fmr;
+       mlnx_fmr_handle_t               h_fmr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -217,7 +218,7 @@ mlnx_create_fmr(

 ib_api_status_t
 mlnx_map_phys_fmr(
-       IN              const   mlnx_fmr_handle_t FUNC_PTR64                    h_fmr,
+       IN              const   mlnx_fmr_handle_t                       h_fmr,
        IN              const   uint64_t* const                         paddr_list,
        IN              const   int                                                     list_len,
        IN      OUT                     uint64_t* const                         p_vaddr,
@@ -260,12 +261,12 @@ mlnx_map_phys_fmr(

 ib_api_status_t
 mlnx_unmap_fmr(
-       IN              const   mlnx_fmr_handle_t FUNC_PTR64                            h_fmr )
+       IN              const   mlnx_fmr_handle_t                               h_fmr )
 {
        ib_api_status_t         status;
        mlnx_fmr_t                      *p_fmr = (mlnx_fmr_t*)h_fmr;
        mlnx_fmr_t                      *p_cur_fmr;
-       mlnx_fmr_handle_t VOID_PTR64            *p_fmr_array;
+       mlnx_fmr_handle_t               *p_fmr_array;
        int                                     i;

        AL_ENTER( AL_DBG_MR );
@@ -281,7 +282,7 @@ mlnx_unmap_fmr(
                i++;

        // allocate the array
-       p_fmr_array = cl_zalloc((i+1)*sizeof(mlnx_fmr_handle_t VOID_PTR64));
+       p_fmr_array = cl_zalloc((i+1)*sizeof(mlnx_fmr_handle_t));
        if (!p_fmr_array)
        {
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_FMR_HANDLE\n") );
@@ -312,7 +313,7 @@ mlnx_unmap_fmr(

 ib_api_status_t
 mlnx_destroy_fmr(
-       IN              const   mlnx_fmr_handle_t FUNC_PTR64                            h_fmr )
+       IN              const   mlnx_fmr_handle_t                               h_fmr )
 {
        ib_api_status_t         status;

@@ -356,18 +357,18 @@ mlnx_destroy_fmr(

 ib_api_status_t
 ib_create_shmid(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   int                                                     shmid,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        ib_api_status_t         status;
        cl_status_t                     cl_status;
        net32_t                         lkey;
        net32_t                         rkey;
-       ib_mr_handle_t VOID_PTR64               h_mr;
+       ib_mr_handle_t          h_mr;

        AL_ENTER( AL_DBG_MR );

@@ -491,13 +492,13 @@ __free_shmid(

 ib_api_status_t
 ib_reg_shmid(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_shmid_t                                      shmid,
        IN              const   ib_mr_create_t* const           p_mr_create,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        return reg_shmid( h_pd, shmid, p_mr_create, p_vaddr, p_lkey, p_rkey, ph_mr );
 }
@@ -505,13 +506,13 @@ ib_reg_shmid(

 ib_api_status_t
 reg_shmid(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_shmid_t                                      shmid,
        IN              const   ib_mr_create_t* const           p_mr_create,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        UNUSED_PARAM( h_pd );
        UNUSED_PARAM( shmid );
@@ -528,7 +529,7 @@ reg_shmid(
        uint64_t                        vaddr;
        net32_t                         lkey;
        net32_t                         rkey;
-       ib_mr_handle_t VOID_PTR64               h_mr, h_reg_mr;
+       ib_mr_handle_t          h_mr, h_reg_mr;

        AL_ENTER( AL_DBG_MR );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ndi_cm.c trunk\core\al\kernel\al_ndi_cm.c
--- old\core\al\kernel\al_ndi_cm.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_ndi_cm.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -132,7 +133,7 @@ __ndi_complete_irp_ex(
  */
 static void
 __cep_timewait_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN              const   ib_qp_handle_t                          h_qp )
 {
        uint64_t                        timewait = 0;
        ib_qp_mod_t                     qp_mod;
@@ -182,7 +183,7 @@ __cep_timewait_qp(

 static ib_api_status_t
 __ndi_qp2rts(
-       IN              ib_qp_handle_t FUNC_PTR64       const                           h_qp,
+       IN              ib_qp_handle_t  const                           h_qp,
        IN              uint8_t                                                         init_depth,
        IN              uint8_t                                                         resp_res,
        IN              PIRP                                                            p_irp,
@@ -327,7 +328,7 @@ static VOID __ndi_acquire_lock(
        )
 {
        ndi_qp_csq_t *p_ndi_csq = (ndi_qp_csq_t*)Csq;
-       ib_qp_handle_t VOID_PTR64 h_qp = p_ndi_csq->h_qp;
+       ib_qp_handle_t h_qp = p_ndi_csq->h_qp;
        UNUSED_PARAM( Irql );

        AL_ENTER( AL_DBG_NDI );
@@ -341,7 +342,7 @@ static VOID __ndi_release_lock(
        )
 {
        ndi_qp_csq_t *p_ndi_csq = (ndi_qp_csq_t*)Csq;
-       ib_qp_handle_t VOID_PTR64 h_qp = p_ndi_csq->h_qp;
+       ib_qp_handle_t h_qp = p_ndi_csq->h_qp;
        UNUSED_PARAM( Irql );

        AL_ENTER( AL_DBG_NDI );
@@ -427,7 +428,7 @@ ndi_qp_flush_ques(

 NTSTATUS
 ndi_qp_init(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN                              ib_qp_handle_t                          h_qp )
 {

        NTSTATUS status;
@@ -835,8 +836,8 @@ __ndi_cm_handler(

 static void
 __ndi_fill_cm_req(
-       IN              ib_qp_handle_t FUNC_PTR64       const                           h_qp,
-       IN              ual_ndi_req_cm_ioctl_in_t                       *p_req,
+       IN              ib_qp_handle_t  const                           h_qp,
+       IN              ual_ndi_req_cm_ioctl_in_t                       *p_req,
        IN              ib_path_rec_t                                           *p_path_rec,
                OUT     ib_cm_req_t                                                     *p_cm_req)
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ndi_cm.h trunk\core\al\kernel\al_ndi_cm.h
--- old\core\al\kernel\al_ndi_cm.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_ndi_cm.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -82,7 +83,7 @@ typedef struct _ndi_qp_csq
 {
        IO_CSQ                                          csq;
        ib_qp_t*                                        h_qp;
-TO_LONG_PTR(   ib_query_handle_t ,                     h_query) ;
+       ib_query_handle_t                       h_query;
        LIST_ENTRY                                      que;
        ndi_cm_state_t                          state;
        PIO_WORKITEM                            p_workitem;
@@ -91,21 +92,21 @@ TO_LONG_PTR(        ib_query_handle_t ,                     h_que

 ib_api_status_t
 ndi_modify_qp(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN              const   uint32_t                                        buf_size,
        IN                              uint8_t* const                          p_outbuf);

 NTSTATUS
 ndi_req_cm(
-       IN              ib_qp_handle_t FUNC_PTR64       const                   h_qp,
+       IN              ib_qp_handle_t  const                   h_qp,
        IN              cl_ioctl_handle_t                               h_ioctl,
        IN              ual_ndi_req_cm_ioctl_in_t               *p_req
        );

 NTSTATUS
 ndi_rep_cm(
-       IN              ib_qp_handle_t FUNC_PTR64       const                   h_qp,
+       IN              ib_qp_handle_t  const                   h_qp,
        IN              net32_t                 const                   cid,
        IN              cl_ioctl_handle_t                               h_ioctl,
        IN              ual_ndi_rep_cm_ioctl_in_t               *p_ndi_rep_cm
@@ -113,14 +114,14 @@ ndi_rep_cm(

 cl_status_t
 ndi_rtu_cm(
-       IN              ib_qp_handle_t FUNC_PTR64       const                           h_qp,
-       IN              PIRP                                                            p_irp
+       IN              ib_qp_handle_t  const                   h_qp,
+       IN              PIRP                                                    p_irp
        );

 NTSTATUS
 ndi_dreq_cm(
-       IN              ib_qp_handle_t FUNC_PTR64       const                           h_qp,
-       IN              PIRP                                                            p_irp
+       IN              ib_qp_handle_t  const                   h_qp,
+       IN              PIRP                                                    p_irp
        );

 void
@@ -130,15 +131,15 @@ ndi_qp_flush_ques(

 NTSTATUS
 ndi_qp_init(
-       IN              ib_qp_handle_t FUNC_PTR64                                       h_qp );
+       IN              ib_qp_handle_t                                  h_qp );

 void
 ndi_qp_destroy(
-       IN              ib_qp_handle_t FUNC_PTR64                                       h_qp );
+       IN              ib_qp_handle_t                                  h_qp );

 void
 ndi_qp_free(
-       IN              ib_qp_handle_t FUNC_PTR64                                       h_qp );
+       IN              ib_qp_handle_t                                  h_qp );

 #endif

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ndi_cq.c trunk\core\al\kernel\al_ndi_cq.c
--- old\core\al\kernel\al_ndi_cq.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_ndi_cq.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -79,7 +80,7 @@ static inline void __ndi_flush_que(

 #pragma warning(disable:4706)
 void ndi_cq_compl_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context )
 {
        PIRP Irp;
@@ -103,7 +104,7 @@ void ndi_cq_compl_cb(
 void ndi_cq_error_cb(
        IN                              ib_async_event_rec_t            *p_err_rec)
 {
-       ib_cq_handle_t VOID_PTR64 h_cq = p_err_rec->handle.h_cq;
+       ib_cq_handle_t h_cq = p_err_rec->handle.h_cq;
        AL_ENTER( AL_DBG_NDI );
        __ndi_flush_que( &h_cq->compl, STATUS_INTERNAL_ERROR );
        __ndi_flush_que( &h_cq->error, STATUS_INTERNAL_ERROR );
@@ -119,7 +120,7 @@ void ndi_cq_error_cb(
 /* flush a queue of pending requests */
 void
 ndi_cq_flush_ques(
-       IN      ib_cq_handle_t FUNC_PTR64                                                       h_cq
+       IN      ib_cq_handle_t                                                  h_cq
        )
 {
        AL_ENTER( AL_DBG_NDI );
@@ -219,7 +220,7 @@ static VOID __ndi_acquire_lock(
        )
 {
        ndi_cq_csq_t *p_ndi_csq = (ndi_cq_csq_t*)Csq;
-       ib_cq_handle_t VOID_PTR64 h_cq = p_ndi_csq->h_cq;
+       ib_cq_handle_t h_cq = p_ndi_csq->h_cq;
        UNUSED_PARAM( Irql );

        AL_ENTER( AL_DBG_NDI );
@@ -233,7 +234,7 @@ static VOID __ndi_release_lock(
        )
 {
        ndi_cq_csq_t *p_ndi_csq = (ndi_cq_csq_t*)Csq;
-       ib_cq_handle_t VOID_PTR64 h_cq = p_ndi_csq->h_cq;
+       ib_cq_handle_t h_cq = p_ndi_csq->h_cq;
        UNUSED_PARAM( Irql );

        AL_ENTER( AL_DBG_NDI );
@@ -247,7 +248,7 @@ static VOID __ndi_complete_cancelled_irp
        )
 {
        ndi_cq_csq_t *p_ndi_csq = (ndi_cq_csq_t*)Csq;
-       ib_cq_handle_t VOID_PTR64 h_cq = p_ndi_csq->h_cq;
+       ib_cq_handle_t h_cq = p_ndi_csq->h_cq;

        AL_ENTER( AL_DBG_NDI );
        cl_ioctl_complete( Irp, CL_CANCELED, 0 );
@@ -257,7 +258,7 @@ static VOID __ndi_complete_cancelled_irp

 NTSTATUS
 ndi_cq_init(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq )
+       IN                              ib_cq_handle_t                          h_cq )
 {

        NTSTATUS status;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_ndi_cq.h trunk\core\al\kernel\al_ndi_cq.h
--- old\core\al\kernel\al_ndi_cq.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_ndi_cq.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -44,15 +45,15 @@

 void
 ndi_cq_flush_ques(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq );
+       IN                              ib_cq_handle_t                          h_cq );

 NTSTATUS
 ndi_cq_init(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq );
+       IN                              ib_cq_handle_t                          h_cq );

 void
 ndi_cq_compl_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context );

 void
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_pnp.c trunk\core\al\kernel\al_pnp.c
--- old\core\al\kernel\al_pnp.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_pnp.c       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -774,9 +775,9 @@ __al_pnp_process_reg(

 ib_api_status_t
 ib_reg_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_pnp_req_t* const                     p_pnp_req,
-               OUT                     ib_pnp_handle_t FUNC_PTR64* const               ph_pnp )
+               OUT                     ib_pnp_handle_t* const          ph_pnp )
 {
        ib_api_status_t         status;
        KEVENT                          event;
@@ -818,10 +819,10 @@ ib_reg_pnp(

 ib_api_status_t
 al_reg_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_pnp_req_t* const                     p_pnp_req,
        IN                              KEVENT                                          *p_sync_event,
-               OUT                     ib_pnp_handle_t FUNC_PTR64* const               ph_pnp )
+               OUT                     ib_pnp_handle_t* const          ph_pnp )
 {
        ib_api_status_t         status;
        al_pnp_t*                       p_reg;
@@ -907,7 +908,7 @@ al_reg_pnp(

 ib_api_status_t
 ib_dereg_pnp(
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_pnp,
+       IN              const   ib_pnp_handle_t                         h_pnp,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_PNP );
@@ -1714,8 +1715,8 @@ pnp_ca_change(

 ib_api_status_t
 ib_reject_ioc(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_event )
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   ib_pnp_handle_t                         h_event )
 {
        AL_ENTER( AL_DBG_PNP );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy.c trunk\core\al\kernel\al_proxy.c
--- old\core\al\kernel\al_proxy.c       Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_proxy.c     Mon Jun 30 14:32:52 2008
@@ -114,8 +114,8 @@ proxy_reg_shmid(
                        (ual_reg_shmid_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                                                        (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_pd_handle_t                  h_pd;
+       ib_mr_handle_t                  h_mr;
        uint64_t                                vaddr;
        net32_t                                 lkey, rkey;

@@ -130,7 +130,7 @@ proxy_reg_shmid(
        }

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -970,7 +970,7 @@ proxy_reg_pnp(
        ib_pnp_req_t                    pnp_req;
        ib_api_status_t                 status, *p_user_status;
        uint64_t                                *p_user_hdl;
-       ib_pnp_handle_t VOID_PTR64                      h_pnp;
+       ib_pnp_handle_t                 h_pnp;
        cl_status_t                             cl_status;
        KEVENT                                  *p_sync_event;
        NTSTATUS                                nt_status;
@@ -1116,7 +1116,7 @@ proxy_rearm_pnp(
        al_dev_open_context_t           *p_context;
        IO_STACK_LOCATION                       *p_io_stack;
        proxy_pnp_evt_t                         *p_evt;
-       ib_pnp_handle_t VOID_PTR64                              h_pnp;
+       ib_pnp_handle_t                         h_pnp;
        IRP                                                     *p_old_irp;

        AL_ENTER( AL_DBG_PNP );
@@ -1200,7 +1200,7 @@ proxy_dereg_pnp(
        uint64_t                                *p_hdl;
        al_dev_open_context_t   *p_context;
        IO_STACK_LOCATION               *p_io_stack;
-       ib_pnp_handle_t VOID_PTR64                      h_pnp;
+       ib_pnp_handle_t                 h_pnp;

        AL_ENTER( AL_DBG_PNP );
        p_context = p_open_context;
@@ -1223,7 +1223,7 @@ proxy_dereg_pnp(

        p_hdl = cl_ioctl_in_buf( h_ioctl );

-       h_pnp = (ib_pnp_handle_t VOID_PTR64)
+       h_pnp = (ib_pnp_handle_t)
                al_hdl_ref( p_context->h_al, *p_hdl, AL_OBJ_TYPE_H_PNP );
        if( !h_pnp )
        {
@@ -1267,22 +1267,22 @@ al_ioctl(

        switch( cl_ioctl_ctl_code( h_ioctl ) )
        {
-       case UAL_REG_SHMID: //check_done, ioctl was initialized
+       case UAL_REG_SHMID:
                cl_status = proxy_reg_shmid( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_GET_CA_ATTR_INFO: //check done, __process_misc_cb fixed
+       case UAL_GET_CA_ATTR_INFO:
                cl_status = proxy_get_ca_attr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REG_PNP: //check done, ib_reg_pnp fixed
+       case UAL_REG_PNP:
                cl_status = proxy_reg_pnp( p_context, h_ioctl );
                break;
-       case UAL_POLL_PNP: // check_done, no ptr64
+       case UAL_POLL_PNP:
                cl_status = proxy_poll_pnp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REARM_PNP: // check done, _pnp_async_cb fixed
+       case UAL_REARM_PNP:
                cl_status = proxy_rearm_pnp( p_context, h_ioctl );
                break;
-       case UAL_DEREG_PNP: // check_done, no ptr64
+       case UAL_DEREG_PNP:
                cl_status = proxy_dereg_pnp( p_context, h_ioctl );
                break;
        default:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy_cep.c trunk\core\al\kernel\al_proxy_cep.c
--- old\core\al\kernel\al_proxy_cep.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_proxy_cep.c Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -83,7 +84,7 @@ proxy_create_cep(

 static inline void
 __complete_get_event_ioctl(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              IRP* const                                      p_irp,
        IN                              NTSTATUS                                        status )
 {
@@ -176,7 +177,7 @@ proxy_cep_pre_req(
 {
        al_dev_open_context_t           *p_context;
        ual_cep_req_ioctl_t                     *p_ioctl;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;

        AL_ENTER( AL_DBG_CM );

@@ -267,7 +268,7 @@ proxy_cep_pre_rep(
 {
        al_dev_open_context_t           *p_context;
        ual_cep_rep_ioctl_t                     *p_ioctl;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;

        AL_ENTER( AL_DBG_CM );

@@ -525,7 +526,7 @@ proxy_cep_lap(
        al_dev_open_context_t           *p_context;
        ual_cep_lap_ioctl_t                     *p_ioctl;
        ib_api_status_t                         status;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;

        AL_ENTER( AL_DBG_CM );

@@ -577,7 +578,7 @@ proxy_cep_pre_apr(
 {
        al_dev_open_context_t           *p_context;
        ual_cep_apr_ioctl_t                     *p_ioctl;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;

        AL_ENTER( AL_DBG_CM );

@@ -699,7 +700,7 @@ proxy_cep_drep(
                OUT     size_t                                  *p_ret_bytes )
 {
        al_dev_open_context_t           *p_context;
-       ual_cep_drep_ioctl_t                    *p_ioctl;
+       ual_cep_drep_ioctl_t            *p_ioctl;

        AL_ENTER( AL_DBG_CM );

@@ -986,70 +987,70 @@ cl_status_t cep_ioctl(

        switch( cl_ioctl_ctl_code( h_ioctl ) )
        {
-       case UAL_CREATE_CEP: //check_done
+       case UAL_CREATE_CEP:
                cl_status = proxy_create_cep( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_CEP: //check done, doesn't contain ptr64
+       case UAL_DESTROY_CEP:
                cl_status = proxy_destroy_cep( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_LISTEN: //check_done, al_cep_listen fixed
+       case UAL_CEP_LISTEN:
                cl_status = proxy_cep_listen( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_PRE_REQ: //check_done, inner ioctl was initialized
+       case UAL_CEP_PRE_REQ:
                cl_status = proxy_cep_pre_req( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_SEND_REQ: //check done, doesn't contain ptr64
+       case UAL_CEP_SEND_REQ:
                cl_status = proxy_cep_send_req( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_PRE_REP: //check_done, al_cep_pre_rep fixed
+       case UAL_CEP_PRE_REP:
                cl_status = proxy_cep_pre_rep( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_SEND_REP: //check done, doesn't contain ptr64
+       case UAL_CEP_SEND_REP:
                cl_status = proxy_cep_send_rep( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_RTR: //check done, doesn't contain ptr64
+       case UAL_CEP_GET_RTR:
                cl_status = proxy_cep_get_rtr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_RTS: //check done, doesn't contain ptr64
+       case UAL_CEP_GET_RTS:
                cl_status = proxy_cep_get_rts( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_RTU: //check done, al_cep_rtu fixed
+       case UAL_CEP_RTU:
                cl_status = proxy_cep_rtu( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_REJ: //check_done, al_cep_pre_apr fixed, BUG fixed
+       case UAL_CEP_REJ:
                cl_status = proxy_cep_rej( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_MRA:  //check done, al_cep_mra fixed
+       case UAL_CEP_MRA:
                cl_status = proxy_cep_mra( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_LAP: //check done, al_cep_lap fixed
+       case UAL_CEP_LAP:
                cl_status = proxy_cep_lap( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_PRE_APR: //check done,al_cep_pre_apr fixed, BUG fixed
+       case UAL_CEP_PRE_APR:
                cl_status = proxy_cep_pre_apr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_SEND_APR: //check done, doesn't contain ptr64
+       case UAL_CEP_SEND_APR:
                cl_status = proxy_cep_send_apr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_DREQ: //check done, al_cep_dreq fixed
+       case UAL_CEP_DREQ:
                cl_status = proxy_cep_dreq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_DREP: //check done , al_cep_drep fixed
+       case UAL_CEP_DREP:
                cl_status = proxy_cep_drep( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_TIMEWAIT: //check done, doesn't contain ptr64
+       case UAL_CEP_GET_TIMEWAIT:
                cl_status = proxy_cep_get_timewait( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_EVENT: //check_done,  doesn't contain ptr64
+       case UAL_CEP_GET_EVENT:
                cl_status = proxy_cep_get_event( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_POLL: //check_done,  doesn't contain ptr64
+       case UAL_CEP_POLL:
                cl_status = proxy_cep_poll( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_REQ_CID: //check_done,  no IN ioctls
+       case UAL_CEP_GET_REQ_CID:
                cl_status = proxy_cep_get_req_cid( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CEP_GET_PDATA: //check_done,  no IN ioctls
+       case UAL_CEP_GET_PDATA:
                cl_status = proxy_cep_get_pdata( p_context, h_ioctl, p_ret_bytes );
                break;
        default:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy_ndi.c trunk\core\al\kernel\al_proxy_ndi.c
--- old\core\al\kernel\al_proxy_ndi.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_proxy_ndi.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -72,8 +73,8 @@ __ndi_create_cq(
                (ual_create_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_ca_handle_t                  h_ca;
+       ib_cq_handle_t                  h_cq;
        ib_cq_create_t                  cq_create;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
@@ -91,7 +92,7 @@ __ndi_create_cq(
        }

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -159,7 +160,7 @@ __ndi_notify_cq(
        cl_status_t cl_status;
        ual_ndi_notify_cq_ioctl_in_t *p_ioctl;
        al_dev_open_context_t *p_context;
-       ib_cq_handle_t VOID_PTR64 h_cq;
+       ib_cq_handle_t h_cq;
        UNUSED_PARAM(p_ret_bytes);

        AL_ENTER( AL_DBG_NDI );
@@ -175,7 +176,7 @@ __ndi_notify_cq(
        }

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -203,7 +204,7 @@ __ndi_cancel_cq(
                OUT     size_t                                  *p_ret_bytes )
 {
        cl_status_t cl_status;
-       ib_cq_handle_t VOID_PTR64 h_cq = NULL;
+       ib_cq_handle_t h_cq = NULL;
        al_dev_open_context_t *p_context;
        UNUSED_PARAM(p_ret_bytes);

@@ -219,7 +220,7 @@ __ndi_cancel_cq(
        }

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al,
                        *(uint64_t*)cl_ioctl_in_buf( h_ioctl ), AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
@@ -247,7 +248,7 @@ __ndi_modify_qp(
 {
        cl_status_t cl_status;
        ib_api_status_t status;
-       ib_qp_handle_t VOID_PTR64 h_qp = NULL;
+       ib_qp_handle_t h_qp = NULL;
        al_dev_open_context_t *p_context;
        ual_ndi_modify_qp_ioctl_in_t *p_req =
                (ual_ndi_modify_qp_ioctl_in_t*)cl_ioctl_in_buf( h_ioctl );
@@ -266,7 +267,7 @@ __ndi_modify_qp(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)al_hdl_ref( p_context->h_al, p_req->h_qp, AL_OBJ_TYPE_H_QP );
+       h_qp = (ib_qp_handle_t)al_hdl_ref( p_context->h_al, p_req->h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
                cl_status = CL_INVALID_HANDLE;
@@ -277,7 +278,7 @@ __ndi_modify_qp(
        if( h_qp->type != IB_QPT_RELIABLE_CONN )
        {
                cl_status = CL_INVALID_HANDLE;
-               goto exit;
+               goto err;
        }

        /* perform the ioctl */
@@ -295,10 +296,10 @@ __ndi_modify_qp(
                *p_ret_bytes = cl_ioctl_out_size( h_ioctl );
        }

-exit:
-       if ( h_qp )
-               deref_al_obj( &h_qp->obj );
+err:
+       deref_al_obj( &h_qp->obj );

+exit:
        AL_EXIT( AL_DBG_NDI );
        return cl_status;
 }
@@ -310,7 +311,7 @@ __ndi_req_cm(
                OUT     size_t                                  *p_ret_bytes )
 {
        cl_status_t cl_status;
-       ib_qp_handle_t VOID_PTR64 h_qp = NULL;
+       ib_qp_handle_t h_qp = NULL;
        al_dev_open_context_t *p_context;
        ual_ndi_req_cm_ioctl_in_t *p_parm, *p_req =
                (ual_ndi_req_cm_ioctl_in_t*)cl_ioctl_in_buf( h_ioctl );
@@ -328,7 +329,7 @@ __ndi_req_cm(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)al_hdl_ref( p_context->h_al, p_req->h_qp, AL_OBJ_TYPE_H_QP );
+       h_qp = (ib_qp_handle_t)al_hdl_ref( p_context->h_al, p_req->h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
                cl_status = CL_INVALID_HANDLE;
@@ -377,7 +378,7 @@ __ndi_rep_cm(
                OUT     size_t                                  *p_ret_bytes )
 {
        cl_status_t cl_status;
-       ib_qp_handle_t VOID_PTR64 h_qp = NULL;
+       ib_qp_handle_t h_qp = NULL;
        al_dev_open_context_t *p_context;
        net32_t cid;
        ual_ndi_rep_cm_ioctl_in_t *p_rep =
@@ -487,7 +488,7 @@ __ndi_rtu_cm(
                OUT     size_t                                  *p_ret_bytes )
 {
        cl_status_t cl_status;
-       ib_qp_handle_t VOID_PTR64 h_qp = NULL;
+       ib_qp_handle_t h_qp = NULL;
        al_dev_open_context_t *p_context;
        ual_ndi_rtu_cm_ioctl_in_t *p_rtu =
                (ual_ndi_rtu_cm_ioctl_in_t*)cl_ioctl_in_buf( h_ioctl );
@@ -506,7 +507,7 @@ __ndi_rtu_cm(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)al_hdl_ref( p_context->h_al, p_rtu->h_qp, AL_OBJ_TYPE_H_QP );
+       h_qp = (ib_qp_handle_t)al_hdl_ref( p_context->h_al, p_rtu->h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
                cl_status = CL_INVALID_HANDLE;
@@ -517,16 +518,16 @@ __ndi_rtu_cm(
        if( h_qp->type != IB_QPT_RELIABLE_CONN )
        {
                cl_status = CL_INVALID_HANDLE;
-               goto exit;
+               goto err;
        }

        /* perform the ioctl */
        cl_status = ndi_rtu_cm( h_qp, h_ioctl );

-exit:
-       if (h_qp)
-               deref_al_obj( &h_qp->obj );
+err:
+       deref_al_obj( &h_qp->obj );

+exit:
        AL_EXIT( AL_DBG_NDI );
        return cl_status;
 }
@@ -538,7 +539,7 @@ __ndi_dreq_cm(
                OUT     size_t                                  *p_ret_bytes )
 {
        cl_status_t cl_status;
-       ib_qp_handle_t VOID_PTR64 h_qp = NULL;
+       ib_qp_handle_t h_qp = NULL;
        al_dev_open_context_t *p_context;

        UNUSED_PARAM(p_ret_bytes);
@@ -555,7 +556,7 @@ __ndi_dreq_cm(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)al_hdl_ref( p_context->h_al,
+       h_qp = (ib_qp_handle_t)al_hdl_ref( p_context->h_al,
                *(uint64_t*)cl_ioctl_in_buf( h_ioctl ), AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -567,16 +568,16 @@ __ndi_dreq_cm(
        if( h_qp->type != IB_QPT_RELIABLE_CONN )
        {
                cl_status = CL_CONNECTION_INVALID;
-               goto exit;
+               goto err;
        }

        /* perform the ioctl */
        cl_status = ndi_dreq_cm( h_qp, h_ioctl );

-exit:
-       if (h_qp)
-               deref_al_obj( &h_qp->obj );
+err:
+       deref_al_obj( &h_qp->obj );

+exit:
        AL_EXIT( AL_DBG_NDI );
        return cl_status;
 }
@@ -603,31 +604,31 @@ ndi_ioctl(

        switch( cl_ioctl_ctl_code( h_ioctl ) )
        {
-       case UAL_NDI_CREATE_CQ: //check_done, ioctl was initialized
+       case UAL_NDI_CREATE_CQ:
                cl_status = __ndi_create_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_NOTIFY_CQ: //check_done, on IN ioctls
+       case UAL_NDI_NOTIFY_CQ:
                cl_status = __ndi_notify_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_CANCEL_CQ: //check_done, no ptr64 ioctls
+       case UAL_NDI_CANCEL_CQ:
                cl_status = __ndi_cancel_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_MODIFY_QP: //check_done, ioctl was initialized
+       case UAL_NDI_MODIFY_QP:
                cl_status = __ndi_modify_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_REQ_CM: //check_done, on IN ioctls
+       case UAL_NDI_REQ_CM:
                cl_status = __ndi_req_cm( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_REP_CM: //check_done, on IN ioctls
+       case UAL_NDI_REP_CM:
                cl_status = __ndi_rep_cm( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_RTU_CM: //check_done, on IN ioctls
+       case UAL_NDI_RTU_CM:
                cl_status = __ndi_rtu_cm( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_REJ_CM: //check_done, on IN ioctls
+       case UAL_NDI_REJ_CM:
                cl_status = __ndi_rej_cm( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_NDI_DREQ_CM: //check_done, on IN ioctls
+       case UAL_NDI_DREQ_CM:
                cl_status = __ndi_dreq_cm( p_context, h_ioctl, p_ret_bytes );
                break;
        default:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy_subnet.c trunk\core\al\kernel\al_proxy_subnet.c
--- old\core\al\kernel\al_proxy_subnet.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_proxy_subnet.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -56,7 +57,7 @@
 #include "al_proxy.h"


-extern ib_pool_handle_t VOID_PTR64             gh_mad_pool;
+extern ib_pool_handle_t                gh_mad_pool;



@@ -380,9 +381,9 @@ proxy_send_mad(
                (ual_send_mad_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
-       ib_pool_key_t VOID_PTR64                        pool_key = NULL;
-       ib_av_handle_t VOID_PTR64                       h_av = NULL;
+       ib_mad_svc_handle_t             h_mad_svc;
+       ib_pool_key_t                   pool_key = NULL;
+       ib_av_handle_t                  h_av = NULL;
        ib_mad_element_t                *p_mad_el;
        al_mad_element_t                *p_al_el;
        ib_mad_t                                *p_mad_buf, *p_usr_buf;
@@ -400,7 +401,7 @@ proxy_send_mad(
        }

        /* Validate mad svc handle. */
-       h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)al_hdl_ref(
+       h_mad_svc = (ib_mad_svc_handle_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC );
        if( !h_mad_svc )
        {
@@ -409,7 +410,7 @@ proxy_send_mad(
        }

        /* Validate the pool key */
-       pool_key = (ib_pool_key_t VOID_PTR64)al_hdl_ref(
+       pool_key = (ib_pool_key_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.pool_key, AL_OBJ_TYPE_H_POOL_KEY );
        if( !pool_key )
        {
@@ -420,7 +421,7 @@ proxy_send_mad(
        /* Validate the AV handle in the mad element if it is not NULL. */
        if( p_ioctl->in.h_av )
        {
-               h_av = (ib_av_handle_t VOID_PTR64)
+               h_av = (ib_av_handle_t)
                        al_hdl_ref( p_context->h_al, p_ioctl->in.h_av, AL_OBJ_TYPE_H_AV );
                if( !h_av )
                {
@@ -630,7 +631,7 @@ proxy_init_dgrm(

 static void
 __proxy_mad_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
@@ -676,7 +677,7 @@ __proxy_mad_send_cb(

 static void
 __proxy_mad_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_element )
 {
@@ -744,8 +745,8 @@ proxy_reg_mad_svc(
                (ual_reg_mad_svc_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_qp_handle_t                  h_qp;
+       ib_mad_svc_handle_t             h_mad_svc;

        AL_ENTER( AL_DBG_MAD );

@@ -762,7 +763,7 @@ proxy_reg_mad_svc(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -808,7 +809,7 @@ proxy_dereg_mad_svc(
 {
        ual_dereg_mad_svc_ioctl_t       *p_ioctl;
        al_dev_open_context_t           *p_context;
-       ib_mad_svc_handle_t VOID_PTR64                  h_mad_svc;
+       ib_mad_svc_handle_t                     h_mad_svc;

        AL_ENTER( AL_DBG_MAD );

@@ -828,7 +829,7 @@ proxy_dereg_mad_svc(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate MAD service. */
-       h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)al_hdl_ref(
+       h_mad_svc = (ib_mad_svc_handle_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC );
        if( !h_mad_svc )
        {
@@ -862,8 +863,8 @@ proxy_reg_mad_pool(
                (ual_reg_mad_pool_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t           *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                               h_pd;
-       ib_pool_key_t VOID_PTR64                                pool_key;
+       ib_pd_handle_t                          h_pd;
+       ib_pool_key_t                           pool_key;

        AL_ENTER( AL_DBG_MAD );

@@ -880,7 +881,7 @@ proxy_reg_mad_pool(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -934,7 +935,7 @@ proxy_dereg_mad_pool(
                (ual_dereg_mad_pool_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t           *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pool_key_t VOID_PTR64                                pool_key;
+       ib_pool_key_t                           pool_key;

        AL_ENTER( AL_DBG_MAD );

@@ -952,7 +953,7 @@ proxy_dereg_mad_pool(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate pool key */
-       pool_key = (ib_pool_key_t VOID_PTR64)al_hdl_ref(
+       pool_key = (ib_pool_key_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.pool_key, AL_OBJ_TYPE_H_POOL_KEY );
        if( !pool_key )
        {
@@ -985,7 +986,7 @@ proxy_cancel_mad(
 {
        ual_cancel_mad_ioctl_t  *p_ioctl;
        al_dev_open_context_t   *p_context;
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_mad_svc_handle_t             h_mad_svc;

        AL_ENTER( AL_DBG_MAD );

@@ -1005,7 +1006,7 @@ proxy_cancel_mad(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate MAD service handle. */
-       h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)al_hdl_ref(
+       h_mad_svc = (ib_mad_svc_handle_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC );
        if( !h_mad_svc )
        {
@@ -1039,7 +1040,7 @@ proxy_local_mad(
                        (ual_local_mad_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                                                        (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MAD );
@@ -1062,7 +1063,7 @@ proxy_local_mad(
        }

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -1110,43 +1111,43 @@ subnet_ioctl(

        switch( cl_ioctl_ctl_code( h_ioctl ) )
        {
-       case UAL_REG_SVC: //TODO: NO USAGE ?
+       case UAL_REG_SVC:
                cl_status = proxy_reg_svc( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_SEND_SA_REQ: //TODO : validate that that there's no "non-initialized" calls to sa_reg_svc
+       case UAL_SEND_SA_REQ:
                cl_status = proxy_send_sa_req( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CANCEL_SA_REQ: //check_done, fixed al_cancel_sa_req
+       case UAL_CANCEL_SA_REQ:
                cl_status = proxy_cancel_sa_req( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MAD_SEND: //check_done, fixed ual_send_one_mad
+       case UAL_MAD_SEND:
                cl_status = proxy_send_mad( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_INIT_DGRM_SVC: //TODO: NO USAGE ?
+       case UAL_INIT_DGRM_SVC:
                cl_status = proxy_init_dgrm( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REG_MAD_SVC: //check_done, ioctl was initialized
+       case UAL_REG_MAD_SVC:
                cl_status = proxy_reg_mad_svc( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REG_MAD_POOL: //check_done, ioctl was initialized
+       case UAL_REG_MAD_POOL:
                cl_status = proxy_reg_mad_pool( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CANCEL_MAD: //check_done, ioctl was initialized
+       case UAL_CANCEL_MAD:
                cl_status = proxy_cancel_mad( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MAD_RECV_COMP: //check_done, ioctl was initialized
+       case UAL_MAD_RECV_COMP:
                cl_status = proxy_mad_comp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DEREG_SVC: //TODO: NO USAGE ?
+       case UAL_DEREG_SVC:
                cl_status = proxy_dereg_svc( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DEREG_MAD_SVC: //TODO: NO USAGE ?
+       case UAL_DEREG_MAD_SVC:
                cl_status = proxy_dereg_mad_svc( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DEREG_MAD_POOL: //TODO: NO USAGE ?
+       case UAL_DEREG_MAD_POOL:
                cl_status = proxy_dereg_mad_pool( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_LOCAL_MAD: //check_done, fixed ual_local_mad
+       case UAL_LOCAL_MAD:
                cl_status = proxy_local_mad( p_context, h_ioctl, p_ret_bytes );
                break;
        default:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_proxy_verbs.c trunk\core\al\kernel\al_proxy_verbs.c
--- old\core\al\kernel\al_proxy_verbs.c Mon Jun 30 12:28:06 2008
+++ trunk\core\al\kernel\al_proxy_verbs.c       Mon Jun 30 14:32:52 2008
@@ -334,7 +334,7 @@ static void
 proxy_ca_err_cb(
        IN ib_async_event_rec_t *p_err_rec)
 {
-       ib_ca_handle_t VOID_PTR64                       h_ca = p_err_rec->handle.h_ca;
+       ib_ca_handle_t                  h_ca = p_err_rec->handle.h_ca;
        al_dev_open_context_t   *p_context = h_ca->obj.h_al->p_context;
        misc_cb_ioctl_info_t    cb_info;

@@ -380,7 +380,7 @@ proxy_open_ca(
                (ual_open_ca_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -446,7 +446,7 @@ proxy_query_ca(
                        (ual_query_ca_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                                                        (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_ca_attr_t                    *p_ca_attr = NULL;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
@@ -467,7 +467,7 @@ proxy_query_ca(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -552,7 +552,7 @@ proxy_modify_ca(
                        (ual_modify_ca_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                                                        (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;

        AL_ENTER( AL_DBG_CA );

@@ -569,7 +569,7 @@ proxy_modify_ca(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -602,7 +602,7 @@ proxy_close_ca(
                        (ual_close_ca_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                                                        (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;

        AL_ENTER( AL_DBG_CA );

@@ -619,7 +619,7 @@ proxy_close_ca(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -649,7 +649,7 @@ __convert_to_al_handles(
        IN                              al_dev_open_context_t*  const   p_context,
        IN                              uint64_t*                               const   um_handle_array,
        IN                              uint32_t                                                num_handles,
-               OUT                     void* FUNC_PTR64 *                      const   p_handle_array )
+               OUT                     void**                                  const   p_handle_array )
 {
        uint32_t                                i;

@@ -685,11 +685,11 @@ proxy_ci_call(
                (ual_ci_call_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        void*                                   p_ci_op_buf = NULL;
        void*                                   p_ci_op_user_buf = NULL;
-       void* VOID_PTR64 *                      p_handle_array = NULL;
+       void**                                  p_handle_array = NULL;
        size_t                                  ci_op_buf_size;
        ib_api_status_t                 status;
        uint32_t                                num_handles;
@@ -719,7 +719,7 @@ proxy_ci_call(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -734,7 +734,7 @@ proxy_ci_call(
        /* Validate the handle array */
        if( num_handles )
        {
-               p_handle_array = cl_malloc( sizeof(void* VOID_PTR64) * num_handles );
+               p_handle_array = cl_malloc( sizeof(void*) * num_handles );
                if( !p_handle_array )
                {
                        p_ioctl->out.status = IB_INSUFFICIENT_MEMORY;
@@ -819,7 +819,7 @@ proxy_ci_call_err:
        if( p_handle_array )
        {
                while( num_handles-- )
-                       deref_al_obj( (al_obj_t* VOID_PTR64)p_handle_array[num_handles] );
+                       deref_al_obj( (al_obj_t*)p_handle_array[num_handles] );
                cl_free( p_handle_array );
        }
        if( p_ci_op_buf )
@@ -850,8 +850,8 @@ proxy_alloc_pd(
                (ual_alloc_pd_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_ca_handle_t                  h_ca;
+       ib_pd_handle_t                  h_pd;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -867,7 +867,7 @@ proxy_alloc_pd(
        }

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -926,7 +926,7 @@ proxy_dealloc_pd(
                (ual_dealloc_pd_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_pd_handle_t                  h_pd;

        AL_ENTER( AL_DBG_PD );

@@ -943,7 +943,7 @@ proxy_dealloc_pd(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)al_hdl_ref(
+       h_pd = (ib_pd_handle_t)al_hdl_ref(
                p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -967,7 +967,7 @@ static void
 proxy_srq_err_cb(
        IN ib_async_event_rec_t *p_err_rec )
 {
-       ib_srq_handle_t VOID_PTR64      h_srq = p_err_rec->handle.h_srq;
+       ib_srq_handle_t h_srq = p_err_rec->handle.h_srq;
        al_dev_open_context_t   *p_context = h_srq->obj.h_al->p_context;
        misc_cb_ioctl_info_t    cb_info;

@@ -1016,8 +1016,8 @@ proxy_create_srq(
                (ual_create_srq_ioctl_t*)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_pd_handle_t                  h_pd;
+       ib_srq_handle_t                 h_srq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
        ib_pfn_event_cb_t               pfn_ev;
@@ -1034,7 +1034,7 @@ proxy_create_srq(
        }

        /* Validate handles. */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd)
        {
@@ -1097,7 +1097,7 @@ proxy_query_srq(
                (ual_query_srq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1113,7 +1113,7 @@ proxy_query_srq(
        }

        /* Validate SRQ handle */
-       h_srq = (ib_srq_handle_t VOID_PTR64)
+       h_srq = (ib_srq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_srq, AL_OBJ_TYPE_H_SRQ );
        if( !h_srq )
        {
@@ -1164,7 +1164,7 @@ proxy_modify_srq(
                (ual_modify_srq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1180,7 +1180,7 @@ proxy_modify_srq(
        }

        /* Validate SRQ handle */
-       h_srq = (ib_srq_handle_t VOID_PTR64)
+       h_srq = (ib_srq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_srq, AL_OBJ_TYPE_H_SRQ );
        if( !h_srq )
        {
@@ -1229,7 +1229,7 @@ proxy_destroy_srq(
                (ual_destroy_srq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;

        AL_ENTER( AL_DBG_SRQ );

@@ -1246,7 +1246,7 @@ proxy_destroy_srq(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate SRQ handle */
-       h_srq = (ib_srq_handle_t VOID_PTR64)
+       h_srq = (ib_srq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_srq, AL_OBJ_TYPE_H_SRQ );
        if( !h_srq )
        {
@@ -1271,7 +1271,7 @@ static void
 proxy_qp_err_cb(
        IN ib_async_event_rec_t *p_err_rec )
 {
-       ib_qp_handle_t VOID_PTR64                       h_qp = p_err_rec->handle.h_qp;
+       ib_qp_handle_t                  h_qp = p_err_rec->handle.h_qp;
        al_dev_open_context_t   *p_context = h_qp->obj.h_al->p_context;
        misc_cb_ioctl_info_t    cb_info;

@@ -1322,10 +1322,10 @@ proxy_create_qp(
                (ual_create_qp_ioctl_t*)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_srq_handle_t VOID_PTR64                      h_srq = NULL;
-       ib_cq_handle_t VOID_PTR64                       h_sq_cq, h_rq_cq;
+       ib_pd_handle_t                  h_pd;
+       ib_qp_handle_t                  h_qp;
+       ib_srq_handle_t                 h_srq = NULL;
+       ib_cq_handle_t                  h_sq_cq, h_rq_cq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
        ib_pfn_event_cb_t               pfn_ev;
@@ -1453,7 +1453,7 @@ proxy_query_qp(
                (ual_query_qp_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1469,7 +1469,7 @@ proxy_query_qp(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -1559,7 +1559,7 @@ proxy_modify_qp(
                (ual_modify_qp_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1575,7 +1575,7 @@ proxy_modify_qp(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -1624,7 +1624,7 @@ proxy_destroy_qp(
                (ual_destroy_qp_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;

        AL_ENTER( AL_DBG_QP );

@@ -1641,7 +1641,7 @@ proxy_destroy_qp(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -1674,8 +1674,8 @@ proxy_create_av(
                (ual_create_av_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_pd_handle_t                  h_pd;
+       ib_av_handle_t                  h_av;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1691,7 +1691,7 @@ proxy_create_av(
        }

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -1752,8 +1752,8 @@ proxy_query_av(
                (ual_query_av_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_av_handle_t VOID_PTR64                       h_av;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_av_handle_t                  h_av;
+       ib_pd_handle_t                  h_pd;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1769,7 +1769,7 @@ proxy_query_av(
        }

        /* Validate AV handle */
-       h_av = (ib_av_handle_t VOID_PTR64)
+       h_av = (ib_av_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_av, AL_OBJ_TYPE_H_AV );
        if( !h_av )
        {
@@ -1827,7 +1827,7 @@ proxy_modify_av(
                (ual_modify_av_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -1843,7 +1843,7 @@ proxy_modify_av(
        }

        /* Validate AV handle */
-       h_av = (ib_av_handle_t VOID_PTR64)
+       h_av = (ib_av_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_av, AL_OBJ_TYPE_H_AV );
        if( !h_av )
        {
@@ -1894,7 +1894,7 @@ proxy_destroy_av(
                (ual_destroy_av_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;

        AL_ENTER( AL_DBG_AV );

@@ -1911,7 +1911,7 @@ proxy_destroy_av(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate AV handle */
-       h_av = (ib_av_handle_t VOID_PTR64)
+       h_av = (ib_av_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_av, AL_OBJ_TYPE_H_AV );
        if( !h_av )
        {
@@ -1943,7 +1943,7 @@ proxy_modify_cq(
                (ual_modify_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
        uint32_t                                size;
@@ -1960,7 +1960,7 @@ proxy_modify_cq(
        }

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2007,7 +2007,7 @@ proxy_modify_cq_err:
  */
 static void
 proxy_cq_comp_cb(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                              ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context )
 {
        comp_cb_ioctl_info_t    cb_info;
@@ -2045,7 +2045,7 @@ static void
 proxy_cq_err_cb(
        IN                              ib_async_event_rec_t            *p_err_rec)
 {
-       ib_cq_handle_t VOID_PTR64                       h_cq = p_err_rec->handle.h_cq;
+       ib_cq_handle_t                  h_cq = p_err_rec->handle.h_cq;
        al_dev_open_context_t   *p_context = h_cq->obj.h_al->p_context;
        misc_cb_ioctl_info_t    cb_info;

@@ -2089,8 +2089,8 @@ proxy_create_cq(
                (ual_create_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_ca_handle_t                  h_ca;
+       ib_cq_handle_t                  h_cq;
        ib_cq_create_t                  cq_create;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
@@ -2108,7 +2108,7 @@ proxy_create_cq(
        }

        /* Validate CA handle */
-       h_ca = (ib_ca_handle_t VOID_PTR64)
+       h_ca = (ib_ca_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_ca, AL_OBJ_TYPE_H_CA );
        if( !h_ca )
        {
@@ -2198,7 +2198,7 @@ proxy_query_cq(
                (ual_query_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -2214,7 +2214,7 @@ proxy_query_cq(
        }

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2265,7 +2265,7 @@ proxy_destroy_cq(
                (ual_destroy_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        cl_waitobj_handle_t             h_wait_obj;

        AL_ENTER( AL_DBG_CQ );
@@ -2283,7 +2283,7 @@ proxy_destroy_cq(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2321,8 +2321,8 @@ proxy_post_send(
                (ual_post_send_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_qp_handle_t                  h_qp;
+       ib_av_handle_t                  h_av;
        ib_send_wr_t                    *p_wr;
        ib_send_wr_t                    *p_send_failure;
        uintn_t                                 i = 0;
@@ -2359,7 +2359,7 @@ proxy_post_send(
        p_send_failure = p_wr = p_ioctl->in.send_wr;

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -2466,7 +2466,7 @@ proxy_post_recv(
                (ual_post_recv_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_qp_handle_t                  h_qp;
        ib_recv_wr_t                    *p_wr;
        ib_recv_wr_t                    *p_recv_failure;
        uintn_t                                 i;
@@ -2504,7 +2504,7 @@ proxy_post_recv(
        p_recv_failure = p_wr = p_ioctl->in.recv_wr;

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -2587,7 +2587,7 @@ proxy_post_srq_recv(
                (ual_post_srq_recv_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_srq_handle_t VOID_PTR64                      h_srq;
+       ib_srq_handle_t                 h_srq;
        ib_recv_wr_t                    *p_wr;
        ib_recv_wr_t                    *p_recv_failure;
        uintn_t                                 i;
@@ -2625,7 +2625,7 @@ proxy_post_srq_recv(
        p_recv_failure = p_wr = p_ioctl->in.recv_wr;

        /* Validate SRQ handle */
-       h_srq = (ib_srq_handle_t VOID_PTR64)
+       h_srq = (ib_srq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_srq, AL_OBJ_TYPE_H_QP );
        if( !h_srq )
        {
@@ -2707,7 +2707,7 @@ proxy_peek_cq(
                (ual_peek_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;

        AL_ENTER( AL_DBG_CQ );

@@ -2724,7 +2724,7 @@ proxy_peek_cq(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2755,7 +2755,7 @@ proxy_poll_cq(
 {
        ual_poll_cq_ioctl_t             *p_ioctl;
        al_dev_open_context_t   *p_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;
        ib_wc_t                                 *p_free_wc;
        ib_wc_t                                 *p_done_wc = NULL;
        uint32_t                                i, num_wc;
@@ -2790,7 +2790,7 @@ proxy_poll_cq(
        }

        /* Validate CQ handle. */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2858,7 +2858,7 @@ proxy_rearm_cq(
                (ual_rearm_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;

        AL_ENTER( AL_DBG_CQ );

@@ -2875,7 +2875,7 @@ proxy_rearm_cq(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2908,7 +2908,7 @@ proxy_rearm_n_cq(
                (ual_rearm_n_cq_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_cq_handle_t VOID_PTR64                       h_cq;
+       ib_cq_handle_t                  h_cq;

        AL_ENTER( AL_DBG_CQ );

@@ -2925,7 +2925,7 @@ proxy_rearm_n_cq(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate CQ handle */
-       h_cq = (ib_cq_handle_t VOID_PTR64)
+       h_cq = (ib_cq_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_cq, AL_OBJ_TYPE_H_CQ );
        if( !h_cq )
        {
@@ -2957,8 +2957,8 @@ proxy_register_mr(
                (ual_reg_mem_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_pd_handle_t                  h_pd;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -2973,7 +2973,7 @@ proxy_register_mr(
        }

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -3030,7 +3030,7 @@ proxy_query_mr(
                (ual_query_mr_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MR );
@@ -3045,7 +3045,7 @@ proxy_query_mr(
        }

        /* Validate MR handle */
-       h_mr = (ib_mr_handle_t VOID_PTR64)
+       h_mr = (ib_mr_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mr, AL_OBJ_TYPE_H_MR );
        if( !h_mr )
        {
@@ -3092,8 +3092,8 @@ proxy_modify_mr(
                (ual_rereg_mem_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
-       ib_pd_handle_t VOID_PTR64                       h_pd = NULL;
+       ib_mr_handle_t                  h_mr;
+       ib_pd_handle_t                  h_pd = NULL;
        ib_mr_create_t                  *p_mr_create;
        ib_api_status_t                 status;

@@ -3109,7 +3109,7 @@ proxy_modify_mr(
        }

        /* Validate MR handle */
-       h_mr = (ib_mr_handle_t VOID_PTR64)
+       h_mr = (ib_mr_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mr, AL_OBJ_TYPE_H_MR );
        if( !h_mr )
        {
@@ -3132,7 +3132,7 @@ proxy_modify_mr(
                        goto proxy_modify_mr_err;
                }
                /* This is a modify PD request, validate the PD handle */
-               h_pd = (ib_pd_handle_t VOID_PTR64)
+               h_pd = (ib_pd_handle_t)
                        al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
                if( !h_pd )
                {
@@ -3188,8 +3188,8 @@ proxy_shared_mr(
                (ual_reg_shared_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_mr_handle_t VOID_PTR64                       h_mr, h_cur_mr;
+       ib_pd_handle_t                  h_pd;
+       ib_mr_handle_t                  h_mr, h_cur_mr;
        ib_api_status_t                 status;
        uint64_t                                vaddr;

@@ -3209,7 +3209,7 @@ proxy_shared_mr(
         * in this process's context.
         */
        /* Validate MR handle */
-       h_cur_mr = (ib_mr_handle_t VOID_PTR64)
+       h_cur_mr = (ib_mr_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mr, AL_OBJ_TYPE_H_MR );
        if( !h_cur_mr )
        {
@@ -3219,7 +3219,7 @@ proxy_shared_mr(
        }

        /* Validate the PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -3273,7 +3273,7 @@ proxy_deregister_mr(
                (ual_dereg_mr_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;

        AL_ENTER( AL_DBG_MR );

@@ -3290,7 +3290,7 @@ proxy_deregister_mr(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate MR handle */
-       h_mr = (ib_mr_handle_t VOID_PTR64)
+       h_mr = (ib_mr_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mr, AL_OBJ_TYPE_H_MR );
        if( !h_mr )
        {
@@ -3323,8 +3323,8 @@ proxy_create_mw(
                (ual_create_mw_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_pd_handle_t                  h_pd;
+       ib_mw_handle_t                  h_mw;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -3340,7 +3340,7 @@ proxy_create_mw(
        }

        /* Validate PD handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -3399,10 +3399,10 @@ proxy_query_mw(
                (ual_query_mw_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_mw_handle_t                  h_mw;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
+       ib_pd_handle_t                  h_pd;

        AL_ENTER( AL_DBG_MW );

@@ -3416,7 +3416,7 @@ proxy_query_mw(
        }

        /* Validate MW handle */
-       h_mw = (ib_mw_handle_t VOID_PTR64)
+       h_mw = (ib_mw_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mw, AL_OBJ_TYPE_H_MW );
        if( !h_mw )
        {
@@ -3475,9 +3475,9 @@ proxy_bind_mw(
                (ual_bind_mw_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mw_handle_t VOID_PTR64                       h_mw;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
-       ib_mr_handle_t VOID_PTR64                       h_mr;
+       ib_mw_handle_t                  h_mw;
+       ib_qp_handle_t                  h_qp;
+       ib_mr_handle_t                  h_mr;
        ib_api_status_t                 status;

        AL_ENTER( AL_DBG_MW );
@@ -3492,7 +3492,7 @@ proxy_bind_mw(
        }

        /* Validate MW handle */
-       h_mw = (ib_mw_handle_t VOID_PTR64)
+       h_mw = (ib_mw_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mw, AL_OBJ_TYPE_H_MW );
        if( !h_mw )
        {
@@ -3501,7 +3501,7 @@ proxy_bind_mw(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -3556,7 +3556,7 @@ proxy_destroy_mw(
                (ual_destroy_mw_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_mw_handle_t VOID_PTR64                       h_mw;
+       ib_mw_handle_t                  h_mw;

        AL_ENTER( AL_DBG_MW );

@@ -3573,7 +3573,7 @@ proxy_destroy_mw(
        *p_ret_bytes = sizeof(p_ioctl->out);

        /* Validate MW handle */
-       h_mw = (ib_mw_handle_t VOID_PTR64)
+       h_mw = (ib_mw_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_mw, AL_OBJ_TYPE_H_MW );
        if( !h_mw )
        {
@@ -3601,8 +3601,8 @@ proxy_get_spl_qp(
                (ual_spl_qp_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t   *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_pd_handle_t VOID_PTR64                       h_pd;
-       ib_qp_handle_t VOID_PTR64                       h_qp;
+       ib_pd_handle_t                  h_pd;
+       ib_qp_handle_t                  h_qp;
        ci_umv_buf_t                    *p_umv_buf = NULL;
        ib_api_status_t                 status;

@@ -3618,7 +3618,7 @@ proxy_get_spl_qp(
        }

        /* Validate pd handle */
-       h_pd = (ib_pd_handle_t VOID_PTR64)
+       h_pd = (ib_pd_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
        if( !h_pd )
        {
@@ -3675,7 +3675,7 @@ proxy_attach_mcast(
                (ual_attach_mcast_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
        al_dev_open_context_t           *p_context =
                (al_dev_open_context_t *)p_open_context;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;
        al_attach_handle_t                      h_attach;
        ci_umv_buf_t                            *p_umv_buf = NULL;
        ib_api_status_t                         status;
@@ -3692,7 +3692,7 @@ proxy_attach_mcast(
        }

        /* Validate QP handle */
-       h_qp = (ib_qp_handle_t VOID_PTR64)
+       h_qp = (ib_qp_handle_t)
                al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp, AL_OBJ_TYPE_H_QP );
        if( !h_qp )
        {
@@ -3805,133 +3805,133 @@ verbs_ioctl(

        switch( cl_ioctl_ctl_code( h_ioctl ) )
        {
-       case UAL_OPEN_CA: //check_done, ioctl was already initialized to 0
+       case UAL_OPEN_CA:
                cl_status = proxy_open_ca( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_CA: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_CA:
                cl_status = proxy_query_ca( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_CA: //check_done, ioctl initialized to 0 in ual_modify_ca
+       case UAL_MODIFY_CA:
                cl_status = proxy_modify_ca( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CI_CALL: //check_done, ioctl was already initialized to 0
+       case UAL_CI_CALL:
                cl_status = proxy_ci_call( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_ALLOC_PD: //check_done, ioctl was already initialized to 0
+       case UAL_ALLOC_PD:
                cl_status = proxy_alloc_pd( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CREATE_AV: //check_done, ioctl was already initialized to 0
+       case UAL_CREATE_AV:
                cl_status = proxy_create_av( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_AV: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_AV:
                cl_status = proxy_query_av( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_AV: //check_done, ioctl was already initialized to 0
+       case UAL_MODIFY_AV:
                cl_status = proxy_modify_av( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CREATE_SRQ: //check_done, ioctl was already initialized to 0
+       case UAL_CREATE_SRQ:
                cl_status = proxy_create_srq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_SRQ: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_SRQ:
                cl_status = proxy_query_srq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_SRQ: //check_done, ioctl was already initialized to 0
+       case UAL_MODIFY_SRQ:
                cl_status = proxy_modify_srq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_SRQ: //check_done, ioctl was already initialized to 0
+       case UAL_DESTROY_SRQ:
                cl_status = proxy_destroy_srq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_POST_SRQ_RECV: //check_done, ioctl was already initialized to 0
+       case UAL_POST_SRQ_RECV:
                cl_status = proxy_post_srq_recv( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CREATE_QP: //check_done, ioctl was already initialized to 0
+       case UAL_CREATE_QP:
                cl_status = proxy_create_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_QP: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_QP:
                cl_status = proxy_query_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_QP: //check_done, ioctl was already initialized to 0
+       case UAL_MODIFY_QP:
                cl_status = proxy_modify_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CREATE_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_CREATE_CQ:
                cl_status = proxy_create_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_CQ:
                cl_status = proxy_query_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_MODIFY_CQ:
                cl_status = proxy_modify_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REG_MR: //check_done, ioctl was already initialized to 0
+       case UAL_REG_MR:
                cl_status = proxy_register_mr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_MR: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_MR:
                cl_status = proxy_query_mr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_MODIFY_MR: //check_done, ioctl was already initialized to 0
+       case UAL_MODIFY_MR:
                cl_status = proxy_modify_mr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REG_SHARED: //check_done, ioctl was already initialized to 0
+       case UAL_REG_SHARED:
                cl_status = proxy_shared_mr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CREATE_MW: //check_done, ioctl was already initialized to 0
+       case UAL_CREATE_MW:
                cl_status = proxy_create_mw( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_QUERY_MW: //check_done, ioctl was already initialized to 0
+       case UAL_QUERY_MW:
                cl_status = proxy_query_mw( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_BIND_MW: //check_done, ioctl was already initialized to 0
+       case UAL_BIND_MW:
                cl_status = proxy_bind_mw( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_POST_SEND: //check_done, ioctl was already initialized to 0
+       case UAL_POST_SEND:
                cl_status = proxy_post_send( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_POST_RECV: //check_done, ioctl was already initialized to 0
+       case UAL_POST_RECV:
                cl_status = proxy_post_recv( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_PEEK_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_PEEK_CQ:
                cl_status = proxy_peek_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_POLL_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_POLL_CQ:
                cl_status = proxy_poll_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REARM_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_REARM_CQ:
                cl_status = proxy_rearm_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_REARM_N_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_REARM_N_CQ:
                cl_status = proxy_rearm_n_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_ATTACH_MCAST: //check_done, ioctl was already initialized to 0
+       case UAL_ATTACH_MCAST:
                cl_status = proxy_attach_mcast( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_GET_SPL_QP_ALIAS: //check_done, ioctl was already initialized to 0
+       case UAL_GET_SPL_QP_ALIAS:
                cl_status = proxy_get_spl_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_CLOSE_CA: //check_done, ioctl was already initialized to 0
+       case UAL_CLOSE_CA:
                cl_status = proxy_close_ca( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DEALLOC_PD: //check_done, ioctl was already initialized to 0
+       case UAL_DEALLOC_PD:
                cl_status = proxy_dealloc_pd( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_AV: //check_done, ioctl was already initialized to 0
+       case UAL_DESTROY_AV:
                cl_status = proxy_destroy_av( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_QP: //check_done, ioctl was already initialized to 0
+       case UAL_DESTROY_QP:
                cl_status = proxy_destroy_qp( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_CQ: //check_done, ioctl was already initialized to 0
+       case UAL_DESTROY_CQ:
                cl_status = proxy_destroy_cq( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DEREG_MR: //check_done, ioctl was already initialized to 0
+       case UAL_DEREG_MR:
                cl_status = proxy_deregister_mr( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DESTROY_MW: //check_done, ioctl was already initialized to 0
+       case UAL_DESTROY_MW:
                cl_status = proxy_destroy_mw( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_DETACH_MCAST: //check_done, ioctl was already initialized to 0
+       case UAL_DETACH_MCAST:
                cl_status = proxy_detach_mcast( p_context, h_ioctl, p_ret_bytes );
                break;
-       case UAL_GET_VENDOR_LIBCFG: //check_done, ioctl was already initialized to 0
+       case UAL_GET_VENDOR_LIBCFG:
                cl_status =
                        proxy_get_vendor_libcfg( p_context, h_ioctl, p_ret_bytes );
                break;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_sa_req.c trunk\core\al\kernel\al_sa_req.c
--- old\core\al\kernel\al_sa_req.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_sa_req.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -52,7 +53,7 @@
 typedef struct _sa_req_mgr
 {
        al_obj_t                                        obj;            /* Child of gp_al_mgr */
-       ib_pnp_handle_t VOID_PTR64                              h_pnp;          /* Handle for CA PnP events */
+       ib_pnp_handle_t                         h_pnp;          /* Handle for CA PnP events */

 }      sa_req_mgr_t;

@@ -95,13 +96,13 @@ init_sa_req_svc(

 void
 sa_req_send_comp_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad );

 void
 sa_req_recv_comp_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad );

@@ -232,7 +233,7 @@ sa_req_mgr_pnp_cb(
 {
        sa_req_svc_t                            *p_sa_req_svc;
        ib_av_attr_t                            av_attr;
-       ib_pd_handle_t VOID_PTR64                               h_pd;
+       ib_pd_handle_t                          h_pd;
        ib_api_status_t                         status;

        AL_ENTER( AL_DBG_SA_REQ );
@@ -432,7 +433,7 @@ init_sa_req_svc(
        ib_qp_create_t                  qp_create;
        ib_mad_svc_t                    mad_svc;
        ib_api_status_t                 status;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_av_attr_t                    av_attr;

        AL_ENTER( AL_DBG_SA_REQ );
@@ -704,7 +705,7 @@ al_send_sa_req(
  */
 void
 sa_req_send_comp_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_request_mad )
 {
@@ -751,7 +752,7 @@ sa_req_send_comp_cb(
  */
 void
 sa_req_recv_comp_cb(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_response )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_smi.c trunk\core\al\kernel\al_smi.c
--- old\core\al\kernel\al_smi.c Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_smi.c       Mon Jun 30 14:32:52 2008
@@ -2,6 +2,7 @@
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
  * Copyright (c) 2006 Voltaire Corporation.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -136,18 +137,18 @@ send_local_mad_cb(

 void
 spl_qp_send_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context );

 void
 spl_qp_recv_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void                                            *cq_context );

 void
 spl_qp_comp(
        IN                              spl_qp_svc_t*                           p_spl_qp_svc,
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              ib_wc_type_t                            wc_type );

 ib_api_status_t
@@ -187,13 +188,13 @@ recv_local_mad(

 void
 spl_qp_alias_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_element );

 void
 spl_qp_alias_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void                                            *mad_svc_context,
        IN                              ib_mad_element_t                        *p_mad_response );

@@ -515,7 +516,7 @@ create_spl_qp_svc(
 {
        cl_status_t                             cl_status;
        spl_qp_svc_t*                   p_spl_qp_svc;
-       ib_ca_handle_t VOID_PTR64                       h_ca;
+       ib_ca_handle_t                  h_ca;
        ib_cq_create_t                  cq_create;
        ib_qp_create_t                  qp_create;
        ib_qp_attr_t                    qp_attr;
@@ -582,7 +583,7 @@ create_spl_qp_svc(

        /* Attach the special QP service to the parent object. */
        status = attach_al_obj(
-               (al_obj_t* VOID_PTR64)p_pnp_rec->pnp_rec.pnp_context, &p_spl_qp_svc->obj );
+               (al_obj_t*)p_pnp_rec->pnp_rec.pnp_context, &p_spl_qp_svc->obj );
        if( status != IB_SUCCESS )
        {
                p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL );
@@ -1050,7 +1051,7 @@ route_mad_send(
        al_mad_send_t*                  p_mad_send;
        ib_mad_t*                               p_mad;
        ib_smp_t*                               p_smp;
-       ib_av_handle_t VOID_PTR64                       h_av;
+       ib_av_handle_t                  h_av;
        mad_route_t                             route;
        boolean_t                               local, loopback, discard;

@@ -1198,7 +1199,7 @@ route_mad_send(
  */
 ib_api_status_t
 spl_qp_svc_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr )
 {
        spl_qp_svc_t*                   p_spl_qp_svc;
@@ -2453,7 +2454,7 @@ send_local_mad_cb(
  */
 void
 spl_qp_send_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void*                                           cq_context )
 {
        spl_qp_svc_t*                   p_spl_qp_svc;
@@ -2528,7 +2529,7 @@ spl_qp_send_async_cb(
  */
 void
 spl_qp_recv_comp_cb(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              void*                                           cq_context )
 {
        spl_qp_svc_t*                   p_spl_qp_svc;
@@ -2595,7 +2596,7 @@ spl_qp_recv_async_cb(
 void
 spl_qp_comp(
        IN                              spl_qp_svc_t*                           p_spl_qp_svc,
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN                              ib_wc_type_t                            wc_type )
 {
        ib_wc_t                                 wc;
@@ -3081,7 +3082,7 @@ forward_sm_trap(
        av_attr.dlid = p_spl_qp_svc->sm_lid;
        av_attr.grh_valid = FALSE;

-       status = ib_create_av( p_spl_qp_svc->h_qp->obj.p_ci_ca->h_pd_alias,
+       status = ib_create_av( p_spl_qp_svc->h_qp->obj.p_ci_ca->h_pd_alias,
                &av_attr, &p_mad_element->h_av );

        if( status != IB_SUCCESS )
@@ -3169,7 +3170,7 @@ recv_local_mad(
  */
 void
 spl_qp_alias_send_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_element )
 {
@@ -3200,7 +3201,7 @@ spl_qp_alias_send_cb(
  */
 void
 spl_qp_alias_recv_cb(
-       IN                              ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN                              ib_mad_svc_handle_t                     h_mad_svc,
        IN                              void*                                           mad_svc_context,
        IN                              ib_mad_element_t*                       p_mad_response )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\kernel\al_smi.h trunk\core\al\kernel\al_smi.h
--- old\core\al\kernel\al_smi.h Mon Jun 30 12:28:07 2008
+++ trunk\core\al\kernel\al_smi.h       Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -45,8 +46,8 @@
 typedef struct _spl_qp_mgr
 {
        al_obj_t                                        obj;            /* Child of gp_al_mgr */
-TO_LONG_PTR(   ib_pnp_handle_t ,                               h_qp0_pnp) ;    /* Handle for QP0 port PnP events */
-TO_LONG_PTR(   ib_pnp_handle_t ,                               h_qp1_pnp) ;    /* Handle for QP1 port PnP events */
+       ib_pnp_handle_t                         h_qp0_pnp;      /* Handle for QP0 port PnP events */
+       ib_pnp_handle_t                         h_qp1_pnp;      /* Handle for QP1 port PnP events */

        cl_timer_t                                      poll_timer;     /* Timer for polling HW SMIs */

@@ -131,9 +132,9 @@ typedef struct _spl_qp_svc
        boolean_t                                       cache_en;

        al_mad_disp_handle_t                    h_mad_disp;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_send_cq) ;
-TO_LONG_PTR(   ib_cq_handle_t ,                                h_recv_cq) ;
-TO_LONG_PTR(   ib_qp_handle_t ,                                h_qp) ;
+       ib_cq_handle_t                          h_send_cq;
+       ib_cq_handle_t                          h_recv_cq;
+       ib_qp_handle_t                          h_qp;

 #if defined( CL_USE_MUTEX )
        boolean_t                                       send_async_queued;
@@ -152,9 +153,9 @@ TO_LONG_PTR(        ib_qp_handle_t ,                                h_qp) ;
        cl_qlist_t                                      recv_queue;
        cl_async_proc_item_t            send_async;

-TO_LONG_PTR(   ib_qp_handle_t ,                                h_qp_alias) ;
-TO_LONG_PTR(   ib_pool_key_t ,                         pool_key) ;
-TO_LONG_PTR(   ib_mad_svc_handle_t ,                   h_mad_svc) ;
+       ib_qp_handle_t                          h_qp_alias;
+       ib_pool_key_t                           pool_key;
+       ib_mad_svc_handle_t                     h_mad_svc;

 }      spl_qp_svc_t;

@@ -234,7 +235,7 @@ acquire_gsi_disp(

 ib_api_status_t
 spl_qp_svc_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr );


diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\al_mad_pool.c trunk\core\al\user\al_mad_pool.c
--- old\core\al\user\al_mad_pool.c      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\al_mad_pool.c    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -51,7 +52,7 @@
 typedef struct _mad_reg
 {
        al_obj_t                                obj;                    /* Child of al_pool_key_t */
-       struct _ib_mr* VOID_PTR64                       h_mr;
+       ib_mr_handle_t                  h_mr;
        net32_t                                 lkey;
        net32_t                                 rkey;
        mad_array_t*                    p_mad_array;
@@ -63,7 +64,7 @@ typedef struct _mad_reg
 typedef struct _mad_send
 {
        al_mad_send_t                   mad_send;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

 }      mad_send_t;

@@ -73,7 +74,7 @@ typedef struct _mad_send
 typedef struct _mad_rmpp
 {
        al_mad_rmpp_t                   mad_rmpp;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

 }      mad_rmpp_t;

@@ -119,7 +120,7 @@ __locate_reg_cb(

 static ib_api_status_t
 __grow_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
+       IN              const   ib_pool_handle_t                        h_pool,
                OUT                     mad_item_t**                            pp_mad_item OPTIONAL );

 static void
@@ -145,13 +146,13 @@ __mad_rmpp_init(
  */
 ib_api_status_t
 ib_create_mad_pool(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   size_t                                          min,
        IN              const   size_t                                          max,
        IN              const   size_t                                          grow_size,
-               OUT                     ib_pool_handle_t FUNC_PTR64* const              ph_pool )
+               OUT                     ib_pool_handle_t* const         ph_pool )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        ib_api_status_t                 status;
        cl_status_t                             cl_status;

@@ -267,8 +268,8 @@ static void
 __destroying_pool(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_pool_handle_t                h_pool;
+       ib_al_handle_t                  h_al;

        AL_ENTER(AL_DBG_MAD_POOL);

@@ -294,7 +295,7 @@ static void
 __free_pool(
        IN                              al_obj_t*                                       p_obj )
 {
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

        CL_ASSERT( p_obj );
        h_pool = PARENT_STRUCT( p_obj, al_pool_t, obj );
@@ -312,7 +313,7 @@ __free_pool(
  */
 ib_api_status_t
 ib_destroy_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool )
+       IN              const   ib_pool_handle_t                        h_pool )
 {
        cl_list_item_t*                 p_array_item;
        al_obj_t*                               p_obj;
@@ -360,14 +361,14 @@ ib_destroy_mad_pool(
  */
 ib_api_status_t
 ib_reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key )
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+               OUT                     ib_pool_key_t* const            pp_pool_key )
 {
        al_pool_key_t*                  p_pool_key;
        cl_list_item_t*                 p_array_item;
        al_obj_t*                               p_obj;
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        mad_array_t*                    p_mad_array;
        ib_api_status_t                 status;
        al_key_type_t                   key_type;
@@ -496,7 +497,7 @@ ib_reg_mad_pool(
        }

        /* Return the pool key. */
-       *pp_pool_key = (ib_pool_key_t VOID_PTR64)p_pool_key;
+       *pp_pool_key = (ib_pool_key_t)p_pool_key;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &p_pool_key->obj );
@@ -718,7 +719,7 @@ __free_mad_reg(
  */
 ib_api_status_t
 ib_dereg_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key )
+       IN              const   ib_pool_key_t                           pool_key )
 {
        ib_api_status_t         status;

@@ -747,7 +748,7 @@ ib_dereg_mad_pool(
  */
 ib_api_status_t
 dereg_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key ,
+       IN              const   ib_pool_key_t                           pool_key ,
        IN              const   al_key_type_t                           expected_type )
 {
        AL_ENTER(AL_DBG_MAD_POOL);
@@ -778,11 +779,11 @@ dereg_mad_pool(
  */
 static ib_api_status_t
 __get_mad_element(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
                OUT                     al_mad_element_t**                      pp_mad_element )
 {
        al_pool_key_t*                  p_pool_key;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        cl_list_item_t*                 p_item;
        mad_item_t*                             p_mad_item;
        ib_api_status_t                 status;
@@ -835,7 +836,7 @@ __get_mad_element(
        /* Hold a reference on the array while a MAD element is removed. */
        ref_al_obj( &p_mad_item->p_mad_array->obj );

-       p_mad_item->al_mad_element.pool_key = (ib_pool_key_t VOID_PTR64)pool_key;
+       p_mad_item->al_mad_element.pool_key = (ib_pool_key_t)pool_key;
        /* Return the MAD element. */
        *pp_mad_element = &p_mad_item->al_mad_element;

@@ -878,7 +879,7 @@ __init_mad_element(
        cl_qlist_t                              *p_list;
        al_obj_t                                *p_obj;
        mad_reg_t                               *p_reg;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

        CL_ASSERT( p_pool_key );
        CL_ASSERT( p_mad_item != NULL );
@@ -962,7 +963,7 @@ __put_mad_element(
        IN                              al_mad_element_t*                       p_mad_element )
 {
        mad_item_t*                             p_mad_item;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;

        CL_ASSERT( p_mad_element );
        p_mad_item = PARENT_STRUCT( p_mad_element, mad_item_t, al_mad_element );
@@ -992,7 +993,7 @@ __put_mad_element(
  */
 static ib_api_status_t
 __grow_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
+       IN              const   ib_pool_handle_t                        h_pool,
                OUT                     mad_item_t**                            pp_mad_item OPTIONAL )
 {
        size_t                                  i;
@@ -1155,7 +1156,7 @@ __free_mad_array(
        IN                              al_obj_t*                                       p_obj )
 {
        mad_array_t*                    p_mad_array;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        cl_list_item_t*                 p_key_item;
        al_pool_key_t*                  p_pool_key;
        cl_list_item_t*                 p_reg_item;
@@ -1227,14 +1228,14 @@ __mad_send_init(



-ib_mad_send_handle_t VOID_PTR64
+ib_mad_send_handle_t
 get_mad_send(
        IN              const   al_mad_element_t                        *p_mad_element )
 {
        mad_item_t*                             p_mad_item;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        cl_pool_item_t                  *p_pool_item;
-       ib_mad_send_handle_t VOID_PTR64 h_send;
+       ib_mad_send_handle_t    h_send;

        CL_ASSERT( p_mad_element );

@@ -1265,7 +1266,7 @@ get_mad_send(

 void
 put_mad_send(
-       IN                              ib_mad_send_handle_t FUNC_PTR64         h_mad_send )
+       IN                              ib_mad_send_handle_t            h_mad_send )
 {
        mad_send_t                      *p_mad_send;

@@ -1304,7 +1305,7 @@ get_mad_rmpp(
        IN              const   al_mad_element_t                        *p_mad_element )
 {
        mad_item_t*                             p_mad_item;
-       ib_pool_handle_t VOID_PTR64             h_pool;
+       ib_pool_handle_t                h_pool;
        cl_pool_item_t                  *p_pool_item;

        CL_ASSERT( p_mad_element );
@@ -1344,7 +1345,7 @@ put_mad_rmpp(

 ib_api_status_t
 ib_get_mad(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key,
+       IN              const   ib_pool_key_t                           pool_key,
        IN              const   size_t                                          buf_size,
                OUT                     ib_mad_element_t                        **pp_mad_element )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_av.c trunk\core\al\user\ual_av.c
--- old\core\al\user\ual_av.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_av.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -48,9 +49,9 @@

 ib_api_status_t
 ual_create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-       IN      OUT                     ib_av_handle_t FUNC_PTR64                               h_av )
+       IN      OUT                     ib_av_handle_t                          h_av )
 {
        ual_create_av_ioctl_t   ioctl_buf;
        uintn_t                                 bytes_ret;
@@ -119,9 +120,9 @@ ual_create_av(
  */
 ib_api_status_t
 ual_pd_alias_create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-       IN      OUT                     ib_av_handle_t FUNC_PTR64                               h_av )
+       IN      OUT                     ib_av_handle_t                          h_av )
 {
        ual_create_av_ioctl_t   ioctl_buf;
        uintn_t                                 bytes_ret;
@@ -167,7 +168,7 @@ ual_pd_alias_create_av(
  */
 ib_api_status_t
 ual_destroy_av(
-       IN                      ib_av_handle_t FUNC_PTR64                               h_av )
+       IN                      ib_av_handle_t                          h_av )
 {
        ual_destroy_av_ioctl_t  ioctl_buf;
        uintn_t                                 bytes_ret;
@@ -239,7 +240,7 @@ ual_destroy_av(

 ib_api_status_t
 ual_modify_av(
-       IN                      ib_av_handle_t FUNC_PTR64                               h_av,
+       IN                      ib_av_handle_t                          h_av,
        IN      const   ib_av_attr_t* const                     p_av_attr)
 {
        ual_modify_av_ioctl_t   ioctl_buf;
@@ -311,9 +312,9 @@ ual_modify_av(

 ib_api_status_t
 ual_query_av(
-       IN                      ib_av_handle_t FUNC_PTR64                               h_av,
+       IN                      ib_av_handle_t                          h_av,
                OUT             ib_av_attr_t*   const           p_av_attr,
-               OUT             ib_pd_handle_t FUNC_PTR64*      const           ph_pd )
+               OUT             ib_pd_handle_t* const           ph_pd )
 {
        ual_query_av_ioctl_t    ioctl_buf;
        uintn_t                                 bytes_ret;
@@ -381,5 +382,4 @@ ual_query_av(
        AL_EXIT( AL_DBG_AV );
        return status;
 }
-

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_ca.c trunk\core\al\user\ual_ca.c
--- old\core\al\user\ual_ca.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_ca.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -255,7 +256,7 @@ ual_close_ca(

 ib_api_status_t
 ual_query_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size )
 {
@@ -321,7 +322,7 @@ ual_query_ca(

 ib_api_status_t
 ual_modify_ca(
-       IN              const ib_ca_handle_t FUNC_PTR64                         h_ca,
+       IN              const ib_ca_handle_t                            h_ca,
        IN              const uint8_t                                           port_num,
        IN              const ib_ca_mod_t                                       ca_mod,
        IN              const ib_port_attr_mod_t* const         p_port_attr_mod )
@@ -382,7 +383,7 @@ ual_modify_ca(
 static ib_api_status_t
 __convert_to_proxy_handles(
        IN                              uint64_t*                       const   dst_handle_array,
-       IN              const   void* FUNC_PTR64 *              const   src_handle_array,
+       IN              const   void**                          const   src_handle_array,
        IN                              uint32_t                                        num_handles )
 {
        uint32_t                i;
@@ -390,7 +391,7 @@ __convert_to_proxy_handles(

        for( i = 0; i < num_handles; i++ )
        {
-               p_al_obj = (al_obj_t* VOID_PTR64)src_handle_array[i];
+               p_al_obj = (al_obj_t*)src_handle_array[i];
                if( (p_al_obj->type != AL_OBJ_TYPE_H_PD) &&
                        (p_al_obj->type != AL_OBJ_TYPE_H_CQ) &&
                        (p_al_obj->type != AL_OBJ_TYPE_H_AV) &&
@@ -410,8 +411,8 @@ __convert_to_proxy_handles(

 ib_api_status_t
 ib_ci_call(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
-       IN              const   void* FUNC_PTR64 *              const   handle_array    OPTIONAL,
+       IN                              ib_ca_handle_t                          h_ca,
+       IN              const   void**                          const   handle_array    OPTIONAL,
        IN                              uint32_t                                        num_handles,
        IN                              ib_ci_op_t*                     const   p_ci_op )
 {
@@ -421,7 +422,7 @@ ib_ci_call(
        cl_status_t                             cl_status;
        ib_api_status_t                 status;
        uvp_interface_t                 uvp_intf;
-       void*  *        VOID_PTR64              p_uvp_handle_array = NULL ;
+       void**                                  p_uvp_handle_array = NULL;

        AL_ENTER( AL_DBG_CA );

@@ -460,7 +461,7 @@ ib_ci_call(
                        return status;
                }

-               p_uvp_handle_array = cl_zalloc( sizeof(void* VOID_PTR64) * num_handles );
+               p_uvp_handle_array = cl_zalloc( sizeof(void*) * num_handles );
                if( !p_uvp_handle_array )
                {
                        cl_free( p_ca_ioctl );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_ci_ca.c trunk\core\al\user\ual_ci_ca.c
--- old\core\al\user\ual_ci_ca.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_ci_ca.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -49,8 +50,8 @@
 #endif


-extern ib_pool_handle_t VOID_PTR64             gh_mad_pool;
-extern ib_al_handle_t VOID_PTR64               gh_al;
+extern ib_pool_handle_t                gh_mad_pool;
+extern ib_al_handle_t          gh_al;
 extern cl_async_proc_t         *gp_async_proc_mgr;

 #define        EVENT_POOL_MIN                  4
@@ -79,7 +80,7 @@ cleanup_ci_ca(

 ib_api_status_t
 create_ci_ca(
-       IN ib_al_handle_t FUNC_PTR64                                            h_al,
+       IN ib_al_handle_t                                               h_al,
        IN al_obj_t                                                             *p_parent_obj,
        IN ib_net64_t                                                   ca_guid )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_ci_ca.h trunk\core\al\user\ual_ci_ca.h
--- old\core\al\user\ual_ci_ca.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_ci_ca.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -43,7 +44,7 @@

 ib_api_status_t
 create_ci_ca(
-       IN              ib_al_handle_t FUNC_PTR64                                               h_al,
+       IN              ib_al_handle_t                                          h_al,
        IN              al_obj_t                                                        *p_parent_obj,
        IN              ib_net64_t                                                      ca_guid );

@@ -55,7 +56,7 @@ ual_open_ca(
 #if 0
 ib_api_status_t
 ual_close_ca(
-       IN              ib_ca_handle_t FUNC_PTR64                                               h_ca);
+       IN              ib_ca_handle_t                                          h_ca);
 #else
 ib_api_status_t
 ual_close_ca(
@@ -64,213 +65,213 @@ ual_close_ca(

 ib_api_status_t
 ual_modify_ca(
-       IN              const ib_ca_handle_t FUNC_PTR64                         h_ca,
+       IN              const ib_ca_handle_t                            h_ca,
        IN              const uint8_t                                           port_num,
        IN              const ib_ca_mod_t                                       ca_mod,
        IN              const ib_port_attr_mod_t* const         p_port_attr_mod );

 ib_api_status_t
 ual_query_ca(
-       IN              const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN              const   ib_ca_handle_t                          h_ca,
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,
        IN      OUT                     uint32_t* const                         p_size );

 ib_api_status_t
 ual_allocate_pd(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN                              ib_ca_handle_t                          h_ca,
        IN              const   ib_pd_type_t                            pd_type,
-       IN      OUT                     ib_pd_handle_t FUNC_PTR64                               h_pd );
+       IN      OUT                     ib_pd_handle_t                          h_pd );

 ib_api_status_t
 ual_deallocate_pd(
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd );
+       IN                              ib_pd_handle_t                          h_pd );

 ib_api_status_t
 ual_create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-       IN      OUT                     ib_av_handle_t FUNC_PTR64                               h_av );
+       IN      OUT                     ib_av_handle_t                          h_av );

 ib_api_status_t
 ual_pd_alias_create_av(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_av_attr_t* const                     p_av_attr,
-       IN      OUT                     ib_av_handle_t FUNC_PTR64                               h_av );
+       IN      OUT                     ib_av_handle_t                          h_av );

 ib_api_status_t
 ual_destroy_av(
-       IN                              ib_av_handle_t FUNC_PTR64                               h_av );
+       IN                              ib_av_handle_t                          h_av );

 ib_api_status_t
 ual_modify_av(
-       IN                              ib_av_handle_t FUNC_PTR64                               h_av,
+       IN                              ib_av_handle_t                          h_av,
        IN              const   ib_av_attr_t* const                     p_av_attr);

 ib_api_status_t
 ual_query_av(
-       IN                              ib_av_handle_t FUNC_PTR64                               h_av,
+       IN                              ib_av_handle_t                          h_av,
                OUT                     ib_av_attr_t* const                     p_av_attr,
-               OUT                     ib_pd_handle_t FUNC_PTR64* const                ph_pd );
+               OUT                     ib_pd_handle_t* const           ph_pd );

 ib_api_status_t
 ual_create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN      OUT                     ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN      OUT                     ib_srq_handle_t                         h_srq,
        IN              const   ib_srq_attr_t* const                    p_srq_attr);

 ib_api_status_t
 ual_modify_srq(
-       IN                              ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN                              ib_srq_handle_t                         h_srq,
        IN              const   ib_srq_attr_t*  const                   p_srq_attr,
        IN              const   ib_srq_attr_mask_t                      srq_attr_mask );

 ib_api_status_t
 ual_query_srq(
-       IN                              ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN                              ib_srq_handle_t                         h_srq,
                OUT                     ib_srq_attr_t*                          p_srq_attr );

 ib_api_status_t
 ual_destroy_srq(
-       IN                              ib_srq_handle_t FUNC_PTR64                              h_srq );
+       IN                              ib_srq_handle_t                         h_srq );

 ib_api_status_t
 ual_create_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN      OUT                     ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN      OUT                     ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN                              ib_qp_attr_t*                           p_qp_attr );

 ib_api_status_t
 ual_modify_qp(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                              ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_mod_t* const                      p_qp_mod,
        IN                              ib_qp_attr_t*                           p_qp_attr );

 ib_api_status_t
 ual_query_qp(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                              ib_qp_handle_t                          h_qp,
                OUT                     ib_qp_attr_t*                           p_qp_attr );

 ib_api_status_t
 ual_destroy_qp(
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp );
+       IN                              ib_qp_handle_t                          h_qp );

 ib_api_status_t
 ual_create_cq(
        IN                              struct _al_ci_ca* const         p_ci_ca,
        IN                              ib_cq_create_t* const           p_cq_create,
-       IN      OUT                     ib_cq_handle_t FUNC_PTR64                               h_cq );
+       IN      OUT                     ib_cq_handle_t                          h_cq );

 ib_api_status_t
 ual_modify_cq(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                              ib_cq_handle_t                          h_cq,
        IN      OUT                     uint32_t*                                       p_size );

 ib_api_status_t
 ual_query_cq(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                              ib_cq_handle_t                          h_cq,
                OUT                     uint32_t*                                       p_size );

 ib_api_status_t
 ual_destroy_cq(
-       IN                              ib_cq_handle_t FUNC_PTR64                               h_cq );
+       IN                              ib_cq_handle_t                          h_cq );

 ib_api_status_t
 ual_reg_mem(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mr_handle_t FUNC_PTR64                               h_mr );
+       IN      OUT                     ib_mr_handle_t                          h_mr );

 ib_api_status_t
 ual_dereg_mr(
-       IN                              ib_mr_handle_t FUNC_PTR64                               h_mr );
+       IN                              ib_mr_handle_t                          h_mr );

 ib_api_status_t
 ual_modify_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_mr_create_t* const           p_mr_create OPTIONAL,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL );
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL );

 ib_api_status_t
 ual_query_mr(
-       IN                              ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN                              ib_mr_handle_t                          h_mr,
                OUT                     ib_mr_attr_t*                           p_mr_attr );

 ib_api_status_t
 ual_reg_shared(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_mr_handle_t                          h_mr,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_access_t                                     access_ctrl,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mr_handle_t FUNC_PTR64                               h_new_mr );
+       IN      OUT                     ib_mr_handle_t                          h_new_mr );

 ib_api_status_t
 ual_create_mw(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mw_handle_t FUNC_PTR64                               h_mw );
+       IN      OUT                     ib_mw_handle_t                          h_mw );

 ib_api_status_t
 ual_destroy_mw(
-       IN                              ib_mw_handle_t FUNC_PTR64                               h_mw );
+       IN                              ib_mw_handle_t                          h_mw );

 ib_api_status_t
 ual_query_mw(
-       IN                              ib_mw_handle_t FUNC_PTR64                               h_mw,
-               OUT                     ib_pd_handle_t FUNC_PTR64*                              ph_pd,
+       IN                              ib_mw_handle_t                          h_mw,
+               OUT                     ib_pd_handle_t*                         ph_pd,
                OUT                     net32_t* const                          p_rkey );

 ib_api_status_t
 ual_bind_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_mw_handle_t                          h_mw,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_bind_wr_t*                           p_mw_bind,
                OUT                     net32_t* const                          p_rkey );

 ib_api_status_t
 ual_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t* const                     p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure );

 ib_api_status_t
 ual_post_recv(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure );

 ib_api_status_t
 ual_post_srq_recv(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              ib_recv_wr_t* const                     p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure );

 ib_api_status_t
 ual_peek_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        OUT                             uint32_t* const                         p_n_cqes );

 ib_api_status_t
 ual_poll_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     ib_wc_t** const                         pp_free_wclist,
                OUT                     ib_wc_t** const                         pp_done_wclist );

 ib_api_status_t
 ual_rearm_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   boolean_t                                       solicited );

 ib_api_status_t
 ual_rearm_n_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   uint32_t                                        n_cqes );

 typedef struct _ual_ci_interface
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_cm_cep.c trunk\core\al\user\ual_cm_cep.c
--- old\core\al\user\ual_cm_cep.c       Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_cm_cep.c     Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -74,7 +75,7 @@ typedef struct _ual_cep_mgr
 typedef struct _al_ucep
 {
        al_pfn_cep_cb_t                         pfn_cb;
-       ib_al_handle_t VOID_PTR64                               h_al;
+       ib_al_handle_t                          h_al;
        cl_list_item_t                          al_item;

        ib_pfn_destroy_cb_t                     pfn_destroy_cb;
@@ -194,7 +195,7 @@ create_cep_mgr(

 void
 al_cep_cleanup_al(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al )
+       IN              const   ib_al_handle_t                          h_al )
 {
        cl_list_item_t          *p_item;
        net32_t                         cid;
@@ -241,17 +242,15 @@ __destroy_ucep(

 ib_api_status_t
 __create_ucep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
                OUT                     net32_t* const                          p_cid )
 {
        ucep_t                                  *p_cep;
        DWORD                                   bytes_ret;
        ual_create_cep_ioctl_t  ioctl;
-    //TO_LONG_PTR(context);
-    //context.context = context;

        AL_ENTER( AL_DBG_CM );

@@ -340,9 +339,9 @@ __create_ucep(

 ib_api_status_t
 al_create_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              al_pfn_cep_cb_t                         pfn_cb,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
                OUT                     net32_t* const                          p_cid )
 {
        ib_api_status_t         status;
@@ -362,7 +361,7 @@ al_create_cep(
  */
 ib_api_status_t
 al_destroy_cep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
@@ -423,7 +422,7 @@ invalid:

 ib_api_status_t
 al_cep_listen(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_cep_listen_t* const          p_listen_info )
 {
@@ -476,7 +475,7 @@ al_cep_listen(

 ib_api_status_t
 al_cep_pre_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_req_t* const                      p_cm_req,
                OUT                     ib_qp_mod_t* const                      p_init )
@@ -557,7 +556,7 @@ al_cep_pre_req(

 ib_api_status_t
 al_cep_send_req(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -587,9 +586,9 @@ al_cep_send_req(

 ib_api_status_t
 al_cep_pre_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-       IN                              void* FUNC_PTR64                                context,
+       IN                              void*                                           context,
        IN              const   ib_cm_rep_t* const                      p_cm_rep,
                OUT                     ib_qp_mod_t* const                      p_init )
 {
@@ -667,7 +666,7 @@ al_cep_pre_rep(

 ib_api_status_t
 al_cep_send_rep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -697,7 +696,7 @@ al_cep_send_rep(

 ib_api_status_t
 al_cep_get_rtr_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rtr )
 {
@@ -737,7 +736,7 @@ al_cep_get_rtr_attr(

 ib_api_status_t
 al_cep_get_rts_attr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     ib_qp_mod_t* const                      p_rts )
 {
@@ -777,7 +776,7 @@ al_cep_get_rts_attr(

 ib_api_status_t
 al_cep_rtu(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t*                                        p_pdata OPTIONAL,
        IN                              uint8_t                                         pdata_len )
@@ -825,7 +824,7 @@ al_cep_rtu(

 ib_api_status_t
 al_cep_rej(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN                              ib_rej_status_t                         rej_status,
        IN              const   uint8_t* const                          p_ari,
@@ -897,7 +896,7 @@ al_cep_rej(

 ib_api_status_t
 al_cep_mra(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_mra_t* const                      p_cm_mra )
 {
@@ -951,7 +950,7 @@ al_cep_mra(

 ib_api_status_t
 al_cep_lap(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_lap_t* const                      p_cm_lap )
 {
@@ -1013,7 +1012,7 @@ al_cep_lap(

 ib_api_status_t
 al_cep_pre_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_apr_t* const                      p_cm_apr,
                OUT                     ib_qp_mod_t* const                      p_apr )
@@ -1083,7 +1082,7 @@ al_cep_pre_apr(

 ib_api_status_t
 al_cep_send_apr(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid )
 {
        ib_api_status_t         status;
@@ -1113,7 +1112,7 @@ al_cep_send_apr(

 ib_api_status_t
 al_cep_dreq(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   uint8_t* const                          p_pdata OPTIONAL,
        IN              const   uint8_t                                         pdata_len )
@@ -1165,7 +1164,7 @@ al_cep_dreq(

 ib_api_status_t
 al_cep_drep(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
        IN              const   ib_cm_drep_t* const                     p_cm_drep )
 {
@@ -1219,7 +1218,7 @@ al_cep_drep(

 ib_api_status_t
 al_cep_get_timewait(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
                OUT                     uint64_t* const                         p_timewait_us )
 {
@@ -1259,21 +1258,21 @@ al_cep_get_timewait(
 //
 //ib_api_status_t
 //al_cep_migrate(
-//     IN                              ib_al_handle_t VOID_PTR64                               h_al,
+//     IN                              ib_al_handle_t                          h_al,
 //     IN                              net32_t                                         cid );
 //
 //
 //ib_api_status_t
 //al_cep_established(
-//     IN                              ib_al_handle_t VOID_PTR64                               h_al,
+//     IN                              ib_al_handle_t                          h_al,
 //     IN                              net32_t                                         cid );


 ib_api_status_t
 al_cep_poll(
-       IN                              ib_al_handle_t FUNC_PTR64                               h_al,
+       IN                              ib_al_handle_t                          h_al,
        IN                              net32_t                                         cid,
-               OUT                     void* FUNC_PTR64 *                              p_context,
+               OUT                     void**                                          p_context,
                OUT                     net32_t* const                          p_new_cid,
                OUT                     ib_mad_element_t** const        pp_mad )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_cq.c trunk\core\al\user\ual_cq.c
--- old\core\al\user\ual_cq.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_cq.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -50,7 +51,7 @@ ib_api_status_t
 ual_create_cq(
        IN                              al_ci_ca_t* const                       p_ci_ca,
        IN                              ib_cq_create_t* const           p_cq_create,
-       IN      OUT                     ib_cq_handle_t FUNC_PTR64                               h_cq )
+       IN      OUT                     ib_cq_handle_t                          h_cq )
 {
        ual_create_cq_ioctl_t   cq_ioctl;
        uintn_t                                 bytes_ret;
@@ -181,7 +182,7 @@ ual_create_cq(

 ib_api_status_t
 ual_destroy_cq(
-       IN                      ib_cq_handle_t FUNC_PTR64                               h_cq )
+       IN                      ib_cq_handle_t                          h_cq )
 {
        ual_destroy_cq_ioctl_t  cq_ioctl;
        uintn_t                                 bytes_ret;
@@ -233,7 +234,7 @@ ual_destroy_cq(

 ib_api_status_t
 ual_modify_cq(
-       IN                      ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                      ib_cq_handle_t                          h_cq,
        IN      OUT             uint32_t*                                       p_size )
 {
        ual_modify_cq_ioctl_t   cq_ioctl;
@@ -295,7 +296,7 @@ ual_modify_cq(

 ib_api_status_t
 ual_query_cq(
-       IN                      ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN                      ib_cq_handle_t                          h_cq,
                OUT             uint32_t*                                       p_size )
 {
        ual_query_cq_ioctl_t    cq_ioctl;
@@ -361,7 +362,7 @@ ual_query_cq(

 ib_api_status_t
 ual_peek_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        OUT                             uint32_t* const                         p_n_cqes )
 {
        ual_peek_cq_ioctl_t             cq_ioctl;
@@ -397,7 +398,7 @@ ual_peek_cq(

 ib_api_status_t
 ual_poll_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN      OUT                     ib_wc_t**       const                   pp_free_wclist,
                OUT                     ib_wc_t**       const                   pp_done_wclist )
 {
@@ -435,7 +436,7 @@ ual_poll_cq(
                return IB_INVALID_PARAMETER;
        }

-       ioctl_buf_sz = sizeof(*p_cq_ioctl); //we should use the size of the whole union here
+       ioctl_buf_sz = sizeof(p_cq_ioctl->out);
        ioctl_buf_sz += sizeof(ib_wc_t) * (num_wc - 1);

        p_cq_ioctl = (ual_poll_cq_ioctl_t*)cl_zalloc( ioctl_buf_sz );
@@ -496,7 +497,7 @@ ual_poll_cq(

 ib_api_status_t
 ual_rearm_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   boolean_t                                       solicited )
 {
        ual_rearm_cq_ioctl_t    cq_ioctl;
@@ -530,7 +531,7 @@ ual_rearm_cq(

 ib_api_status_t
 ual_rearm_n_cq(
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,
+       IN              const   ib_cq_handle_t                          h_cq,
        IN              const   uint32_t                                        n_cqes )
 {
        ual_rearm_n_cq_ioctl_t  cq_ioctl;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mad.c trunk\core\al\user\ual_mad.c
--- old\core\al\user\ual_mad.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mad.c        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -54,7 +55,7 @@ static void
 __destroying_ual_mad_svc(
        IN                              struct _al_obj                          *p_obj )
 {
-       ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+       ib_mad_svc_handle_t             h_mad_svc;

        AL_ENTER(AL_DBG_MAD_SVC);
        CL_ASSERT( p_obj );
@@ -69,14 +70,14 @@ __destroying_ual_mad_svc(

 ib_api_status_t
 ual_reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc )
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc )
 {
        ib_api_status_t                         status;
        cl_status_t                                     cl_status;
        uintn_t                                         bytes_ret;
-       ib_mad_svc_handle_t VOID_PTR64                  h_mad_svc;
+       ib_mad_svc_handle_t                     h_mad_svc;
        al_qp_alias_t                           *p_qp_alias;
        ual_reg_mad_svc_ioctl_t         ioctl_buf;

@@ -155,7 +156,7 @@ ual_reg_mad_svc(

 ib_api_status_t
 ual_dereg_mad_svc(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc )
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc )
 {
        ual_dereg_mad_svc_ioctl_t       ioctl_buf;
        uintn_t                                         bytes_ret;
@@ -189,7 +190,7 @@ ual_dereg_mad_svc(

 ib_api_status_t
 ual_send_one_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element )
 {
        ual_send_mad_ioctl_t    ioctl_buf;
@@ -251,7 +252,7 @@ ual_send_one_mad(

 ib_api_status_t
 ual_spl_qp_mad_send(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element_list,
                OUT                     ib_mad_element_t                        **pp_mad_failure OPTIONAL )
 {
@@ -283,7 +284,7 @@ ual_spl_qp_mad_send(

 ib_api_status_t
 ual_spl_qp_cancel_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element )
 {
        ual_cancel_mad_ioctl_t  ioctl_buf;
@@ -323,9 +324,9 @@ ual_spl_qp_cancel_mad(

 ib_api_status_t
 ual_create_reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN      OUT                     ib_pool_key_t FUNC_PTR64                                p_pool_key )
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN      OUT                     ib_pool_key_t                           p_pool_key )
 {
        ual_reg_mad_pool_ioctl_t                ioctl_buf;
        uintn_t                                         bytes_ret;
@@ -370,7 +371,7 @@ ual_create_reg_mad_pool(

 void
 ual_dereg_destroy_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key )
+       IN              const   ib_pool_key_t                           pool_key )
 {
        ual_dereg_mad_pool_ioctl_t      ioctl_buf;
        uintn_t                                         bytes_ret;
@@ -410,7 +411,7 @@ ual_dereg_destroy_mad_pool(
  */
 ib_api_status_t
 ual_get_recv_mad(
-       IN                              ib_pool_key_t FUNC_PTR64                                p_pool_key,
+       IN                              ib_pool_key_t                           p_pool_key,
        IN              const   uint64_t                                        h_mad,
        IN              const   size_t                                          buf_size,
                OUT                     ib_mad_element_t** const        pp_mad_element )
@@ -488,7 +489,7 @@ ual_get_recv_mad(

 ib_api_status_t
 ual_local_mad(
-       IN                              const ib_ca_handle_t FUNC_PTR64         h_ca,
+       IN                              const ib_ca_handle_t            h_ca,
        IN                              const uint8_t                           port_num,
        IN                              ib_mad_t* const                         p_mad_in,
        IN                              ib_mad_t*                                       p_mad_out )
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mad.h trunk\core\al\user\ual_mad.h
--- old\core\al\user\ual_mad.h  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mad.h        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -43,52 +44,52 @@
  */
 ib_api_status_t
 ual_reg_global_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key );
+       IN              const   ib_pool_handle_t                        h_pool,
+               OUT                     ib_pool_key_t* const            pp_pool_key );

 ib_api_status_t
 ual_reg_mad_svc(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN              const   ib_mad_svc_t* const                     p_mad_svc,
-               OUT                     ib_mad_svc_handle_t FUNC_PTR64* const   ph_mad_svc );
+               OUT                     ib_mad_svc_handle_t* const      ph_mad_svc );

 ib_api_status_t
 ual_dereg_mad_svc(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc );
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc );


 ib_api_status_t
 ual_spl_qp_mad_send(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element_list,
                OUT                     ib_mad_element_t                        **pp_mad_failure OPTIONAL );

 ib_api_status_t
 ual_spl_qp_cancel_mad(
-       IN              const   ib_mad_svc_handle_t FUNC_PTR64                  h_mad_svc,
+       IN              const   ib_mad_svc_handle_t                     h_mad_svc,
        IN                              ib_mad_element_t* const         p_mad_element );

 void
 ual_dereg_destroy_mad_pool(
-       IN              const   ib_pool_key_t FUNC_PTR64                                pool_key );
+       IN              const   ib_pool_key_t                           pool_key );

 ib_api_status_t
 ual_create_reg_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN                              ib_pool_key_t FUNC_PTR64                                p_pool_key );
+       IN              const   ib_pool_handle_t                        h_pool,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN                              ib_pool_key_t                           p_pool_key );


 ib_api_status_t
 ual_get_recv_mad(
-       IN                              ib_pool_key_t FUNC_PTR64                                p_pool_key,
+       IN                              ib_pool_key_t                           p_pool_key,
        IN              const   uint64_t                                        h_mad,
        IN              const   size_t                                          buf_size,
                OUT                     ib_mad_element_t** const        pp_mad_element );

 ib_api_status_t
 ual_local_mad(
-IN             const   ib_ca_handle_t FUNC_PTR64                               h_ca,
+IN             const   ib_ca_handle_t                          h_ca,
        IN              const   uint8_t                                         port_num,
        IN              const   void* const                                     p_mad_in,
        IN                              void*                                           p_mad_out );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mad_pool.c trunk\core\al\user\ual_mad_pool.c
--- old\core\al\user\ual_mad_pool.c     Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mad_pool.c   Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -56,8 +57,8 @@ __ual_free_pool_key(
  */
 ib_api_status_t
 ual_reg_global_mad_pool(
-       IN              const   ib_pool_handle_t FUNC_PTR64                     h_pool,
-               OUT                     ib_pool_key_t FUNC_PTR64* const         pp_pool_key )
+       IN              const   ib_pool_handle_t                        h_pool,
+               OUT                     ib_pool_key_t* const            pp_pool_key )
 {
        al_pool_key_t*                  p_pool_key;
        ib_api_status_t                 status;
@@ -109,7 +110,7 @@ ual_reg_global_mad_pool(
        p_pool_key->h_al = p_pool_key->obj.h_al;

        /* Return the pool key. */
-       *pp_pool_key = (ib_pool_key_t VOID_PTR64)p_pool_key;
+       *pp_pool_key = (ib_pool_key_t)p_pool_key;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &p_pool_key->obj );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mcast.c trunk\core\al\user\ual_mcast.c
--- old\core\al\user\ual_mcast.c        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mcast.c      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -46,13 +47,13 @@

 ib_api_status_t
 ual_attach_mcast(
-       IN                      ib_mcast_handle_t FUNC_PTR64                    h_mcast )
+       IN                      ib_mcast_handle_t                       h_mcast )
 {
        ual_attach_mcast_ioctl_t        ioctl_buf;
        uintn_t                                         bytes_ret;
        cl_status_t                                     cl_status;
        ib_api_status_t                         status = IB_ERROR;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;
        uvp_interface_t                         uvp_intf;

        AL_ENTER( AL_DBG_MCAST );
@@ -116,13 +117,13 @@ ual_attach_mcast(

 ib_api_status_t
 ual_detach_mcast(
-       IN                      ib_mcast_handle_t FUNC_PTR64                    h_mcast )
+       IN                      ib_mcast_handle_t                       h_mcast )
 {
        ual_detach_mcast_ioctl_t        ioctl_buf;
        uintn_t                                         bytes_ret;
        cl_status_t                                     cl_status;
        ib_api_status_t                         status;
-       ib_qp_handle_t VOID_PTR64                               h_qp;
+       ib_qp_handle_t                          h_qp;
        uvp_interface_t                         uvp_intf;

        AL_ENTER( AL_DBG_MCAST );
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mcast.h trunk\core\al\user\ual_mcast.h
--- old\core\al\user\ual_mcast.h        Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mcast.h      Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -35,10 +36,10 @@

 ib_api_status_t
 ual_attach_mcast(
-       IN                      ib_mcast_handle_t FUNC_PTR64                    h_mcast );
+       IN                      ib_mcast_handle_t                       h_mcast );

 ib_api_status_t
 ual_detach_mcast(
-       IN                      ib_mcast_handle_t FUNC_PTR64                    h_mcast );
+       IN                      ib_mcast_handle_t                       h_mcast );

 #endif /* __UAL_MCAST_H__ */
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mgr.c trunk\core\al\user\ual_mgr.c
--- old\core\al\user\ual_mgr.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mgr.c        Mon Jun 30 14:32:52 2008
@@ -58,9 +58,9 @@


 /* Global AL manager handle is defined in al_mgr_shared.c */
-extern ib_al_handle_t VOID_PTR64               gh_al;
+extern ib_al_handle_t          gh_al;
 extern al_mgr_t*                       gp_al_mgr;
-extern ib_pool_handle_t VOID_PTR64     gh_mad_pool;
+extern ib_pool_handle_t        gh_mad_pool;


 atomic32_t                                     g_open_cnt = 0;
@@ -706,9 +706,9 @@ static void
 __process_comp_cb(
        IN              comp_cb_ioctl_info_t*                   p_comp_cb_info )
 {
-       ib_cq_handle_t VOID_PTR64       h_cq;
+       ib_cq_handle_t  h_cq;
        CL_ASSERT( p_comp_cb_info->cq_context );
-       h_cq = (ib_cq_handle_t VOID_PTR64)(p_comp_cb_info->cq_context);
+       h_cq = (ib_cq_handle_t)(ULONG_PTR)p_comp_cb_info->cq_context;

        if( ref_al_obj( &h_cq->obj ) > 1 )
        {
@@ -860,7 +860,7 @@ __process_misc_cb(
                uintn_t                                 bytes_ret;
                cl_status_t                             cl_status;
                ib_api_status_t                 status;
-               ib_mad_svc_handle_t VOID_PTR64          h_mad_svc;
+               ib_mad_svc_handle_t             h_mad_svc;
                ib_mad_element_t                *p_mad = NULL;
                ib_mad_element_t                *p_send_mad;
                ib_mad_t                                *p_mad_buf = NULL;
@@ -888,7 +888,7 @@ __process_misc_cb(
                 * in case of failure.
                 */
                if( status == IB_SUCCESS )
-                       al_handoff_mad( (ib_al_handle_t VOID_PTR64)h_mad_svc->obj.h_al, p_mad );
+                       al_handoff_mad( (ib_al_handle_t)h_mad_svc->obj.h_al, p_mad );
                else if( p_send_mad )
                        p_send_mad->status = IB_WCS_TIMEOUT_RETRY_ERR;

@@ -929,7 +929,7 @@ __process_misc_cb(
                                p_mad->p_grh = p_grh;
                                /* Restore the client's send context1 */
                                if( p_send_mad )
-                                       p_mad->send_context1 = (void* VOID_PTR64)p_send_mad->context1;
+                                       p_mad->send_context1 = (void*)p_send_mad->context1;

                                h_mad_svc->pfn_user_recv_cb( h_mad_svc,
                                        (void*)h_mad_svc->obj.context, p_mad );
@@ -1090,7 +1090,7 @@ __process_misc_cb(
  */
 ib_api_status_t
 ib_open_al(
-               OUT                     ib_al_handle_t FUNC_PTR64* const                ph_al )
+               OUT                     ib_al_handle_t* const           ph_al )
 {
        ib_api_status_t         status;

@@ -1111,7 +1111,7 @@ ib_open_al(

 ib_api_status_t
 ib_close_al(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al )
+       IN              const   ib_al_handle_t                          h_al )
 {
        ib_api_status_t         status;

@@ -1126,9 +1126,9 @@ ib_close_al(

 ib_api_status_t
 do_open_al(
-               OUT                     ib_al_handle_t FUNC_PTR64* const                ph_al )
+               OUT                     ib_al_handle_t* const           ph_al )
 {
-       ib_al_handle_t VOID_PTR64                       h_al;
+       ib_al_handle_t                  h_al;
        ib_api_status_t                 status;

        AL_ENTER(AL_DBG_MGR);
@@ -1161,7 +1161,7 @@ do_open_al(
        }

        /* Allocate an access layer instance. */
-       h_al = (ib_al_handle_t VOID_PTR64)cl_zalloc( sizeof( ib_al_t ) );
+       h_al = (ib_al_handle_t)cl_zalloc( sizeof( ib_al_t ) );
        if( !h_al )
        {
                AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("cl_malloc failed\n") );
@@ -1211,7 +1211,7 @@ do_open_al(
        }

        /* Return UAL's handle to caller */
-       *ph_al = (ib_al_handle_t VOID_PTR64)h_al;
+       *ph_al = (ib_al_handle_t)h_al;

        /* Release the reference taken in init_al_obj. */
        deref_al_obj( &h_al->obj );
@@ -1253,27 +1253,27 @@ __cb_thread_routine(
                case UAL_BIND_CM:
                        //DebugBreak();
                        /* CM callback. */
-                       cm_cb( err, ret_bytes, p_ov ); //check_done, no ptr64
+                       cm_cb( err, ret_bytes, p_ov );
                        break;

                case UAL_BIND_CQ:
                        /* CQ completion callback. */
-                       cq_cb( err, ret_bytes, p_ov ); //check_done, no ptr64
+                       cq_cb( err, ret_bytes, p_ov );
                        break;

                case UAL_BIND_MISC:
                        /* Misc callback. */
-                       misc_cb( err, ret_bytes, p_ov );//check_done, no ptr64
+                       misc_cb( err, ret_bytes, p_ov );
                        break;

                case UAL_BIND_PNP:
                        /* PnP callback. */
-                       pnp_cb( err, ret_bytes, p_ov );//check_done, no ptr64
+                       pnp_cb( err, ret_bytes, p_ov );
                        break;

                case UAL_BIND_SA:
                        /* SA callback. */
-                       sa_req_cb( err, ret_bytes, p_ov ); //check_done, safe memclr
+                       sa_req_cb( err, ret_bytes, p_ov );
                        break;

                case UAL_BIND_DESTROY:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mgr.h trunk\core\al\user\ual_mgr.h
--- old\core\al\user\ual_mgr.h  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mgr.h        Mon Jun 30 14:32:52 2008
@@ -41,7 +41,7 @@

 typedef struct _ual_mgr
 {
-TO_LONG_PTR(   ib_al_handle_t ,                                h_al) ;         /* UAL's internal implicit open_al */
+       ib_al_handle_t                          h_al;   /* UAL's internal implicit open_al */

        cl_event_t                                      sync_event;

@@ -81,16 +81,16 @@ TO_LONG_PTR(        ib_al_handle_t ,                                h_al) ;


 /* Global mad pool key for internal MADs. */
-ib_pool_key_t                          g_pool_key ;
+ib_pool_key_t                          g_pool_key;


 ib_api_status_t
 do_open_al(
-               OUT                     ib_al_handle_t FUNC_PTR64* const                ph_al );
+               OUT                     ib_al_handle_t* const           ph_al );

 ib_api_status_t
 do_close_al(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al );
+       IN              const   ib_al_handle_t                          h_al );


 /*
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mr.c trunk\core\al\user\ual_mr.c
--- old\core\al\user\ual_mr.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mr.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -51,11 +52,11 @@

 ib_api_status_t
 ual_reg_mem(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mr_handle_t FUNC_PTR64                               h_mr )
+       IN      OUT                     ib_mr_handle_t                          h_mr )
 {
        ual_reg_mem_ioctl_t             mr_ioctl;
        uintn_t                                 bytes_ret;
@@ -99,7 +100,7 @@ ual_reg_mem(

 ib_api_status_t
 ual_dereg_mr(
-       IN                      ib_mr_handle_t FUNC_PTR64                               h_mr )
+       IN                      ib_mr_handle_t                          h_mr )
 {
        ual_dereg_mr_ioctl_t    mr_ioctl;
        uintn_t                                 bytes_ret;
@@ -131,12 +132,12 @@ ual_dereg_mr(

 ib_api_status_t
 ual_modify_mr(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN              const   ib_mr_handle_t                          h_mr,
        IN              const   ib_mr_mod_t                                     mr_mod_mask,
        IN              const   ib_mr_create_t* const           p_mr_create OPTIONAL,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd OPTIONAL )
+       IN              const   ib_pd_handle_t                          h_pd OPTIONAL )
 {
        ual_rereg_mem_ioctl_t   mr_ioctl;
        uintn_t                                 bytes_ret;
@@ -182,7 +183,7 @@ ual_modify_mr(

 ib_api_status_t
 ual_query_mr(
-       IN                      ib_mr_handle_t FUNC_PTR64                               h_mr,
+       IN                      ib_mr_handle_t                          h_mr,
                OUT             ib_mr_attr_t*                           p_mr_attr )
 {
        ual_query_mr_ioctl_t    mr_ioctl;
@@ -210,6 +211,8 @@ ual_query_mr(
        else if( mr_ioctl.out.status == IB_SUCCESS )
        {
                *p_mr_attr = mr_ioctl.out.attr;
+               p_mr_attr->h_pd_padding = 0;
+               p_mr_attr->h_pd = CONTAINING_RECORD( h_mr->obj.p_parent_obj, ib_pd_t, obj );
        }

        AL_EXIT( AL_DBG_MR );
@@ -219,13 +222,13 @@ ual_query_mr(

 ib_api_status_t
 ual_reg_shared(
-       IN              const   ib_mr_handle_t FUNC_PTR64                               h_mr,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_mr_handle_t                          h_mr,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_access_t                                     access_ctrl,
        IN      OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mr_handle_t FUNC_PTR64                               h_new_mr )
+       IN      OUT                     ib_mr_handle_t                          h_new_mr )
 {
        ual_reg_shared_ioctl_t  mr_ioctl;
        uintn_t                                 bytes_ret;
@@ -267,19 +270,19 @@ ual_reg_shared(

 ib_api_status_t
 ib_reg_shmid(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_shmid_t                                      shmid,
        IN              const   ib_mr_create_t* const           p_mr_create,
                OUT                     uint64_t* const                         p_vaddr,
                OUT                     net32_t* const                          p_lkey,
                OUT                     net32_t* const                          p_rkey,
-               OUT                     ib_mr_handle_t FUNC_PTR64* const                ph_mr )
+               OUT                     ib_mr_handle_t* const           ph_mr )
 {
        ual_reg_shmid_ioctl_t                   mr_ioctl;
        uintn_t                                                 bytes_ret;
        cl_status_t                                             cl_status;
        ib_api_status_t                                 status;
-       ib_mr_handle_t VOID_PTR64                                       h_mr;
+       ib_mr_handle_t                                  h_mr;

        AL_ENTER( AL_DBG_MR );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_mw.c trunk\core\al\user\ual_mw.c
--- old\core\al\user\ual_mw.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_mw.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -50,9 +51,9 @@

 ib_api_status_t
 ual_create_mw(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
                OUT                     net32_t* const                          p_rkey,
-       IN      OUT                     ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN      OUT                     ib_mw_handle_t                          h_mw )
 {
        ual_create_mw_ioctl_t   mw_ioctl;
        uintn_t                                 bytes_ret;
@@ -117,7 +118,7 @@ ual_create_mw(

 ib_api_status_t
 ual_destroy_mw(
-       IN                      ib_mw_handle_t FUNC_PTR64                               h_mw )
+       IN                      ib_mw_handle_t                          h_mw )
 {
        ual_destroy_mw_ioctl_t  mw_ioctl;
        uintn_t                                 bytes_ret;
@@ -177,8 +178,8 @@ ual_destroy_mw(

 ib_api_status_t
 ual_query_mw(
-       IN                      ib_mw_handle_t FUNC_PTR64                               h_mw,
-       OUT                     ib_pd_handle_t FUNC_PTR64*                              ph_pd,
+       IN                      ib_mw_handle_t                          h_mw,
+       OUT                     ib_pd_handle_t*                         ph_pd,
        OUT                     net32_t* const                          p_rkey )
 {
        ual_query_mw_ioctl_t    mw_ioctl;
@@ -224,14 +225,15 @@ ual_query_mw(
        if( IB_SUCCESS == status )
        {
                *p_rkey = mw_ioctl.out.rkey;
-               *ph_pd = ((ib_pd_handle_t VOID_PTR64)mw_ioctl.out.pd_context)->h_ci_pd;
+               *ph_pd = (ib_pd_handle_t)h_mw->obj.p_parent_obj;
        }

        /* Post uvp call */
        if( h_mw->h_ci_mw && uvp_intf.post_query_mw )
        {
+               ib_pd_handle_t junk;
                uvp_intf.post_query_mw( h_mw->h_ci_mw, status,
-                       mw_ioctl.out.rkey, ph_pd, &mw_ioctl.out.umv_buf );
+                       mw_ioctl.out.rkey, &junk, &mw_ioctl.out.umv_buf );
        }

        AL_EXIT( AL_DBG_MW );
@@ -241,8 +243,8 @@ ual_query_mw(

 ib_api_status_t
 ual_bind_mw(
-       IN              const   ib_mw_handle_t FUNC_PTR64                               h_mw,
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_mw_handle_t                          h_mw,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_bind_wr_t*                           p_mw_bind,
                OUT                     net32_t* const                          p_rkey )
 {
@@ -250,7 +252,7 @@ ual_bind_mw(
        cl_status_t                             cl_status;
        ib_api_status_t                 status;
        uintn_t                                 bytes_ret;
-       ib_mr_handle_t VOID_PTR64                       h_user_mr;
+       ib_mr_handle_t                  h_user_mr;
        /*
         * Check whether a vendor library is available and the
         * bind_mw call is implemented.  If so, the call terminates
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_pd.c trunk\core\al\user\ual_pd.c
--- old\core\al\user\ual_pd.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_pd.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -47,16 +48,16 @@

 ib_api_status_t
 ual_allocate_pd(
-       IN                              ib_ca_handle_t FUNC_PTR64                               h_ca,
+       IN                              ib_ca_handle_t                          h_ca,
        IN              const   ib_pd_type_t                            pd_type,
-       IN      OUT                     ib_pd_handle_t FUNC_PTR64                               h_pd )
+       IN      OUT                     ib_pd_handle_t                          h_pd )
 {
        /* The first two arguments is probably not needed */
        ual_alloc_pd_ioctl_t    pd_ioctl;
        uintn_t                                 bytes_ret;
        cl_status_t                             cl_status;
        ib_api_status_t                 status;
-       ib_ca_handle_t VOID_PTR64                       h_uvp_ca;
+       ib_ca_handle_t                  h_uvp_ca;
        uvp_interface_t                 uvp_intf = h_ca->obj.p_ci_ca->verbs.user_verbs;

        AL_ENTER( AL_DBG_PD );
@@ -116,7 +117,7 @@ ual_allocate_pd(

 ib_api_status_t
 ual_deallocate_pd(
-       IN                      ib_pd_handle_t FUNC_PTR64                               h_pd )
+       IN                      ib_pd_handle_t                          h_pd )
 {
        ual_dealloc_pd_ioctl_t  pd_ioctl;
        uintn_t                                 bytes_ret;
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_pnp.c trunk\core\al\user\ual_pnp.c
--- old\core\al\user\ual_pnp.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_pnp.c        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -262,9 +263,9 @@ __pnp_reg_free(

 ib_api_status_t
 ib_reg_pnp(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
+       IN              const   ib_al_handle_t                          h_al,
        IN              const   ib_pnp_req_t* const                     p_pnp_req,
-               OUT                     ib_pnp_handle_t FUNC_PTR64* const               ph_pnp )
+               OUT                     ib_pnp_handle_t* const          ph_pnp )
 {
        ib_api_status_t                 status;
        al_pnp_t*                               p_reg;
@@ -372,7 +373,7 @@ ib_reg_pnp(

 ib_api_status_t
 ib_dereg_pnp(
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_pnp,
+       IN              const   ib_pnp_handle_t                         h_pnp,
        IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )
 {
        AL_ENTER( AL_DBG_PNP );
@@ -393,8 +394,8 @@ ib_dereg_pnp(

 ib_api_status_t
 ib_reject_ioc(
-       IN              const   ib_al_handle_t FUNC_PTR64                               h_al,
-       IN              const   ib_pnp_handle_t FUNC_PTR64                              h_event )
+       IN              const   ib_al_handle_t                          h_al,
+       IN              const   ib_pnp_handle_t                         h_event )
 {
        AL_ENTER( AL_DBG_PNP );

@@ -427,8 +428,8 @@ __fix_port_attr(
                (uintn_t)(ib_ca_attr_t*)p_port_rec->p_ca_attr;
        ib_fixup_ca_attr( (ib_ca_attr_t*)(p_port_rec + 1), p_port_rec->p_ca_attr );
        p_port_rec->p_ca_attr = (ib_ca_attr_t*)(size_t)(p_port_rec + 1);
-       p_port_rec->p_port_attr = (ib_port_attr_t* VOID_PTR64)
-               (((uint8_t* VOID_PTR64)p_port_rec->p_port_attr) + offset);
+       p_port_rec->p_port_attr = (ib_port_attr_t*)
+               (((uint8_t*)p_port_rec->p_port_attr) + offset);
 }


diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_qp.c trunk\core\al\user\ual_qp.c
--- old\core\al\user\ual_qp.c   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_qp.c Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -51,7 +52,7 @@
 #endif
 ib_api_status_t
 ual_post_send(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_send_wr_t*   const           p_send_wr,
                OUT                     ib_send_wr_t                            **pp_send_failure OPTIONAL )
 {
@@ -158,7 +159,7 @@ ual_post_send(

 ib_api_status_t
 ual_post_recv(
-       IN              const   ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_qp_handle_t                          h_qp,
        IN                              ib_recv_wr_t*   const           p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure OPTIONAL )
 {
@@ -267,8 +268,8 @@ ual_post_recv(

 ib_api_status_t
 ual_create_qp(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN      OUT                     ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN      OUT                     ib_qp_handle_t                          h_qp,
        IN              const   ib_qp_create_t* const           p_qp_create,
        IN                              ib_qp_attr_t*                           p_qp_attr )
 {
@@ -391,7 +392,7 @@ ual_create_qp(

 ib_api_status_t
 ual_destroy_qp(
-       IN                      ib_qp_handle_t FUNC_PTR64                               h_qp )
+       IN                      ib_qp_handle_t                          h_qp )
 {
        ual_destroy_qp_ioctl_t  qp_ioctl;
        uintn_t                                 bytes_ret;
@@ -441,7 +442,7 @@ ual_destroy_qp(

 ib_api_status_t
 ual_modify_qp(
-       IN                                      ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                                      ib_qp_handle_t                          h_qp,
        IN              const           ib_qp_mod_t*            const   p_qp_mod,
        IN                                      ib_qp_attr_t*                           p_qp_attr)
 {
@@ -508,7 +509,7 @@ ual_modify_qp(

 ib_api_status_t
 ual_query_qp(
-       IN                      ib_qp_handle_t FUNC_PTR64                               h_qp,
+       IN                      ib_qp_handle_t                          h_qp,
                OUT             ib_qp_attr_t*                           p_qp_attr )
 {
        ual_query_qp_ioctl_t    qp_ioctl;
@@ -517,7 +518,7 @@ ual_query_qp(
        ib_api_status_t                 status;
        uvp_interface_t                 uvp_intf = h_qp->obj.p_ci_ca->verbs.user_verbs;
        ib_qp_attr_t*                   p_attr;
-       ib_pd_handle_t VOID_PTR64                       h_ual_pd;
+       ib_pd_handle_t                  h_ual_pd;

        AL_ENTER( AL_DBG_QP );

@@ -590,7 +591,7 @@ ual_query_qp(
 ib_api_status_t
 ual_init_qp_alias(
        IN                              al_qp_alias_t* const            p_qp_alias,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create )
 {
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_qp.h trunk\core\al\user\ual_qp.h
--- old\core\al\user\ual_qp.h   Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_qp.h Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -39,7 +40,7 @@
 ib_api_status_t
 ual_init_qp_alias(
        IN                              al_qp_alias_t* const            p_qp_alias,
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
+       IN              const   ib_pd_handle_t                          h_pd,
        IN              const   ib_net64_t                                      port_guid,
        IN              const   ib_qp_create_t* const           p_qp_create );

diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_res_mgr.h trunk\core\al\user\ual_res_mgr.h
--- old\core\al\user\ual_res_mgr.h      Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_res_mgr.h    Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -51,7 +52,7 @@
  * when calling the external API.  This handle is initialized by the access
  * layer manager.
  */
-TO_LONG_PTR(extern ib_al_handle_t ,                    gh_al) ;
+extern ib_al_handle_t                  gh_al;


 /*
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_sa_req.c trunk\core\al\user\ual_sa_req.c
--- old\core\al\user\ual_sa_req.c       Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_sa_req.c     Mon Jun 30 14:32:52 2008
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_srq.c trunk\core\al\user\ual_srq.c
--- old\core\al\user\ual_srq.c  Mon Jun 30 12:28:07 2008
+++ trunk\core\al\user\ual_srq.c        Mon Jun 30 14:32:52 2008
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -52,7 +53,7 @@

 ib_api_status_t
 ual_post_srq_recv(
-       IN              const   ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_srq_handle_t                         h_srq,
        IN                              ib_recv_wr_t*   const           p_recv_wr,
                OUT                     ib_recv_wr_t                            **pp_recv_failure OPTIONAL )
 {
@@ -161,8 +162,8 @@ ual_post_srq_recv(

 ib_api_status_t
 ual_create_srq(
-       IN              const   ib_pd_handle_t FUNC_PTR64                               h_pd,
-       IN      OUT                     ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN              const   ib_pd_handle_t                          h_pd,
+       IN      OUT                     ib_srq_handle_t                         h_srq,
        IN              const   ib_srq_attr_t* const                    p_srq_attr)
 {
        /* The first argument is probably not needed */
@@ -253,7 +254,7 @@ ual_create_srq(

 ib_api_status_t
 ual_modify_srq(
-       IN                                      ib_srq_handle_t FUNC_PTR64                      h_srq,
+       IN                                      ib_srq_handle_t                 h_srq,
        IN              const           ib_srq_attr_t*          const   p_srq_attr,
        IN              const           ib_srq_attr_mask_t                      srq_attr_mask)
 {
@@ -320,7 +321,7 @@ ual_modify_srq(

 ib_api_status_t
 ual_query_srq(
-       IN                      ib_srq_handle_t FUNC_PTR64                              h_srq,
+       IN                      ib_srq_handle_t                         h_srq,
                OUT             ib_srq_attr_t*                          p_srq_attr )
 {
        ual_query_srq_ioctl_t           srq_ioctl;
@@ -389,7 +390,7 @@ ual_query_srq(

 ib_api_status_t
 ual_destroy_srq(
-       IN                      ib_srq_handle_t FUNC_PTR64                              h_srq )
+       IN                      ib_srq_handle_t                         h_srq )
 {
        ual_destroy_srq_ioctl_t         srq_ioctl;
        uintn_t                                 bytes_ret;
@@ -435,5 +436,4 @@ ual_destroy_srq(
        AL_EXIT( AL_DBG_SRQ );
        return status;
 }
-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ibal_cleanup.patch
Type: application/octet-stream
Size: 349871 bytes
Desc: ibal_cleanup.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080630/32e5eb71/attachment.obj>


More information about the ofw mailing list