Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2007 06:19:56 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 131650 for review
Message-ID:  <200712260619.lBQ6Jut2069113@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131650

Change 131650 by jb@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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712260619.lBQ6Jut2069113>