[Core] upgrade ExAllocatePool ==> ExAllocatePoolWithTag to suppress deprecated functi...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 18 Dec 2007 17:39:47 +0000 (17:39 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 18 Dec 2007 17:39:47 +0000 (17:39 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@920 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/bus_iou_mgr.c
core/bus/kernel/bus_port_mgr.c
core/complib/kernel/cl_memory_osd.c
core/complib/kernel/cl_pnp_po.c
core/iou/kernel/iou_ioc_mgr.c
hw/mt23108/kernel/hca_driver.c
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mem.c
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdDbg.c
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdDbg.h
hw/mthca/kernel/hca_pnp.c

index 81ce2cd..6a6645d 100644 (file)
@@ -971,7 +971,7 @@ iou_query_device_id(
        }\r
 \r
        /* Device ID is "IBA\SID_<sid> where <sid> is the IPoIB Service ID. */\r
-       p_string = ExAllocatePool( PagedPool, IOU_DEV_ID_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOU_DEV_ID_SIZE, 'didq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1016,7 +1016,7 @@ iou_query_hardware_ids(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, IOU_HW_ID_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOU_HW_ID_SIZE, 'dihq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1070,7 +1070,7 @@ iou_query_compatible_ids(
 \r
        UNUSED_PARAM( p_dev_obj );\r
 \r
-       p_string = ExAllocatePool( PagedPool, sizeof(IOU_COMPAT_ID) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IOU_COMPAT_ID), 'dicq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1106,7 +1106,7 @@ iou_query_unique_id(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePool( PagedPool, sizeof(WCHAR) * 33 );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'diuq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1152,8 +1152,9 @@ iou_query_description(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string =\r
-               ExAllocatePool( PagedPool, sizeof(WCHAR) * sizeof(p_ext->desc) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool,\r
+                                                                         sizeof(WCHAR) * sizeof(p_ext->desc),\r
+                                                                         'sedq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1197,7 +1198,7 @@ iou_query_location(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, IOU_LOCATION_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOU_LOCATION_SIZE, 'colq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1236,7 +1237,7 @@ iou_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_bus_info = ExAllocatePool( PagedPool, sizeof(PNP_BUS_INFORMATION) );\r
+       p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'subq' );\r
        if( !p_bus_info )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
index 704e2eb..eaefe8d 100644 (file)
@@ -966,7 +966,7 @@ port_query_device_id(
        }\r
 \r
        /* Device ID is "IBA\SID_<sid> where <sid> is the IPoIB Service ID. */\r
-       p_string = ExAllocatePool( PagedPool, sizeof(IPOIB_DEVICE_ID) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IPOIB_DEVICE_ID), 'vedq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1000,7 +1000,7 @@ port_query_hardware_ids(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, sizeof(IPOIB_HARDWARE_ID) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IPOIB_HARDWARE_ID), 'ihqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1027,7 +1027,7 @@ port_query_compatible_ids(
 \r
        UNUSED_PARAM( p_dev_obj );\r
 \r
-       p_string = ExAllocatePool( PagedPool, sizeof(IPOIB_COMPAT_ID) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IPOIB_COMPAT_ID), 'icqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1063,7 +1063,7 @@ port_query_unique_id(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePool( PagedPool, sizeof(WCHAR) * 17 );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 17, 'iuqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1108,7 +1108,7 @@ port_query_description(
 \r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePool( PagedPool, sizeof(IPOIB_DESCRIPTION) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IPOIB_DESCRIPTION), 'edqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1171,7 +1171,7 @@ port_query_location(
                return STATUS_INSUFFICIENT_RESOURCES;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, size );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, size, 'olqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1224,7 +1224,7 @@ port_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_bus_info = ExAllocatePool( PagedPool, sizeof(PNP_BUS_INFORMATION) );\r
+       p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqp' );\r
        if( !p_bus_info )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
index a206cbf..6205a5a 100644 (file)
@@ -41,12 +41,12 @@ __cl_malloc_priv(
        if( pageable )\r
        {\r
                CL_ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL );\r
-               return( ExAllocatePool( PagedPool, size ) );\r
+               return( ExAllocatePoolWithTag( PagedPool, size, 'virp' ) );\r
        }\r
        else\r
        {\r
                CL_ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL );\r
-               return( ExAllocatePool( NonPagedPool, size ) );\r
+               return( ExAllocatePoolWithTag( NonPagedPool, size, 'virp' ) );\r
        }\r
 }\r
 \r
@@ -56,5 +56,5 @@ __cl_free_priv(
        IN      void* const     p_memory )\r
 {\r
        CL_ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL );\r
-       ExFreePool( p_memory );\r
+       ExFreePoolWithTag( p_memory, 'virp' );\r
 }\r
index 7409802..972937b 100644 (file)
@@ -1207,7 +1207,7 @@ cl_alloc_relations(
                alloc_size += (sizeof(PDEVICE_OBJECT) * p_old_rel->Count);\r
 \r
        /* Allocate the new relations structure. */\r
-       p_rel = ExAllocatePool( PagedPool, alloc_size );\r
+       p_rel = ExAllocatePoolWithTag( PagedPool, alloc_size, 'ralc' );\r
        p_irp->IoStatus.Information = (ULONG_PTR)p_rel;\r
        if( !p_rel )\r
        {\r
index eb31364..ade863c 100644 (file)
@@ -823,7 +823,7 @@ ioc_query_device_id(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, IOC_DEV_ID_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOC_DEV_ID_SIZE, 'didq' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -875,7 +875,7 @@ ioc_query_hardware_ids(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, IOC_HW_ID_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOC_HW_ID_SIZE, 'ihqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -967,7 +967,7 @@ ioc_query_compatible_ids(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, IOC_COMPAT_ID_SIZE );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, IOC_COMPAT_ID_SIZE, 'icqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1032,7 +1032,7 @@ ioc_query_unique_id(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePool( PagedPool, sizeof(WCHAR) * 33 );\r
+       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'iuqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1078,8 +1078,9 @@ ioc_query_description(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool(\r
-               PagedPool, sizeof(WCHAR) * sizeof(p_ext->info.profile.id_string) );\r
+       p_string = ExAllocatePoolWithTag( PagedPool,\r
+                                                                         sizeof(WCHAR) * sizeof(p_ext->info.profile.id_string),\r
+                                                                         'edqi');\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1142,9 +1143,10 @@ ioc_query_location(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePool( PagedPool, \r
-               max( IOC_LOCATION_SIZE,\r
-               sizeof( WCHAR ) * ( sizeof( p_ext->info.profile.id_string ) + 1 )));\r
+       p_string = ExAllocatePoolWithTag( PagedPool, \r
+                                                                         max( IOC_LOCATION_SIZE, sizeof( WCHAR ) *\r
+                                                                              ( sizeof( p_ext->info.profile.id_string ) + 1 )),\r
+                                                                         'olqi');\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1201,7 +1203,7 @@ ioc_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_iou_info = ExAllocatePool( PagedPool, sizeof(PNP_BUS_INFORMATION) );\r
+       p_iou_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqi' );\r
        if( !p_iou_info )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
index bc2de2f..735fe24 100644 (file)
@@ -664,7 +664,7 @@ __alloc_hca_ifc(
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
-       p_ifc = ExAllocatePool( PagedPool, sizeof(ci_interface_t) );\r
+       p_ifc = ExAllocatePoolWithTag( PagedPool, sizeof(ci_interface_t), 'fiha' );\r
        if( !p_ifc )\r
        {\r
                HCA_TRACE_EXIT( HCA_DBG_ERROR,\r
index 4e3aacf..13eecf5 100644 (file)
@@ -912,7 +912,7 @@ MT_virt_addr_t MOSAL_mem_alloc( MT_size_t size, u_int32_t flags )
        if (flags)\r
                return (MT_virt_addr_t)ExAllocatePoolWithTag(NonPagedPool,size,flags);\r
        else\r
-               return (MT_virt_addr_t)ExAllocatePool(NonPagedPool,size);\r
+               return (MT_virt_addr_t)ExAllocatePoolWithTag(NonPagedPool,size,'amOM');\r
 }\r
 \r
 /******************************************************************************\r
index ea227f0..9b06803 100644 (file)
@@ -49,7 +49,7 @@ MdExAllocatePool(
 {\r
        g_pDbgData->m_nExAllocCount++;\r
     MdKdPrint( DBGLVL_HIGH,("MdExAllocatePool() nExAllocCount = %d\n", g_pDbgData->m_nExAllocCount ));\r
-       return ExAllocatePool(  PoolType, NumberOfBytes );\r
+       return ExAllocatePoolWithTag(  PoolType, NumberOfBytes, 'xEdM' );\r
 \r
 }\r
 \r
@@ -63,7 +63,7 @@ MdExFreePool(
 {\r
        g_pDbgData->m_nExAllocCount--;\r
     MdKdPrint( DBGLVL_HIGH,("MdExFreePool() nExAllocCount = %d\n", g_pDbgData->m_nExAllocCount ));\r
-       ExFreePool(  p );\r
+       ExFreePoolWithTag(  p, 'xEdM' );\r
 }\r
 \r
 \r
index 6f97274..c27e288 100644 (file)
@@ -225,8 +225,8 @@ VOID
 #define MdStringForPnpMnFunc( mnfunc )\r
 #define MdStringForIrpMjFunc(  mjfunc ) \r
 \r
-#define MdExAllocatePool( typ, siz )  ExAllocatePool( typ, siz )\r
-#define MdExFreePool( p )   ExFreePool( p )\r
+#define MdExAllocatePool( typ, siz )  ExAllocatePoolWithTag( typ, siz, 'xEdM' )\r
+#define MdExFreePool( p )   ExFreePoolWithTag( p, 'xEdM' )\r
 \r
 \r
 #endif /* DBG */\r
index fa1c5b7..9e4a4c0 100644 (file)
@@ -430,8 +430,9 @@ __alloc_hca_ifc(
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
-       pIfc =\r
-               (ci_interface_t*)ExAllocatePool( PagedPool, sizeof(ci_interface_t) );\r
+       pIfc = (ci_interface_t*)ExAllocatePoolWithTag( PagedPool,\r
+                                                                                                  sizeof(ci_interface_t),\r
+                                                                                                  'pnpa' );\r
        if( !pIfc )\r
        {\r
                HCA_PRINT( TRACE_LEVEL_ERROR,HCA_DBG_PNP, \r
@@ -564,8 +565,9 @@ __pnp_notify_ifc(
        if (!p_ext->al_sym_name.Buffer) {\r
                p_ext->al_sym_name.Length = pNotify->SymbolicLinkName->Length;\r
                p_ext->al_sym_name.MaximumLength = pNotify->SymbolicLinkName->MaximumLength;\r
-               p_ext->al_sym_name.Buffer = ExAllocatePool( NonPagedPool, \r
-                       p_ext->al_sym_name.MaximumLength * sizeof(wchar_t) );\r
+               p_ext->al_sym_name.Buffer = ExAllocatePoolWithTag( NonPagedPool, \r
+                                                                                                                  p_ext->al_sym_name.MaximumLength * sizeof(wchar_t),\r
+                                                                                                                  'cfin' );\r
                if (!p_ext->al_sym_name.Buffer)\r
                {\r
                        HCA_PRINT( TRACE_LEVEL_ERROR  ,HCA_DBG_PNP  ,("allocation of sym IBAL name failed.\n"));\r
@@ -860,7 +862,9 @@ hca_start(
                        err = mthca_get_livefish_info( p_ext->hca.mdev, &p_ext->hca.guid, &p_ext->hca.hw_ver );\r
                else\r
                        err = mthca_get_dev_info( p_ext->hca.mdev, &p_ext->hca.guid, &p_ext->hca.hw_ver );\r
-               if (err) {\r\r
+\r
+               if (err) {\r
+\r
                        //TODO: no cleanup on error\r
                        HCA_PRINT( TRACE_LEVEL_ERROR,HCA_DBG_PNP, \r
                                ("can't get guid - mthca_query_port()"));\r