From: sleybo Date: Wed, 7 Feb 2007 12:25:00 +0000 (+0000) Subject: [MTHCA] Cosmetic changes to allow building the driver without WPP X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ea23839318e059563993d27004f28623e27e36af;p=~shefty%2Frdma-win.git [MTHCA] Cosmetic changes to allow building the driver without WPP git-svn-id: svn://openib.tc.cornell.edu/gen1@581 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/hw/mthca/kernel/hca_direct.c b/trunk/hw/mthca/kernel/hca_direct.c index 6e1eb47d..1ef67a65 100644 --- a/trunk/hw/mthca/kernel/hca_direct.c +++ b/trunk/hw/mthca/kernel/hca_direct.c @@ -178,7 +178,7 @@ mlnx_poll_cq ( int err; ib_api_status_t status = IB_SUCCESS; struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq; - PREP_IBDEV_FOR_PRINT(ib_cq_p->device) + PREP_IBDEV_FOR_PRINT(ib_cq_p->device); HCA_ENTER(HCA_DBG_CQ); @@ -215,7 +215,7 @@ mlnx_enable_cq_notify ( int err; ib_api_status_t status = IB_SUCCESS; struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq; - PREP_IBDEV_FOR_PRINT(ib_cq_p->device) + PREP_IBDEV_FOR_PRINT(ib_cq_p->device); HCA_ENTER(HCA_DBG_SHIM); @@ -240,7 +240,7 @@ mlnx_enable_ncomp_cq_notify ( int err; ib_api_status_t status = IB_SUCCESS; struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq; - PREP_IBDEV_FOR_PRINT(ib_cq_p->device) + PREP_IBDEV_FOR_PRINT(ib_cq_p->device); HCA_ENTER(HCA_DBG_SHIM); diff --git a/trunk/hw/mthca/kernel/hca_driver.h b/trunk/hw/mthca/kernel/hca_driver.h index cb395c84..6221696b 100644 --- a/trunk/hw/mthca/kernel/hca_driver.h +++ b/trunk/hw/mthca/kernel/hca_driver.h @@ -174,7 +174,7 @@ typedef struct _hca_dev_ext #define IB_GET_ERR_STR ib_dev->mdev->ext->ci_ifc.get_err_str #if DBG || defined( EVENT_TRACING ) -#define PREP_IBDEV_FOR_PRINT(val) struct ib_device *ib_dev = val; +#define PREP_IBDEV_FOR_PRINT(val) struct ib_device *ib_dev = val #else #define PREP_IBDEV_FOR_PRINT(val) #endif diff --git a/trunk/hw/mthca/kernel/hca_mcast.c b/trunk/hw/mthca/kernel/hca_mcast.c index 5c731105..42a17bd3 100644 --- a/trunk/hw/mthca/kernel/hca_mcast.c +++ b/trunk/hw/mthca/kernel/hca_mcast.c @@ -58,7 +58,7 @@ mlnx_attach_mcast ( int err; ib_api_status_t status; struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp; - PREP_IBDEV_FOR_PRINT(ib_qp_p->device) + PREP_IBDEV_FOR_PRINT(ib_qp_p->device); mlnx_mcast_t *mcast_p; HCA_ENTER(HCA_DBG_SHIM); diff --git a/trunk/hw/mthca/kernel/hca_memory.c b/trunk/hw/mthca/kernel/hca_memory.c index 8155f7ed..90b4e893 100644 --- a/trunk/hw/mthca/kernel/hca_memory.c +++ b/trunk/hw/mthca/kernel/hca_memory.c @@ -58,7 +58,7 @@ mlnx_register_mr ( int err; struct ib_mr *mr_p; struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd; - PREP_IBDEV_FOR_PRINT(ib_pd_p->device) + PREP_IBDEV_FOR_PRINT(ib_pd_p->device); HCA_ENTER(HCA_DBG_MEMORY); @@ -127,7 +127,7 @@ mlnx_register_pmr ( struct ib_mr *mr_p; struct ib_phys_buf *buffer_list; struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd; - PREP_IBDEV_FOR_PRINT(ib_pd_p->device) + PREP_IBDEV_FOR_PRINT(ib_pd_p->device); UNUSED_PARAM( um_call ); @@ -282,7 +282,7 @@ mlnx_deregister_mr ( ib_api_status_t status; int err; struct ib_mr *ib_mr = (struct ib_mr *)h_mr; - PREP_IBDEV_FOR_PRINT(ib_mr->device) + PREP_IBDEV_FOR_PRINT(ib_mr->device); HCA_ENTER(HCA_DBG_SHIM); @@ -329,7 +329,7 @@ mlnx_alloc_fmr( struct ib_fmr * fmr_p; struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd; struct ib_fmr_attr fmr_attr; - PREP_IBDEV_FOR_PRINT(ib_pd_p->device) + PREP_IBDEV_FOR_PRINT(ib_pd_p->device); HCA_ENTER(HCA_DBG_MEMORY); @@ -392,7 +392,7 @@ mlnx_map_phys_fmr ( ib_api_status_t status; struct ib_fmr *ib_fmr = (struct ib_fmr *)h_fmr; uint64_t vaddr = (*p_vaddr) & ~(PAGE_SIZE - 1); - PREP_IBDEV_FOR_PRINT(ib_fmr->device) + PREP_IBDEV_FOR_PRINT(ib_fmr->device); HCA_ENTER(HCA_DBG_MEMORY); @@ -428,7 +428,7 @@ mlnx_unmap_fmr ( int err; struct ib_fmr *ib_fmr = (struct ib_fmr *)h_fmr; struct list_head fmr_list; - PREP_IBDEV_FOR_PRINT(ib_fmr->device) + PREP_IBDEV_FOR_PRINT(ib_fmr->device); HCA_ENTER(HCA_DBG_MEMORY); @@ -470,7 +470,8 @@ mlnx_dealloc_fmr ( ib_api_status_t status; int err; struct ib_fmr *fmr = (struct ib_fmr *)h_fmr; - PREP_IBDEV_FOR_PRINT(fmr->device) + PREP_IBDEV_FOR_PRINT(fmr->device); + UNUSED_PARAM_WOWPP(fmr); HCA_ENTER(HCA_DBG_MEMORY); diff --git a/trunk/hw/mthca/kernel/hca_verbs.c b/trunk/hw/mthca/kernel/hca_verbs.c index d7f07377..53730b51 100644 --- a/trunk/hw/mthca/kernel/hca_verbs.c +++ b/trunk/hw/mthca/kernel/hca_verbs.c @@ -583,7 +583,7 @@ mlnx_deallocate_pd ( ib_api_status_t status; int err; struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd; - PREP_IBDEV_FOR_PRINT(ib_pd_p->device) + PREP_IBDEV_FOR_PRINT(ib_pd_p->device); HCA_ENTER( HCA_DBG_QP); @@ -676,7 +676,7 @@ mlnx_query_av ( int err; ib_api_status_t status = IB_SUCCESS; struct ib_ah *ib_ah_p = (struct ib_ah *)h_av; - PREP_IBDEV_FOR_PRINT(ib_ah_p->device) + PREP_IBDEV_FOR_PRINT(ib_ah_p->device); HCA_ENTER(HCA_DBG_AV); @@ -774,7 +774,7 @@ mlnx_destroy_av ( int err; ib_api_status_t status = IB_SUCCESS; struct ib_ah *ib_ah_p = (struct ib_ah *)h_av; - PREP_IBDEV_FOR_PRINT(ib_ah_p->device) + PREP_IBDEV_FOR_PRINT(ib_ah_p->device); HCA_ENTER(HCA_DBG_AV); @@ -876,6 +876,7 @@ mlnx_modify_srq ( struct ib_srq *ib_srq = (struct ib_srq *)h_srq; struct ib_device *ib_dev = ib_srq->device; UNUSED_PARAM(p_umv_buf); + UNUSED_PARAM_WOWPP(ib_dev); HCA_ENTER(HCA_DBG_SRQ); @@ -902,6 +903,7 @@ mlnx_query_srq ( struct ib_srq *ib_srq = (struct ib_srq *)h_srq; struct ib_device *ib_dev = ib_srq->device; UNUSED_PARAM(p_umv_buf); + UNUSED_PARAM_WOWPP(ib_dev); HCA_ENTER(HCA_DBG_SRQ); @@ -925,6 +927,7 @@ mlnx_destroy_srq ( ib_api_status_t status = IB_SUCCESS; struct ib_srq *ib_srq = (struct ib_srq *)h_srq; struct ib_device *ib_dev = ib_srq->device; + UNUSED_PARAM_WOWPP(ib_dev); HCA_ENTER(HCA_DBG_SRQ); @@ -1044,7 +1047,7 @@ mlnx_create_spl_qp ( OUT ib_qp_handle_t *ph_qp ) { ib_api_status_t status; - PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device) + PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device); HCA_ENTER(HCA_DBG_SHIM); @@ -1066,7 +1069,7 @@ mlnx_create_qp ( IN OUT ci_umv_buf_t *p_umv_buf ) { ib_api_status_t status; - PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device) + PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device); //NB: algorithm of mthca_alloc_sqp() requires port_num // PRM states, that special pares are created in couples, so @@ -1095,7 +1098,7 @@ mlnx_modify_qp ( struct ib_qp_attr qp_attr; int qp_attr_mask; struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp; - PREP_IBDEV_FOR_PRINT(ib_qp_p->device) + PREP_IBDEV_FOR_PRINT(ib_qp_p->device); HCA_ENTER(HCA_DBG_QP); @@ -1169,7 +1172,7 @@ mlnx_query_qp ( ib_api_status_t status = IB_SUCCESS; struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp; struct mthca_qp *qp_p = (struct mthca_qp *)ib_qp_p; - PREP_IBDEV_FOR_PRINT(ib_qp_p->device) + PREP_IBDEV_FOR_PRINT(ib_qp_p->device); UNREFERENCED_PARAMETER(p_umv_buf); @@ -1226,7 +1229,7 @@ mlnx_destroy_qp ( ib_api_status_t status; int err; struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp; - PREP_IBDEV_FOR_PRINT(ib_qp_p->device) + PREP_IBDEV_FOR_PRINT(ib_qp_p->device); UNUSED_PARAM( timewait ); @@ -1370,7 +1373,7 @@ mlnx_destroy_cq ( ib_api_status_t status; int err; struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq; - PREP_IBDEV_FOR_PRINT(ib_cq_p->device) + PREP_IBDEV_FOR_PRINT(ib_cq_p->device); HCA_ENTER( HCA_DBG_QP); diff --git a/trunk/hw/mthca/kernel/mt_verbs.c b/trunk/hw/mthca/kernel/mt_verbs.c index 3257b813..b6bbcbe0 100644 --- a/trunk/hw/mthca/kernel/mt_verbs.c +++ b/trunk/hw/mthca/kernel/mt_verbs.c @@ -56,7 +56,7 @@ void ibv_um_close( struct ib_ucontext * h_um_ca ) int err; ib_api_status_t status; struct ib_ucontext *context_p = (struct ib_ucontext *)h_um_ca; - PREP_IBDEV_FOR_PRINT(context_p->device) + PREP_IBDEV_FOR_PRINT(context_p->device); HCA_ENTER(HCA_DBG_SHIM); diff --git a/trunk/hw/mthca/kernel/mthca_cq.c b/trunk/hw/mthca/kernel/mthca_cq.c index c6544c01..6030097b 100644 --- a/trunk/hw/mthca/kernel/mthca_cq.c +++ b/trunk/hw/mthca/kernel/mthca_cq.c @@ -187,6 +187,7 @@ static void dump_cqe(u32 print_lvl, struct mthca_dev *dev, void *cqe_ptr) { __be32 *cqe = cqe_ptr; UNREFERENCED_PARAMETER(dev); + UNUSED_PARAM_WOWPP(print_lvl); (void) cqe; /* avoid warning if mthca_dbg compiled away... */ HCA_PRINT(print_lvl,HCA_DBG_CQ,("CQE contents \n")); @@ -895,10 +896,11 @@ void mthca_free_cq(struct mthca_dev *dev, else if (status){ HCA_PRINT(TRACE_LEVEL_WARNING ,HCA_DBG_LOW ,("HW2SW_CQ returned status 0x%02x\n", status)); } - { // debug print __be32 *ctx = mailbox->buf; int j; + UNUSED_PARAM_WOWPP(ctx); + UNUSED_PARAM_WOWPP(j); HCA_PRINT(TRACE_LEVEL_VERBOSE ,HCA_DBG_LOW ,("context for CQN %x (cons index %x, next sw %d)\n", cq->cqn, cq->cons_index, @@ -906,7 +908,6 @@ void mthca_free_cq(struct mthca_dev *dev, for (j = 0; j < 16; ++j) HCA_PRINT(TRACE_LEVEL_VERBOSE ,HCA_DBG_LOW ,("[%2x] %08x\n", j * 4, cl_ntoh32(ctx[j]))); } - spin_lock_irq(&dev->cq_table.lock, &lh); mthca_array_clear(&dev->cq_table.cq, cq->cqn & (dev->limits.num_cqs - 1)); diff --git a/trunk/hw/mthca/kernel/mthca_mr.c b/trunk/hw/mthca/kernel/mthca_mr.c index ea55270e..3d349ee7 100644 --- a/trunk/hw/mthca/kernel/mthca_mr.c +++ b/trunk/hw/mthca/kernel/mthca_mr.c @@ -95,7 +95,8 @@ struct mthca_mpt_entry { static void dump_mtt(u32 print_lvl, __be64 *mtt_entry ,int list_len) { int i; - UNREFERENCED_PARAMETER(mtt_entry); // for release version + UNUSED_PARAM_WOWPP(mtt_entry); // for release version + UNUSED_PARAM_WOWPP(print_lvl); HCA_PRINT(print_lvl ,HCA_DBG_MEMORY ,("Dumping MTT entry len %d :\n",list_len)); for (i = 0; i < list_len && i < MTHCA_MAILBOX_SIZE / 8 - 2; i=i+4) { HCA_PRINT(print_lvl ,HCA_DBG_MEMORY ,("[%02x] %016I64x %016I64x %016I64x %016I64x\n",i, @@ -110,7 +111,8 @@ static void dump_mtt(u32 print_lvl, __be64 *mtt_entry ,int list_len) static void dump_mpt(u32 print_lvl, struct mthca_mpt_entry *mpt_entry ) { int i; - UNREFERENCED_PARAMETER(mpt_entry); // for release version + UNUSED_PARAM_WOWPP(mpt_entry); // for release version + UNUSED_PARAM_WOWPP(print_lvl); HCA_PRINT(print_lvl ,HCA_DBG_MEMORY ,("Dumping MPT entry %08x :\n", mpt_entry->key)); for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; i=i+4) { HCA_PRINT(print_lvl ,HCA_DBG_MEMORY ,("[%02x] %08x %08x %08x %08x \n",i, diff --git a/trunk/hw/mthca/kernel/mthca_provider.c b/trunk/hw/mthca/kernel/mthca_provider.c index 6618cec5..fb3d9254 100644 --- a/trunk/hw/mthca/kernel/mthca_provider.c +++ b/trunk/hw/mthca/kernel/mthca_provider.c @@ -1093,6 +1093,7 @@ static struct ib_mr *mthca_reg_virt_mr(struct ib_pd *pd, } __except (EXCEPTION_EXECUTE_HANDLER) { NTSTATUS Status = GetExceptionCode(); + UNUSED_PARAM_WOWPP(Status); HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_MEMORY , ("Exception 0x%x on MmSecureVirtualMemory(), addr %p, size %I64d, access %#x\n", Status, vaddr, length, acc )); diff --git a/trunk/inc/kernel/complib/cl_debug_osd.h b/trunk/inc/kernel/complib/cl_debug_osd.h index bfc09e6c..7a3d2f95 100644 --- a/trunk/inc/kernel/complib/cl_debug_osd.h +++ b/trunk/inc/kernel/complib/cl_debug_osd.h @@ -88,7 +88,7 @@ #else // !defined( _WDMDDK_ ) #define _CL_DBG_ENTER \ - ("~%d:%s%s%s() [\n", KeGetCurrentProcessorNumber(), __MODULE__, \ + ("~%d:(%x)%s%s%s() [\n", KeGetCurrentProcessorNumber(), PsGetCurrentThread(), __MODULE__, \ __MOD_DELIMITER__, __FUNCTION__) #define _CL_DBG_EXIT \ diff --git a/trunk/inc/kernel/complib/cl_types_osd.h b/trunk/inc/kernel/complib/cl_types_osd.h index 98499318..7a6dd643 100644 --- a/trunk/inc/kernel/complib/cl_types_osd.h +++ b/trunk/inc/kernel/complib/cl_types_osd.h @@ -94,6 +94,11 @@ typedef volatile __int32 atomic32_t; #define UNUSED_PARAM UNREFERENCED_PARAMETER +#if defined(EVENT_TRACING) +#define UNUSED_PARAM_WOWPP(a) +#else +#define UNUSED_PARAM_WOWPP(a)UNREFERENCED_PARAMETER(a) +#endif #define CL_EXPORT diff --git a/trunk/inc/user/complib/cl_types_osd.h b/trunk/inc/user/complib/cl_types_osd.h index b5352671..16e91046 100644 --- a/trunk/inc/user/complib/cl_types_osd.h +++ b/trunk/inc/user/complib/cl_types_osd.h @@ -102,8 +102,12 @@ typedef int boolean_t; #endif /* CL_ASSERT */ -#define UNUSED_PARAM UNREFERENCED_PARAMETER - +#define UNUSED_PARAM UNREFERENCED_PARAMETER +#if defined(EVENT_TRACING) +#define UNUSED_PARAM_WOWPP(a) +#else +#define UNUSED_PARAM_WOWPP(a)UNREFERENCED_PARAMETER(a) +#endif #if !defined(EXPORT_CL_SYMBOLS) #define CL_EXPORT DECLSPEC_IMPORT