Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/mainbus arm_cpu_max = num of cpus
details: https://anonhg.NetBSD.org/src/rev/ba639d9f8c1b
branches: trunk
changeset: 328171:ba639d9f8c1b
user: matt <matt%NetBSD.org@localhost>
date: Fri Mar 28 21:43:01 2014 +0000
description:
arm_cpu_max = num of cpus
diffstat:
sys/arch/arm/mainbus/cpu_mainbus.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 910998cc598a -r ba639d9f8c1b sys/arch/arm/mainbus/cpu_mainbus.c
--- a/sys/arch/arm/mainbus/cpu_mainbus.c Fri Mar 28 21:41:46 2014 +0000
+++ b/sys/arch/arm/mainbus/cpu_mainbus.c Fri Mar 28 21:43:01 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_mainbus.c,v 1.13 2012/08/29 23:16:35 matt Exp $ */
+/* $NetBSD: cpu_mainbus.c,v 1.14 2014/03/28 21:43:01 matt Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@@ -44,7 +44,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_mainbus.c,v 1.13 2012/08/29 23:16:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_mainbus.c,v 1.14 2014/03/28 21:43:01 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,7 +69,7 @@
#ifdef MULTIPROCESSOR
extern u_int arm_cpu_max;
#else
-#define arm_cpu_max 0
+#define arm_cpu_max 1
#endif
static int
@@ -79,14 +79,14 @@
int id = mb->mb_core;
if (id != MAINBUSCF_CORE_DEFAULT) {
- if (id > arm_cpu_max || kcpuset_isset(kcpuset_attached, id))
+ if (id >= arm_cpu_max || kcpuset_isset(kcpuset_attached, id))
return 0;
if (id == 0 && cpu_info_store.ci_dev != NULL)
return 0;
return 1;
}
- for (id = 0; id <= arm_cpu_max; id++) {
+ for (id = 0; id < arm_cpu_max; id++) {
#ifdef MULTIPROCESSOR
if (cpu_info[id] != NULL && cpu_info[id]->ci_dev != NULL)
continue;
Home |
Main Index |
Thread Index |
Old Index