diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-05-06 14:39:53 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-05-06 14:39:53 +0000 |
commit | 28b281a0bea8262d5ab4820702546fcd1036f40b (patch) | |
tree | ac4d708e4c9803002d5618c640f9405f926794e2 /sys/arch | |
parent | 6bf5d720f926e867f1201b2f6e13af768c5bbb4b (diff) |
Count the number of CPUs in the system.
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/autoconf.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/mainbus.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c index d7ef576055e..ae9470906f8 100644 --- a/sys/arch/hppa/hppa/autoconf.c +++ b/sys/arch/hppa/hppa/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.54 2010/04/29 13:48:29 jsing Exp $ */ +/* $OpenBSD: autoconf.c,v 1.55 2010/05/06 14:39:52 jsing Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -311,6 +311,10 @@ pdc_scanbus(struct device *self, struct confargs *ca, int maxmod, nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model); } + if (cpu_scan && nca.ca_type.iodc_type == HPPA_TYPE_NPROC && + nca.ca_type.iodc_sv_model == HPPA_NPROC_HPPA) + ncpusfound++; + if (cpu_scan && ((nca.ca_type.iodc_type != HPPA_TYPE_NPROC || nca.ca_type.iodc_sv_model != HPPA_NPROC_HPPA) && diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index 56e1df0eb3e..61d29e49526 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.78 2010/04/29 13:48:29 jsing Exp $ */ +/* $OpenBSD: mainbus.c,v 1.79 2010/05/06 14:39:52 jsing Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -1141,11 +1141,13 @@ mbattach(parent, self, aux) case HPPA_BOARD_HP780_C240: case HPPA_BOARD_HP785_C360: /* Attach CPUs first, then everything else... */ + ncpusfound = 0; pdc_scanbus(self, &nca, MAXMODBUS, HPPA_FPA, 1); pdc_scanbus(self, &nca, MAXMODBUS, HPPA_FPA, 0); break; default: /* Attach CPUs first, then everything else... */ + ncpusfound = 0; pdc_scanbus(self, &nca, MAXMODBUS, 0, 1); pdc_scanbus(self, &nca, MAXMODBUS, 0, 0); } |