[MTHCA] Cosmetic changes to allow building the driver without WPP
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 12:25:00 +0000 (12:25 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 12:25:00 +0000 (12:25 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@581 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

12 files changed:
hw/mthca/kernel/hca_direct.c
hw/mthca/kernel/hca_driver.h
hw/mthca/kernel/hca_mcast.c
hw/mthca/kernel/hca_memory.c
hw/mthca/kernel/hca_verbs.c
hw/mthca/kernel/mt_verbs.c
hw/mthca/kernel/mthca_cq.c
hw/mthca/kernel/mthca_mr.c
hw/mthca/kernel/mthca_provider.c
inc/kernel/complib/cl_debug_osd.h
inc/kernel/complib/cl_types_osd.h
inc/user/complib/cl_types_osd.h

index 6e1eb47..1ef67a6 100644 (file)
@@ -178,7 +178,7 @@ mlnx_poll_cq (
        int err;\r
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq;\r
-       PREP_IBDEV_FOR_PRINT(ib_cq_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_cq_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_CQ);\r
 \r
@@ -215,7 +215,7 @@ mlnx_enable_cq_notify (
        int err;\r
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq;\r
-       PREP_IBDEV_FOR_PRINT(ib_cq_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_cq_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_SHIM);\r
 \r
@@ -240,7 +240,7 @@ mlnx_enable_ncomp_cq_notify (
        int err;\r
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq;\r
-       PREP_IBDEV_FOR_PRINT(ib_cq_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_cq_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_SHIM);\r
 \r
index cb395c8..6221696 100644 (file)
@@ -174,7 +174,7 @@ typedef struct _hca_dev_ext
 \r
 #define IB_GET_ERR_STR ib_dev->mdev->ext->ci_ifc.get_err_str\r
 #if DBG || defined( EVENT_TRACING )\r
-#define PREP_IBDEV_FOR_PRINT(val)      struct ib_device *ib_dev = val;\r
+#define PREP_IBDEV_FOR_PRINT(val)      struct ib_device *ib_dev = val\r
 #else\r
 #define PREP_IBDEV_FOR_PRINT(val)\r
 #endif\r
index 5c73110..42a17bd 100644 (file)
@@ -58,7 +58,7 @@ mlnx_attach_mcast (
        int err;\r
        ib_api_status_t         status;\r
        struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp;\r
-       PREP_IBDEV_FOR_PRINT(ib_qp_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_qp_p->device);\r
        mlnx_mcast_t *mcast_p;\r
 \r
        HCA_ENTER(HCA_DBG_SHIM);\r
index 8155f7e..90b4e89 100644 (file)
@@ -58,7 +58,7 @@ mlnx_register_mr (
        int err;\r
        struct ib_mr *mr_p;\r
        struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd;\r
-       PREP_IBDEV_FOR_PRINT(ib_pd_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_pd_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_MEMORY);\r
 \r
@@ -127,7 +127,7 @@ mlnx_register_pmr (
        struct ib_mr *mr_p;\r
        struct ib_phys_buf *buffer_list;\r
        struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd;\r
-       PREP_IBDEV_FOR_PRINT(ib_pd_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_pd_p->device);\r
 \r
        UNUSED_PARAM( um_call );\r
 \r
@@ -282,7 +282,7 @@ mlnx_deregister_mr (
        ib_api_status_t         status;\r
        int err;\r
        struct ib_mr *ib_mr = (struct ib_mr *)h_mr;\r
-       PREP_IBDEV_FOR_PRINT(ib_mr->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_mr->device);\r
 \r
        HCA_ENTER(HCA_DBG_SHIM);\r
 \r
@@ -329,7 +329,7 @@ mlnx_alloc_fmr(
        struct ib_fmr * fmr_p;\r
        struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd;\r
        struct ib_fmr_attr fmr_attr;\r
-       PREP_IBDEV_FOR_PRINT(ib_pd_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_pd_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_MEMORY);\r
 \r
@@ -392,7 +392,7 @@ mlnx_map_phys_fmr (
        ib_api_status_t         status;\r
        struct ib_fmr *ib_fmr = (struct ib_fmr *)h_fmr;\r
        uint64_t vaddr = (*p_vaddr) & ~(PAGE_SIZE - 1);\r
-       PREP_IBDEV_FOR_PRINT(ib_fmr->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_fmr->device);\r
 \r
        HCA_ENTER(HCA_DBG_MEMORY);\r
 \r
@@ -428,7 +428,7 @@ mlnx_unmap_fmr (
        int err;\r
        struct ib_fmr *ib_fmr = (struct ib_fmr *)h_fmr;\r
        struct list_head fmr_list;\r
-       PREP_IBDEV_FOR_PRINT(ib_fmr->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_fmr->device);\r
 \r
        HCA_ENTER(HCA_DBG_MEMORY);\r
 \r
@@ -470,7 +470,8 @@ mlnx_dealloc_fmr (
        ib_api_status_t         status;\r
        int err;\r
        struct ib_fmr *fmr = (struct ib_fmr *)h_fmr;\r
-       PREP_IBDEV_FOR_PRINT(fmr->device)\r
+       PREP_IBDEV_FOR_PRINT(fmr->device);\r
+       UNUSED_PARAM_WOWPP(fmr);\r
 \r
        HCA_ENTER(HCA_DBG_MEMORY);\r
 \r
index d7f0737..53730b5 100644 (file)
@@ -583,7 +583,7 @@ mlnx_deallocate_pd (
        ib_api_status_t         status;\r
        int err;\r
        struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd;\r
-       PREP_IBDEV_FOR_PRINT(ib_pd_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_pd_p->device);\r
 \r
        HCA_ENTER( HCA_DBG_QP);\r
 \r
@@ -676,7 +676,7 @@ mlnx_query_av (
        int err;\r
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_ah *ib_ah_p = (struct ib_ah *)h_av;\r
-       PREP_IBDEV_FOR_PRINT(ib_ah_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_ah_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_AV);\r
 \r
@@ -774,7 +774,7 @@ mlnx_destroy_av (
        int err;\r
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_ah *ib_ah_p = (struct ib_ah *)h_av;\r
-       PREP_IBDEV_FOR_PRINT(ib_ah_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_ah_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_AV);\r
 \r
@@ -876,6 +876,7 @@ mlnx_modify_srq (
        struct ib_srq *ib_srq = (struct ib_srq *)h_srq;\r
        struct ib_device *ib_dev = ib_srq->device;\r
        UNUSED_PARAM(p_umv_buf);\r
+    UNUSED_PARAM_WOWPP(ib_dev);\r
 \r
        HCA_ENTER(HCA_DBG_SRQ);\r
 \r
@@ -902,6 +903,7 @@ mlnx_query_srq (
        struct ib_srq *ib_srq = (struct ib_srq *)h_srq;\r
        struct ib_device *ib_dev = ib_srq->device;\r
        UNUSED_PARAM(p_umv_buf);\r
+    UNUSED_PARAM_WOWPP(ib_dev);\r
 \r
        HCA_ENTER(HCA_DBG_SRQ);\r
 \r
@@ -925,6 +927,7 @@ mlnx_destroy_srq (
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_srq *ib_srq = (struct ib_srq *)h_srq;\r
        struct ib_device *ib_dev = ib_srq->device;\r
+    UNUSED_PARAM_WOWPP(ib_dev);\r
 \r
        HCA_ENTER(HCA_DBG_SRQ);\r
 \r
@@ -1044,7 +1047,7 @@ mlnx_create_spl_qp (
                OUT                     ib_qp_handle_t                          *ph_qp )\r
 {\r
        ib_api_status_t         status;\r
-       PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device)\r
+       PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device);\r
 \r
        HCA_ENTER(HCA_DBG_SHIM);\r
 \r
@@ -1066,7 +1069,7 @@ mlnx_create_qp (
        IN      OUT                     ci_umv_buf_t                            *p_umv_buf )\r
 {\r
        ib_api_status_t         status;\r
-       PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device)\r
+       PREP_IBDEV_FOR_PRINT(((struct ib_pd*)h_pd)->device);\r
 \r
        //NB: algorithm of mthca_alloc_sqp() requires port_num\r
        // PRM states, that special pares are created in couples, so\r
@@ -1095,7 +1098,7 @@ mlnx_modify_qp (
        struct ib_qp_attr qp_attr;\r
        int qp_attr_mask;\r
        struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp;\r
-       PREP_IBDEV_FOR_PRINT(ib_qp_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_qp_p->device);\r
 \r
        HCA_ENTER(HCA_DBG_QP);\r
 \r
@@ -1169,7 +1172,7 @@ mlnx_query_qp (
        ib_api_status_t         status = IB_SUCCESS;\r
        struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp;\r
        struct mthca_qp *qp_p = (struct mthca_qp *)ib_qp_p;\r
-       PREP_IBDEV_FOR_PRINT(ib_qp_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_qp_p->device);\r
 \r
        UNREFERENCED_PARAMETER(p_umv_buf);\r
        \r
@@ -1226,7 +1229,7 @@ mlnx_destroy_qp (
        ib_api_status_t         status;\r
        int err;\r
        struct ib_qp *ib_qp_p = (struct ib_qp *)h_qp;\r
-       PREP_IBDEV_FOR_PRINT(ib_qp_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_qp_p->device);\r
 \r
        UNUSED_PARAM( timewait );\r
 \r
@@ -1370,7 +1373,7 @@ mlnx_destroy_cq (
        ib_api_status_t         status;\r
        int err;\r
        struct ib_cq *ib_cq_p = (struct ib_cq *)h_cq;\r
-       PREP_IBDEV_FOR_PRINT(ib_cq_p->device)\r
+       PREP_IBDEV_FOR_PRINT(ib_cq_p->device);\r
 \r
        HCA_ENTER( HCA_DBG_QP);\r
 \r
index 3257b81..b6bbcbe 100644 (file)
@@ -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);
 
index c6544c0..6030097 100644 (file)
@@ -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));
index ea55270..3d349ee 100644 (file)
@@ -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,
index 6618cec..fb3d925 100644 (file)
@@ -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 ));
index bfc09e6..7a3d2f9 100644 (file)
@@ -88,7 +88,7 @@
 #else // !defined( _WDMDDK_ )\r
 \r
 #define _CL_DBG_ENTER  \\r
-       ("~%d:%s%s%s() [\n", KeGetCurrentProcessorNumber(), __MODULE__, \\r
+       ("~%d:(%x)%s%s%s() [\n", KeGetCurrentProcessorNumber(), PsGetCurrentThread(), __MODULE__, \\r
        __MOD_DELIMITER__, __FUNCTION__)\r
 \r
 #define _CL_DBG_EXIT   \\r
index 9849931..7a6dd64 100644 (file)
@@ -94,6 +94,11 @@ typedef volatile __int32             atomic32_t;
 \r
 \r
 #define UNUSED_PARAM   UNREFERENCED_PARAMETER\r
+#if defined(EVENT_TRACING)\r
+#define UNUSED_PARAM_WOWPP(a)\r
+#else\r
+#define UNUSED_PARAM_WOWPP(a)UNREFERENCED_PARAMETER(a)\r
+#endif\r
 \r
 \r
 #define CL_EXPORT\r
index b535267..16e9104 100644 (file)
@@ -102,8 +102,12 @@ typedef int                                                boolean_t;
 #endif /* CL_ASSERT */\r
 \r
 \r
-#define UNUSED_PARAM   UNREFERENCED_PARAMETER\r
-\r
+#define UNUSED_PARAM           UNREFERENCED_PARAMETER\r
+#if defined(EVENT_TRACING)\r
+#define UNUSED_PARAM_WOWPP(a)\r
+#else\r
+#define UNUSED_PARAM_WOWPP(a)UNREFERENCED_PARAMETER(a)\r
+#endif\r
 \r
 #if !defined(EXPORT_CL_SYMBOLS)\r
 #define CL_EXPORT              DECLSPEC_IMPORT\r