Whamcloud - gitweb
Correct fix for 2.6 cpu affinity support
authorjacob <jacob>
Thu, 24 Jun 2004 19:46:57 +0000 (19:46 +0000)
committerjacob <jacob>
Thu, 24 Jun 2004 19:46:57 +0000 (19:46 +0000)
lnet/archdep.m4
lnet/include/linux/portals_compat25.h
lustre/portals/archdep.m4
lustre/portals/include/linux/portals_compat25.h

index a550a4c..c705006 100644 (file)
@@ -530,6 +530,18 @@ if test x$enable_modules != xno ; then
                ],[
                        AC_MSG_RESULT([no])
                ])
+       AC_MSG_CHECKING([if kernel defines cpumask_t])
+       LUSTRE_MODULE_TRY_COMPILE(
+               [
+                       #include <linux/sched.h>
+               ],[
+                       return sizeof (cpumask_t);
+               ],[
+                       AC_MSG_RESULT([yes])
+                       AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
+               ],[
+                       AC_MSG_RESULT([no])
+               ])
 
 
        # ---------- modules? ------------------------
index a9dae01..7fe6dfc 100644 (file)
@@ -82,6 +82,8 @@ extern int is_kernel_text_address(unsigned long addr);
 
 #ifndef HAVE_CPU_ONLINE
 #define cpu_online(cpu) (test_bit(cpu_online_map, &(cpu)))
+#endif
+#ifndef HAVE_CPUMASK_T
 #define cpu_set(cpu, map) (set_bit(cpu, &(map)))
 typedef unsigned long cpumask_t;
 #endif
index a550a4c..c705006 100644 (file)
@@ -530,6 +530,18 @@ if test x$enable_modules != xno ; then
                ],[
                        AC_MSG_RESULT([no])
                ])
+       AC_MSG_CHECKING([if kernel defines cpumask_t])
+       LUSTRE_MODULE_TRY_COMPILE(
+               [
+                       #include <linux/sched.h>
+               ],[
+                       return sizeof (cpumask_t);
+               ],[
+                       AC_MSG_RESULT([yes])
+                       AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
+               ],[
+                       AC_MSG_RESULT([no])
+               ])
 
 
        # ---------- modules? ------------------------
index a9dae01..7fe6dfc 100644 (file)
@@ -82,6 +82,8 @@ extern int is_kernel_text_address(unsigned long addr);
 
 #ifndef HAVE_CPU_ONLINE
 #define cpu_online(cpu) (test_bit(cpu_online_map, &(cpu)))
+#endif
+#ifndef HAVE_CPUMASK_T
 #define cpu_set(cpu, map) (set_bit(cpu, &(map)))
 typedef unsigned long cpumask_t;
 #endif