From owner-p4-projects@FreeBSD.ORG Fri Nov 17 19:05:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF57C16A695; Fri, 17 Nov 2006 19:05:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 852E816A691 for ; Fri, 17 Nov 2006 19:05:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0543143D45 for ; Fri, 17 Nov 2006 19:05:42 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHJ5fP8032151 for ; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHJ5fhd032146 for perforce@freebsd.org; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from jhb@freebsd.org) Date: Fri, 17 Nov 2006 19:05:41 GMT Message-Id: <200611171905.kAHJ5fhd032146@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 110169 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:05:43 -0000 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 -__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 -__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 #include @@ -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 -__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 #include @@ -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 -__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);