diff options
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/ip30_machdep.c | 14 |
1 files changed, 8 insertions, 6 deletions
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); |