Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196725
b: refs/heads/master
c: 7b389b2
h: refs/heads/master
i:
  196723: ab1dbe4
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed May 3, 2010
1 parent 1e73241 commit 9d3d331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d0d2d385ca7cc511f7d1c64735a1b4aaefd9a1b
refs/heads/master: 7b389b2cc539dc2dc60b049240942be54958c93a
14 changes: 5 additions & 9 deletions trunk/kernel/padata.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,15 @@ static struct parallel_data *padata_alloc_pd(struct padata_instance *pinst,
if (!alloc_cpumask_var(&pd->cpumask, GFP_KERNEL))
goto err_free_queue;

for_each_possible_cpu(cpu) {
cpumask_and(pd->cpumask, cpumask, cpu_active_mask);

for_each_cpu(cpu, pd->cpumask) {
queue = per_cpu_ptr(pd->queue, cpu);

queue->pd = pd;

if (cpumask_test_cpu(cpu, cpumask)
&& cpumask_test_cpu(cpu, cpu_active_mask)) {
queue->cpu_index = cpu_index;
cpu_index++;
} else
queue->cpu_index = -1;
queue->cpu_index = cpu_index;
cpu_index++;

INIT_LIST_HEAD(&queue->reorder.list);
INIT_LIST_HEAD(&queue->parallel.list);
Expand All @@ -382,8 +380,6 @@ static struct parallel_data *padata_alloc_pd(struct padata_instance *pinst,
atomic_set(&queue->num_obj, 0);
}

cpumask_and(pd->cpumask, cpumask, cpu_active_mask);

num_cpus = cpumask_weight(pd->cpumask);
pd->max_seq_nr = (MAX_SEQ_NR / num_cpus) * num_cpus - 1;

Expand Down

0 comments on commit 9d3d331

Please sign in to comment.