Rename hppa_ncpus hppa_ncpu.
Increment for primary CPU only for now.
This commit is contained in:
parent
f80f065ff5
commit
fb562d62f0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.c,v 1.17 2011/01/23 21:53:39 skrll Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.18 2011/01/31 14:11: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.17 2011/01/23 21:53:39 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.18 2011/01/31 14:11:02 skrll Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -56,7 +56,8 @@ struct cpu_softc {
|
|||
};
|
||||
|
||||
#ifdef MULTIPROCESSOR
|
||||
int hppa_ncpus;
|
||||
|
||||
int hppa_ncpu;
|
||||
|
||||
struct cpu_info *cpu_hatch_info;
|
||||
static volatile int start_secondary_cpu;
|
||||
|
@ -192,6 +193,7 @@ cpuattach(device_t parent, device_t self, void *aux)
|
|||
|
||||
if (ci->ci_hpa == hppa_mcpuhpa) {
|
||||
ci->ci_flags |= CPUF_PRIMARY|CPUF_RUNNING;
|
||||
hppa_ncpu++;
|
||||
} else {
|
||||
int err;
|
||||
|
||||
|
@ -278,6 +280,9 @@ cpu_hatch(void)
|
|||
struct cpu_info *ci = curcpu();
|
||||
|
||||
ci->ci_flags |= CPUF_RUNNING;
|
||||
#if 0
|
||||
hppa_ncpu++;
|
||||
#endif
|
||||
|
||||
/* Wait for additional CPUs to spinup. */
|
||||
while (!start_secondary_cpu)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.63 2011/01/25 21:27:48 skrll Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.64 2011/01/31 14:11:02 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */
|
||||
|
||||
|
@ -298,14 +298,14 @@ struct cpu_info {
|
|||
#ifdef MULTIPROCESSOR
|
||||
|
||||
/* Number of CPUs in the system */
|
||||
extern int hppa_ncpus;
|
||||
extern int hppa_ncpu;
|
||||
|
||||
#define HPPA_MAXCPUS 4
|
||||
#define cpu_number() (curcpu()->ci_cpuid)
|
||||
|
||||
#define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0)
|
||||
#define CPU_INFO_ITERATOR int
|
||||
#define CPU_INFO_FOREACH(cii, ci) cii = 0; ci = &cpus[0], cii < hppa_ncpus; cii++, ci++
|
||||
#define CPU_INFO_FOREACH(cii, ci) cii = 0; ci = &cpus[0], cii < hppa_ncpu; cii++, ci++
|
||||
|
||||
void cpu_boot_secondary_processors(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue