Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2006 17:52:39 GMT
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111293 for review
Message-ID:  <200612081752.kB8HqdWZ017635@repoman.freebsd.org>

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

Change 111293 by mjacob@newisp on 2006/12/08 17:52:04

	IFC

Affected files ...

.. //depot/projects/newisp/amd64/amd64/machdep.c#9 integrate
.. //depot/projects/newisp/amd64/amd64/minidump_machdep.c#2 integrate
.. //depot/projects/newisp/amd64/amd64/pmap.c#5 integrate
.. //depot/projects/newisp/amd64/include/pmap.h#4 integrate
.. //depot/projects/newisp/arm/at91/kb920x_machdep.c#6 integrate
.. //depot/projects/newisp/arm/at91/uart_dev_at91usart.c#2 integrate
.. //depot/projects/newisp/arm/sa11x0/assabet_machdep.c#4 integrate
.. //depot/projects/newisp/arm/xscale/i80321/ep80219_machdep.c#5 integrate
.. //depot/projects/newisp/arm/xscale/i80321/iq31244_machdep.c#4 integrate
.. //depot/projects/newisp/arm/xscale/ixp425/avila_machdep.c#2 integrate
.. //depot/projects/newisp/arm/xscale/ixp425/files.ixp425#2 integrate
.. //depot/projects/newisp/boot/i386/btx/btx/btx.S#4 integrate
.. //depot/projects/newisp/ddb/db_ps.c#3 integrate
.. //depot/projects/newisp/dev/bce/if_bce.c#10 integrate
.. //depot/projects/newisp/dev/dc/if_dc.c#5 integrate
.. //depot/projects/newisp/dev/dc/if_dcreg.h#3 integrate
.. //depot/projects/newisp/dev/firewire/fwdev.c#2 integrate
.. //depot/projects/newisp/dev/gem/if_gem.c#3 integrate
.. //depot/projects/newisp/dev/gem/if_gemvar.h#2 integrate
.. //depot/projects/newisp/dev/hme/if_hme.c#3 integrate
.. //depot/projects/newisp/dev/hme/if_hmevar.h#2 integrate
.. //depot/projects/newisp/dev/ipmi/ipmi.c#5 integrate
.. //depot/projects/newisp/dev/iwi/if_iwi.c#5 integrate
.. //depot/projects/newisp/dev/le/am7990.c#2 integrate
.. //depot/projects/newisp/dev/le/am79900.c#2 integrate
.. //depot/projects/newisp/dev/le/lance.c#2 integrate
.. //depot/projects/newisp/dev/le/lancevar.h#2 integrate
.. //depot/projects/newisp/dev/mpt/mpt.c#9 integrate
.. //depot/projects/newisp/dev/mpt/mpt.h#10 integrate
.. //depot/projects/newisp/dev/mpt/mpt_cam.c#21 integrate
.. //depot/projects/newisp/dev/mpt/mpt_debug.c#3 integrate
.. //depot/projects/newisp/dev/mpt/mpt_raid.c#7 integrate
.. //depot/projects/newisp/dev/nve/if_nvereg.h#2 integrate
.. //depot/projects/newisp/dev/ral/rt2560.c#2 integrate
.. //depot/projects/newisp/dev/ral/rt2661.c#2 integrate
.. //depot/projects/newisp/dev/sound/pcm/channel.c#5 integrate
.. //depot/projects/newisp/dev/sound/pcm/dsp.c#7 integrate
.. //depot/projects/newisp/fs/procfs/procfs_status.c#3 integrate
.. //depot/projects/newisp/i386/i386/machdep.c#8 integrate
.. //depot/projects/newisp/ia64/ia64/machdep.c#5 integrate
.. //depot/projects/newisp/isofs/cd9660/cd9660_node.h#2 integrate
.. //depot/projects/newisp/kern/init_main.c#6 integrate
.. //depot/projects/newisp/kern/kern_clock.c#3 integrate
.. //depot/projects/newisp/kern/kern_fork.c#5 integrate
.. //depot/projects/newisp/kern/kern_idle.c#4 integrate
.. //depot/projects/newisp/kern/kern_intr.c#4 integrate
.. //depot/projects/newisp/kern/kern_kse.c#3 integrate
.. //depot/projects/newisp/kern/kern_poll.c#3 integrate
.. //depot/projects/newisp/kern/kern_proc.c#6 integrate
.. //depot/projects/newisp/kern/kern_resource.c#6 integrate
.. //depot/projects/newisp/kern/kern_subr.c#3 integrate
.. //depot/projects/newisp/kern/kern_switch.c#3 integrate
.. //depot/projects/newisp/kern/kern_thr.c#7 integrate
.. //depot/projects/newisp/kern/kern_thread.c#4 integrate
.. //depot/projects/newisp/kern/kern_umtx.c#12 integrate
.. //depot/projects/newisp/kern/ksched.c#2 integrate
.. //depot/projects/newisp/kern/sched_4bsd.c#6 integrate
.. //depot/projects/newisp/kern/sched_ule.c#4 integrate
.. //depot/projects/newisp/kern/subr_trap.c#5 integrate
.. //depot/projects/newisp/kern/tty.c#8 integrate
.. //depot/projects/newisp/kern/vfs_export.c#3 integrate
.. //depot/projects/newisp/net/if_ethersubr.c#4 integrate
.. //depot/projects/newisp/net/if_ppp.c#6 integrate
.. //depot/projects/newisp/net/if_pppvar.h#3 integrate
.. //depot/projects/newisp/net/ppp_tty.c#3 integrate
.. //depot/projects/newisp/nfsclient/bootp_subr.c#3 integrate
.. //depot/projects/newisp/nfsclient/nfs_diskless.c#2 integrate
.. //depot/projects/newisp/nfsclient/nfs_vfsops.c#5 integrate
.. //depot/projects/newisp/nfsclient/nfsdiskless.h#2 integrate
.. //depot/projects/newisp/pc98/pc98/machdep.c#6 integrate
.. //depot/projects/newisp/pci/if_xl.c#3 integrate
.. //depot/projects/newisp/pci/if_xlreg.h#3 integrate
.. //depot/projects/newisp/powerpc/powerpc/intr_machdep.c#2 integrate
.. //depot/projects/newisp/powerpc/powerpc/machdep.c#3 integrate
.. //depot/projects/newisp/sparc64/sparc64/machdep.c#4 integrate
.. //depot/projects/newisp/sun4v/mdesc/mdesc_vdevfindval.c#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/machdep.c#5 integrate
.. //depot/projects/newisp/sun4v/sun4v/mp_machdep.c#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/uio_machdep.c#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/vnex.c#3 integrate
.. //depot/projects/newisp/sys/proc.h#6 integrate
.. //depot/projects/newisp/sys/rtprio.h#4 integrate
.. //depot/projects/newisp/sys/runq.h#2 integrate
.. //depot/projects/newisp/sys/sched.h#4 integrate
.. //depot/projects/newisp/vm/vm_glue.c#3 integrate
.. //depot/projects/newisp/vm/vm_page.c#7 integrate
.. //depot/projects/newisp/vm/vm_zeroidle.c#3 integrate

