Module Name: src
Committed By: sevan
Date: Tue Apr 4 11:46:13 UTC 2017
Modified Files:
src/sys/arch/arm/arm: arm_machdep.c
Log Message:
Define NCPUINFO and set it to 1 or MAXCPUS whether on single or multiprocessor
system.
Use NCPUINFO as the array size for *cpu_info[].
Closes PR port-hpcarm/52138
Patch by skrll
ok pgoyette
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/arm/arm_machdep.c
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/arm/arm/arm_machdep.c
diff -u src/sys/arch/arm/arm/arm_machdep.c:1.50 src/sys/arch/arm/arm/arm_machdep.c:1.51
--- src/sys/arch/arm/arm/arm_machdep.c:1.50 Thu Mar 16 16:13:20 2017
+++ src/sys/arch/arm/arm/arm_machdep.c Tue Apr 4 11:46:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_machdep.c,v 1.50 2017/03/16 16:13:20 chs Exp $ */
+/* $NetBSD: arm_machdep.c,v 1.51 2017/04/04 11:46:12 sevan Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.50 2017/03/16 16:13:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.51 2017/04/04 11:46:12 sevan Exp $");
#include <sys/exec.h>
#include <sys/proc.h>
@@ -121,10 +121,14 @@ struct cpu_info cpu_info_store = {
};
#ifdef MULTIPROCESSOR
-struct cpu_info *cpu_info[MAXCPUS] = {
+#define NCPUINFO MAXCPUS
+#else
+#define NCPUINFO 1
+#endif
+
+struct cpu_info *cpu_info[NCPUINFO] = {
[0] = &cpu_info_store
};
-#endif
const pcu_ops_t * const pcu_ops_md_defs[PCU_UNIT_COUNT] = {
#if defined(FPU_VFP)