aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-04-04 21:11:02 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:59 -0400
commit321a8e9dcb714f3c350ba55e41ed447bf3f05fac (patch)
treee75ca8ebcee0954dc6e313864ebba9f72e984fc8 /include/linux/cpumask.h
parent7c16ec585c558960a508ccf9a08fcb9ed49b3754 (diff)
cpumask: add CPU_MASK_ALL_PTR macro
* Add a static cpumask_t variable "CPU_MASK_ALL_PTR" to use as a pointer reference to CPU_MASK_ALL. This reduces where possible the instances where CPU_MASK_ALL allocates and fills a large array on the stack. Used only if NR_CPUS > BITS_PER_LONG. * Change init/main.c to use new set_cpus_allowed_ptr(). Depends on: [sched-devel]: sched: add new set_cpus_allowed_ptr function Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 67e0e38d32b1..629102feaa66 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -243,6 +243,8 @@ int __next_cpu(int n, const cpumask_t *srcp);
243 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 243 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
244} } 244} }
245 245
246#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)
247
246#else 248#else
247 249
248#define CPU_MASK_ALL \ 250#define CPU_MASK_ALL \
@@ -251,6 +253,10 @@ int __next_cpu(int n, const cpumask_t *srcp);
251 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 253 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
252} } 254} }
253 255
256/* cpu_mask_all is in init/main.c */
257extern cpumask_t cpu_mask_all;
258#define CPU_MASK_ALL_PTR (&cpu_mask_all)
259
254#endif 260#endif
255 261
256#define CPU_MASK_NONE \ 262#define CPU_MASK_NONE \