[MLX4] added support to WPP. [mlnx:3348-9]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 13:37:49 +0000 (13:37 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 13:37:49 +0000 (13:37 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1687 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

24 files changed:
hw/mlx4/kernel/bus/core/SOURCES
hw/mlx4/kernel/bus/core/cache.c
hw/mlx4/kernel/bus/core/device.c
hw/mlx4/kernel/bus/core/l2w.c
hw/mlx4/kernel/bus/core/l2w_memory.c
hw/mlx4/kernel/bus/core/l2w_umem.c
hw/mlx4/kernel/bus/core/verbs.c
hw/mlx4/kernel/bus/drv/drv.c
hw/mlx4/kernel/bus/drv/pdo.c
hw/mlx4/kernel/bus/drv/precomp.h
hw/mlx4/kernel/bus/drv/sources
hw/mlx4/kernel/bus/drv/wmi.c
hw/mlx4/kernel/bus/ib/SOURCES
hw/mlx4/kernel/bus/ib/cq.c
hw/mlx4/kernel/bus/ib/mad.c
hw/mlx4/kernel/bus/net/SOURCES
hw/mlx4/kernel/bus/net/alloc.c
hw/mlx4/kernel/bus/net/cq.c
hw/mlx4/kernel/bus/net/main.c
hw/mlx4/kernel/hca/SOURCES
hw/mlx4/kernel/hca/hverbs.c [moved from hw/mlx4/kernel/hca/verbs.c with 96% similarity]
hw/mlx4/kernel/hca/hverbs.h [moved from hw/mlx4/kernel/hca/verbs.h with 100% similarity]
hw/mlx4/kernel/hca/precomp.h
hw/mlx4/kernel/inc/mlx4_debug.h

index e0cc75c..fe394f6 100644 (file)
@@ -5,7 +5,7 @@ TARGETTYPE=DRIVER_LIBRARY
 \r
 \r
 !if $(FREEBUILD)\r
-#ENABLE_EVENT_TRACING=1\r
+ENABLE_EVENT_TRACING=1\r
 !else\r
 #ENABLE_EVENT_TRACING=1\r
 !endif\r
index c41e9ae..b3ddc34 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "ib\mlx4_ib.h"
 #include "ib_cache.h"
+#include <mlx4_debug.h>
 
 #if defined(EVENT_TRACING)
 #ifdef offsetof
index c68ae40..d20b110 100644 (file)
  * $Id: device.c 1349 2004-12-16 21:09:43Z roland $
  */
 
+#include "l2w.h"
+#include "ib_verbs.h"
+#include "core.h"
+#include <mlx4_debug.h>
+
 #if defined(EVENT_TRACING)
 #ifdef offsetof
 #undef offsetof
@@ -40,9 +45,6 @@
 #include "device.tmh"
 #endif
 
-#include "l2w.h"
-#include "ib_verbs.h"
-#include "core.h"
 
 struct ib_client_data {
        struct list_head  list;
index d3a225e..4b7599e 100644 (file)
@@ -3,6 +3,13 @@
 #include "pa_cash.h"
 #include "mlx4.h"
 
+#if defined (EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "l2w.tmh"
+#endif 
+
 /* Nth element of the table contains the index of the first set bit of N; 8 - for N=0 */
 char g_set_bit_tbl[256];
 
index bb0f885..49b8c92 100644 (file)
@@ -34,6 +34,7 @@
  * $Id: mt_memory.c 2020 2007-05-01 09:29:10Z leonid $
  */
 #include "l2w.h"
+#include <mlx4_debug.h>
 
 #if defined (EVENT_TRACING)
 #ifdef offsetof
index 5a3d307..245ca6b 100644 (file)
@@ -2,6 +2,13 @@
 #include "l2w.h"
 #include "ib_verbs.h"
 
+#if defined (EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "l2w_umem.tmh"
+#endif 
+
 /**
  * ib_umem_release - release memory pinned with ib_umem_get
  * @umem: umem struct to release
index fd9daa7..33e08f5 100644 (file)
  * $Id: verbs.c 1349 2004-12-16 21:09:43Z roland $
  */
 
+#include "l2w.h"
+#include "ib_verbs.h"
+#include <mlx4_debug.h>
+
 #if defined(EVENT_TRACING)
 #ifdef offsetof
 #undef offsetof
@@ -45,8 +49,6 @@
 #include "device.tmh"
 #endif
 
-#include "l2w.h"
-#include "ib_verbs.h"
 
 // qp_state_table
 static struct {
index 23b9ef7..345205e 100644 (file)
@@ -22,7 +22,10 @@ Environment:
 #include <initguid.h>\r
 #include <wdmguid.h>\r
 \r
-#if defined(EVENT_TRACING)\r
+#if defined (EVENT_TRACING)\r
+#ifdef offsetof\r
+#undef offsetof\r
+#endif\r
 #include "drv.tmh"\r
 #endif \r
 \r
@@ -570,20 +573,20 @@ __get_resources(
                                                i, desc->ShareDisposition, desc->Flags,\r
                                                desc->u.MessageInterrupt.Translated.Level, \r
                                                desc->u.MessageInterrupt.Translated.Vector, \r
-                                               desc->u.MessageInterrupt.Translated.Affinity ));\r
+                                               (u32)desc->u.MessageInterrupt.Translated.Affinity ));\r
                                        MLX4_PRINT(TRACE_LEVEL_WARNING, MLX4_DBG_DRV,\r
-                                               ("EvtPrepareHardware: Desc %d: RawMsiInterrupt: Share %d, Flags %#x, MessageCount #hx, Vector %#x, Affinity %#x\n", \r
+                                               ("EvtPrepareHardware: Desc %d: RawMsiInterrupt: Share %d, Flags %#x, MessageCount %#hx, Vector %#x, Affinity %#x\n", \r
                                                i, desc_raw->ShareDisposition, desc_raw->Flags,\r
                                                desc_raw->u.MessageInterrupt.Raw.MessageCount, \r
                                                desc_raw->u.MessageInterrupt.Raw.Vector,\r
-                                               desc_raw->u.MessageInterrupt.Raw.Affinity ));\r
+                                               (u32)desc_raw->u.MessageInterrupt.Raw.Affinity ));\r
                                }\r
                                else { // line-based interrupt\r
                                        MLX4_PRINT(TRACE_LEVEL_WARNING, MLX4_DBG_DRV,\r
                                                ("EvtPrepareHardware: Desc %d: LineInterrupt: Share %d, Flags %#x, Level %d, Vector %#x, Affinity %#x\n", \r
                                                i, desc->ShareDisposition, desc->Flags,\r
                                                desc->u.Interrupt.Level, desc->u.Interrupt.Vector, \r
-                                               desc->u.Interrupt.Affinity ));\r
+                                               (u32)desc->u.Interrupt.Affinity ));\r
                                }\r
                                break;\r
 #endif\r
