summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-11-26 15:07:11 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-11-26 15:07:11 +0100
commitab906de0601813dffce00213c6e7a1c7b5fad5fd (patch)
treebfef27b7f34889ea1f289f4affcfcd96e82d764e
parentcbb530bed5770abfae17eb5acaa22b10602e7fd1 (diff)
arm: workqueue: fix get_pool_nr_running()
Unfortunately when merging 15 patches NVIDIA missed 3 resp. 4 lines which failed UP case (e.g. on PXA). The offending commit in question is 9dfdd9ac17ac9955b431cb962df3d0492384ba0e The list of commits the above should have included is as follows: 974271c485a4d8bb801decc616748f90aafb07ec bd7bdd43dcb81bb08240b9401b36a104f77dc135: just some comments missing 63d95a9150ee3bbd4117fcd609dee40313b454d9 11ebea50dbc1ade5994b2c838a096078d4c02399 4ce62e9e30cacc26885cab133ad1de358dd79f21: 2 lines missing 3270476a6c0ce322354df8679652f060d66526dc: one line missing 6575820221f7a4dd6eadecf7bf83cdd154335eda f2d5a0ee06c1813f985bb9386f3ccc0d0315720f 403c821d452c03be4ced571ac91339a9d3631b17 6037315269d62bf967286ae2670fdd6b6acedab9 bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1 25511a477657884d2164f338341fa89652610507 3ce63377305b694f53e7dd0c72907591c5344224 628c78e7ea19d5b70d2b6a59030362168cdbe1ad: just some comments missing 8db25e7891a47e03db6f04344a9c92be16e391bb
-rw-r--r--kernel/workqueue.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index cc09c562e479..b4793408969d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -495,14 +495,12 @@ static struct global_cwq *get_gcwq(unsigned int cpu)
static atomic_t *get_pool_nr_running(struct worker_pool *pool)
{
int cpu = pool->gcwq->cpu;
- atomic_t (*nr_running)[NR_WORKER_POOLS];
+ int idx = worker_pool_pri(pool);
if (cpu != WORK_CPU_UNBOUND)
- nr_running = &per_cpu(pool_nr_running, cpu);
+ return &per_cpu(pool_nr_running, cpu)[idx];
else
- nr_running = &unbound_pool_nr_running;
-
- return nr_running[worker_pool_pri(pool)];
+ return &unbound_pool_nr_running[idx];
}
static struct cpu_workqueue_struct *get_cwq(unsigned int cpu,