Differences ...

==== //depot/projects/newisp/amd64/amd64/machdep.c#9 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.664 2006/11/19 20:54:57 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.666 2006/12/06 18:27:17 sobomax Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -514,6 +514,7 @@
  * help lock contention somewhat, and this is critical for HTT. -Peter
  */
 static int	cpu_idle_hlt = 1;
+TUNABLE_INT("machdep.cpu_idle_hlt", &cpu_idle_hlt);
 SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
     &cpu_idle_hlt, 0, "Idle loop HLT enable");
 
@@ -1121,11 +1122,7 @@
  	 * This may be done better later if it gets more high level
  	 * components in it. If so just link td->td_proc here.
 	 */
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 
 	preload_metadata = (caddr_t)(uintptr_t)(modulep + KERNBASE);
 	preload_bootstrap_relocate(KERNBASE);

==== //depot/projects/newisp/amd64/amd64/minidump_machdep.c#2 (text) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.1 2006/04/21 04:24:50 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.2 2006/12/05 11:31:33 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -215,7 +215,7 @@
 		j = ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1));
 		if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V))  {
 			/* This is an entire 2M page. */
-			pa = pd[j] & PG_FRAME & ~PDRMASK;
+			pa = pd[j] & PG_PS_FRAME;
 			for (k = 0; k < NPTEPG; k++) {
 				if (is_dumpable(pa))
 					dump_add_page(pa);
@@ -326,7 +326,7 @@
 		j = ((va >> PDRSHIFT) & ((1ul << NPDEPGSHIFT) - 1));
 		if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V))  {
 			/* This is a single 2M block. Generate a fake PTP */
-			pa = pd[j] & PG_FRAME & ~PDRMASK;
+			pa = pd[j] & PG_PS_FRAME;
 			for (k = 0; k < NPTEPG; k++) {
 				fakept[k] = (pa + (k * PAGE_SIZE)) | PG_V | PG_RW | PG_A | PG_M;
 			}

==== //depot/projects/newisp/amd64/amd64/pmap.c#5 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.576 2006/11/23 21:37:04 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.577 2006/12/05 11:31:33 ru Exp $");
 
 /*
  *	Manages physical address maps.
@@ -947,9 +947,7 @@
 		pde = *pdep;
 		if (pde) {
 			if ((pde & PG_PS) != 0) {
-				KASSERT((pde & PG_FRAME & PDRMASK) == 0,
-				    ("pmap_extract: bad pde"));
-				rtval = (pde & PG_FRAME) | (va & PDRMASK);
+				rtval = (pde & PG_PS_FRAME) | (va & PDRMASK);
 				PMAP_UNLOCK(pmap);
 				return rtval;
 			}
@@ -982,9 +980,7 @@
 	if (pdep != NULL && (pde = *pdep)) {
 		if (pde & PG_PS) {
 			if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) {
-				KASSERT((pde & PG_FRAME & PDRMASK) == 0,
-				    ("pmap_extract_and_hold: bad pde"));
-				m = PHYS_TO_VM_PAGE((pde & PG_FRAME) |
+				m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) |
 				    (va & PDRMASK));
 				vm_page_hold(m);
 			}
@@ -1013,7 +1009,7 @@
 	} else {
 		pde = vtopde(va);
 		if (*pde & PG_PS) {
-			pa = (*pde & ~(NBPDR - 1)) | (va & (NBPDR - 1));
+			pa = (*pde & PG_PS_FRAME) | (va & PDRMASK);
 		} else {
 			pa = *vtopte(va);
 			pa = (pa & PG_FRAME) | (va & PAGE_MASK);

==== //depot/projects/newisp/amd64/include/pmap.h#4 (text+ko) ====

@@ -39,7 +39,7 @@
  *
  *	from: hp300: @(#)pmap.h	7.2 (Berkeley) 12/16/90
  *	from: @(#)pmap.h	7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.137 2006/11/19 20:54:57 alc Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.138 2006/12/05 11:31:33 ru Exp $
  */
 
 #ifndef _MACHINE_PMAP_H_
@@ -71,6 +71,7 @@
 #define PG_W		PG_AVAIL1	/* "Wired" pseudoflag */
 #define	PG_MANAGED	PG_AVAIL2
 #define	PG_FRAME	(0x000ffffffffff000ul)
+#define	PG_PS_FRAME	(0x000fffffffe00000ul)
 #define	PG_PROT		(PG_RW|PG_U)	/* all protection bits . */
 #define PG_N		(PG_NC_PWT|PG_NC_PCD)	/* Non-cacheable */
 

==== //depot/projects/newisp/arm/at91/kb920x_machdep.c#6 (text) ====

@@ -48,7 +48,7 @@
 #include "opt_at91.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.19 2006/11/11 20:57:52 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.20 2006/12/06 06:34:53 julian Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -455,11 +455,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)
 		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;

==== //depot/projects/newisp/arm/at91/uart_dev_at91usart.c#2 (text) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.9 2006/07/20 21:03:43 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.10 2006/12/07 00:24:15 cognet Exp $");
 
 #include "opt_comconsole.h"
 
@@ -323,7 +323,10 @@
 static int
 at91_usart_bus_attach(struct uart_softc *sc)
 {
-	int err, i;
+#ifndef SKYEYE_WORKAROUNDS
+	int err;
+	int i;
+#endif
 	uint32_t cr;
 	struct at91_usart_softc *atsc;
 
@@ -345,6 +348,7 @@
 	sc->sc_rxfifosz = USART_BUFFER_SIZE;
 	sc->sc_hwiflow = 0;
 
+#ifndef SKYEYE_WORKAROUNDS
 	/*
 	 * Allocate DMA tags and maps
 	 */
@@ -374,6 +378,7 @@
 		atsc->ping = &atsc->ping_pong[0];
 		atsc->pong = &atsc->ping_pong[1];
 	}
+#endif
 
 	/*
 	 * Prime the pump with the RX buffer.  We use two 64 byte bounce
@@ -407,9 +412,13 @@
 		WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY);
 	}
 	WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK);
+#ifndef SKYEYE_WORKAROUNDS
 errout:;
 	// XXX bad
 	return (err);
+#else
+	return (0);
+#endif
 }
 
 static int

==== //depot/projects/newisp/arm/sa11x0/assabet_machdep.c#4 (text+ko) ====

@@ -47,7 +47,7 @@
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.20 2006/11/11 20:57:52 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.21 2006/12/06 06:34:54 julian Exp $");
 
 #include "opt_md.h"
 
@@ -422,11 +422,7 @@
 
 	/* Set stack for exception handlers */
 	
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)
 		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;

