Module Name: src Committed By: skrll Date: Thu Feb 21 15:16:02 UTC 2013
Modified Files: src/sys/arch/hp700/dev: cpu.c Log Message: Fixup the cpu_{match,attach} functions to not allow more that HPPA_MAXCPUs to be used. Fixes problem booting on a dual-cpu j6700 with GENERIC (which doesn't define MULTIPROCESSOR) reported by KIYOHARA Takashi on port-hp700. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hp700/dev/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/hp700/dev/cpu.c diff -u src/sys/arch/hp700/dev/cpu.c:1.29 src/sys/arch/hp700/dev/cpu.c:1.30 --- src/sys/arch/hp700/dev/cpu.c:1.29 Wed Oct 10 15:46:34 2012 +++ src/sys/arch/hp700/dev/cpu.c Thu Feb 21 15:16:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.30 2013/02/21 15:16:02 skrll Exp $ */ /* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.29 2012/10/10 15:46:34 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.30 2013/02/21 15:16:02 skrll Exp $"); #include "opt_multiprocessor.h" @@ -74,9 +74,6 @@ cpumatch(device_t parent, cfdata_t cf, v ca->ca_type.iodc_sv_model != HPPA_NPROC_HPPA) return 0; - if (cf->cf_unit >= MAXCPUS) - return 0; - return 1; } @@ -105,10 +102,6 @@ cpuattach(device_t parent, device_t self sc->sc_dev = self; - ci = &cpus[cpuno]; - ci->ci_cpuid = cpuno; - ci->ci_hpa = ca->ca_hpa; - /* Print the CPU chip name, nickname, and rev. */ aprint_normal(": %s", hppa_cpu_info->hci_chip_name); if (hppa_cpu_info->hci_chip_nickname != NULL) @@ -162,6 +155,15 @@ cpuattach(device_t parent, device_t self hppa_mod_info(HPPA_TYPE_FPU, (fpu_version >> 16) & 0x1f), (fpu_version >> 11) & 0x1f); + if (cpuno >= HPPA_MAXCPUS) { + aprint_normal_dev(self, "not started\n"); + return; + } + + ci = &cpus[cpuno]; + ci->ci_cpuid = cpuno; + ci->ci_hpa = ca->ca_hpa; + hp700_intr_initialise(ci); ir = &ci->ci_ir;