Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99997
b: refs/heads/master
c: 329513a
h: refs/heads/master
i:
  99995: d6c8584
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 993a3cd commit 8c0f7fe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 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: 5f4765f96eebee6a0adc4009758b597ba48a0a3a
refs/heads/master: 329513a35d1a2b6b28d54f5c2c0dde4face8200b
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ void __init setup_arch(char **cmdline_p)
get_smp_config();
#endif

prefill_possible_map();
#ifdef CONFIG_X86_64
init_cpu_to_node();
#endif
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/x86/kernel/setup_percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,6 @@ void __init setup_per_cpu_areas(void)
char *ptr;
int cpu;

/* no processor from mptable or madt */
if (!num_processors)
num_processors = 1;

#ifdef CONFIG_HOTPLUG_CPU
prefill_possible_map();
#else
nr_cpu_ids = num_processors;
#endif

/* Setup cpu_pda map */
setup_cpu_pda_map();

Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,12 +1278,20 @@ __init void prefill_possible_map(void)
int i;
int possible;

/* no processor from mptable or madt */
if (!num_processors)
num_processors = 1;

#ifdef CONFIG_HOTPLUG_CPU
if (additional_cpus == -1) {
if (disabled_cpus > 0)
additional_cpus = disabled_cpus;
else
additional_cpus = 0;
}
#else
additional_cpus = 0;
#endif
possible = num_processors + additional_cpus;
if (possible > NR_CPUS)
possible = NR_CPUS;
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-x86/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ static inline int num_booting_cpus(void)
{
return cpus_weight(cpu_callout_map);
}
#else
static inline void prefill_possible_map(void)
{
}
#endif /* CONFIG_SMP */

extern unsigned disabled_cpus __cpuinitdata;
Expand Down

0 comments on commit 8c0f7fe

Please sign in to comment.