aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-19 03:22:19 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-19 03:22:19 -0400
commit4200efd9acda4accf24640f1e77d24fdcdb524df (patch)
treeffeda24ae6a9c1b8ca94615e261434d925d2ed2c /kernel/sched.c
parent2d02494f5a90f2e4b3c4c6acc85ec94674cdc431 (diff)
sched: properly define the sched_group::cpumask and sched_domain::span fields
Properly document the variable-size structure tricks we are doing wrt. struct sched_group and sched_domain, and use the field[0] GCC extension instead of defining a vla array. Dont use unions for this, as pointed out by Linus. [ Impact: cleanup, un-confuse Sparse and LLVM ] Reported-by: Jeff Garzik <jeff@garzik.org> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <alpine.LFD.2.01.0905180850110.3301@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 497c09ba61e7..228acae8821f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7948,8 +7948,9 @@ int sched_smt_power_savings = 0, sched_mc_power_savings = 0;
7948 7948
7949/* 7949/*
7950 * The cpus mask in sched_group and sched_domain hangs off the end. 7950 * The cpus mask in sched_group and sched_domain hangs off the end.
7951 * FIXME: use cpumask_var_t or dynamic percpu alloc to avoid wasting space 7951 *
7952 * for nr_cpu_ids < CONFIG_NR_CPUS. 7952 * ( See the the comments in include/linux/sched.h:struct sched_group
7953 * and struct sched_domain. )
7953 */ 7954 */
7954struct static_sched_group { 7955struct static_sched_group {
7955 struct sched_group sg; 7956 struct sched_group sg;