index 920cd47..826f834 100644 (file)
@@ -2,9 +2,12 @@
 #include <initguid.h>\r
 #include <wdmguid.h>\r
 \r
-#if defined(EVENT_TRACING)\r
-#include "pdo.tmh"\r
+#if defined (EVENT_TRACING)\r
+#ifdef offsetof\r
+#undef offsetof\r
 #endif\r
+#include "pdo.tmh"\r
+#endif \r
 \r
 #ifdef ALLOC_PRAGMA\r
 #pragma alloc_text(PAGE, create_pdo)\r
index 9fbb31c..eefec29 100644 (file)
 #include "drv.h"\r
 #include "driver.h"\r
 #include "cmd.h"\r
-\r
-#if 0\r
-#include "mxe_hca.h"\r
-#include "mtnic_if_defs.h"\r
-#include "mxe_utils.h"\r
-#include "mxe_wpptrace.h"\r
-#include "mtnic_dev.h"\r
-#include "mxe_drv.h"\r
-#endif\r
+#include <mlx4_debug.h>\r
 \r
 \r
index 54d4982..00644b6 100644 (file)
@@ -11,7 +11,7 @@ NTTARGETFILES=$(INF_TARGET)
 !endif\r
 \r
 !if $(FREEBUILD)\r
-#ENABLE_EVENT_TRACING=1\r
+ENABLE_EVENT_TRACING=1\r
 !else\r
 #ENABLE_EVENT_TRACING=1\r
 !endif\r