==== //depot/projects/newisp/arm/xscale/i80321/ep80219_machdep.c#5 (text+ko) ====

@@ -49,7 +49,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.4 2006/11/17 00:53:39 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.5 2006/12/06 06:34:54 julian Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -429,11 +429,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)
 		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;

==== //depot/projects/newisp/arm/xscale/i80321/iq31244_machdep.c#4 (text+ko) ====

@@ -49,7 +49,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.25 2006/11/17 00:53:39 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.26 2006/12/06 06:34:54 julian Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -427,11 +427,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)
 		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;

==== //depot/projects/newisp/arm/xscale/ixp425/avila_machdep.c#2 (text+ko) ====

@@ -49,7 +49,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.2 2006/12/06 06:34:54 julian Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -493,11 +493,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-#ifdef KSE
-	proc_linkup(&proc0, &ksegrp0, &thread0);
-#else
 	proc_linkup(&proc0, &thread0);
-#endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)
 		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;

==== //depot/projects/newisp/arm/xscale/ixp425/files.ixp425#2 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.1 2006/11/19 23:55:23 sam Exp $
+#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.2 2006/12/07 00:49:33 sam Exp $
 arm/arm/cpufunc_asm_xscale.S		standard
 arm/arm/irq_dispatch.S			standard
 arm/xscale/ixp425/ixp425.c		standard
