summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>2000-01-07 08:49:25 +0000
committerluoqi <luoqi@FreeBSD.org>2000-01-07 08:49:25 +0000
commit35b4c17c7948fded5016e651c9f3b6292e720a09 (patch)
treee1925c1031b9bc86cbff534a5b1a2955ab60de6d /sys/i386/include/mptable.h
parente100d44d5538cc21abeba58f459ce9eb497651a9 (diff)
downloadFreeBSD-src-35b4c17c7948fded5016e651c9f3b6292e720a09.zip
FreeBSD-src-35b4c17c7948fded5016e651c9f3b6292e720a09.tar.gz
Allow SMP && NCPU == 1 to work. From now on, there's no restriction on the
value of NCPU relative to the number of cpus physically present, the actual number of cpus utilized will be the smaller of the two.
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 48d716a..ca8cfd2 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -1155,7 +1155,7 @@ static int
processor_entry(proc_entry_ptr entry, int cpu)
{
/* check for usability */
- if ((cpu >= NCPU) || !(entry->cpu_flags & PROCENTRY_FLAG_EN))
+ if (!(entry->cpu_flags & PROCENTRY_FLAG_EN))
return 0;
/* check for BSP flag */
@@ -1167,11 +1167,13 @@ processor_entry(proc_entry_ptr entry, int cpu)
}
/* add another AP to list, if less than max number of CPUs */
- else {
+ else if (cpu < NCPU) {
CPU_TO_ID(cpu) = entry->apic_id;
ID_TO_CPU(entry->apic_id) = cpu;
return 1;
}
+
+ return 0;
}
OpenPOWER on IntegriCloud