Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350292
b: refs/heads/master
c: 6be1958
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Feb 7, 2013
1 parent d851e31 commit 43164eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 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: 706026c2141113886f61e1ad2738c9a7723ec69c
refs/heads/master: 6be195886ac26abe0194ed1bc7a9224f8a97c310
3 changes: 1 addition & 2 deletions trunk/include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ enum {

/* special cpu IDs */
WORK_CPU_UNBOUND = NR_CPUS,
WORK_CPU_NONE = NR_CPUS + 1,
WORK_CPU_LAST = WORK_CPU_NONE,
WORK_CPU_END = NR_CPUS + 1,

/*
* Reserve 7 bits off of cwq pointer w/ debugobjects turned
Expand Down
10 changes: 5 additions & 5 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static inline int __next_wq_cpu(int cpu, const struct cpumask *mask,
if (sw & 2)
return WORK_CPU_UNBOUND;
}
return WORK_CPU_NONE;
return WORK_CPU_END;
}

static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask,
Expand All @@ -282,17 +282,17 @@ static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask,
*/
#define for_each_wq_cpu(cpu) \
for ((cpu) = __next_wq_cpu(-1, cpu_possible_mask, 3); \
(cpu) < WORK_CPU_NONE; \
(cpu) < WORK_CPU_END; \
(cpu) = __next_wq_cpu((cpu), cpu_possible_mask, 3))

#define for_each_online_wq_cpu(cpu) \
for ((cpu) = __next_wq_cpu(-1, cpu_online_mask, 3); \
(cpu) < WORK_CPU_NONE; \
(cpu) < WORK_CPU_END; \
(cpu) = __next_wq_cpu((cpu), cpu_online_mask, 3))

#define for_each_cwq_cpu(cpu, wq) \
for ((cpu) = __next_cwq_cpu(-1, cpu_possible_mask, (wq)); \
(cpu) < WORK_CPU_NONE; \
(cpu) < WORK_CPU_END; \
(cpu) = __next_cwq_cpu((cpu), cpu_possible_mask, (wq)))

#ifdef CONFIG_DEBUG_OBJECTS_WORK
Expand Down Expand Up @@ -3796,7 +3796,7 @@ static int __init init_workqueues(void)

/* make sure we have enough bits for OFFQ pool ID */
BUILD_BUG_ON((1LU << (BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT)) <
WORK_CPU_LAST * NR_STD_WORKER_POOLS);
WORK_CPU_END * NR_STD_WORKER_POOLS);

cpu_notifier(workqueue_cpu_up_callback, CPU_PRI_WORKQUEUE_UP);
hotcpu_notifier(workqueue_cpu_down_callback, CPU_PRI_WORKQUEUE_DOWN);
Expand Down

0 comments on commit 43164eb

Please sign in to comment.