@@ -18,7 +18,11 @@
 #
 # NPE-based Ethernet support (requires qmgr also).  Note the
 # firmware images must be downloaded from the Intel web site.
+# The URL seems to change frequently; try this as a starting
+# place:
 #
+# http://www.intel.com/design/network/products/npfamily/download_ixp400.htm
+#
 arm/xscale/ixp425/if_npe.c		optional npe
 arm/xscale/ixp425/ixp425_npe.c		optional npe
 ixp425_npe_fw.c				optional npe_fw			\
@@ -31,10 +35,15 @@
 #     get known values for reference in the _fw.c file.
 #
 IxNpeMicrocode.fwo			optional npe_fw			\
-	dependency	"$S/arm/xscale/ixp425/IxNpeMicrocode.dat"	\
-	compile-with	"ln -sf $S/arm/xscale/ixp425/IxNpeMicrocode.dat ${.OBJDIR}; ${LD} -b binary -d -warn-common -r -d -o ${.TARGET} IxNpeMicrocode.dat" \
+	dependency	"IxNpeMicrocode.dat"				\
+	compile-with	"${LD} -b binary -d -warn-common -r -d -o ${.TARGET} IxNpeMicrocode.dat" \
 	no-implicit-rule						\
-	clean		"IxNpeMicrocode.dat IxNpeMicrocode.fwo"
+	clean		"IxNpeMicrocode.fwo"
+IxNpeMicrocode.dat			optional npe_fw			\
+	dependency	".PHONY"					\
+	compile-with	"if [ -e $S/arm/xscale/ixp425/IxNpeMicrocode.dat ]; then ln -sf $S/arm/xscale/ixp425/IxNpeMicrocode.dat .; else echo 'WARNING, no IxNpeMicrocode.dat file; you must obtain this from the Intel web site'; false; fi" \
+	no-obj no-implicit-rule						\
+	clean		"IxNpeMicrocode.dat"
 #
 # Q-Manager support
 #

==== //depot/projects/newisp/boot/i386/btx/btx/btx.S#4 (text+ko) ====

@@ -12,7 +12,7 @@
  * warranties of merchantability and fitness for a particular
  * purpose.
  *
- * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.43 2006/10/05 15:30:51 jhb Exp $
+ * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.44 2006/12/06 17:45:35 jhb Exp $
  */
 
 /*
@@ -499,6 +499,8 @@
 		je v86cli			# Yes
 		cmpb $0xfb,%al			# STI?
 		je v86sti			# Yes
+		cmpb $0xcc,%al			# INT3?
+		je v86mon.7			# Yes, ignore
 		movzwl 0x38(%ebp),%ebx		# Load V86 SS
 		shll $0x4,%ebx			# To offset
 		pushl %ebx			# Save

==== //depot/projects/newisp/ddb/db_ps.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.64 2006/10/26 21:42:17 jb Exp $");
+__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.65 2006/12/06 06:34:54 julian Exp $");
 
 #include <sys/param.h>
 #include <sys/cons.h>
@@ -292,12 +292,7 @@
 		td = kdb_thread;
 
 	db_printf("Thread %d at %p:\n", td->td_tid, td);
-#ifdef KSE
-	db_printf(" proc (pid %d): %p ", td->td_proc->p_pid, td->td_proc);
-	db_printf(" ksegrp: %p\n", td->td_ksegrp);
-#else
 	db_printf(" proc (pid %d): %p\n", td->td_proc->p_pid, td->td_proc);
-#endif
 	if (td->td_name[0] != '\0')
 		db_printf(" name: %s\n", td->td_name);
 	db_printf(" flags: %#x ", td->td_flags);

==== //depot/projects/newisp/dev/bce/if_bce.c#10 (text) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.21 2006/11/16 06:28:54 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.22 2006/12/06 22:53:22 jhb Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -4566,7 +4566,7 @@
             
 		/* Try to defrag the mbuf if there are too many segments. */
 	        DBPRINT(sc, BCE_WARN, "%s(): fragmented mbuf (%d pieces)\n",
-                    __FUNCTION__, map_arg.maxsegs);
+                    __FUNCTION__, nsegs);
 
                 m0 = m_defrag(*m_head, M_DONTWAIT);
                 if (m0 == NULL) {
@@ -4619,7 +4619,7 @@
 	DBPRINT(sc, BCE_INFO_SEND,
 		"%s(): Start: prod = 0x%04X, chain_prod = %04X, "
 		"prod_bseq = 0x%08X\n",
-		__FUNCTION__, *prod, chain_prod, prod_bseq);
+		__FUNCTION__, prod, chain_prod, prod_bseq);
 
 	/*
 	 * Cycle through each mbuf segment that makes up
@@ -4646,7 +4646,7 @@
 	/* Set the END flag on the last TX buffer descriptor. */
 	txbd->tx_bd_flags |= htole16(TX_BD_FLAGS_END);
 
