summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-24 06:22:57 +0000
committerjhb <jhb@FreeBSD.org>2001-03-24 06:22:57 +0000
commite3813eeec8d7534245032496461631f73216c1ce (patch)
tree4e311e844698ff1339ea12d5ce8a18aa26f21dd2 /sys
parent7507911b050da6bf08aa6ad1bf8cb7750e68f374 (diff)
downloadFreeBSD-src-e3813eeec8d7534245032496461631f73216c1ce.zip
FreeBSD-src-e3813eeec8d7534245032496461631f73216c1ce.tar.gz
- Define and use MAXCPU like the alpha and i386 instead of NCPUS.
- Sort the sys/mutex.h include in mp_machdep.c into a closer to correct location.
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/mp_machdep.c10
-rw-r--r--sys/ia64/include/param.h6
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index ff1a377..d3ee570 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -28,11 +28,11 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/mutex.h>
#include <sys/ktr.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
@@ -58,9 +58,9 @@ volatile u_int started_cpus;
volatile u_int checkstate_probed_cpus;
volatile u_int checkstate_need_ast;
volatile u_int checkstate_pending_ast;
-struct proc* checkstate_curproc[NCPUS];
-int checkstate_cpustate[NCPUS];
-u_long checkstate_pc[NCPUS];
+struct proc* checkstate_curproc[MAXCPU];
+int checkstate_cpustate[MAXCPU];
+u_long checkstate_pc[MAXCPU];
volatile u_int resched_cpus;
void (*cpustop_restartfunc) __P((void));
int mp_ncpus;
@@ -69,7 +69,7 @@ int smp_started;
int boot_cpu_id;
u_int32_t all_cpus;
-static struct globaldata *cpuid_to_globaldata[NCPUS];
+static struct globaldata *cpuid_to_globaldata[MAXCPU];
int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h
index db2271f..62e3235 100644
--- a/sys/ia64/include/param.h
+++ b/sys/ia64/include/param.h
@@ -91,7 +91,11 @@
#define OBJFORMAT_NAMES "elf"
#define OBJFORMAT_DEFAULT "elf"
-#define NCPUS 1
+#ifdef SMP
+#define MAXCPU 16
+#else
+#define MAXCPU 1
+#endif
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
OpenPOWER on IntegriCloud