[openib-general] kdapl build error on ia64
James Lentini
jlentini at netapp.com
Tue Aug 2 09:25:04 PDT 2005
On Tue, 2 Aug 2005, John Partridge wrote:
> James,
>
> Do you want me to do a patch killing dapl_os_atomic_assign() as far as I can
> see
> it only get used in two places, dapl_rbuf_add() and dapl_rbuf_remove() right
> ?
>
> I'll base the patch off of svn rev 2944 OK ?
>
> John
>
Hi John,
I was just working on one. Here's what I have (note: pine will mess up
the inline patch, please use the attachment if you want to test it
out). I'm going to test it now.
Index: dapl_provider.h
===================================================================
--- dapl_provider.h (revision 2946)
+++ dapl_provider.h (working copy)
@@ -35,8 +35,6 @@
#include "dapl.h"
-extern DAPL_DBG_MASK g_dapl_dbg_mask;
-
extern int dapl_provider_list_search(const char *name,
struct dat_provider **provider);
Index: dapl_ring_buffer_util.c
===================================================================
--- dapl_ring_buffer_util.c (revision 2946)
+++ dapl_ring_buffer_util.c (working copy)
@@ -184,7 +184,7 @@
while (((atomic_read(&rbuf->head) + 1) & rbuf->lim) !=
(atomic_read(&rbuf->tail) & rbuf->lim)) {
pos = atomic_read(&rbuf->head);
- val = dapl_os_atomic_assign(&rbuf->head, pos, pos + 1);
+ val = cmpxchg(&rbuf->head.counter, pos, pos + 1);
if (val == pos) {
pos = (pos + 1) & rbuf->lim; /* verify in range */
rbuf->base[pos] = entry;
@@ -218,7 +218,7 @@
while (atomic_read(&rbuf->head) != atomic_read(&rbuf->tail)) {
pos = atomic_read(&rbuf->tail);
- val = dapl_os_atomic_assign(&rbuf->tail, pos, pos + 1);
+ val = cmpxchg(&rbuf->tail.counter, pos, pos + 1);
if (val == pos) {
pos = (pos + 1) & rbuf->lim; /* verify in range */
return rbuf->base[pos];
Index: Makefile
===================================================================
--- Makefile (revision 2946)
+++ Makefile (working copy)
@@ -7,4 +7,4 @@
dapl_cookie.o dapl_cr.o dapl_ep.o dapl_evd.o \
dapl_hca_util.o dapl_ia.o dapl_lmr.o dapl_provider.o \
dapl_pz.o dapl_ring_buffer_util.o dapl_rmr.o dapl_sp.o \
- dapl_srq.o dapl_util.o
+ dapl_srq.o
Index: dapl_util.c
===================================================================
--- dapl_util.c (revision 2946)
+++ dapl_util.c (working copy)
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- * copy of which is available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id$
- */
-
-#include "dapl.h"
-#include "dapl_provider.h"
-#include "dapl_util.h"
-
-#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-
-void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...)
-{
- char buf[1024];
- va_list args;
-
- if (type & g_dapl_dbg_mask) {
- va_start(args, fmt);
- vsnprintf(buf, sizeof buf, fmt, args);
- printk(KERN_ALERT "kDAPL: %s", buf);
- va_end(args);
- }
-}
-
-#endif /* KDAPL_INFINIBAND_DEBUG */
Index: dapl_util.h
===================================================================
--- dapl_util.h (revision 2946)
+++ dapl_util.h (working copy)
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- * copy of which is available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id$
- */
-
-#ifndef DAPL_UTIL_H
-#define DAPL_UTIL_H
-
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <asm/types.h>
-#include <asm/atomic.h>
-#include <linux/delay.h>
-#include <asm/div64.h> /* needed by hash functions */
-
-#ifdef __ia64__
-#include <asm/atomic.h>
-#include <asm/system.h>
-#endif
-
-/* dapl_os_atomic_assign
- *
- * assign 'new_value' to '*v' if the current value
- * matches the provided 'match_value'.
- *
- * Make no assignment if there is no match.
- *
- * Return the current value in any case.
- *
- * This matches the IBTA atomic operation compare & swap
- * except that it is for local memory and a int may
- * be only 32 bits, rather than 64.
- */
-
-static inline int dapl_os_atomic_assign(atomic_t * v, int match_value,
- int new_value)
-{
- int current_value;
-
- /*
- * Use the Pentium compare and exchange instruction
- */
-
-#ifdef __ia64__
-
- current_value = ia64_cmpxchg("acq", v, match_value, new_value, 4);
-
-#elif defined (__PPC__)
-
- current_value =
- __cmpxchg_u32((volatile int *)v, (int)match_value, (int)new_value);
-
-#else
- current_value = __cmpxchg((volatile void *)v,
- (unsigned long)match_value,
- (unsigned long)new_value, (int)4);
-#endif
- return current_value;
-}
-
-/*
- * *printf format helper. We use the C string constant concatenation
- * ability to define 64 bit formats, which unfortunatly are non standard
- * in the C compiler world.
- */
-#ifdef __x86_64__
-#define F64x "%lx"
-#else
-#define F64x "%llx"
-#endif
-
-/*
- * Debug Functions
- */
-
-/*
- * Use these bits to enable various tracing/debug options. Each bit
- * represents debugging in a particular subsystem or area of the code.
- */
-enum dapl_dbg_type {
- DAPL_DBG_TYPE_ERR = 0x0001,
- DAPL_DBG_TYPE_WARN = 0x0002,
- DAPL_DBG_TYPE_EVD = 0x0004,
- DAPL_DBG_TYPE_CM = 0x0008,
- DAPL_DBG_TYPE_EP = 0x0010,
- DAPL_DBG_TYPE_UTIL = 0x0020,
- DAPL_DBG_TYPE_CALLBACK = 0x0040,
- DAPL_DBG_TYPE_DTO_COMP_ERR = 0x0080,
- DAPL_DBG_TYPE_API = 0x0100,
- DAPL_DBG_TYPE_RTN = 0x0200,
- DAPL_DBG_TYPE_EXCEPTION = 0x0400,
- DAPL_DBG_TYPE_SRQ = 0x0800
-};
-
-typedef int DAPL_DBG_MASK;
-
-#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-extern void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...);
-#else /* !KDAPL_INFINIBAND_DEBUG */
-#define dapl_dbg_log(...)
-#endif /* KDAPL_INFINIBAND_DEBUG */
-
-#endif /* DAPL_UTIL_H */
Index: dapl.h
===================================================================
--- dapl.h (revision 2946)
+++ dapl.h (working copy)
@@ -36,10 +36,12 @@
#define DAPL_H
#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <asm/atomic.h>
#include <kdapl.h>
-#include "dapl_util.h"
#include "ib_verbs.h"
#include "ib_cm.h"
@@ -601,4 +603,37 @@
extern int dapl_srq_set_lw(struct dat_srq *srq, int low_watermark);
-#endif
+/*********************************************************************
+ * *
+ * Debug Functions *
+ * *
+ *********************************************************************/
+
+/*
+ * Use these bits to enable various tracing/debug options. Each bit
+ * represents debugging in a particular subsystem or area of the code.
+ */
+enum dapl_dbg_type {
+ DAPL_DBG_TYPE_ERR = (1 << 0),
+ DAPL_DBG_TYPE_WARN = (1 << 1),
+ DAPL_DBG_TYPE_EVD = (1 << 2),
+ DAPL_DBG_TYPE_CM = (1 << 3),
+ DAPL_DBG_TYPE_EP = (1 << 4),
+ DAPL_DBG_TYPE_UTIL = (1 << 5),
+ DAPL_DBG_TYPE_CALLBACK = (1 << 6),
+ DAPL_DBG_TYPE_DTO_COMP_ERR = (1 << 7),
+ DAPL_DBG_TYPE_API = (1 << 8),
+ DAPL_DBG_TYPE_RTN = (1 << 9),
+ DAPL_DBG_TYPE_EXCEPTION = (1 << 10),
+ DAPL_DBG_TYPE_SRQ = (1 << 11)
+};
+
+typedef int DAPL_DBG_MASK;
+
+#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
+extern void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...);
+#else /* !KDAPL_INFINIBAND_DEBUG */
+#define dapl_dbg_log(...)
+#endif /* KDAPL_INFINIBAND_DEBUG */
+
+#endif /* DAPL_H */
Index: dapl_provider.c
===================================================================
--- dapl_provider.c (revision 2946)
+++ dapl_provider.c (working copy)
@@ -36,7 +36,6 @@
#include "dapl.h"
#include "dapl_hca_util.h"
#include "dapl_provider.h"
-#include "dapl_util.h"
#include "dapl_openib_util.h"
MODULE_LICENSE("Dual BSD/GPL");
@@ -56,7 +55,7 @@
*********************************************************************/
#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-DAPL_DBG_MASK g_dapl_dbg_mask = 0;
+static DAPL_DBG_MASK g_dapl_dbg_mask = 0;
module_param_named(dbg_mask, g_dapl_dbg_mask, int, 0644);
MODULE_PARM_DESC(dbg_mask, "Bitmask to enable debug message types.");
#endif /* CONFIG_KDAPL_INFINIBAND_DEBUG */
@@ -144,6 +143,24 @@
* *
*********************************************************************/
+#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
+
+void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...)
+{
+ char buf[1024];
+ va_list args;
+
+ if (type & g_dapl_dbg_mask) {
+ va_start(args, fmt);
+ vsnprintf(buf, sizeof buf, fmt, args);
+ printk(KERN_ALERT "kDAPL: %s", buf);
+ va_end(args);
+ }
+}
+
+#endif /* KDAPL_INFINIBAND_DEBUG */
+
+
static void dapl_provider_list_destroy(void)
{
struct list_head *cur_list, *next_list;
Index: dapl_openib_cm.c
===================================================================
--- dapl_openib_cm.c (revision 2946)
+++ dapl_openib_cm.c (working copy)
@@ -342,7 +342,7 @@
&cm_ctx->dapl_comp);
if (status) {
printk(KERN_ERR "dapl_path_comp_handler: "
- "ib_at_paths_by_route returned %d id %lld\n",
+ "ib_at_paths_by_route returned %d id %Lu\n",
status, cm_ctx->dapl_comp.req_id);
event = DAT_CONNECTION_EVENT_BROKEN;
goto error;
@@ -413,7 +413,7 @@
&cm_ctx->dapl_comp);
if (status) {
printk(KERN_ERR "dapl_rt_comp_handler: ib_at_paths_by_route "
- "returned %d id %lld\n", status, cm_ctx->dapl_comp.req_id);
+ "returned %d id %Lu\n", status, cm_ctx->dapl_comp.req_id);
event = DAT_CONNECTION_EVENT_BROKEN;
goto error;
}
-------------- next part --------------
Index: dapl_provider.h
===================================================================
--- dapl_provider.h (revision 2946)
+++ dapl_provider.h (working copy)
@@ -35,8 +35,6 @@
#include "dapl.h"
-extern DAPL_DBG_MASK g_dapl_dbg_mask;
-
extern int dapl_provider_list_search(const char *name,
struct dat_provider **provider);
Index: dapl_ring_buffer_util.c
===================================================================
--- dapl_ring_buffer_util.c (revision 2946)
+++ dapl_ring_buffer_util.c (working copy)
@@ -184,7 +184,7 @@
while (((atomic_read(&rbuf->head) + 1) & rbuf->lim) !=
(atomic_read(&rbuf->tail) & rbuf->lim)) {
pos = atomic_read(&rbuf->head);
- val = dapl_os_atomic_assign(&rbuf->head, pos, pos + 1);
+ val = cmpxchg(&rbuf->head.counter, pos, pos + 1);
if (val == pos) {
pos = (pos + 1) & rbuf->lim; /* verify in range */
rbuf->base[pos] = entry;
@@ -218,7 +218,7 @@
while (atomic_read(&rbuf->head) != atomic_read(&rbuf->tail)) {
pos = atomic_read(&rbuf->tail);
- val = dapl_os_atomic_assign(&rbuf->tail, pos, pos + 1);
+ val = cmpxchg(&rbuf->tail.counter, pos, pos + 1);
if (val == pos) {
pos = (pos + 1) & rbuf->lim; /* verify in range */
return rbuf->base[pos];
Index: Makefile
===================================================================
--- Makefile (revision 2946)
+++ Makefile (working copy)
@@ -7,4 +7,4 @@
dapl_cookie.o dapl_cr.o dapl_ep.o dapl_evd.o \
dapl_hca_util.o dapl_ia.o dapl_lmr.o dapl_provider.o \
dapl_pz.o dapl_ring_buffer_util.o dapl_rmr.o dapl_sp.o \
- dapl_srq.o dapl_util.o
+ dapl_srq.o
Index: dapl_util.c
===================================================================
--- dapl_util.c (revision 2946)
+++ dapl_util.c (working copy)
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- * copy of which is available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id$
- */
-
-#include "dapl.h"
-#include "dapl_provider.h"
-#include "dapl_util.h"
-
-#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-
-void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...)
-{
- char buf[1024];
- va_list args;
-
- if (type & g_dapl_dbg_mask) {
- va_start(args, fmt);
- vsnprintf(buf, sizeof buf, fmt, args);
- printk(KERN_ALERT "kDAPL: %s", buf);
- va_end(args);
- }
-}
-
-#endif /* KDAPL_INFINIBAND_DEBUG */
Index: dapl_util.h
===================================================================
--- dapl_util.h (revision 2946)
+++ dapl_util.h (working copy)
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
- *
- * This Software is licensed under one of the following licenses:
- *
- * 1) under the terms of the "Common Public License 1.0" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/cpl.php.
- *
- * 2) under the terms of the "The BSD License" a copy of which is
- * available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/bsd-license.php.
- *
- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
- * copy of which is available from the Open Source Initiative, see
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * Licensee has the right to choose one of the above licenses.
- *
- * Redistributions of source code must retain the above copyright
- * notice and one of the license notices.
- *
- * Redistributions in binary form must reproduce both the above copyright
- * notice, one of the license notices in the documentation
- * and/or other materials provided with the distribution.
- */
-
-/*
- * $Id$
- */
-
-#ifndef DAPL_UTIL_H
-#define DAPL_UTIL_H
-
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <asm/types.h>
-#include <asm/atomic.h>
-#include <linux/delay.h>
-#include <asm/div64.h> /* needed by hash functions */
-
-#ifdef __ia64__
-#include <asm/atomic.h>
-#include <asm/system.h>
-#endif
-
-/* dapl_os_atomic_assign
- *
- * assign 'new_value' to '*v' if the current value
- * matches the provided 'match_value'.
- *
- * Make no assignment if there is no match.
- *
- * Return the current value in any case.
- *
- * This matches the IBTA atomic operation compare & swap
- * except that it is for local memory and a int may
- * be only 32 bits, rather than 64.
- */
-
-static inline int dapl_os_atomic_assign(atomic_t * v, int match_value,
- int new_value)
-{
- int current_value;
-
- /*
- * Use the Pentium compare and exchange instruction
- */
-
-#ifdef __ia64__
-
- current_value = ia64_cmpxchg("acq", v, match_value, new_value, 4);
-
-#elif defined (__PPC__)
-
- current_value =
- __cmpxchg_u32((volatile int *)v, (int)match_value, (int)new_value);
-
-#else
- current_value = __cmpxchg((volatile void *)v,
- (unsigned long)match_value,
- (unsigned long)new_value, (int)4);
-#endif
- return current_value;
-}
-
-/*
- * *printf format helper. We use the C string constant concatenation
- * ability to define 64 bit formats, which unfortunatly are non standard
- * in the C compiler world.
- */
-#ifdef __x86_64__
-#define F64x "%lx"
-#else
-#define F64x "%llx"
-#endif
-
-/*
- * Debug Functions
- */
-
-/*
- * Use these bits to enable various tracing/debug options. Each bit
- * represents debugging in a particular subsystem or area of the code.
- */
-enum dapl_dbg_type {
- DAPL_DBG_TYPE_ERR = 0x0001,
- DAPL_DBG_TYPE_WARN = 0x0002,
- DAPL_DBG_TYPE_EVD = 0x0004,
- DAPL_DBG_TYPE_CM = 0x0008,
- DAPL_DBG_TYPE_EP = 0x0010,
- DAPL_DBG_TYPE_UTIL = 0x0020,
- DAPL_DBG_TYPE_CALLBACK = 0x0040,
- DAPL_DBG_TYPE_DTO_COMP_ERR = 0x0080,
- DAPL_DBG_TYPE_API = 0x0100,
- DAPL_DBG_TYPE_RTN = 0x0200,
- DAPL_DBG_TYPE_EXCEPTION = 0x0400,
- DAPL_DBG_TYPE_SRQ = 0x0800
-};
-
-typedef int DAPL_DBG_MASK;
-
-#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-extern void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...);
-#else /* !KDAPL_INFINIBAND_DEBUG */
-#define dapl_dbg_log(...)
-#endif /* KDAPL_INFINIBAND_DEBUG */
-
-#endif /* DAPL_UTIL_H */
Index: dapl.h
===================================================================
--- dapl.h (revision 2946)
+++ dapl.h (working copy)
@@ -36,10 +36,12 @@
#define DAPL_H
#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <asm/atomic.h>
#include <kdapl.h>
-#include "dapl_util.h"
#include "ib_verbs.h"
#include "ib_cm.h"
@@ -601,4 +603,37 @@
extern int dapl_srq_set_lw(struct dat_srq *srq, int low_watermark);
-#endif
+/*********************************************************************
+ * *
+ * Debug Functions *
+ * *
+ *********************************************************************/
+
+/*
+ * Use these bits to enable various tracing/debug options. Each bit
+ * represents debugging in a particular subsystem or area of the code.
+ */
+enum dapl_dbg_type {
+ DAPL_DBG_TYPE_ERR = (1 << 0),
+ DAPL_DBG_TYPE_WARN = (1 << 1),
+ DAPL_DBG_TYPE_EVD = (1 << 2),
+ DAPL_DBG_TYPE_CM = (1 << 3),
+ DAPL_DBG_TYPE_EP = (1 << 4),
+ DAPL_DBG_TYPE_UTIL = (1 << 5),
+ DAPL_DBG_TYPE_CALLBACK = (1 << 6),
+ DAPL_DBG_TYPE_DTO_COMP_ERR = (1 << 7),
+ DAPL_DBG_TYPE_API = (1 << 8),
+ DAPL_DBG_TYPE_RTN = (1 << 9),
+ DAPL_DBG_TYPE_EXCEPTION = (1 << 10),
+ DAPL_DBG_TYPE_SRQ = (1 << 11)
+};
+
+typedef int DAPL_DBG_MASK;
+
+#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
+extern void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...);
+#else /* !KDAPL_INFINIBAND_DEBUG */
+#define dapl_dbg_log(...)
+#endif /* KDAPL_INFINIBAND_DEBUG */
+
+#endif /* DAPL_H */
Index: dapl_provider.c
===================================================================
--- dapl_provider.c (revision 2946)
+++ dapl_provider.c (working copy)
@@ -36,7 +36,6 @@
#include "dapl.h"
#include "dapl_hca_util.h"
#include "dapl_provider.h"
-#include "dapl_util.h"
#include "dapl_openib_util.h"
MODULE_LICENSE("Dual BSD/GPL");
@@ -56,7 +55,7 @@
*********************************************************************/
#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
-DAPL_DBG_MASK g_dapl_dbg_mask = 0;
+static DAPL_DBG_MASK g_dapl_dbg_mask = 0;
module_param_named(dbg_mask, g_dapl_dbg_mask, int, 0644);
MODULE_PARM_DESC(dbg_mask, "Bitmask to enable debug message types.");
#endif /* CONFIG_KDAPL_INFINIBAND_DEBUG */
@@ -144,6 +143,24 @@
* *
*********************************************************************/
+#ifdef CONFIG_KDAPL_INFINIBAND_DEBUG
+
+void dapl_dbg_log(enum dapl_dbg_type type, const char *fmt, ...)
+{
+ char buf[1024];
+ va_list args;
+
+ if (type & g_dapl_dbg_mask) {
+ va_start(args, fmt);
+ vsnprintf(buf, sizeof buf, fmt, args);
+ printk(KERN_ALERT "kDAPL: %s", buf);
+ va_end(args);
+ }
+}
+
+#endif /* KDAPL_INFINIBAND_DEBUG */
+
+
static void dapl_provider_list_destroy(void)
{
struct list_head *cur_list, *next_list;
Index: dapl_openib_cm.c
===================================================================
--- dapl_openib_cm.c (revision 2946)
+++ dapl_openib_cm.c (working copy)
@@ -342,7 +342,7 @@
&cm_ctx->dapl_comp);
if (status) {
printk(KERN_ERR "dapl_path_comp_handler: "
- "ib_at_paths_by_route returned %d id %lld\n",
+ "ib_at_paths_by_route returned %d id %Lu\n",
status, cm_ctx->dapl_comp.req_id);
event = DAT_CONNECTION_EVENT_BROKEN;
goto error;
@@ -413,7 +413,7 @@
&cm_ctx->dapl_comp);
if (status) {
printk(KERN_ERR "dapl_rt_comp_handler: ib_at_paths_by_route "
- "returned %d id %lld\n", status, cm_ctx->dapl_comp.req_id);
+ "returned %d id %Lu\n", status, cm_ctx->dapl_comp.req_id);
event = DAT_CONNECTION_EVENT_BROKEN;
goto error;
}
More information about the general
mailing list