-	DBRUN(BCE_INFO_SEND, bce_dump_tx_chain(sc, debug_prod, nseg));
+	DBRUN(BCE_INFO_SEND, bce_dump_tx_chain(sc, debug_prod, nsegs));
 
 	DBPRINT(sc, BCE_INFO_SEND,
 		"%s(): End: prod = 0x%04X, chain_prod = %04X, "
@@ -6163,7 +6163,7 @@
 	else
 		/* Normal tx_bd entry. */
 		BCE_PRINTF(sc, "tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, "
-			"vlan tag= 0x%4X, "flags = 0x%04X\n", idx, 
+			"vlan tag= 0x%4X, flags = 0x%04X\n", idx, 
 			txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo,
 			txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag,
 			txbd->tx_bd_flags);

==== //depot/projects/newisp/dev/dc/if_dc.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.188 2006/11/02 00:05:15 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.189 2006/12/06 01:56:38 marius Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -247,7 +247,7 @@
 static void dc_init(void *);
 static void dc_init_locked(struct dc_softc *);
 static void dc_stop(struct dc_softc *);
-static void dc_watchdog(struct ifnet *);
+static void dc_watchdog(void *);
 static void dc_shutdown(device_t);
 static int dc_ifmedia_upd(struct ifnet *);
 static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -1138,7 +1138,7 @@
 	 */
 	DELAY(10000);
 
-	ifp->if_timer = 5;
+	sc->dc_wdog_timer = 5;
 }
 
 static void
@@ -1340,7 +1340,7 @@
 	 */
 	DELAY(1000);
 
-	ifp->if_timer = 5;
+	sc->dc_wdog_timer = 5;
 }
 
 static void
@@ -2077,9 +2077,10 @@
 	}
 
 	/* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */
-	error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct dc_list_data), 1,
-	    sizeof(struct dc_list_data), 0, NULL, NULL, &sc->dc_ltag);
+	error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+	    sizeof(struct dc_list_data), 1, sizeof(struct dc_list_data),
+	    0, NULL, NULL, &sc->dc_ltag);
 	if (error) {
 		device_printf(dev, "failed to allocate busdma tag\n");
 		error = ENXIO;
@@ -2105,9 +2106,10 @@
 	 * Allocate a busdma tag and DMA safe memory for the multicast
 	 * setup frame.
 	 */
-	error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR, NULL, NULL, DC_SFRAME_LEN + DC_MIN_FRAMELEN, 1,
-	    DC_SFRAME_LEN + DC_MIN_FRAMELEN, 0, NULL, NULL, &sc->dc_stag);
+	error = bus_dma_tag_create(bus_get_dma_tag(dev), PAGE_SIZE, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+	    DC_SFRAME_LEN + DC_MIN_FRAMELEN, 1, DC_SFRAME_LEN + DC_MIN_FRAMELEN,
+	    0, NULL, NULL, &sc->dc_stag);
 	if (error) {
 		device_printf(dev, "failed to allocate busdma tag\n");
 		error = ENXIO;
@@ -2129,8 +2131,9 @@
 	}
 
 	/* Allocate a busdma tag for mbufs. */
-	error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, DC_TX_LIST_CNT, MCLBYTES,
+	error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+	    MCLBYTES, DC_TX_LIST_CNT, MCLBYTES,
 	    0, NULL, NULL, &sc->dc_mtag);
 	if (error) {
 		device_printf(dev, "failed to allocate busdma tag\n");
@@ -2172,12 +2175,9 @@
 	}
 	ifp->if_softc = sc;
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
-	/* XXX: bleah, MTU gets overwritten in ether_ifattach() */
-	ifp->if_mtu = ETHERMTU;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = dc_ioctl;
 	ifp->if_start = dc_start;
