From: James Simmons Date: Wed, 10 Jul 2013 19:50:54 +0000 (-0400) Subject: LU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test X-Git-Tag: 2.4.53~52 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=68db57a59c10583eb4bc1db99c0629c8a660b11a LU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test set_cpus_allowed_ptr replaced set_cpus_allowed in v2.6.32. We can remove the test and dead code. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: I684589fd13b52a79fbe4aba6229d89273ff3d9da Reviewed-on: http://review.whamcloud.com/5384 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- diff --git a/libcfs/include/libcfs/linux/linux-prim.h b/libcfs/include/libcfs/linux/linux-prim.h index b0bdb58..634a50b 100644 --- a/libcfs/include/libcfs/linux/linux-prim.h +++ b/libcfs/include/libcfs/linux/linux-prim.h @@ -93,12 +93,6 @@ #define CFS_NR_CPUS 1 #endif -#ifdef HAVE_SET_CPUS_ALLOWED -#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask) -#else -#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed_ptr(t, &(mask)) -#endif - /* * cache */ diff --git a/libcfs/libcfs/linux/linux-cpu.c b/libcfs/libcfs/linux/linux-cpu.c index 95777a8..a708148 100644 --- a/libcfs/libcfs/linux/linux-cpu.c +++ b/libcfs/libcfs/linux/linux-cpu.c @@ -627,11 +627,7 @@ cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) if (cpu_isset(i, *cpumask)) continue; -#ifdef HAVE_SET_CPUS_ALLOWED - rc = set_cpus_allowed(cfs_current(), *cpumask); -#else rc = set_cpus_allowed_ptr(cfs_current(), cpumask); -#endif set_mems_allowed(*nodemask); if (rc == 0) cfs_schedule(); /* switch to allowed CPU */ diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 5a778c2..ec50de0 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -769,19 +769,6 @@ EXTRA_KCFLAGS="-I$LINUX/fs" EXTRA_KCFLAGS=$tmp_flags ]) -# 2.6.32 set_cpus_allowed is no more defined if CONFIG_CPUMASK_OFFSTACK=yes -AC_DEFUN([LC_SET_CPUS_ALLOWED], - [AC_MSG_CHECKING([if kernel defines set_cpus_allowed]) - LB_LINUX_TRY_COMPILE( - [#include ], - [struct task_struct *p = NULL; - cpumask_t mask = { { 0 } }; - (void) set_cpus_allowed(p, mask);], - [AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_SET_CPUS_ALLOWED, 1, - [set_cpus_allowed is exported by the kernel])], - [AC_MSG_RESULT([no])] )]) - # # 2.6.36 fs_struct.lock use spinlock instead of rwlock. # @@ -1599,7 +1586,6 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.32 LC_BLK_QUEUE_MAX_SEGMENTS - LC_SET_CPUS_ALLOWED # 2.6.34 LC_HAVE_DQUOT_FS_DISK_QUOTA diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index 5f8f5c2..ea7b457 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -420,8 +420,8 @@ static int ptlrpcd(void *arg) if (++index >= cfs_num_possible_cpus()) index = 0; } - cfs_set_cpus_allowed(cfs_current(), - *cpumask_of_node(cpu_to_node(index))); + set_cpus_allowed_ptr(cfs_current(), + cpumask_of_node(cpu_to_node(index))); } } #endif