aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:10:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:10:33 -0500
commitcfa97f993c275d193fe82c22511dfb5f1e51b661 (patch)
tree552cea5db0ef07bbcc5d53850607dcda6f9b664c /kernel/sched.c
parent7238eb4ca35cd63340dc02caf757376e40c1210c (diff)
parentdb2f59c8c9b315f2b88b1dac159b988c6009034d (diff)
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: fix section mismatch sched: fix double kfree in failure path sched: clean up arch_reinit_sched_domains() sched: mark sched_create_sysfs_power_savings_entries() as __init getrusage: RUSAGE_THREAD should return ru_utime and ru_stime sched: fix sched_slice() sched_clock: prevent scd->clock from moving backwards, take #2 sched: sched.c declare variables before they get used
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 545c6fccd1dc..2e3545f57e77 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6957,7 +6957,7 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
6957 spin_unlock_irqrestore(&rq->lock, flags); 6957 spin_unlock_irqrestore(&rq->lock, flags);
6958} 6958}
6959 6959
6960static int init_rootdomain(struct root_domain *rd, bool bootmem) 6960static int __init_refok init_rootdomain(struct root_domain *rd, bool bootmem)
6961{ 6961{
6962 memset(rd, 0, sizeof(*rd)); 6962 memset(rd, 0, sizeof(*rd));
6963 6963
@@ -6970,7 +6970,7 @@ static int init_rootdomain(struct root_domain *rd, bool bootmem)
6970 } 6970 }
6971 6971
6972 if (!alloc_cpumask_var(&rd->span, GFP_KERNEL)) 6972 if (!alloc_cpumask_var(&rd->span, GFP_KERNEL))
6973 goto free_rd; 6973 goto out;
6974 if (!alloc_cpumask_var(&rd->online, GFP_KERNEL)) 6974 if (!alloc_cpumask_var(&rd->online, GFP_KERNEL))
6975 goto free_span; 6975 goto free_span;
6976 if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL)) 6976 if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
@@ -6986,8 +6986,7 @@ free_online:
6986 free_cpumask_var(rd->online); 6986 free_cpumask_var(rd->online);
6987free_span: 6987free_span:
6988 free_cpumask_var(rd->span); 6988 free_cpumask_var(rd->span);
6989free_rd: 6989out:
6990 kfree(rd);
6991 return -ENOMEM; 6990 return -ENOMEM;
6992} 6991}
6993 6992
@@ -7987,7 +7986,7 @@ match2:
7987} 7986}
7988 7987
7989#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 7988#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
7990int arch_reinit_sched_domains(void) 7989static void arch_reinit_sched_domains(void)
7991{ 7990{
7992 get_online_cpus(); 7991 get_online_cpus();
7993 7992
@@ -7996,13 +7995,10 @@ int arch_reinit_sched_domains(void)
7996 7995
7997 rebuild_sched_domains(); 7996 rebuild_sched_domains();
7998 put_online_cpus(); 7997 put_online_cpus();
7999
8000 return 0;
8001} 7998}
8002 7999
8003static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) 8000static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
8004{ 8001{
8005 int ret;
8006 unsigned int level = 0; 8002 unsigned int level = 0;
8007 8003
8008 if (sscanf(buf, "%u", &level) != 1) 8004 if (sscanf(buf, "%u", &level) != 1)
@@ -8023,9 +8019,9 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
8023 else 8019 else
8024 sched_mc_power_savings = level; 8020 sched_mc_power_savings = level;
8025 8021
8026 ret = arch_reinit_sched_domains(); 8022 arch_reinit_sched_domains();
8027 8023
8028 return ret ? ret : count; 8024 return count;
8029} 8025}
8030 8026
8031#ifdef CONFIG_SCHED_MC 8027#ifdef CONFIG_SCHED_MC
@@ -8060,7 +8056,7 @@ static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644,
8060 sched_smt_power_savings_store); 8056 sched_smt_power_savings_store);
8061#endif 8057#endif
8062 8058
8063int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) 8059int __init sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
8064{ 8060{
8065 int err = 0; 8061 int err = 0;
8066 8062