-	ifp->if_watchdog = dc_watchdog;
 	ifp->if_init = dc_init;
 	IFQ_SET_MAXLEN(&ifp->if_snd, DC_TX_LIST_CNT - 1);
 	ifp->if_snd.ifq_drv_maxlen = DC_TX_LIST_CNT - 1;
@@ -2256,6 +2256,7 @@
 #endif
 
 	callout_init_mtx(&sc->dc_stat_ch, &sc->dc_mtx, 0);
+	callout_init_mtx(&sc->dc_wdog_ch, &sc->dc_mtx, 0);
 
 	/*
 	 * Call MI attach routine.
@@ -2309,6 +2310,7 @@
 		dc_stop(sc);
 		DC_UNLOCK(sc);
 		callout_drain(&sc->dc_stat_ch);
+		callout_drain(&sc->dc_wdog_ch);
 		ether_ifdetach(ifp);
 	}
 	if (sc->dc_miibus)
@@ -2869,7 +2871,7 @@
 		sc->dc_cdata.dc_tx_cons = idx;
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	}
-	ifp->if_timer = (sc->dc_cdata.dc_tx_cnt == 0) ? 0 : 5;
+	sc->dc_wdog_timer = (sc->dc_cdata.dc_tx_cnt == 0) ? 0 : 5;
 }
 
 static void
@@ -3338,7 +3340,7 @@
 		/*
 		 * Set a timeout in case the chip goes out to lunch.
 		 */
-		ifp->if_timer = 5;
+		sc->dc_wdog_timer = 5;
 	}
 }
 
@@ -3525,6 +3527,9 @@
 		else
 			callout_reset(&sc->dc_stat_ch, hz, dc_tick, sc);
 	}
+
+	sc->dc_wdog_timer = 0;
+	callout_reset(&sc->dc_wdog_ch, hz, dc_watchdog, sc);
 }
 
 /*
@@ -3659,16 +3664,21 @@
 }
 
 static void
-dc_watchdog(struct ifnet *ifp)
+dc_watchdog(void *xsc)
 {
-	struct dc_softc *sc;
+	struct dc_softc *sc = xsc;
+	struct ifnet *ifp;
 
-	sc = ifp->if_softc;
+	DC_LOCK_ASSERT(sc);
 
-	DC_LOCK(sc);
+	if (sc->dc_wdog_timer == 0 || --sc->dc_wdog_timer != 0) {
+		callout_reset(&sc->dc_wdog_ch, hz, dc_watchdog, sc);
+		return;
+	}
 
+	ifp = sc->dc_ifp;
 	ifp->if_oerrors++;
-	if_printf(ifp, "watchdog timeout\n");
+	device_printf(sc->dc_dev, "watchdog timeout\n");
 
 	dc_stop(sc);
 	dc_reset(sc);
@@ -3676,8 +3686,6 @@
 
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		dc_start_locked(ifp);
-
-	DC_UNLOCK(sc);
 }
 
 /*
@@ -3696,11 +3704,12 @@
 	DC_LOCK_ASSERT(sc);
 
 	ifp = sc->dc_ifp;
-	ifp->if_timer = 0;
 	ld = sc->dc_ldata;
 	cd = &sc->dc_cdata;
 
 	callout_stop(&sc->dc_stat_ch);
+	callout_stop(&sc->dc_wdog_ch);
+	sc->dc_wdog_timer = 0;
 
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 

==== //depot/projects/newisp/dev/dc/if_dcreg.h#3 (text+ko) ====

@@ -29,7 +29,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.52 2006/09/15 15:16:10 glebius Exp $
+ * $FreeBSD: src/sys/dev/dc/if_dcreg.h,v 1.53 2006/12/06 01:56:38 marius Exp $
  */
 
 /*
@@ -749,9 +749,8 @@
 	struct dc_list_data	*dc_ldata;
 	struct dc_chain_data	dc_cdata;
 	struct callout		dc_stat_ch;
-#ifdef SRM_MEDIA
-	int			dc_srm_media;
-#endif
+	struct callout		dc_wdog_ch;
+	int			dc_wdog_timer;
 	struct mtx		dc_mtx;
 #ifdef DEVICE_POLLING
 	int			rxcycles;	/* ... when polling */

==== //depot/projects/newisp/dev/firewire/fwdev.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.47 2005/08/08 19:55:30 rwatson Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.48 2006/12/06 09:13:24 cperciva Exp $
  *
  */
 
