Hello,
  Modifications look OK.

Stan.

>-----Original Message-----
>From: Alex Naslednikov [mailto:[email protected]]
>Sent: Thursday, June 23, 2011 7:44 AM
>To: Smith, Stan; [email protected]
>Subject: [ofw] [Patches 27/26][Core][bus] fix dditional IRQL warnings with 
>driver directive.
>
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_port_mgr.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_port_mgr.c  
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_port_mgr.c  
>(revision 8370)
>@@ -525,8 +525,8 @@
> /*
>  * Called to get bus relations for an HCA.
>  */
>-NTSTATUS
>-port_mgr_get_bus_relations(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+NTSTATUS port_mgr_get_bus_relations(
>       IN              const   net64_t                                         
> ca_guid,
>       IN                              IRP* const                              
>         p_irp )
> {
>@@ -583,8 +583,8 @@
>       return STATUS_SUCCESS;
> }
>
>-static ib_api_status_t
>-__port_was_hibernated(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+static ib_api_status_t __port_was_hibernated(
>       IN                              ib_pnp_port_rec_t*                      
> p_pnp_rec,
>       IN                              bus_filter_t*                           
> p_bfi )
> {
>@@ -958,6 +958,7 @@
> * output:     none
> * return:     cl_status
> *************************************************************************************/
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> cl_status_t _port_mgr_pkey_rem(       IN      pkey_array_t    *pkeys,
>                                                               IN      
> port_mgr_t              *p_port_mgr )
> {
>@@ -1039,6 +1040,7 @@
> * output:     none
> * return:     cl_status
> *************************************************************************************/
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> cl_status_t _port_mgr_pkey_add( IN    pkey_array_t    *req_pkeys,
>                                                               IN      
> bus_filter_t    *p_bfi,
>                                                               IN      
> port_mgr_t              *p_port_mgr )
>@@ -1175,9 +1177,8 @@
>       return ( success_cnt ? CL_SUCCESS : CL_ERROR );
> }
>
>-
>-void
>-port_mgr_port_remove(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+void port_mgr_port_remove(
>       IN                              ib_pnp_port_rec_t*              
> p_pnp_rec )
> {
>       bus_pdo_ext_t   *p_ext;
>@@ -1380,9 +1381,8 @@
>       return STATUS_SUCCESS;
> }
>
>-
>-static void
>-port_release_resources(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+static void port_release_resources(
>       IN                                      DEVICE_OBJECT* const    
> p_dev_obj )
> {
>       bus_port_ext_t  *p_ext;
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_iou_mgr.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_iou_mgr.c   
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/bus/kernel/bus_iou_mgr.c   
>(revision 8370)
>@@ -525,8 +525,8 @@
> /*
>  * Called to get child relations for the bus root.
>  */
>-NTSTATUS
>-iou_mgr_get_bus_relations(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+NTSTATUS iou_mgr_get_bus_relations(
>       IN              const   net64_t                                         
> ca_guid,
>       IN                              IRP* const                              
>         p_irp )
> {
>@@ -579,8 +579,8 @@
> }
>
>
>-static ib_api_status_t
>-__iou_was_hibernated(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+static ib_api_status_t __iou_was_hibernated(
>       IN                              ib_pnp_iou_rec_t*                       
> p_pnp_rec,
>       IN                              bus_filter_t*                           
> p_bfi )
> {
>@@ -800,9 +800,8 @@
>       return IB_SUCCESS;
> }
>
>-
>-void
>-iou_mgr_iou_remove(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+void iou_mgr_iou_remove(
>       IN                              ib_pnp_iou_rec_t*                       
> p_pnp_rec )
> {
>       bus_pdo_ext_t   *p_ext;
>@@ -959,9 +958,8 @@
>       return STATUS_SUCCESS;
> }
>
>-
>-static void
>-iou_release_resources(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+static void iou_release_resources(
>       IN                                      DEVICE_OBJECT* const    
> p_dev_obj )
> {
>       bus_iou_ext_t   *p_ext;
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.h
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.h       
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.h       
>(revision 8370)
>@@ -213,6 +213,10 @@
> }
> #pragma warning(default:4706)
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_INSERT_IRP __insert_irp;
>+#endif
>+
> static VOID __insert_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>@@ -222,6 +226,10 @@
>       InsertTailList( &p_al_csq->queue, &Irp->Tail.Overlay.ListEntry );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_REMOVE_IRP __insert_irp;
>+#endif
>+
> static VOID __remove_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>@@ -231,6 +239,10 @@
>       RemoveEntryList( &Irp->Tail.Overlay.ListEntry );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_PEEK_NEXT_IRP __peek_next_irp;
>+#endif
>+
> static PIRP __peek_next_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp,
>@@ -281,6 +293,14 @@
>       return nextIrp;
> }
>
>+#ifdef NTDDI_WIN8
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_raises_(DISPATCH_LEVEL)
>+//TOD __drv_at(p_ndi_csq->lock, __drv_acquiresExclusiveResource(KSPIN_LOCK))
>+__drv_at(pIrql, __drv_savesIRQL)
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is saved by 
>cl_spinlock_acquire, impossible to annotate by driver directives")
>+#pragma prefast(suppress: 28158, "The irql level is stored by 
>cl_spinlock_acquire, impossible to annotate by driver directives")
> static VOID __acquire_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       OUT     PKIRQL                                                          
>         Irql
>@@ -290,6 +310,15 @@
>       KeAcquireSpinLock( &p_al_csq->lock, Irql );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_ACQUIRE_LOCK __acquire_lock;
>+
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_requires_min_(DISPATCH_LEVEL)
>+//TODO __drv_at(p_ndi_csq->lock, __drv_restoresExclusiveResource(KSPIN_LOCK))
>+__drv_at(Irql, __drv_restoresIRQL)
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is restored by 
>KeReleaseSpinLock, impossible to annotate by driver directives")
> static VOID __release_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      KIRQL                                                           
>         Irql
>@@ -299,6 +328,10 @@
>       KeReleaseSpinLock( &p_al_csq->lock, Irql );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_COMPLETE_CANCELED_IRP __complete_cancelled_irp;
>+#endif
>+
> static VOID __complete_cancelled_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_cm_cep.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_cm_cep.c      
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_cm_cep.c      
>(revision 8370)
>@@ -6557,6 +6557,11 @@
>       AL_EXIT( AL_DBG_CM );
> }
>
>+#ifdef NTDDI_WIN8
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_requires_min_(DISPATCH_LEVEL)
>+__drv_at(p_irp->CancelIrql, __drv_restoresIRQL)
>+#endif
> static void
> __cep_cancel_ndi_irp(
>       IN                              DEVICE_OBJECT*                          
> p_dev_obj,
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cm.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cm.c      
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cm.c      
>(revision 8370)
>@@ -301,8 +301,10 @@
>  * CSQ
>  *
>  ******************************************************************/
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_INSERT_IRP_EX __ndi_insert_irp_ex;
>+#endif
>
>-
> static NTSTATUS __ndi_insert_irp_ex(
>       IN      PIO_CSQ                                                         
>         pCsq,
>       IN      PIRP                                                            
>         pIrp,
>@@ -364,6 +366,11 @@
>       return status;
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_REMOVE_IRP __ndi_remove_irp;
>+#endif
>+
>+
> static VOID __ndi_remove_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>@@ -376,6 +383,11 @@
>       AL_EXIT( AL_DBG_NDI );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_PEEK_NEXT_IRP __peek_next_irp;
>+#endif
>+
>+
> static PIRP __ndi_peek_next_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp,
>@@ -429,6 +441,18 @@
>       return nextIrp;
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_ACQUIRE_LOCK __ndi_acquire_lock;
>+#endif
>+
>+
>+#ifdef NTDDI_WIN8
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_raises_(DISPATCH_LEVEL)
>+//TOD __drv_at(p_ndi_csq->lock, __drv_acquiresExclusiveResource(KSPIN_LOCK))
>+__drv_at(pIrql, __drv_savesIRQL)
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is saved by 
>cl_spinlock_acquire, impossible to annotate by driver directives")
> static VOID __ndi_acquire_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       OUT     PKIRQL                                                          
>         pIrql
>@@ -437,8 +461,20 @@
>       nd_csq_t *p_ndi_csq = (nd_csq_t*)Csq;
>
>       KeAcquireSpinLock( &p_ndi_csq->lock, pIrql );
>-}
>+}
>
>+
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_RELEASE_LOCK __ndi_release_lock;
>+#endif
>+
>+#ifdef NTDDI_WIN8
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_requires_min_(DISPATCH_LEVEL)
>+//TODO __drv_at(p_ndi_csq->lock, __drv_restoresExclusiveResource(KSPIN_LOCK))
>+__drv_at(Irql, __drv_restoresIRQL)
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is restored by 
>KeReleaseSpinLock, impossible to annotate by driver directives")
> static VOID __ndi_release_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      KIRQL                                                           
>         Irql
>@@ -449,6 +485,10 @@
>       KeReleaseSpinLock( &p_ndi_csq->lock, Irql );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_COMPLETE_CANCELED_IRP __ndi_complete_cancelled_irp;
>+#endif
>+
> static VOID __ndi_complete_cancelled_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         p_irp
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cq.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cq.c      
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_ndi_cq.c      
>(revision 8370)
>@@ -138,6 +138,9 @@
>  * CSQ
>  *
>  ******************************************************************/
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_INSERT_IRP __ndi_insert_irp;
>+#endif
>
> static VOID __ndi_insert_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>@@ -151,6 +154,10 @@
>       AL_EXIT( AL_DBG_NDI );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_REMOVE_IRP __ndi_remove_irp;
>+#endif
>+
> static VOID __ndi_remove_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>@@ -163,6 +170,10 @@
>       AL_EXIT( AL_DBG_NDI );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_PEEK_NEXT_IRP __peek_next_irp;
>+#endif
>+
> static PIRP __ndi_peek_next_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp,
>@@ -214,6 +225,15 @@
>       return nextIrp;
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_ACQUIRE_LOCK __ndi_acquire_lock;
>+
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+__drv_raisesIRQL(DISPATCH_LEVEL)
>+//TODO __drv_at((ndi_cq_csq_t*)Csq->h_cq->obj.lock, 
>__drv_acquiresExclusiveResource(KSPIN_LOCK))
>+_IRQL_saves_global_(SpinLock, pIrql)
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is restored by 
>cl_spinlock_release, impossible to annotate by driver directives")
> static VOID __ndi_acquire_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       OUT     PKIRQL                                                          
>         Irql
>@@ -228,6 +248,16 @@
>       AL_EXIT( AL_DBG_NDI );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_RELEASE_LOCK __ndi_release_lock;
>+
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_requires_min_(DISPATCH_LEVEL)
>+// TODO __drv_at(((ndi_cq_csq_t*)Csq)->h_cq->obj.lock, 
>__drv_releasesExclusiveResource(KSPIN_LOCK))
>+_IRQL_restores_global_(SpinLock, pIrql)
>+
>+#endif
>+#pragma prefast(suppress: 28167, "The irql level is restored by 
>cl_spinlock_release, impossible to annotate by driver directives")
> static VOID __ndi_release_lock(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      KIRQL                                                           
>         Irql
>@@ -242,6 +272,10 @@
>       AL_EXIT( AL_DBG_NDI );
> }
>
>+#ifdef NTDDI_WIN8
>+static IO_CSQ_COMPLETE_CANCELED_IRP __ndi_complete_cancelled_irp;
>+#endif
>+
> static VOID __ndi_complete_cancelled_irp(
>       IN      PIO_CSQ                                                         
>         Csq,
>       IN      PIRP                                                            
>         Irp
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.c       
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/kernel/al_proxy.c       
>(revision 8370)
>@@ -865,8 +865,8 @@
> /*
>  * Process the ioctl UAL_REG_PNP:
>  */
>-static cl_status_t
>-proxy_reg_pnp(
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
>+static cl_status_t proxy_reg_pnp(
>       IN                              void                                    
>         *p_open_context,
>       IN                              cl_ioctl_handle_t                       
> h_ioctl )
> {
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca_shared.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca_shared.c       
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca_shared.c       
>(revision 8370)
>@@ -587,33 +587,3 @@
>       return IB_SUCCESS;
> }
>
>-
>-
>-void
>-ci_ca_lock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca )
>-{
>-      CL_ASSERT( p_ci_ca );
>-
>-      cl_spinlock_acquire( &p_ci_ca->attr_lock );
>-}
>-
>-
>-void
>-ci_ca_excl_lock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca )
>-{
>-      CL_ASSERT( p_ci_ca );
>-
>-      cl_spinlock_acquire( &p_ci_ca->attr_lock );
>-}
>-
>-
>-void
>-ci_ca_unlock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca )
>-{
>-      CL_ASSERT( p_ci_ca );
>-
>-      cl_spinlock_release( &p_ci_ca->attr_lock );
>-}
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_dm.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_dm.c (revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_dm.c (revision 8370)
>@@ -38,7 +38,7 @@
> #include "al_mgr.h"
> #include "ib_common.h"
>
>-#ifdef DRIVER
>+#ifdef CL_KERNEL
> #include <ntstrsafe.h>
> #endif
>
>@@ -764,7 +764,7 @@
>               cl_memclr( &reg_svc_req, sizeof( ib_reg_svc_req_t ) );
>
>               reg_svc_req.svc_rec.service_lease = 0xffffffff;
>-#ifdef DRIVER
>+#ifdef CL_KERNEL
>       RtlStringCchCopyA(
>               (char*)reg_svc_req.svc_rec.service_name,
>               sizeof(reg_svc_req.svc_rec.service_name),
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_common.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_common.c     (revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_common.c     (revision 8370)
>@@ -48,7 +48,8 @@
> #include "al_mgr.h"
> #include <complib/cl_math.h>
> #include "ib_common.h"
>-#ifdef DRIVER
>+
>+#if defined(CL_KERNEL) && defined (NTDDI_WIN8)
> #include <ntstrsafe.h>
> #else
> #include <strsafe.h>
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca.h
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca.h      (revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/core/al/al_ci_ca.h      (revision 8370)
>@@ -204,18 +204,22 @@
>       IN                              al_ci_ca_t*                             
>         p_ci_ca,
>               OUT                     ib_ca_attr_t**                          
> pp_old_pnp_attr );
>
>-void
>-ci_ca_lock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca );
>
>-void
>-ci_ca_excl_lock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca );
>
>-void
>-ci_ca_unlock_attr(
>-      IN                              al_ci_ca_t* const                       
>p_ci_ca );
>+#define ci_ca_lock_attr(p_ci_ca) \
>+      CL_ASSERT( p_ci_ca ); \
>+      cl_spinlock_acquire( &p_ci_ca->attr_lock );
>
>+
>+#define ci_ca_excl_lock_attr(p_ci_ca ) \
>+      CL_ASSERT( p_ci_ca ); \
>+      cl_spinlock_acquire( &p_ci_ca->attr_lock );
>+
>+#define ci_ca_unlock_attr(p_ci_ca) \
>+      CL_ASSERT( p_ci_ca ); \
>+      cl_spinlock_release( &p_ci_ca->attr_lock );
>+
>+
> ib_api_status_t
> ci_call(
>       IN                              ib_ca_handle_t                          
> h_ca,
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_spinlock_osd.h
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_spinlock_osd.h    
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_spinlock_osd.h    
>(revision 8370)
>@@ -106,6 +106,8 @@
> }
>
> #ifdef NTDDI_WIN8
>+_IRQL_requires_max_(DISPATCH_LEVEL)
>+_IRQL_requires_min_(DISPATCH_LEVEL)
> __drv_at(p_spinlock->lock, __drv_releasesExclusiveResource(KSPIN_LOCK))
> __drv_at(p_spinlock->irql, __drv_restoresIRQL)
> #endif
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_mutex_osd.h
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_mutex_osd.h       
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/inc/kernel/complib/cl_mutex_osd.h       
>(revision 8370)
>@@ -80,6 +80,39 @@
>       UNUSED_PARAM( p_mutex );
> }
>
>+/*
>+//TODO : according to 
>MSDN(http://msdn.microsoft.com/en-us/library/ff547911(v=VS.85).aspx),
>+the definition of these fast mutex wrappers should be:
>+But it DOES NOT work and still generates warnings 28157, 28158 !
>+_IRQL_requires_max_(APC_LEVEL)
>+_IRQL_raises_(APC_LEVEL)
>+CL_INLINE VOID
>+  cl_mutex_acquire(
>+    _Inout_
>+        __drv_out(_IRQL_saves_
>+            __drv_acquiresResource(FastMutex))
>+    PFAST_MUTEX  FastMutex
>+    )
>+{
>+      CL_ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL );
>+      ExAcquireFastMutex( FastMutex );
>+}
>+
>+_IRQL_requires_(APC_LEVEL)
>+CL_INLINE VOID
>+  cl_mutex_release(
>+    _Inout_
>+        __drv_in(_IRQL_restores_
>+            __drv_releasesResource(FastMutex))
>+    PFAST_MUTEX  FastMutex
>+    )
>+
>+{
>+      CL_ASSERT( KeGetCurrentIrql() == APC_LEVEL );
>+      ExReleaseFastMutex( FastMutex );
>+}
>+*/
>+
> #ifdef NTDDI_WIN8
> _IRQL_requires_max_(APC_LEVEL)
> _IRQL_raises_(APC_LEVEL)
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/mad.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/mad.c     
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/mad.c     
>(revision 8370)
>@@ -868,6 +868,7 @@
>       }
> }
>
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> static void node_desc_override(struct ib_device *dev,
>                              struct ib_mad *mad)
> {
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/qp.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/qp.c      
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/qp.c      
>(revision 8370)
>@@ -730,6 +730,7 @@
>       }
> }
>
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> static void mlx4_ib_lock_cqs(struct mlx4_ib_cq *send_cq, struct mlx4_ib_cq 
> *recv_cq)
> {
>       if (send_cq == recv_cq)
>@@ -743,6 +744,7 @@
>       }
> }
>
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> static void mlx4_ib_unlock_cqs(struct mlx4_ib_cq *send_cq, struct mlx4_ib_cq 
> *recv_cq)
> {
>       if (send_cq == recv_cq)
>Index: B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/main.c
>===================================================================
>--- B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/main.c    
>(revision 8369)
>+++ B:/users/xalex/PREFAST_TRUNK_3_0_0/hw/mlx4/kernel/bus/ib/main.c    
>(revision 8370)
>@@ -473,6 +473,7 @@
>       return err;
> }
>
>+#pragma prefast(suppress: 28167, "The irql level is restored here")
> static int mlx4_ib_modify_device(struct ib_device *ibdev, int mask,
>                                struct ib_device_modify *props)
> {
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to