AC_MSG_RESULT([disabled])
else
o2ib_found=false
-
for O2IBPATH in $O2IBPATHS; do
if test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \
-f ${O2IBPATH}/include/rdma/ib_cm.h -a \
break
fi
done
-
if ! $o2ib_found; then
AC_MSG_RESULT([no])
case $ENABLEO2IB in
*) AC_MSG_ERROR([internal error]);;
esac
else
- # figure out whether the kernel has an infiniband stack
- # configured
- LB_LINUX_CONFIG_IM([INFINIBAND],[
- CONFIG_INFINIBAND_MODULE_defined=true
- ],[
- CONFIG_INFINIBAND_MODULE_defined=false
- ])
- # at this point we know that the user either explicitly
- # requested o2ib support or didn't explicitly disable it so
- # make sure the kernel's CONFIG_INFINIBAND variable is set
- # appropriately.
- #
- # possible error conditions are:
- # 1) --with-o2ib[=yes] (implies in kernel since no path was
- # given) and kernel not configured for IB
- # 2) --with-o2ib=/path and kernel is configured for IB
- #
- if test "$O2IBPATH" = "$LINUX" -o "$O2IBPATH" = "$LINUX/drivers/infiniband"; then
- # infiniband stack is in the kernel
- if test $ENABLEO2IB -eq 1 -o $ENABLEO2IB -eq 2 && ! $CONFIG_INFINIBAND_MODULE_defined; then
- # case #1
- AC_MSG_ERROR([Kernel supplied OFED drivers are being requested however the kernel is NOT configured to build OFED modules. Please specify --with-o2ib=<path_to_ofed> or rebuild the kernel with Infiniband enabled.])
- fi
- else
- # had to be a specified path with --with-o2ib=/path
- if $CONFIG_INFINIBAND_MODULE_defined; then
- # case #2
- AC_MSG_ERROR([External OFED source has been specified but the kernel is configured to build OFED modules as well. Remove --with-o2ib from the configuration or rebuild the kernel without Infiniband.])
- fi
- fi
- if $o2ib_found; then
O2IBCPPFLAGS="-I$O2IBPATH/include"
EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
- EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"
+ EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE $O2IBCPPFLAGS"
+
LB_LINUX_TRY_COMPILE([
#include <linux/version.h>
#include <linux/pci.h>
break;
fi
done
- if test -n $O2IB_SYMVER ; then
+ if test -n "$O2IB_SYMVER"; then
AC_MSG_NOTICE([adding $O2IBPATH/$O2IB_SYMVER to $PWD/$SYMVERFILE])
# strip out the existing symbols versions first
+ if test -f $PWD/$SYMVERFILE; then
egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
+ else
+ touch $PWD/$SYMVERFILE.old
+ fi
cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
+ rm $PWD/$SYMVERFILE.old
else
AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
fi
fi
- LB_LINUX_TRY_COMPILE([
- #include <linux/version.h>
- #include <linux/pci.h>
- #if !HAVE_GFP_T
- typedef int gfp_t;
- #endif
- #include <rdma/ib_verbs.h>
- ],[
- ib_dma_map_single(NULL, NULL, 0, 0);
- return 0;
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_OFED_IB_DMA_MAP, 1,
- [ib_dma_map_single defined])
- ],[
- AC_MSG_RESULT(NO)
- ])
-
- LB_LINUX_TRY_COMPILE([
- #include <linux/version.h>
- #include <linux/pci.h>
- #if !HAVE_GFP_T
- typedef int gfp_t;
- #endif
- #include <rdma/ib_verbs.h>
- ],[
- ib_create_cq(NULL, NULL, NULL, NULL, 0, 0);
- return 0;
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_OFED_IB_COMP_VECTOR, 1,
- [has completion vector])
- ],[
- AC_MSG_RESULT(NO)
- ])
-
+ LN_CONFIG_OFED_SPEC
EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
fi
- fi
fi
AC_SUBST(EXTRA_LNET_INCLUDE)
])
+#
+# LN_FUNC_DUMP_TRACE
+#
+# 2.6.23 exports dump_trace() so we can dump_stack() on any task
+# 2.6.24 has stacktrace_ops.address with "reliable" parameter
+#
+AC_DEFUN([LN_FUNC_DUMP_TRACE],
+[LB_CHECK_SYMBOL_EXPORT([dump_trace],
+[kernel/ksyms.c arch/${LINUX_ARCH%_64}/kernel/traps_64.c],[
+ AC_DEFINE(HAVE_DUMP_TRACE, 1, [dump_trace is exported])
+ AC_MSG_CHECKING([whether print_trace_address has reliable argument])
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Werror"
+ LB_LINUX_TRY_COMPILE([
+ struct task_struct;
+ struct pt_regs;
+ void print_addr(void *data, unsigned long addr, int reliable);
+ #include <asm/stacktrace.h>
+ ],[
+ struct stacktrace_ops ops;
+
+ ops.address = print_addr;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TRACE_ADDRESS_RELIABLE, 1,
+ [print_trace_address has reliable argument])
+ ],[
+ AC_MSG_RESULT(no)
+ ],[
+ ])
+EXTRA_KCFLAGS="$tmp_flags"
+])
+])
#
# LN_PROG_LINUX
LN_CONFIG_RALND
LN_CONFIG_PTLLND
LN_CONFIG_MX
+LN_FUNC_DUMP_TRACE
])
#