# include <linux/sched.h> /* THREAD_SIZE */
#else
# define THREAD_SIZE 8192
-#endif
+#endif
#ifdef __KERNEL__
-
# ifdef __ia64__
# define CDEBUG_STACK (THREAD_SIZE - \
((unsigned long)__builtin_dwarf_cfa() & \
#if 1
#define CDEBUG(mask, format, a...) \
do { \
- CHECK_STACK(CDEBUG_STACK); \
+ CHECK_STACK(CDEBUG_STACK); \
if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) || \
(portal_debug & (mask) && \
portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24)))) \
portals_debug_msg(DEBUG_SUBSYSTEM, mask, \
__FILE__, __FUNCTION__, __LINE__, \
- CDEBUG_STACK, format, ## a); \
+ CDEBUG_STACK, format, ## a); \
} while (0)
#define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
#ifdef PORTAL_DEBUG
-extern void kportal_assertion_failed(char *expr,char *file,const char *func,const int line);
+extern void kportal_assertion_failed(char *expr, char *file, const char *func,
+ const int line);
#define LASSERT(e) ((e) ? 0 : kportal_assertion_failed( #e , __FILE__, \
__FUNCTION__, __LINE__))
#else
# warning printf has been defined as a macro...
# undef printf
#endif
-void portals_debug_msg (int subsys, int mask, char *file, const char *fn, const int line,
- unsigned long stack, const char *format, ...)
+void portals_debug_msg(int subsys, int mask, char *file, const char *fn,
+ const int line, unsigned long stack,
+ const char *format, ...)
__attribute__ ((format (printf, 7, 8)));
#else
void portals_debug_msg (int subsys, int mask, char *file, const char *fn,
# define DEBUG_SUBSYSTEM S_PORTALS
#include <linux/kp30.h>
-#include <linux/kernel_compat.h>
+#include <linux/portals_compat25.h>
#define DEBUG_OVERFLOW 1024
static char *debug_buf = NULL;
if (debug_buf == NULL)
return -EINVAL;
- CDEBUG(0, "*******************************************************************************\n");
+ CDEBUG(0, "********************************************************\n");
CDEBUG(0, "DEBUG MARKER: %s\n", text);
- CDEBUG(0, "*******************************************************************************\n");
+ CDEBUG(0, "********************************************************\n");
return 0;
}
/* FIXME: I'm not very smart; someone smarter should make this better. */
void
-portals_debug_msg (int subsys, int mask, char *file, const char *fn, const int line,
- unsigned long stack, const char *format, ...)
+portals_debug_msg(int subsys, int mask, char *file, const char *fn,
+ const int line, unsigned long stack, const char *format, ...)
{
va_list ap;
unsigned long flags;
#include <portals/lib-p30.h>
#include <portals/p30.h>
#include <linux/kp30.h>
-#include <linux/kernel_compat.h>
+#include <linux/portals_compat25.h>
#define PORTAL_MINOR 240
struct semaphore nal_cmd_sem;
#ifdef PORTAL_DEBUG
-void kportal_assertion_failed(char *expr, char *file, const char *func,
+void kportal_assertion_failed(char *expr, char *file, const char *func,
const int line)
{
portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK,
# include <linux/sched.h> /* THREAD_SIZE */
#else
# define THREAD_SIZE 8192
-#endif
+#endif
#ifdef __KERNEL__
-
# ifdef __ia64__
# define CDEBUG_STACK (THREAD_SIZE - \
((unsigned long)__builtin_dwarf_cfa() & \
#if 1
#define CDEBUG(mask, format, a...) \
do { \
- CHECK_STACK(CDEBUG_STACK); \
+ CHECK_STACK(CDEBUG_STACK); \
if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) || \
(portal_debug & (mask) && \
portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24)))) \
portals_debug_msg(DEBUG_SUBSYSTEM, mask, \
__FILE__, __FUNCTION__, __LINE__, \
- CDEBUG_STACK, format, ## a); \
+ CDEBUG_STACK, format, ## a); \
} while (0)
#define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
#ifdef PORTAL_DEBUG
-extern void kportal_assertion_failed(char *expr,char *file,const char *func,const int line);
+extern void kportal_assertion_failed(char *expr, char *file, const char *func,
+ const int line);
#define LASSERT(e) ((e) ? 0 : kportal_assertion_failed( #e , __FILE__, \
__FUNCTION__, __LINE__))
#else
# warning printf has been defined as a macro...
# undef printf
#endif
-void portals_debug_msg (int subsys, int mask, char *file, const char *fn, const int line,
- unsigned long stack, const char *format, ...)
+void portals_debug_msg(int subsys, int mask, char *file, const char *fn,
+ const int line, unsigned long stack,
+ const char *format, ...)
__attribute__ ((format (printf, 7, 8)));
#else
void portals_debug_msg (int subsys, int mask, char *file, const char *fn,
# define DEBUG_SUBSYSTEM S_PORTALS
#include <linux/kp30.h>
-#include <linux/kernel_compat.h>
+#include <linux/portals_compat25.h>
#define DEBUG_OVERFLOW 1024
static char *debug_buf = NULL;
if (debug_buf == NULL)
return -EINVAL;
- CDEBUG(0, "*******************************************************************************\n");
+ CDEBUG(0, "********************************************************\n");
CDEBUG(0, "DEBUG MARKER: %s\n", text);
- CDEBUG(0, "*******************************************************************************\n");
+ CDEBUG(0, "********************************************************\n");
return 0;
}
/* FIXME: I'm not very smart; someone smarter should make this better. */
void
-portals_debug_msg (int subsys, int mask, char *file, const char *fn, const int line,
- unsigned long stack, const char *format, ...)
+portals_debug_msg(int subsys, int mask, char *file, const char *fn,
+ const int line, unsigned long stack, const char *format, ...)
{
va_list ap;
unsigned long flags;
#include <portals/lib-p30.h>
#include <portals/p30.h>
#include <linux/kp30.h>
-#include <linux/kernel_compat.h>
+#include <linux/portals_compat25.h>
#define PORTAL_MINOR 240
struct semaphore nal_cmd_sem;
#ifdef PORTAL_DEBUG
-void kportal_assertion_failed(char *expr, char *file, const char *func,
+void kportal_assertion_failed(char *expr, char *file, const char *func,
const int line)
{
portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK,