Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2008 03:54:32 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137672 for review
Message-ID:  <200803140354.m2E3sWhO078619@repoman.freebsd.org>

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

Change 137672 by jhb@jhb_mutex on 2008/03/14 03:53:40

	IFC @137671

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#28 integrate
.. //depot/projects/smpng/sys/i386/i386/intr_machdep.c#28 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#28 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.35 2007/11/21 04:03:50 scottl Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.36 2008/03/14 03:44:41 jhb Exp $
  */
 
 /*
@@ -48,6 +48,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/smp.h>
 #include <sys/syslog.h>
 #include <sys/systm.h>
 #include <sys/sx.h>
@@ -536,7 +537,7 @@
 
 /* The BSP is always a valid target. */
 static cpumask_t intr_cpus = (1 << 0);
-static int current_cpu, num_cpus = 1;
+static int current_cpu;
 
 static void
 intr_assign_next_cpu(struct intsrc *isrc)
@@ -552,7 +553,7 @@
 	pic->pic_assign_cpu(isrc, apic_id);
 	do {
 		current_cpu++;
-		if (current_cpu >= num_cpus)
+		if (current_cpu > mp_maxid)
 			current_cpu = 0;
 	} while (!(intr_cpus & (1 << current_cpu)));
 }
@@ -572,7 +573,6 @@
 		    cpu_apic_ids[cpu]);
 
 	intr_cpus |= (1 << cpu);
-	num_cpus++;
 }
 
 /*
@@ -586,7 +586,7 @@
 	int i;
 
 	/* Don't bother on UP. */
-	if (num_cpus <= 1)
+	if (mp_ncpus == 1)
 		return;
 
 	/* Round-robin assign a CPU to each enabled source. */

==== //depot/projects/smpng/sys/i386/i386/intr_machdep.c#28 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.30 2007/11/21 04:03:50 scottl Exp $
+ * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.31 2008/03/14 03:44:42 jhb Exp $
  */
 
 /*
@@ -47,6 +47,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/smp.h>
 #include <sys/syslog.h>
 #include <sys/systm.h>
 #include <sys/sx.h>
@@ -512,7 +513,7 @@
 
 /* The BSP is always a valid target. */
 static cpumask_t intr_cpus = (1 << 0);
-static int current_cpu, num_cpus = 1;
+static int current_cpu;
 
 static void
 intr_assign_next_cpu(struct intsrc *isrc)
@@ -528,7 +529,7 @@
 	pic->pic_assign_cpu(isrc, apic_id);
 	do {
 		current_cpu++;
-		if (current_cpu >= num_cpus)
+		if (current_cpu > mp_maxid)
 			current_cpu = 0;
 	} while (!(intr_cpus & (1 << current_cpu)));
 }
@@ -548,7 +549,6 @@
 		    cpu_apic_ids[cpu]);
 
 	intr_cpus |= (1 << cpu);
-	num_cpus++;
 }
 
 /*
@@ -562,7 +562,7 @@
 	int i;
 
 	/* Don't bother on UP. */
-	if (num_cpus <= 1)
+	if (mp_ncpus == 1)
 		return;
 
 	/* Round-robin assign a CPU to each enabled source. */



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