aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/workqueue.h3
-rw-r--r--kernel/workqueue.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index a94e4e84e7b1..426c39c2aaa4 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -57,8 +57,7 @@ enum {
57 57
58 /* special cpu IDs */ 58 /* special cpu IDs */
59 WORK_CPU_UNBOUND = NR_CPUS, 59 WORK_CPU_UNBOUND = NR_CPUS,
60 WORK_CPU_NONE = NR_CPUS + 1, 60 WORK_CPU_END = NR_CPUS + 1,
61 WORK_CPU_LAST = WORK_CPU_NONE,
62 61
63 /* 62 /*
64 * Reserve 7 bits off of cwq pointer w/ debugobjects turned 63 * Reserve 7 bits off of cwq pointer w/ debugobjects turned
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 577de1073f24..7e11334a119f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -258,7 +258,7 @@ static inline int __next_wq_cpu(int cpu, const struct cpumask *mask,
258 if (sw & 2) 258 if (sw & 2)
259 return WORK_CPU_UNBOUND; 259 return WORK_CPU_UNBOUND;
260 } 260 }
261 return WORK_CPU_NONE; 261 return WORK_CPU_END;
262} 262}
263 263
264static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask, 264static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask,
@@ -282,17 +282,17 @@ static inline int __next_cwq_cpu(int cpu, const struct cpumask *mask,
282 */ 282 */
283#define for_each_wq_cpu(cpu) \ 283#define for_each_wq_cpu(cpu) \
284 for ((cpu) = __next_wq_cpu(-1, cpu_possible_mask, 3); \ 284 for ((cpu) = __next_wq_cpu(-1, cpu_possible_mask, 3); \
285 (cpu) < WORK_CPU_NONE; \ 285 (cpu) < WORK_CPU_END; \
286 (cpu) = __next_wq_cpu((cpu), cpu_possible_mask, 3)) 286 (cpu) = __next_wq_cpu((cpu), cpu_possible_mask, 3))
287 287
288#define for_each_online_wq_cpu(cpu) \ 288#define for_each_online_wq_cpu(cpu) \
289 for ((cpu) = __next_wq_cpu(-1, cpu_online_mask, 3); \ 289 for ((cpu) = __next_wq_cpu(-1, cpu_online_mask, 3); \
290 (cpu) < WORK_CPU_NONE; \ 290 (cpu) < WORK_CPU_END; \
291 (cpu) = __next_wq_cpu((cpu), cpu_online_mask, 3)) 291 (cpu) = __next_wq_cpu((cpu), cpu_online_mask, 3))
292 292
293#define for_each_cwq_cpu(cpu, wq) \ 293#define for_each_cwq_cpu(cpu, wq) \
294 for ((cpu) = __next_cwq_cpu(-1, cpu_possible_mask, (wq)); \ 294 for ((cpu) = __next_cwq_cpu(-1, cpu_possible_mask, (wq)); \
295 (cpu) < WORK_CPU_NONE; \ 295 (cpu) < WORK_CPU_END; \
296 (cpu) = __next_cwq_cpu((cpu), cpu_possible_mask, (wq))) 296 (cpu) = __next_cwq_cpu((cpu), cpu_possible_mask, (wq)))
297 297
298#ifdef CONFIG_DEBUG_OBJECTS_WORK 298#ifdef CONFIG_DEBUG_OBJECTS_WORK
@@ -3796,7 +3796,7 @@ static int __init init_workqueues(void)
3796 3796
3797 /* make sure we have enough bits for OFFQ pool ID */ 3797 /* make sure we have enough bits for OFFQ pool ID */
3798 BUILD_BUG_ON((1LU << (BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT)) < 3798 BUILD_BUG_ON((1LU << (BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT)) <
3799 WORK_CPU_LAST * NR_STD_WORKER_POOLS); 3799 WORK_CPU_END * NR_STD_WORKER_POOLS);
3800 3800
3801 cpu_notifier(workqueue_cpu_up_callback, CPU_PRI_WORKQUEUE_UP); 3801 cpu_notifier(workqueue_cpu_up_callback, CPU_PRI_WORKQUEUE_UP);
3802 hotcpu_notifier(workqueue_cpu_down_callback, CPU_PRI_WORKQUEUE_DOWN); 3802 hotcpu_notifier(workqueue_cpu_down_callback, CPU_PRI_WORKQUEUE_DOWN);