summaryrefslogtreecommitdiff
path: root/lib/cpumask.c
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.com>2014-06-29 12:54:56 +0400
committerDavid S. Miller <davem@davemloft.net>2014-07-03 05:29:23 +0400
commit143b5ba21b2bd5091cd8dcd92de7ba1ed1d1c83c (patch)
treec30660d72d6b31b44872b1b1e756be8a81a179a1 /lib/cpumask.c
parent35f6f45368632f21bd27559c44dbb1cab51d8947 (diff)
downloadlinux-143b5ba21b2bd5091cd8dcd92de7ba1ed1d1c83c.tar.xz
lib/cpumask: cpumask_set_cpu_local_first to use all cores when numa node is not defined
When device is non numa aware (numa_node == -1), use all online cpu's. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/cpumask.c')
-rw-r--r--lib/cpumask.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c
index c101230658eb..b6513a9f2892 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -191,7 +191,7 @@ int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
i %= num_online_cpus();
- if (!cpumask_of_node(numa_node)) {
+ if (numa_node == -1 || !cpumask_of_node(numa_node)) {
/* Use all online cpu's for non numa aware system */
cpumask_copy(mask, cpu_online_mask);
} else {