Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108671
b: refs/heads/master
c: a58f03b
h: refs/heads/master
i:
  108669: fe0f4a6
  108667: 874cce5
  108663: 975a838
  108655: fbe3b2f
  108639: 3371a81
  108607: 25c6d43
  108543: b556ed9
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Aug 14, 2008
1 parent e06925f commit 0f9aa27
Show file tree
Hide file tree
Showing 2 changed files with 29 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: 858f774733b72609acb28104475f131abb912c08
refs/heads/master: a58f03b07539f6575adaa011712fa139c9343742
38 changes: 28 additions & 10 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,17 +994,7 @@ int __cpuinit native_cpu_up(unsigned int cpu)
flush_tlb_all();
low_mappings = 1;

#ifdef CONFIG_X86_PC
if (def_to_bigsmp && apicid > 8) {
printk(KERN_WARNING
"More than 8 CPUs detected - skipping them.\n"
"Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");
err = -1;
} else
err = do_boot_cpu(apicid, cpu);
#else
err = do_boot_cpu(apicid, cpu);
#endif

zap_low_mappings();
low_mappings = 0;
Expand Down Expand Up @@ -1058,6 +1048,34 @@ static __init void disable_smp(void)
static int __init smp_sanity_check(unsigned max_cpus)
{
preempt_disable();

#if defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
if (def_to_bigsmp && nr_cpu_ids > 8) {
unsigned int cpu;
unsigned nr;

printk(KERN_WARNING
"More than 8 CPUs detected - skipping them.\n"
"Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");

nr = 0;
for_each_present_cpu(cpu) {
if (nr >= 8)
cpu_clear(cpu, cpu_present_map);
nr++;
}

nr = 0;
for_each_possible_cpu(cpu) {
if (nr >= 8)
cpu_clear(cpu, cpu_possible_map);
nr++;
}

nr_cpu_ids = 8;
}
#endif

if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
printk(KERN_WARNING "weird, boot CPU (#%d) not listed"
"by the BIOS.\n", hard_smp_processor_id());
Expand Down

0 comments on commit 0f9aa27

Please sign in to comment.