@@ -54,7 +54,7 @@ C_DEFINES = $(C_DEFINES) -DEVENT_TRACING
 \r
 RUN_WPP= $(SOURCES) -km -dll -ext: .c .cpp .h .C .CPP .H\\r
 #      -preserveext:.cpp .h\\r
-       -scan:..\inc\mlx4_debug.h \\r
+       -scan:..\..\inc\mlx4_debug.h \\r
        -func:MLX4_PRINT(LEVEL,FLAGS,(MSG,...)) \\r
        -func:MLX4_PRINT_EXIT(LEVEL,FLAGS,(MSG,...)) \r
 !ENDIF\r
index e3faf50..25323d4 100644 (file)
@@ -23,9 +23,12 @@ Environment:
 \r
 #include "precomp.h"\r
 \r
-#if defined(EVENT_TRACING)\r
-#include "wmi.tmh"\r
+#if defined (EVENT_TRACING)\r
+#ifdef offsetof\r
+#undef offsetof\r
 #endif\r
+#include "wmi.tmh"\r
+#endif \r
 \r
 #ifdef ALLOC_PRAGMA\r
 #pragma alloc_text(PAGE,WmiRegistration)\r
index 7216a5b..4a940f0 100644 (file)
@@ -5,7 +5,7 @@ TARGETTYPE=DRIVER_LIBRARY
 \r
 \r
 !if $(FREEBUILD)\r
-#ENABLE_EVENT_TRACING=1\r
+ENABLE_EVENT_TRACING=1\r
 !else\r
 #ENABLE_EVENT_TRACING=1\r
 !endif\r
@@ -37,7 +37,7 @@ TARGETLIBS= \
 C_DEFINES = $(C_DEFINES) -DEVENT_TRACING\r
 \r
 RUN_WPP = $(SOURCES) -km -ext: .c .h .C .H \\r
-       -scan:..\inc\mlx4_debug.h \\r
+       -scan:..\..\inc\mlx4_debug.h \\r
        -func:MLX4_PRINT(LEVEL,FLAGS,(MSG,...)) \\r
        -func:MLX4_PRINT_EXIT(LEVEL,FLAGS,(MSG,...)) \r
 !ENDIF\r
index 579d479..2cedea6 100644 (file)
 #include "qp.h"\r
 #include "user.h"\r
 \r
