scst: Switch from the cpu_*() to the cpumask_*() API (merge r5596 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@5646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-06-29 06:10:22 +00:00
parent 7fd827e0ef
commit 42137a23c2
4 changed files with 28 additions and 11 deletions
+4 -8
View File
@@ -4009,8 +4009,7 @@ int iscsi_threads_pool_get(const cpumask_t *cpu_mask,
list_for_each_entry(p, &iscsi_thread_pools_list,
thread_pools_list_entry) {
if ((cpu_mask == NULL) ||
__cpus_equal(cpu_mask, &p->cpu_mask, nr_cpumask_bits)) {
if (!cpu_mask || cpumask_equal(cpu_mask, &p->cpu_mask)) {
p->thread_pool_ref++;
TRACE_DBG("iSCSI thread pool %p found (new ref %d)",
p, p->thread_pool_ref);
@@ -4044,12 +4043,9 @@ int iscsi_threads_pool_get(const cpumask_t *cpu_mask,
INIT_LIST_HEAD(&p->wr_list);
init_waitqueue_head(&p->wr_waitQ);
if (cpu_mask == NULL)
cpus_setall(p->cpu_mask);
else {
cpus_clear(p->cpu_mask);
for_each_cpu(i, cpu_mask)
cpu_set(i, p->cpu_mask);
}
cpumask_setall(&p->cpu_mask);
else
cpumask_copy(&p->cpu_mask, cpu_mask);
p->thread_pool_ref = 1;
INIT_LIST_HEAD(&p->threads_list);