From: Minh Diep Date: Fri, 6 Sep 2013 23:38:12 +0000 (-0700) Subject: LU-3900 autoconf: use set_cpus_allowed_ptr for CPU_AFFINITY X-Git-Tag: 2.4.93~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c8e01ad54bda95ff7bf590ae0592a9fecb17a971 LU-3900 autoconf: use set_cpus_allowed_ptr for CPU_AFFINITY Starting 2.6.32 kernel, set_cpus_allowed only set when CONFIG_CPUMASK_OFFSTACK=n, so we will use set_cpus_allowed_ptr to define CPU_AFFINITY Signed-off-by: Minh Diep Change-Id: I20d4bb2d620d877aadfb042757fd53cc122ee03a Reviewed-on: http://review.whamcloud.com/7582 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin --- diff --git a/libcfs/include/libcfs/linux/linux-cpu.h b/libcfs/include/libcfs/linux/linux-cpu.h index f442f95..097a84b 100644 --- a/libcfs/include/libcfs/linux/linux-cpu.h +++ b/libcfs/include/libcfs/linux/linux-cpu.h @@ -117,7 +117,6 @@ int cfs_cpu_ht_nsiblings(int cpu); * #define cfs_cpu_mask_first(mask) first_cpu(mask) * #define cfs_cpu_mask_any_online(mask) (any_online_cpu(mask) != NR_CPUS) * #define cfs_cpu_mask_for_each(i, mask) for_each_cpu_mask(i, mask) - * #define cfs_cpu_mask_bind(t, mask) set_cpus_allowed(t, mask) * * #define cfs_cpu_mask_copy(dst, src) cpumask_copy(dst, src) * diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 0a1232e..d38581c 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -76,13 +76,13 @@ else LB_LINUX_TRY_COMPILE([ #include ],[ - struct task_struct t; + struct task_struct *t; #if HAVE_CPUMASK_T cpumask_t m; #else unsigned long m; #endif - set_cpus_allowed(&t, m); + set_cpus_allowed_ptr(t, &m); ],[ AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support]) AC_MSG_RESULT([yes])