+#if defined(EVENT_TRACING)\r
+#ifdef offsetof\r
+#undef offsetof\r
+#endif\r
+#include "cq.tmh"\r
+#endif\r
+\r
+\r
 static void mlx4_ib_cq_comp(struct mlx4_cq *cq)\r
 {\r
        struct ib_cq *ibcq = &to_mibcq(cq)->ibcq;\r
index 01ba48c..4a055d9 100644 (file)
 #include <ib_smi.h>
 #include "cmd.h"
 
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "mad.tmh"
+#endif
+
+
 enum {
        MLX4_IB_VENDOR_CLASS1 = 0x9,
        MLX4_IB_VENDOR_CLASS2 = 0xa
index e1c89e5..37441cf 100644 (file)
@@ -5,7 +5,7 @@ TARGETTYPE=DRIVER_LIBRARY
 \r
 \r
 !if $(FREEBUILD)\r
-#ENABLE_EVENT_TRACING=1\r
+ENABLE_EVENT_TRACING=1\r
 !else\r
 #ENABLE_EVENT_TRACING=1\r
 !endif\r
@@ -46,7 +46,7 @@ TARGETLIBS= \
 C_DEFINES = $(C_DEFINES) -DEVENT_TRACING\r
 \r
 RUN_WPP = $(SOURCES) -km -ext: .c .h .C .H \\r
-       -scan:..\mlx4_debug.h \\r
+       -scan:..\..\inc\mlx4_debug.h \\r
        -func:MLX4_PRINT(LEVEL,FLAGS,(MSG,...)) \\r
        -func:MLX4_PRINT_EXIT(LEVEL,FLAGS,(MSG,...)) \r
 !ENDIF\r
index 62a074e..52d999f 100644 (file)
  */
 
 #include "mlx4.h"
+#include <mlx4_debug.h>
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "alloc.tmh"
+#endif
+
 
 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap)
 {
@@ -214,7 +223,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
                        buf->npages *= 2;
                }
                MLX4_PRINT( TRACE_LEVEL_INFORMATION, MLX4_DBG_CQ,
-                       ("size %#x, nbufs %d, pages %d, page_shift %d, kva %p, da %llx, buf_size %#x\n",
+                       ("size %#x, nbufs %d, pages %d, page_shift %d, kva %p, da %I64x, buf_size %#x\n",
                        size, buf->nbufs, buf->npages, buf->page_shift, 
                        buf->u.direct.buf, t.da, t.sz ));
                memset(buf->u.direct.buf, 0, size);
index 9fed0ad..3dab6b0 100644 (file)
 #include "cmd.h"
 #include "icm.h"
 #include "cq.h"
+#include <mlx4_debug.h>
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "cq.tmh"
+#endif
+
 
 #define MLX4_CQ_STATUS_OK              ( 0 << 28)
 #define MLX4_CQ_STATUS_OVERFLOW                ( 9 << 28)
index 3a1d92e..1273d77 100644 (file)
 #include "device.h"
 #include "doorbell.h"
 #include "complib\cl_thread.h"
+#include <mlx4_debug.h>
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "main.tmh"
+#endif
 
 
 static struct mlx4_profile default_profile = {
index ab9c297..4a25791 100644 (file)
@@ -17,7 +17,7 @@ ENABLE_EVENT_TRACING=1
 !endif\r
 \r
 SOURCES= \\r
-       hca.rc                  \\r
+       hca.rc                  \\r
        av.c                    \\r
        ca.c                    \\r
        cq.c                    \\r
@@ -25,12 +25,12 @@ SOURCES= \
        direct.c                \\r
        drv.c                   \\r
        fw.c                    \\r
-       mcast.c                 \\r
+       mcast.c                 \\r
        mr.c                    \\r
        pd.c                    \\r
        qp.c                    \\r
        srq.c                   \\r
-       verbs.c                 \\r
+       hverbs.c                \\r
        vp.c                    \\r
        wmi.c                   \\r
 \r
similarity index 96%
rename from hw/mlx4/kernel/hca/verbs.c
rename to hw/mlx4/kernel/hca/hverbs.c
index 44969d9..4fcf5b1 100644 (file)
@@ -38,7 +38,7 @@
 #ifdef offsetof\r
 #undef offsetof\r
 #endif\r
-#include "verbs.tmh"\r
+#include "hverbs.tmh"\r
 #endif\r
 \r
 \r
index a2f8f99..1d31618 100644 (file)
@@ -39,7 +39,7 @@
 #include "public.h"\r
 #include "debug.h"\r
 #include "l2w.h"\r
-#include "verbs.h"\r
+#include "hverbs.h"\r
 #include "mlx4_ib.h"\r
 #include "drv.h"\r
 #include "mx_abi.h"\r
index 76e8d2e..d9b21bc 100644 (file)
@@ -93,7 +93,7 @@ end:
        WPP_DEFINE_BIT( MLX4_DBG_INIT) \\r
        WPP_DEFINE_BIT( MLX4_DBG_MAD) \\r
        WPP_DEFINE_BIT( MLX4_DBG_PO) \\r
-       WPP_DEFINE_BIT( MLX4_DBG_PD)\\r
+       WPP_DEFINE_BIT( MLX4_DBG_PD) \\r
        WPP_DEFINE_BIT( MLX4_DBG_CQ) \\r
        WPP_DEFINE_BIT( MLX4_DBG_QP) \\r
        WPP_DEFINE_BIT( MLX4_DBG_MEMORY) \\r
@@ -101,8 +101,8 @@ end:
        WPP_DEFINE_BIT( MLX4_DBG_SRQ) \\r
        WPP_DEFINE_BIT( MLX4_DBG_MCAST) \\r
        WPP_DEFINE_BIT( MLX4_DBG_LOW) \\r
-       WPP_DEFINE_BIT( MLX4_DBG_SHIM)) \\r
-       WPP_DEFINE_BIT( MLX4_DBG_DRV))\r
+       WPP_DEFINE_BIT( MLX4_DBG_SHIM) \\r
+       WPP_DEFINE_BIT( MLX4_DBG_DRV) )\r
 \r
 \r
 #define WPP_GLOBALLOGGER\r