summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-05 10:01:46 +0000
committerjeff <jeff@FreeBSD.org>2002-03-05 10:01:46 +0000
commitf25b3f9f5bc7c1b9dfb66f6fed8206e79613db7f (patch)
treeba2760ce8aec950f5fe901410d365bfcedef9dfd /sys/alpha
parent9efc11065b8c97c4d238abf06c92522301113cf3 (diff)
downloadFreeBSD-src-f25b3f9f5bc7c1b9dfb66f6fed8206e79613db7f.zip
FreeBSD-src-f25b3f9f5bc7c1b9dfb66f6fed8206e79613db7f.tar.gz
Add a new variable mp_maxid. This is used so that per cpu datastructures may
be allocated as arrays indexed by the cpu id. Previously the only reliable way to know the max cpu id was through MAXCPU. mp_ncpus isn't useful here because cpu ids may be sparsely mapped, although x86 and alpha do not do this. Also, call cpu_mp_probe much earlier so the max cpu id is known before the VM starts up. This is intended to help support per cpu queues for the new allocator, but may be useful elsewhere. Reviewed by: jake Approved by: jake
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/mp_machdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c
index a5fe20c..d899462 100644
--- a/sys/alpha/alpha/mp_machdep.c
+++ b/sys/alpha/alpha/mp_machdep.c
@@ -307,6 +307,7 @@ cpu_mp_probe(void)
all_cpus = 1 << boot_cpu_id;
mp_ncpus = 1;
+ mp_maxid = 0;
/* Make sure we have at least one secondary CPU. */
cpus = 0;
@@ -332,6 +333,7 @@ cpu_mp_probe(void)
if (i > MAXCPU) {
continue;
}
+ mp_maxid = i;
cpus++;
}
return (cpus);
OpenPOWER on IntegriCloud