summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-03-26 14:23:48 -0700
committerIngo Molnar <mingo@elte.hu>2008-04-19 19:44:59 +0200
commite0982e90cd1ecf59818b137386b7f63debded9cc (patch)
tree3cdbfa8a69dca4a9c9596d61bffa32f1b676f09d /kernel/sched.c
parent4bdbaad33d0f4d0e9818a38a825f5b75c0296a28 (diff)
downloadop-kernel-dev-e0982e90cd1ecf59818b137386b7f63debded9cc.zip
op-kernel-dev-e0982e90cd1ecf59818b137386b7f63debded9cc.tar.gz
init: move setup of nr_cpu_ids to as early as possible
Move the setting of nr_cpu_ids from sched_init() to start_kernel() so that it's available as early as possible. Note that an arch has the option of setting it even earlier if need be, but it should not result in a different value than the setup_nr_cpu_ids() function. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b56d98b..6ab0fcb 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6116,10 +6116,6 @@ void __init migration_init(void)
#ifdef CONFIG_SMP
-/* Number of possible processor ids */
-int nr_cpu_ids __read_mostly = NR_CPUS;
-EXPORT_SYMBOL(nr_cpu_ids);
-
#ifdef CONFIG_SCHED_DEBUG
static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
@@ -7478,7 +7474,6 @@ static void init_tg_rt_entry(struct rq *rq, struct task_group *tg,
void __init sched_init(void)
{
- int highest_cpu = 0;
int i, j;
unsigned long alloc_size = 0, ptr;
@@ -7569,7 +7564,6 @@ void __init sched_init(void)
#endif
init_rq_hrtick(rq);
atomic_set(&rq->nr_iowait, 0);
- highest_cpu = i;
}
set_load_weight(&init_task);
@@ -7579,7 +7573,6 @@ void __init sched_init(void)
#endif
#ifdef CONFIG_SMP
- nr_cpu_ids = highest_cpu + 1;
open_softirq(SCHED_SOFTIRQ, run_rebalance_domains, NULL);
#endif
OpenPOWER on IntegriCloud