diff options
-rw-r--r-- | sys/arch/aviion/aviion/m8820x.c | 8 | ||||
-rw-r--r-- | sys/arch/aviion/aviion/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/m8820x.c | 8 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m8820x_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m88k_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m88110.c | 13 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m8820x.c | 12 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 4 |
11 files changed, 32 insertions, 41 deletions
diff --git a/sys/arch/aviion/aviion/m8820x.c b/sys/arch/aviion/aviion/m8820x.c index caa9b75f234..79b6392a3fe 100644 --- a/sys/arch/aviion/aviion/m8820x.c +++ b/sys/arch/aviion/aviion/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.5 2007/12/13 18:51:01 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.6 2009/04/19 17:56:12 miod Exp $ */ /* * Copyright (c) 2004, 2006, Miodrag Vallat. * @@ -168,7 +168,7 @@ knowledge: /* NOTREACHED */ } - max_cpus = scc.cpucount; + ncpusfound = scc.cpucount; if (scc.igang == 1) { cmmu_shift = 1; m8820x_pfsr = pfsr_av400_straight; @@ -176,12 +176,12 @@ knowledge: cmmu_shift = 2; m8820x_pfsr = pfsr_av400_double; } - max_cmmus = max_cpus << scc.igang; + max_cmmus = ncpusfound << scc.igang; /* * Now that we know which CMMUs are there, report every association */ - for (cpu_num = 0; cpu_num < max_cpus; cpu_num++) { + for (cpu_num = 0; cpu_num < ncpusfound; cpu_num++) { cmmu_num = cpu_num << cmmu_shift; cr = m8820x_cmmu[cmmu_num].cmmu_regs; if (badaddr((vaddr_t)cr, 4) == 0) { diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index f7075d81c1e..f7f5f12df18 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.26 2009/03/15 20:39:51 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.27 2009/04/19 17:56:12 miod Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -847,7 +847,7 @@ cpu_boot_secondary_processors() int rc; extern void secondary_start(void); - for (cpu = 0; cpu < max_cpus; cpu++) { + for (cpu = 0; cpu < ncpusfound; cpu++) { if (cpu != curcpu()->ci_cpuid) { rc = scm_spincpu(cpu, (vaddr_t)secondary_start); if (rc != 0) diff --git a/sys/arch/luna88k/luna88k/m8820x.c b/sys/arch/luna88k/luna88k/m8820x.c index 5b9273a9c50..831de4a4692 100644 --- a/sys/arch/luna88k/luna88k/m8820x.c +++ b/sys/arch/luna88k/luna88k/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.14 2007/11/14 23:12:45 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.15 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -126,14 +126,14 @@ m8820x_setup_board_config() break; } - max_cpus = num >> 1; - max_cmmus = max_cpus << 1; + ncpusfound = num >> 1; + max_cmmus = ncpusfound << 1; cmmu_shift = 1; /* fixed 2:1 configuration */ /* * Now that we know which CMMUs are there, report every association */ - for (num = 0; num < max_cpus; num++) { + for (num = 0; num < ncpusfound; num++) { volatile unsigned *cr; int type; diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 3230fa4d618..79be85bbecc 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.61 2009/02/16 22:55:03 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.62 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -1062,7 +1062,7 @@ luna88k_bootstrap() * currently-running CPU; initialize the others with similar settings * as well, after calling pmap_bootstrap() above. */ - for (cpu = 0; cpu < max_cpus; cpu++) { + for (cpu = 0; cpu < ncpusfound; cpu++) { if (cpu == master_cpu) continue; m8820x_initialize_cpu(cpu); diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index 8d894b8f784..5b9130d3ef9 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.47 2009/03/26 17:24:33 oga Exp $ */ +/* $OpenBSD: cpu.h,v 1.48 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -77,8 +77,6 @@ #ifndef _LOCORE -extern u_int max_cpus; - #include <machine/lock.h> /* diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c index 145a5d31e79..776ef59544f 100644 --- a/sys/arch/m88k/m88k/m8820x_machdep.c +++ b/sys/arch/m88k/m88k/m8820x_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x_machdep.c,v 1.37 2009/02/16 23:03:33 miod Exp $ */ +/* $OpenBSD: m8820x_machdep.c,v 1.38 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 2004, 2007, Miodrag Vallat. * @@ -423,7 +423,7 @@ m8820x_initialize_cpu(cpuid_t cpu) */ sctr = 0; #ifdef MULTIPROCESSOR - if (max_cpus > 1) + if (ncpusfound > 1) sctr |= CMMU_SCTR_SE; #endif cmmu->cmmu_regs[CMMU_SCTR] = sctr; diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c index 0f51383c4ff..db3fc2a8499 100644 --- a/sys/arch/m88k/m88k/m88k_machdep.c +++ b/sys/arch/m88k/m88k/m88k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88k_machdep.c,v 1.49 2009/03/15 20:39:53 miod Exp $ */ +/* $OpenBSD: m88k_machdep.c,v 1.50 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -95,8 +95,6 @@ __cpu_simple_lock_t cmmu_cpu_lock = __SIMPLELOCK_UNLOCKED; #endif struct cpu_info m88k_cpus[MAX_CPUS]; -u_int max_cpus; - struct cmmu_p *cmmu; /* diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index bb5e67bc9d3..5953d24c7a6 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.46 2009/03/04 19:39:05 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.47 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 2001-2004, Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -717,9 +717,9 @@ pmap_bootstrap(vaddr_t load_start) */ phys_map_vaddr = virtual_avail; - phys_map_vaddr_end = virtual_avail + 2 * (max_cpus << PAGE_SHIFT); - avail_start += 2 * (max_cpus << PAGE_SHIFT); - virtual_avail += 2 * (max_cpus << PAGE_SHIFT); + phys_map_vaddr_end = virtual_avail + 2 * (ncpusfound << PAGE_SHIFT); + avail_start += 2 * (ncpusfound << PAGE_SHIFT); + virtual_avail += 2 * (ncpusfound << PAGE_SHIFT); /* * Create all the machine-specific mappings. diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c index 7bfee743cd5..deb4525c1e8 100644 --- a/sys/arch/mvme88k/mvme88k/m88110.c +++ b/sys/arch/mvme88k/mvme88k/m88110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.c,v 1.62 2009/02/16 23:03:33 miod Exp $ */ +/* $OpenBSD: m88110.c,v 1.63 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * All rights reserved. @@ -167,13 +167,12 @@ patc_clear(void) void m88110_setup_board_config(void) { - max_cpus = 1; + ncpusfound = 1; } void m88410_setup_board_config(void) { -#ifdef MULTIPROCESSOR struct mvmeprom_brdid brdid; /* @@ -184,13 +183,9 @@ m88410_setup_board_config(void) bzero(&brdid, sizeof(brdid)); bugbrdid(&brdid); if (bcmp(brdid.pwa, "01-W3815B04", 11) == 0) - max_cpus = 1; + ncpusfound = 1; else - max_cpus = 2; - /* XXX what about 01-W3977B QP boards??? */ -#else - max_cpus = 1; -#endif + ncpusfound = 2; } /* diff --git a/sys/arch/mvme88k/mvme88k/m8820x.c b/sys/arch/mvme88k/mvme88k/m8820x.c index 98fbd15b889..eb21476ba08 100644 --- a/sys/arch/mvme88k/mvme88k/m8820x.c +++ b/sys/arch/mvme88k/mvme88k/m8820x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m8820x.c,v 1.49 2007/11/17 05:36:23 miod Exp $ */ +/* $OpenBSD: m8820x.c,v 1.50 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * @@ -100,7 +100,7 @@ m8820x_setup_board_config() vme188_config = 0x0a; m8820x_cmmu[0].cmmu_regs = (void *)SBC_CMMU_I; m8820x_cmmu[1].cmmu_regs = (void *)SBC_CMMU_D; - max_cpus = 1; + ncpusfound = 1; max_cmmus = 2; cmmu_shift = 1; m8820x_pfsr = pfsr_save_187; @@ -118,10 +118,10 @@ m8820x_setup_board_config() m8820x_cmmu[5].cmmu_regs = (void *)VME_CMMU_D2; m8820x_cmmu[6].cmmu_regs = (void *)VME_CMMU_I3; m8820x_cmmu[7].cmmu_regs = (void *)VME_CMMU_D3; - max_cpus = bd_config[vme188_config].ncpus; + ncpusfound = bd_config[vme188_config].ncpus; max_cmmus = bd_config[vme188_config].ncmmus; m8820x_pfsr = bd_config[vme188_config].pfsr; - cmmu_shift = ff1(max_cmmus / max_cpus); + cmmu_shift = ff1(max_cmmus / ncpusfound); break; #endif /* MVME188 */ } @@ -132,7 +132,7 @@ m8820x_setup_board_config() if (brdtyp == BRD_188) { printf("MVME188 board configuration #%X " "(%d CPUs %d CMMUs)\n", - vme188_config, max_cpus, max_cmmus); + vme188_config, ncpusfound, max_cmmus); } } else { panic("unrecognized MVME%x board configuration #%X", @@ -170,7 +170,7 @@ m8820x_setup_board_config() /* * Now that we know which CMMUs are there, report every association */ - for (num = 0; num < max_cpus; num++) { + for (num = 0; num < ncpusfound; num++) { int type; type = CMMU_TYPE(m8820x_cmmu[num << cmmu_shift]. diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 66e4d0ae524..ef4828c388a 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.228 2009/03/15 20:39:53 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.229 2009/04/19 17:56:13 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -1090,7 +1090,7 @@ cpu_hatch_secondary_processors(void *unused) #ifdef MVME197 case BRD_197: #endif - for (cpu = 0; cpu < max_cpus; cpu++) { + for (cpu = 0; cpu < ncpusfound; cpu++) { if (cpu != ci->ci_cpuid) { __cpu_simple_lock(&cpu_hatch_mutex); rc = spin_cpu(cpu, (vaddr_t)secondary_start); |