summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-09-23 12:18:06 +0000
committerps <ps@FreeBSD.org>2000-09-23 12:18:06 +0000
commit54345fd41bbe91db9411f88932ea2f30315705ca (patch)
treefa6af5a498e4a75de9ffa0c9452502b009ca182f /sys/alpha
parent7d508e1a38ba85283dfae43adc76e0ef44192200 (diff)
downloadFreeBSD-src-54345fd41bbe91db9411f88932ea2f30315705ca.zip
FreeBSD-src-54345fd41bbe91db9411f88932ea2f30315705ca.tar.gz
Move MAXCPU from machine/smp.h to machine/param.h to fix breakage
with !SMP kernels. Also, replace NCPUS with MAXCPU since they are redundant.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/mp_machdep.c8
-rw-r--r--sys/alpha/alpha/pmap.c6
-rw-r--r--sys/alpha/include/lock.h4
-rw-r--r--sys/alpha/include/param.h4
-rw-r--r--sys/alpha/include/pmap.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c
index 122daba..69170fc 100644
--- a/sys/alpha/alpha/mp_machdep.c
+++ b/sys/alpha/alpha/mp_machdep.c
@@ -60,9 +60,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;
@@ -71,7 +71,7 @@ int smp_started;
int boot_cpu_id;
u_int32_t all_cpus;
-static struct globaldata *cpuno_to_globaldata[NCPUS];
+static struct globaldata *cpuno_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/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index 2a4852f..bdfd725 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -326,7 +326,7 @@ vm_offset_t kernel_vm_end;
* Data for the ASN allocator
*/
static int pmap_maxasn;
-static pmap_t pmap_active[NCPUS];
+static pmap_t pmap_active[MAXCPU];
/*
* Data for the pv entry allocation mechanism
@@ -1180,7 +1180,7 @@ pmap_pinit0(pmap)
pmap->pm_count = 1;
pmap->pm_ptphint = NULL;
pmap->pm_active = 0;
- for (i = 0; i < NCPUS; i++) {
+ for (i = 0; i < MAXCPU; i++) {
pmap->pm_asn[i].asn = 0;
pmap->pm_asn[i].gen = 0;
}
@@ -1230,7 +1230,7 @@ pmap_pinit(pmap)
pmap->pm_count = 1;
pmap->pm_ptphint = NULL;
pmap->pm_active = 0;
- for (i = 0; i < NCPUS; i++) {
+ for (i = 0; i < MAXCPU; i++) {
pmap->pm_asn[i].asn = 0;
pmap->pm_asn[i].gen = 0;
}
diff --git a/sys/alpha/include/lock.h b/sys/alpha/include/lock.h
index 1066d46..f2e3448 100644
--- a/sys/alpha/include/lock.h
+++ b/sys/alpha/include/lock.h
@@ -55,7 +55,7 @@ s_unlock(struct simplelock *lkp)
lkp->lock_data = 0;
}
-#if !defined(SIMPLELOCK_DEBUG) && NCPUS > 1
+#if !defined(SIMPLELOCK_DEBUG) && MAXCPU > 1
/*
* This set of defines turns on the real functions in i386/isa/apic_ipl.s.
*/
@@ -64,7 +64,7 @@ s_unlock(struct simplelock *lkp)
#define simple_lock_try(alp) s_lock_try(alp)
#define simple_unlock(alp) s_unlock(alp)
-#endif /* !SIMPLELOCK_DEBUG && NCPUS > 1 */
+#endif /* !SIMPLELOCK_DEBUG && MAXCPU > 1 */
#define COM_LOCK()
#define COM_UNLOCK()
diff --git a/sys/alpha/include/param.h b/sys/alpha/include/param.h
index a845737..28bef01 100644
--- a/sys/alpha/include/param.h
+++ b/sys/alpha/include/param.h
@@ -71,9 +71,9 @@
#define OBJFORMAT_DEFAULT "elf"
#ifdef SMP
-#define NCPUS 32
+#define MAXCPU 32
#else
-#define NCPUS 1
+#define MAXCPU 1
#endif
/*
diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h
index de59b66..886627c 100644
--- a/sys/alpha/include/pmap.h
+++ b/sys/alpha/include/pmap.h
@@ -178,7 +178,7 @@ struct pmap {
struct {
u_int32_t asn:8; /* address space number */
u_int32_t gen:24; /* generation number */
- } pm_asn[NCPUS];
+ } pm_asn[MAXCPU];
struct pmap_statistics pm_stats; /* pmap statistics */
struct vm_page *pm_ptphint; /* pmap ptp hint */
};
OpenPOWER on IntegriCloud