summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-10-17 18:34:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-10-17 18:34:23 +0000
commit10257f019609497e01bc0cc51629aeac769bae2b (patch)
treed6dbf10426acb321ff1cd338926db29670dcd07d
parentb4aac7e1c526df30d06941af1dee24c4751396a2 (diff)
Rename ncpus to alpha_ncpus so that MI ncpus matches the number of
attached processors; deraadt@ ok
-rw-r--r--sys/arch/alpha/alpha/machdep.c9
-rw-r--r--sys/arch/alpha/alpha/mainbus.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index ed271257d0b..c28f1538348 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.92 2005/06/17 21:54:14 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.93 2005/10/17 18:34:22 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -172,6 +172,7 @@ int unusedmem; /* amount of memory for OS that we don't use */
int unknownmem; /* amount of memory with an unknown use */
int cputype; /* system type, from the RPB */
+int alpha_cpus;
int bootdev_debug = 0; /* patchable, or from DDB */
@@ -784,12 +785,12 @@ nobootinfo:
* Figure out the number of cpus in the box, from RPB fields.
* Really. We mean it.
*/
- for (ncpus = 0, i = 0; i < hwrpb->rpb_pcs_cnt; i++) {
+ for (alpha_cpus = 0, i = 0; i < hwrpb->rpb_pcs_cnt; i++) {
struct pcs *pcsp;
pcsp = LOCATE_PCS(hwrpb, i);
if ((pcsp->pcs_flags & PCS_PP) != 0)
- ncpus++;
+ alpha_cpus++;
}
/*
@@ -1064,7 +1065,7 @@ identifycpu()
skipMHz:
printf("\n");
printf("%ld byte page size, %d processor%s.\n",
- hwrpb->rpb_page_size, ncpus, ncpus == 1 ? "" : "s");
+ hwrpb->rpb_page_size, alpha_cpus, alpha_cpus == 1 ? "" : "s");
#if 0
/* this isn't defined for any systems that we run on? */
printf("serial number 0x%lx 0x%lx\n",
diff --git a/sys/arch/alpha/alpha/mainbus.c b/sys/arch/alpha/alpha/mainbus.c
index dd9dc6011a4..ece2b8dead0 100644
--- a/sys/arch/alpha/alpha/mainbus.c
+++ b/sys/arch/alpha/alpha/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.12 2004/06/08 18:09:31 marc Exp $ */
+/* $OpenBSD: mainbus.c,v 1.13 2005/10/17 18:34:22 miod Exp $ */
/* $NetBSD: mainbus.c,v 1.27 1998/06/24 01:10:35 ross Exp $ */
/*
@@ -76,6 +76,7 @@ mbattach(parent, self, aux)
struct mainbus_attach_args ma;
struct pcs *pcsp;
int i, cpuattachcnt;
+ extern int alpha_cpus;
mainbus_found = 1;
@@ -95,9 +96,9 @@ mbattach(parent, self, aux)
if (config_found(self, &ma, mbprint) != NULL)
cpuattachcnt++;
}
- if (ncpus != cpuattachcnt)
+ if (alpha_cpus != cpuattachcnt)
printf("WARNING: %d cpus in machine, %d attached\n",
- ncpus, cpuattachcnt);
+ alpha_cpus, cpuattachcnt);
if (platform.iobus != NULL) {
ma.ma_name = platform.iobus;