Skip to content

Commit

Permalink
[PARISC] Unbreak processor_probe when we have more than NR_CPUS
Browse files Browse the repository at this point in the history
If we already have NR_CPUS worth of cpus online, we obviously shouldn't
be trying to bring up more... Fixes a particularly vexing issue I had when
running another machines kernel on my rp3440.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Oct 18, 2007
1 parent 730e844 commit f8b9e59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/parisc/kernel/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
unsigned long cpuid;
struct cpuinfo_parisc *p;

#ifndef CONFIG_SMP
#ifdef CONFIG_SMP
if (num_online_cpus() >= NR_CPUS) {
printk(KERN_INFO "num_online_cpus() >= NR_CPUS\n");
return 1;
}
#else
if (boot_cpu_data.cpu_count > 0) {
printk(KERN_INFO "CONFIG_SMP=n ignoring additional CPUs\n");
return 1;
Expand Down

0 comments on commit f8b9e59

Please sign in to comment.