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 Cleanup a few MULTIPROCESSOR issues.
details: https://anonhg.NetBSD.org/src/rev/e10571b60ef0
branches: trunk
changeset: 329706:e10571b60ef0
user: matt <matt%NetBSD.org@localhost>
date: Thu Jun 05 03:46:26 2014 +0000
description:
Cleanup a few MULTIPROCESSOR issues.
diffstat:
sys/arch/arm/mainbus/cpu_mainbus.c | 27 +++++++++++++++++----------
sys/arch/arm/mainbus/mainbus.c | 8 +++++---
2 files changed, 22 insertions(+), 13 deletions(-)
diffs (87 lines):
diff -r 94b346fc5b43 -r e10571b60ef0 sys/arch/arm/mainbus/cpu_mainbus.c
--- a/sys/arch/arm/mainbus/cpu_mainbus.c Thu Jun 05 03:45:48 2014 +0000
+++ b/sys/arch/arm/mainbus/cpu_mainbus.c Thu Jun 05 03:46:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_mainbus.c,v 1.14 2014/03/28 21:43:01 matt Exp $ */
+/* $NetBSD: cpu_mainbus.c,v 1.15 2014/06/05 03:46:26 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.14 2014/03/28 21:43:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_mainbus.c,v 1.15 2014/06/05 03:46:26 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -79,24 +79,31 @@
int id = mb->mb_core;
if (id != MAINBUSCF_CORE_DEFAULT) {
- if (id >= arm_cpu_max || kcpuset_isset(kcpuset_attached, id))
+ if (id == 0)
+ return cpu_info_store.ci_dev == NULL;
+ if (id >= arm_cpu_max)
return 0;
- if (id == 0 && cpu_info_store.ci_dev != NULL)
+#ifdef MULTIPROCESSOR
+ if (cpu_info[id] != NULL)
return 0;
+#endif
return 1;
}
- for (id = 0; id < arm_cpu_max; id++) {
+ if (cpu_info_store.ci_dev == NULL) {
+ mb->mb_core = 0;
+ return 1;
+ }
+
#ifdef MULTIPROCESSOR
- if (cpu_info[id] != NULL && cpu_info[id]->ci_dev != NULL)
+ for (id = 1; id < arm_cpu_max; id++) {
+ if (cpu_info[id] != NULL)
continue;
-#else
- if (id != 0 || cpu_info_store.ci_dev != NULL)
- continue;
-#endif
mb->mb_core = id;
return 1;
}
+#endif
+
return 0;
}
diff -r 94b346fc5b43 -r e10571b60ef0 sys/arch/arm/mainbus/mainbus.c
--- a/sys/arch/arm/mainbus/mainbus.c Thu Jun 05 03:45:48 2014 +0000
+++ b/sys/arch/arm/mainbus/mainbus.c Thu Jun 05 03:46:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.20 2012/08/29 23:16:35 matt Exp $ */
+/* $NetBSD: mainbus.c,v 1.21 2014/06/05 03:46:26 matt Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2012/08/29 23:16:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2014/06/05 03:46:26 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -151,7 +151,9 @@
tryagain = 0;
if (config_match(parent, cf, &mb) > 0) {
config_attach(parent, cf, &mb, mainbusprint);
-/* tryagain = (cf->cf_fstate == FSTATE_STAR);*/
+#ifdef MULTIPROCESSOR
+ tryagain = (cf->cf_fstate == FSTATE_STAR);
+#endif
}
} while (tryagain);
Home |
Main Index |
Thread Index |
Old Index