@@ -712,7 +712,7 @@
 			else
 				len = fwdev->rommax - CSRROMOFF + 4;
 		}
-		if (crom_buf->len < len)
+		if (crom_buf->len < len && crom_buf->len >= 0)
 			len = crom_buf->len;
 		else
 			crom_buf->len = len;

==== //depot/projects/newisp/dev/gem/if_gem.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.39 2006/09/03 00:27:41 jmg Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.40 2006/12/06 02:04:25 marius Exp $");
 
 /*
  * Driver for Sun GEM ethernet controllers.
@@ -83,16 +83,16 @@
 static void	gem_txdma_callback(void *, bus_dma_segment_t *, int,
     bus_size_t, int);
 static void	gem_tick(void *);
-static void	gem_watchdog(struct ifnet *);
+static int	gem_watchdog(struct gem_softc *);
 static void	gem_init(void *);
-static void	gem_init_locked(struct gem_softc *sc);
-static void	gem_init_regs(struct gem_softc *sc);
+static void	gem_init_locked(struct gem_softc *);
+static void	gem_init_regs(struct gem_softc *);
 static int	gem_ringsize(int sz);
 static int	gem_meminit(struct gem_softc *);
 static int	gem_load_txmbuf(struct gem_softc *, struct mbuf *);
 static void	gem_mifinit(struct gem_softc *);
-static int	gem_bitwait(struct gem_softc *sc, bus_addr_t r,
-    u_int32_t clr, u_int32_t set);
+static int	gem_bitwait(struct gem_softc *, bus_addr_t, u_int32_t,
+    u_int32_t);
 static int	gem_reset_rx(struct gem_softc *);
 static int	gem_reset_tx(struct gem_softc *);
 static int	gem_disable_rx(struct gem_softc *);
@@ -268,11 +268,9 @@
 	ifp->if_softc = sc;
 	if_initname(ifp, device_get_name(sc->sc_dev),
 	    device_get_unit(sc->sc_dev));
-	ifp->if_mtu = ETHERMTU;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = gem_start;
 	ifp->if_ioctl = gem_ioctl;
-	ifp->if_watchdog = gem_watchdog;
 	ifp->if_init = gem_init;
 	ifp->if_snd.ifq_maxlen = GEM_TXQUEUELEN;
 	/*
@@ -544,6 +542,9 @@
 	GEM_LOCK_ASSERT(sc, MA_OWNED);
 	mii_tick(sc->sc_mii);
 
+	if (gem_watchdog(sc) == EJUSTRETURN)
+		return;
+
 	callout_reset(&sc->sc_tick_ch, hz, gem_tick, sc);
 }
 
@@ -657,7 +658,7 @@
 	 * Mark the interface down and cancel the watchdog timer.
 	 */
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
-	ifp->if_timer = 0;
+	sc->sc_wdog_timer = 0;
 }
 
 /*
@@ -982,11 +983,11 @@
 	bus_space_write_4(t, h, GEM_RX_KICK, GEM_NRXDESC-4);
 
 	/* Start the one second timer. */
+	sc->sc_wdog_timer = 0;
 	callout_reset(&sc->sc_tick_ch, hz, gem_tick, sc);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	ifp->if_timer = 0;
 	sc->sc_ifflags = ifp->if_flags;
 }
 
@@ -1223,10 +1224,10 @@
 #endif
 
 		/* Set a watchdog timer in case the chip flakes out. */
-		ifp->if_timer = 5;
+		sc->sc_wdog_timer = 5;
 #ifdef GEM_DEBUG
 		CTR2(KTR_GEM, "%s: gem_start: watchdog %d",
-			device_get_name(sc->sc_dev), ifp->if_timer);
+		    device_get_name(sc->sc_dev), sc->sc_wdog_timer);
 #endif
 	}
 }
@@ -1355,13 +1356,12 @@
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 		gem_start_locked(ifp);
 
-		if (STAILQ_EMPTY(&sc->sc_txdirtyq))
-			ifp->if_timer = 0;
+		sc->sc_wdog_timer = STAILQ_EMPTY(&sc->sc_txdirtyq) ? 0 : 5;
 	}
 
 #ifdef GEM_DEBUG
 	CTR2(KTR_GEM, "%s: gem_tint: watchdog %d",
-		device_get_name(sc->sc_dev), ifp->if_timer);
+	    device_get_name(sc->sc_dev), sc->sc_wdog_timer);
 #endif
 }
 
@@ -1616,14 +1616,13 @@
 	GEM_UNLOCK(sc);
 }
 
