diff options
author | Takuya ASADA <syuu@cvs.openbsd.org> | 2009-11-22 19:41:42 +0000 |
---|---|---|
committer | Takuya ASADA <syuu@cvs.openbsd.org> | 2009-11-22 19:41:42 +0000 |
commit | ed0122c42b0e30373d4fdadceb3ebb8808e3aef3 (patch) | |
tree | 89af3c9babfff226297475135afee79b23d54cfb /sys/arch | |
parent | 7daed0107f497e4b4ff65b1a8f1f6cb2d7bde47c (diff) |
ncpus, ncpufound values are corrected.
ok miod@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mips64/mips64/cpu.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/ip30_machdep.c | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c index 8d14587e6ec..4a9e39254c0 100644 --- a/sys/arch/mips64/mips64/cpu.c +++ b/sys/arch/mips64/mips64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.16 2009/10/30 08:13:57 syuu Exp $ */ +/* $OpenBSD: cpu.c,v 1.17 2009/11/22 19:41:41 syuu Exp $ */ /* * Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se) @@ -114,7 +114,6 @@ cpuattach(struct device *parent, struct device *dev, void *aux) ci->ci_flags |= CPUF_PRESENT; } cpu_info[cpuno] = ci; - ncpus++; #endif ci->ci_self = ci; ci->ci_cpuid = cpuno; diff --git a/sys/arch/sgi/sgi/ip30_machdep.c b/sys/arch/sgi/sgi/ip30_machdep.c index fcf6a3f75fe..49fd5174424 100644 --- a/sys/arch/sgi/sgi/ip30_machdep.c +++ b/sys/arch/sgi/sgi/ip30_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip30_machdep.c,v 1.20 2009/11/22 18:33:48 syuu Exp $ */ +/* $OpenBSD: ip30_machdep.c,v 1.21 2009/11/22 19:41:41 syuu Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -56,12 +56,10 @@ int ip30_widget_id(int16_t, u_int, uint32_t *); static paddr_t ip30_iocbase; -#ifdef MULTIPROCESSOR static const paddr_t mpconf = PHYS_TO_XKPHYS(MPCONF_BASE, CCA_COHERENT_EXCLWRITE); static int ip30_cpu_exists(int); -#endif void ip30_setup() @@ -188,12 +186,15 @@ ip30_autoconf(struct device *parent) maa.maa_nasid = masternasid; maa.maa_name = "cpu"; config_found(parent, &maa, mbprint); -#ifdef MULTIPROCESSOR + int cpuid; for(cpuid = 1; cpuid < MAX_CPUS; cpuid++) - if (ip30_cpu_exists(cpuid) == 0) + if (ip30_cpu_exists(cpuid) == 0) { + ncpusfound++; +#ifdef MULTIPROCESSOR config_found(parent, &maa, mbprint); #endif + } maa.maa_name = "clock"; config_found(parent, &maa, mbprint); maa.maa_name = "xbow"; @@ -290,7 +291,6 @@ ip30_lights_frob(uint32_t hwpend, struct trap_frame *cf) return 0; /* Real clock int handler will claim the interrupt. */ } -#ifdef MULTIPROCESSOR static int ip30_cpu_exists(int cpuid) { @@ -302,6 +302,7 @@ ip30_cpu_exists(int cpuid) return 1; } +#ifdef MULTIPROCESSOR void hw_cpu_boot_secondary(struct cpu_info *ci) { @@ -401,6 +402,7 @@ hw_cpu_hatch(struct cpu_info *ci) */ Mips_SyncCache(); + ncpus++; cpuset_add(&cpus_running, ci); cpu_startclock(ci); |