PERFORCE change 131650 for review
John Birrell
jb at FreeBSD.org
Tue Dec 25 22:20:02 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131650
Change 131650 by jb at jb_freebsd1 on 2007/12/26 06:19:53
Size the global CPU array using SMP_MAXCPU to allow for the maximum
number of CPUs that the kernel would support if configured with SMP
enabled.
When looping through CPU IDs, use the mp_maxid variable as the limit
for the maximum ID to look for.
Affected files ...
.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#9 edit
Differences ...
==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/os/cyclic.c#9 (text) ====
@@ -568,7 +568,7 @@
#include <sys/kernel.h>
#include <sys/conf.h>
#define gethrtime_unscaled dtrace_gethrtime
-static cyclic_cpu_t cyclic_cpu[MAXCPU];
+static cyclic_cpu_t cyclic_cpu[SMP_MAXCPU];
static kmutex_t cpu_lock;
#endif
@@ -3382,7 +3382,7 @@
do {
#else
- for (i = 0; i < MAXCPU; i++) {
+ for (i = 0; i < mp_maxid; i++) {
if (pcpu_find(i) == NULL)
continue;
@@ -3450,7 +3450,7 @@
do {
#else
- for (i = 0; i < MAXCPU; i++) {
+ for (i = 0; i < mp_maxid; i++) {
if (pcpu_find(i) == NULL)
continue;
More information about the p4-projects
mailing list