diff options
author | 2010-05-06 14:39:52 +0000 | |
---|---|---|
committer | 2010-05-06 14:39:52 +0000 | |
commit | 4ec9747f75e20395faa406bab5aeac7cefbb06e1 (patch) | |
tree | 75be84ea4635aeb2963588de04656cd576524389 | |
parent | Remove the incorrect if_media code. It is no longer needed to show and track (diff) | |
download | wireguard-openbsd-4ec9747f75e20395faa406bab5aeac7cefbb06e1.tar.xz wireguard-openbsd-4ec9747f75e20395faa406bab5aeac7cefbb06e1.zip |
Count the number of CPUs in the system.
ok kettenis@
-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); } |