+static int
+gem_watchdog(sc)
+	struct gem_softc *sc;
+{
 
-static void
-gem_watchdog(ifp)
-	struct ifnet *ifp;
-{
-	struct gem_softc *sc = ifp->if_softc;
+	GEM_LOCK_ASSERT(sc, MA_OWNED);
 
-	GEM_LOCK(sc);
 #ifdef GEM_DEBUG
 	CTR3(KTR_GEM, "gem_watchdog: GEM_RX_CONFIG %x GEM_MAC_RX_STATUS %x "
 		"GEM_MAC_RX_CONFIG %x",
@@ -1637,12 +1636,15 @@
 		bus_space_read_4(sc->sc_bustag, sc->sc_h, GEM_MAC_TX_CONFIG));
 #endif
 
+	if (sc->sc_wdog_timer == 0 || --sc->sc_wdog_timer != 0)
+		return (0);
+
 	device_printf(sc->sc_dev, "device timeout\n");
-	++ifp->if_oerrors;
+	++sc->sc_ifp->if_oerrors;
 
 	/* Try to get more packets going. */
 	gem_init_locked(sc);
-	GEM_UNLOCK(sc);
+	return (EJUSTRETURN);
 }
 
 /*

==== //depot/projects/newisp/dev/gem/if_gemvar.h#2 (text+ko) ====

@@ -25,7 +25,7 @@
  *
  *	from: NetBSD: gemvar.h,v 1.8 2002/05/15 02:36:12 matt Exp
  *
- * $FreeBSD: src/sys/dev/gem/if_gemvar.h,v 1.11 2005/07/24 18:45:15 marius Exp $
+ * $FreeBSD: src/sys/dev/gem/if_gemvar.h,v 1.12 2006/12/06 02:04:25 marius Exp $
  */
 
 #ifndef	_IF_GEMVAR_H
@@ -130,6 +130,7 @@
 	u_char		sc_enaddr[6];
 	struct callout	sc_tick_ch;	/* tick callout */
 	struct callout	sc_rx_ch;	/* delayed rx callout */
+	int		sc_wdog_timer;	/* watchdog timer */
 
 	/* The following bus handles are to be provided by the bus front-end */
 	bus_space_tag_t	sc_bustag;	/* bus tag */

==== //depot/projects/newisp/dev/hme/if_hme.c#3 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme.c,v 1.51 2006/12/04 01:53:40 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hme/if_hme.c,v 1.52 2006/12/06 02:07:19 marius Exp $");
 
 /*
  * HME Ethernet module driver.
@@ -104,7 +104,7 @@
 static void	hme_stop(struct hme_softc *);
 static int	hme_ioctl(struct ifnet *, u_long, caddr_t);
 static void	hme_tick(void *);
-static void	hme_watchdog(struct ifnet *);
+static int	hme_watchdog(struct hme_softc *);
 static void	hme_init(void *);
 static void	hme_init_locked(struct hme_softc *);
 static int	hme_add_rxbuf(struct hme_softc *, unsigned int, int);
@@ -214,9 +214,10 @@
 	 */
 	size =	4096;
 
-	error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR, NULL, NULL, size, HME_NTXDESC + HME_NRXDESC + 1,
-	    BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->sc_pdmatag);
+	error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size,
+	    HME_NTXDESC + HME_NRXDESC + 1, BUS_SPACE_MAXSIZE_32BIT, 0,
+	    NULL, NULL, &sc->sc_pdmatag);
 	if (error)
 		goto fail_ifnet;
 
@@ -290,12 +291,10 @@
 	ifp->if_softc = sc;
 	if_initname(ifp, device_get_name(sc->sc_dev),
 	    device_get_unit(sc->sc_dev));
-	ifp->if_mtu = ETHERMTU;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_start = hme_start;
 	ifp->if_ioctl = hme_ioctl;
 	ifp->if_init = hme_init;
-	ifp->if_watchdog = hme_watchdog;
 	IFQ_SET_MAXLEN(&ifp->if_snd, HME_NTXQ);
 	ifp->if_snd.ifq_drv_maxlen = HME_NTXQ;
 	IFQ_SET_READY(&ifp->if_snd);
@@ -467,6 +466,9 @@
 
 	mii_tick(sc->sc_mii);
 
+	if (hme_watchdog(sc) == EJUSTRETURN)
+		return;
+
 	callout_reset(&sc->sc_tick_ch, hz, hme_tick, sc);
 }
 
@@ -477,6 +479,7 @@
 	int n;
 
 	callout_stop(&sc->sc_tick_ch);
+	sc->sc_wdog_timer = 0;
 	sc->sc_ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
 	/* Mask all interrupts */
@@ -876,11 +879,11 @@
 	hme_mediachange_locked(sc);
 
 	/* Start the one second timer. */
+	sc->sc_wdog_timer = 0;
 	callout_reset(&sc->sc_tick_ch, hz, hme_tick, sc);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-	ifp->if_timer = 0;

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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