Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54170
b: refs/heads/master
c: 476f353
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 7, 2007
1 parent a38216d commit 60de588
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aee16b3cee2746880e40945a9b5bff4f309cfbc4
refs/heads/master: 476f35348eb8d2a827765992899fea78b7dcc46f
5 changes: 0 additions & 5 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,6 @@ static void __init setup_per_cpu_areas(void)
static void __init smp_init(void)
{
unsigned int cpu;
unsigned highest = 0;

for_each_cpu_mask(cpu, cpu_possible_map)
highest = cpu;
nr_cpu_ids = highest + 1;

/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
Expand Down
8 changes: 8 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5244,6 +5244,11 @@ int __init migration_init(void)
#endif

#ifdef CONFIG_SMP

/* Number of possible processor ids */
int nr_cpu_ids __read_mostly = NR_CPUS;
EXPORT_SYMBOL(nr_cpu_ids);

#undef SCHED_DOMAIN_DEBUG
#ifdef SCHED_DOMAIN_DEBUG
static void sched_domain_debug(struct sched_domain *sd, int cpu)
Expand Down Expand Up @@ -6726,6 +6731,7 @@ int in_sched_functions(unsigned long addr)
void __init sched_init(void)
{
int i, j, k;
int highest_cpu = 0;

for_each_possible_cpu(i) {
struct prio_array *array;
Expand Down Expand Up @@ -6760,11 +6766,13 @@ void __init sched_init(void)
// delimiter for bitsearch
__set_bit(MAX_PRIO, array->bitmap);
}
highest_cpu = i;
}

set_load_weight(&init_task);

#ifdef CONFIG_SMP
nr_cpu_ids = highest_cpu + 1;
open_softirq(SCHED_SOFTIRQ, run_rebalance_domains, NULL);
#endif

Expand Down
3 changes: 0 additions & 3 deletions trunk/lib/cpumask.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ int __next_cpu(int n, const cpumask_t *srcp)
}
EXPORT_SYMBOL(__next_cpu);

int nr_cpu_ids;
EXPORT_SYMBOL(nr_cpu_ids);

int __any_online_cpu(const cpumask_t *mask)
{
int cpu;
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
}

#if MAX_NUMNODES > 1
int nr_node_ids __read_mostly;
int nr_node_ids __read_mostly = MAX_NUMNODES;
EXPORT_SYMBOL(nr_node_ids);

/*
Expand Down

0 comments on commit 60de588

Please sign in to comment.