Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lnet / klnds / viblnd / viblnd.h
index 12c8df4..f3a5e19 100644 (file)
@@ -25,8 +25,9 @@
 #ifndef EXPORT_SYMTAB
 # define EXPORT_SYMTAB
 #endif
-
+#ifndef AUTOCONF_INCLUDED
 #include <linux/config.h>
+#endif
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -55,7 +56,7 @@
 
 #define DEBUG_SUBSYSTEM S_LND
 
-#include <libcfs/kp30.h>
+#include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
 
@@ -81,7 +82,7 @@
 # error Invalid GCC version. Must use GCC < 3.0.0 || GCC >= 3.2.3
 #endif
 
-#if CONFIG_SMP
+#ifdef CONFIG_SMP
 # define IBNAL_N_SCHED      num_online_cpus()   /* # schedulers */
 #else
 # define IBNAL_N_SCHED      1                   /* # schedulers */
@@ -169,8 +170,8 @@ typedef struct
 #if IBNAL_USE_FMR
         int              *kib_fmr_remaps;       /* # FMR maps before unmap required */
 #endif
-#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-        struct ctl_table_header *kib_sysctl;    /* sysctl interface */
+#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
+        cfs_sysctl_table_header_t *kib_sysctl;  /* sysctl interface */
 #endif
 } kib_tunables_t;
 
@@ -559,12 +560,16 @@ kibnal_send_keepalive(kib_conn_t *conn)
                            *kibnal_tunables.kib_keepalive*HZ);
 }
 
+#ifndef IBNAL_VOIDSTAR_SGADDR
+# define IBNAL_VOIDSTAR_SGADDR 0
+#endif
+
 #if IBNAL_VOIDSTAR_SGADDR
-# if CONFIG_HIGHMEM
-#  if CONFIG_X86 && CONFIG_HIGHMEM4G
+# if defined(CONFIG_HIGHMEM)
+#  if defined(CONFIG_X86) && defined(CONFIG_HIGHMEM4G)
    /* truncation to void* doesn't matter if 0 <= physmem < 4G
     * so allow x86 with 32 bit phys addrs */
-#  elif CONFIG_IA64
+#  elif defined(CONFIG_IA64)
    /* OK anyway on 64-bit arch */
 #  else
 #   error "Can't support HIGHMEM when vv_scatgat_t::v_address is void *"