Module Name: src Committed By: skrll Date: Mon Jan 31 14:11:02 UTC 2011
Modified Files: src/sys/arch/hp700/dev: cpu.c src/sys/arch/hp700/include: cpu.h Log Message: Rename hppa_ncpus hppa_ncpu. Increment for primary CPU only for now. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp700/dev/cpu.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hp700/include/cpu.h 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.17 src/sys/arch/hp700/dev/cpu.c:1.18 --- src/sys/arch/hp700/dev/cpu.c:1.17 Sun Jan 23 21:53:39 2011 +++ src/sys/arch/hp700/dev/cpu.c Mon Jan 31 14:11:02 2011 @@ -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 @@ }; #ifdef MULTIPROCESSOR -int hppa_ncpus; + +int hppa_ncpu; struct cpu_info *cpu_hatch_info; static volatile int start_secondary_cpu; @@ -192,6 +193,7 @@ if (ci->ci_hpa == hppa_mcpuhpa) { ci->ci_flags |= CPUF_PRIMARY|CPUF_RUNNING; + hppa_ncpu++; } else { int err; @@ -278,6 +280,9 @@ 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) Index: src/sys/arch/hp700/include/cpu.h diff -u src/sys/arch/hp700/include/cpu.h:1.63 src/sys/arch/hp700/include/cpu.h:1.64 --- src/sys/arch/hp700/include/cpu.h:1.63 Tue Jan 25 21:27:48 2011 +++ src/sys/arch/hp700/include/cpu.h Mon Jan 31 14:11:02 2011 @@ -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 @@ #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);