Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2006 19:05:41 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 110169 for review
Message-ID:  <200611171905.kAHJ5fhd032146@repoman.freebsd.org>

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

Change 110169 by jhb@jhb_mutex on 2006/11/17 19:04:50

	IFC @110163.

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#21 integrate
.. //depot/projects/smpng/sys/amd64/amd64/io_apic.c#18 integrate
.. //depot/projects/smpng/sys/ddb/db_watch.c#7 integrate
.. //depot/projects/smpng/sys/dev/isp/isp_pci.c#43 integrate
.. //depot/projects/smpng/sys/dev/nfe/if_nfe.c#5 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#21 (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.25 2006/10/16 21:40:46 jhb Exp $
+ * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.26 2006/11/17 16:41:03 jhb Exp $
  */
 
 /*
@@ -446,10 +446,6 @@
 	current_cpu++;
 	if (current_cpu >= num_cpus)
 		current_cpu = 0;
-	if (bootverbose) {
-		printf("INTR: Assigning IRQ %d", pic->pic_vector(isrc));
-		printf(" to local APIC %u\n", apic_id);
-	}
 	pic->pic_assign_cpu(isrc, apic_id);
 }
 
@@ -483,7 +479,7 @@
 	if (num_cpus <= 1)
 		return;
 
-	/* Round-robin assign each enabled source a CPU. */
+	/* Round-robin assign a CPU to each enabled source. */
 	mtx_lock_spin(&intr_table_lock);
 	assign_cpu = 1;
 	for (i = 0; i < NUM_IO_INTS; i++) {

==== //depot/projects/smpng/sys/amd64/amd64/io_apic.c#18 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.25 2006/10/10 23:23:11 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.26 2006/11/17 16:41:03 jhb Exp $");
 
 #include "opt_isa.h"
 
@@ -512,13 +512,6 @@
 		 * be routed to other CPUs later after they are enabled.
 		 */
 		intpin->io_cpu = PCPU_GET(apic_id);
-		if (bootverbose && intpin->io_irq != IRQ_DISABLED) {
-			printf("ioapic%u: intpin %d -> ",  io->io_id, i);
-			ioapic_print_irq(intpin);
-			printf(" (%s, %s)\n", intpin->io_edgetrigger ?
-			    "edge" : "level", intpin->io_activehi ? "high" :
-			    "low");
-		}
 		value = ioapic_read(apic, IOAPIC_REDTBL_LO(i));
 		ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET);
 	}
@@ -583,6 +576,8 @@
 		return (EINVAL);
 	if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
 		return (EINVAL);
+	if (io->io_pins[pin].io_bus == bus_type)
+		return (0);
 	io->io_pins[pin].io_bus = bus_type;
 	if (bootverbose)
 		printf("ioapic%u: intpin %d bus %s\n", io->io_id, pin,
@@ -666,13 +661,17 @@
 ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol)
 {
 	struct ioapic *io;
+	int activehi;
 
 	io = (struct ioapic *)cookie;
 	if (pin >= io->io_numintr || pol == INTR_POLARITY_CONFORM)
 		return (EINVAL);
 	if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
 		return (EINVAL);
-	io->io_pins[pin].io_activehi = (pol == INTR_POLARITY_HIGH);
+	activehi = (pol == INTR_POLARITY_HIGH);
+	if (io->io_pins[pin].io_activehi == activehi)
+		return (0);
+	io->io_pins[pin].io_activehi = activehi;
 	if (bootverbose)
 		printf("ioapic%u: intpin %d polarity: %s\n", io->io_id, pin,
 		    pol == INTR_POLARITY_HIGH ? "high" : "low");
@@ -683,13 +682,17 @@
 ioapic_set_triggermode(void *cookie, u_int pin, enum intr_trigger trigger)
 {
 	struct ioapic *io;
+	int edgetrigger;
 
 	io = (struct ioapic *)cookie;
 	if (pin >= io->io_numintr || trigger == INTR_TRIGGER_CONFORM)
 		return (EINVAL);
 	if (io->io_pins[pin].io_irq >= NUM_IO_INTS)
-		return (EINVAL);
-	io->io_pins[pin].io_edgetrigger = (trigger == INTR_TRIGGER_EDGE);
+		return (EINVAL);	
+	edgetrigger = (trigger == INTR_TRIGGER_EDGE);
+	if (io->io_pins[pin].io_edgetrigger == edgetrigger)
+		return (0);
+	io->io_pins[pin].io_edgetrigger = edgetrigger;
 	if (bootverbose)
 		printf("ioapic%u: intpin %d trigger: %s\n", io->io_id, pin,
 		    trigger == INTR_TRIGGER_EDGE ? "edge" : "level");

==== //depot/projects/smpng/sys/ddb/db_watch.c#7 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.27 2005/09/10 03:01:24 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.28 2006/11/17 16:41:56 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -168,11 +168,19 @@
 	    return;
 	}
 
+#ifdef __LP64__
+	db_printf(" Map                Address          Size\n");
+#else
 	db_printf(" Map        Address  Size\n");
+#endif
 	for (watch = db_watchpoint_list;
 	     watch != 0;
 	     watch = watch->link)
+#ifdef __LP64__
+	    db_printf("%s%16p  %16lx  %lx\n",
+#else
 	    db_printf("%s%8p  %8lx  %lx\n",
+#endif
 		      db_map_current(watch->map) ? "*" : " ",
 		      (void *)watch->map, (long)watch->loaddr,
 		      (long)watch->hiaddr - (long)watch->loaddr);

==== //depot/projects/smpng/sys/dev/isp/isp_pci.c#43 (text+ko) ====

@@ -30,7 +30,7 @@
  * FreeBSD Version.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.125 2006/11/14 08:45:48 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.126 2006/11/17 17:32:45 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1057,6 +1057,7 @@
 		cmd &= ~PCIM_CMD_INTX_DISABLE;
 	}
 
+#ifdef	WE_KNEW_WHAT_WE_WERE_DOING
 	if (IS_24XX(isp)) {
 		int reg;
 
@@ -1088,6 +1089,11 @@
 			pci_write_config(dev, reg, 2, pectl);
 		}
 	}
+#else
+	if (IS_24XX(isp)) {
+		cmd &= ~PCIM_CMD_INTX_DISABLE;
+	}
+#endif
 
 	pci_write_config(dev, PCIR_COMMAND, cmd, 2);
 

==== //depot/projects/smpng/sys/dev/nfe/if_nfe.c#5 (text+ko) ====

@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.7 2006/10/19 10:01:26 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.8 2006/11/17 16:49:40 obrien Exp $");
 
 /* Uncomment the following line to enable polling. */
 /* #define	DEVICE_POLLING */
@@ -1130,7 +1130,7 @@
 static void
 nfe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
 {
-	struct  nfe_softc *sc = ifp->if_softc;
+	struct nfe_softc *sc = ifp->if_softc;
 
 	NFE_LOCK(sc);
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING)
@@ -1142,7 +1142,7 @@
 static void
 nfe_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count)
 {
-	struct  nfe_softc *sc = ifp->if_softc;
+	struct nfe_softc *sc = ifp->if_softc;
 	u_int32_t r;
 
 	NFE_LOCK_ASSERT(sc);



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