From dd2fff41426dc528aebcd88c793c24813824dc21 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 22 Jul 2003 14:05:22 +0000 Subject: [PATCH] partial merge of b_unify into b_devel (20030722_0202) --- lnet/archdep.m4 | 4 +-- lnet/include/linux/portals_compat25.h | 36 ++++++++++++++++++------- lnet/klnds/socklnd/.cvsignore | 1 + lnet/klnds/socklnd/Makefile.mk | 2 +- lustre/portals/archdep.m4 | 4 +-- lustre/portals/include/linux/portals_compat25.h | 36 ++++++++++++++++++------- lustre/portals/knals/socknal/.cvsignore | 1 + lustre/portals/knals/socknal/Makefile.mk | 2 +- 8 files changed, 62 insertions(+), 24 deletions(-) diff --git a/lnet/archdep.m4 b/lnet/archdep.m4 index 793ee7f..1a7741bc 100644 --- a/lnet/archdep.m4 +++ b/lnet/archdep.m4 @@ -198,7 +198,7 @@ if test $host_cpu != "lib" ; then dnl Get release from version.h RELEASE="`sed -ne 's/-/_/g' -e 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_]*\).*/\1/p' $LINUX/include/linux/version.h`_`date +%Y%m%d%H%M`" changequote([, ]) - + AC_MSG_RESULT($RELEASE) AC_SUBST(RELEASE) @@ -337,5 +337,5 @@ if test $RH_2_4_20 = 1; then AC_MSG_RESULT(redhat-2.4.20) CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20" else - AC_MSG_RESULT($RELEASE) + AC_MSG_RESULT($LINUXRELEASE) fi diff --git a/lnet/include/linux/portals_compat25.h b/lnet/include/linux/portals_compat25.h index 661d1ee..a7cb4d1 100644 --- a/lnet/include/linux/portals_compat25.h +++ b/lnet/include/linux/portals_compat25.h @@ -1,3 +1,9 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +#ifndef _PORTALS_COMPAT_H +#define _PORTALS_COMPAT_H + // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved #if SPINLOCK_DEBUG # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) @@ -13,26 +19,38 @@ // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) -# define SIGNAL_MASK_LOCK(task, flags) \ + +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sighand->siglock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sighand->siglock, flags) +# define USERMODEHELPER(path, argv, envp) \ + call_usermodehelper(path, argv, envp, 1) # define RECALC_SIGPENDING recalc_sigpending() -#else -# define SIGNAL_MASK_LOCK(task, flags) \ +# define CURRENT_SECONDS get_seconds() + +#else /* 2.4.x */ + +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sigmask_lock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sigmask_lock, flags) +# define USERMODEHELPER(path, argv, envp) \ + call_usermodehelper(path, argv, envp) # define RECALC_SIGPENDING recalc_sigpending(current) +# define CURRENT_SECONDS CURRENT_TIME + #endif #if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) -# define THREAD_NAME(comm, fmt, a...) \ - sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) #elif defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -# define THREAD_NAME(comm, fmt, a...) \ +# define THREAD_NAME(comm, fmt, a...) \ sprintf(comm, fmt "|%d", ## a, current->thread.mode.tt.extern_pid) #else # define THREAD_NAME(comm, fmt, a...) \ - sprintf(comm, fmt, ## a) + sprintf(comm, fmt, ## a) #endif + +#endif /* _PORTALS_COMPAT_H */ diff --git a/lnet/klnds/socklnd/.cvsignore b/lnet/klnds/socklnd/.cvsignore index e995588..95973d6 100644 --- a/lnet/klnds/socklnd/.cvsignore +++ b/lnet/klnds/socklnd/.cvsignore @@ -1,3 +1,4 @@ .deps Makefile Makefile.in +.*.o.cmd diff --git a/lnet/klnds/socklnd/Makefile.mk b/lnet/klnds/socklnd/Makefile.mk index 46edf01..5c1b366 100644 --- a/lnet/klnds/socklnd/Makefile.mk +++ b/lnet/klnds/socklnd/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include ../../Kernelenv +include $(src)/../../Kernelenv obj-y += ksocknal.o ksocknal-objs := socknal.o socknal_cb.o diff --git a/lustre/portals/archdep.m4 b/lustre/portals/archdep.m4 index 793ee7f..1a7741bc 100644 --- a/lustre/portals/archdep.m4 +++ b/lustre/portals/archdep.m4 @@ -198,7 +198,7 @@ if test $host_cpu != "lib" ; then dnl Get release from version.h RELEASE="`sed -ne 's/-/_/g' -e 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_]*\).*/\1/p' $LINUX/include/linux/version.h`_`date +%Y%m%d%H%M`" changequote([, ]) - + AC_MSG_RESULT($RELEASE) AC_SUBST(RELEASE) @@ -337,5 +337,5 @@ if test $RH_2_4_20 = 1; then AC_MSG_RESULT(redhat-2.4.20) CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20" else - AC_MSG_RESULT($RELEASE) + AC_MSG_RESULT($LINUXRELEASE) fi diff --git a/lustre/portals/include/linux/portals_compat25.h b/lustre/portals/include/linux/portals_compat25.h index 661d1ee..a7cb4d1 100644 --- a/lustre/portals/include/linux/portals_compat25.h +++ b/lustre/portals/include/linux/portals_compat25.h @@ -1,3 +1,9 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +#ifndef _PORTALS_COMPAT_H +#define _PORTALS_COMPAT_H + // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved #if SPINLOCK_DEBUG # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) @@ -13,26 +19,38 @@ // XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) -# define SIGNAL_MASK_LOCK(task, flags) \ + +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sighand->siglock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sighand->siglock, flags) +# define USERMODEHELPER(path, argv, envp) \ + call_usermodehelper(path, argv, envp, 1) # define RECALC_SIGPENDING recalc_sigpending() -#else -# define SIGNAL_MASK_LOCK(task, flags) \ +# define CURRENT_SECONDS get_seconds() + +#else /* 2.4.x */ + +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sigmask_lock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sigmask_lock, flags) +# define USERMODEHELPER(path, argv, envp) \ + call_usermodehelper(path, argv, envp) # define RECALC_SIGPENDING recalc_sigpending(current) +# define CURRENT_SECONDS CURRENT_TIME + #endif #if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) -# define THREAD_NAME(comm, fmt, a...) \ - sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) #elif defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -# define THREAD_NAME(comm, fmt, a...) \ +# define THREAD_NAME(comm, fmt, a...) \ sprintf(comm, fmt "|%d", ## a, current->thread.mode.tt.extern_pid) #else # define THREAD_NAME(comm, fmt, a...) \ - sprintf(comm, fmt, ## a) + sprintf(comm, fmt, ## a) #endif + +#endif /* _PORTALS_COMPAT_H */ diff --git a/lustre/portals/knals/socknal/.cvsignore b/lustre/portals/knals/socknal/.cvsignore index e995588..95973d6 100644 --- a/lustre/portals/knals/socknal/.cvsignore +++ b/lustre/portals/knals/socknal/.cvsignore @@ -1,3 +1,4 @@ .deps Makefile Makefile.in +.*.o.cmd diff --git a/lustre/portals/knals/socknal/Makefile.mk b/lustre/portals/knals/socknal/Makefile.mk index 46edf01..5c1b366 100644 --- a/lustre/portals/knals/socknal/Makefile.mk +++ b/lustre/portals/knals/socknal/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include ../../Kernelenv +include $(src)/../../Kernelenv obj-y += ksocknal.o ksocknal-objs := socknal.o socknal_cb.o -- 1.8.3.1