Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 21:43:43 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 62056 for review
Message-ID:  <200409232143.i8NLhhQe066913@repoman.freebsd.org>

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

Change 62056 by jhb@jhb_slimer on 2004/09/23 21:43:29

	IFC @62053.

Affected files ...

.. //depot/projects/smpng/sys/boot/efi/libefi/elf_freebsd.c#13 integrate
.. //depot/projects/smpng/sys/boot/efi/loader/main.c#13 integrate
.. //depot/projects/smpng/sys/coda/coda_vfsops.c#18 integrate
.. //depot/projects/smpng/sys/conf/NOTES#82 integrate
.. //depot/projects/smpng/sys/conf/files#122 integrate
.. //depot/projects/smpng/sys/conf/kern.post.mk#39 integrate
.. //depot/projects/smpng/sys/conf/options#87 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/pfvar.h#5 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_pci.c#15 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#21 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_acpi.c#13 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpivar.h#48 integrate
.. //depot/projects/smpng/sys/dev/cp/if_cp.c#6 integrate
.. //depot/projects/smpng/sys/dev/ctau/if_ct.c#9 integrate
.. //depot/projects/smpng/sys/dev/cx/if_cx.c#13 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdc.c#9 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdcvar.h#5 integrate
.. //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#22 integrate
.. //depot/projects/smpng/sys/dev/isp/isp_pci.c#26 integrate
.. //depot/projects/smpng/sys/dev/pdq/pdq.c#6 integrate
.. //depot/projects/smpng/sys/fs/specfs/spec_vnops.c#38 integrate
.. //depot/projects/smpng/sys/i386/conf/PAE#9 integrate
.. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#69 integrate
.. //depot/projects/smpng/sys/ia64/ia64/exception.S#8 integrate
.. //depot/projects/smpng/sys/ia64/ia64/locore.S#6 integrate
.. //depot/projects/smpng/sys/ia64/ia64/machdep.c#86 integrate
.. //depot/projects/smpng/sys/ia64/ia64/pmap.c#63 integrate
.. //depot/projects/smpng/sys/ia64/include/atomic.h#3 integrate
.. //depot/projects/smpng/sys/ia64/include/pmap.h#20 integrate
.. //depot/projects/smpng/sys/ia64/include/pte.h#4 integrate
.. //depot/projects/smpng/sys/isofs/cd9660/cd9660_vnops.c#18 integrate
.. //depot/projects/smpng/sys/kern/kern_conf.c#31 integrate
.. //depot/projects/smpng/sys/kern/kern_exec.c#77 integrate
.. //depot/projects/smpng/sys/kern/kern_kse.c#11 integrate
.. //depot/projects/smpng/sys/kern/kern_physio.c#15 integrate
.. //depot/projects/smpng/sys/kern/subr_trap.c#71 integrate
.. //depot/projects/smpng/sys/kern/tty_pty.c#34 integrate
.. //depot/projects/smpng/sys/kern/vfs_aio.c#50 integrate
.. //depot/projects/smpng/sys/kern/vfs_bio.c#68 integrate
.. //depot/projects/smpng/sys/kern/vfs_mount.c#33 integrate
.. //depot/projects/smpng/sys/kern/vfs_subr.c#83 integrate
.. //depot/projects/smpng/sys/modules/Makefile#83 integrate
.. //depot/projects/smpng/sys/net/if_arcsubr.c#16 integrate
.. //depot/projects/smpng/sys/net/pfil.c#5 integrate
.. //depot/projects/smpng/sys/netinet6/ip6_fw.c#17 integrate
.. //depot/projects/smpng/sys/netipsec/keydb.h#4 integrate
.. //depot/projects/smpng/sys/pci/viapm.c#7 integrate
.. //depot/projects/smpng/sys/rpc/rpcclnt.h#4 integrate
.. //depot/projects/smpng/sys/sys/conf.h#32 integrate
.. //depot/projects/smpng/sys/sys/proc.h#128 integrate
.. //depot/projects/smpng/sys/sys/resource.h#12 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_vfsops.c#58 integrate

Differences ...

==== //depot/projects/smpng/sys/boot/efi/libefi/elf_freebsd.c#13 (text+ko) ====

@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/elf_freebsd.c,v 1.13 2004/04/05 23:41:28 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/elf_freebsd.c,v 1.14 2004/09/23 18:37:36 marcel Exp $");
 
 #include <stand.h>
 #include <string.h>
@@ -137,7 +137,7 @@
 {
 	struct file_metadata	*md;
 	Elf_Ehdr		*hdr;
-	struct ia64_pte		pte;
+	pt_entry_t		pte;
 	struct bootinfo		*bi;
 	u_int64_t		psr;
 	UINTN			mapkey, pages, size;
@@ -193,25 +193,17 @@
 	ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (28 << 2));
 	ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (28 << 2));
 
-	bzero(&pte, sizeof(pte));
-	pte.pte_p = 1;
-	pte.pte_ma = PTE_MA_WB;
-	pte.pte_a = 1;
-	pte.pte_d = 1;
-	pte.pte_pl = PTE_PL_KERN;
-	pte.pte_ar = PTE_AR_RWX;
-	pte.pte_ppn = 0;
+	pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY |
+	    PTE_PL_KERN | PTE_AR_RWX;
 
 	__asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7)));
 	__asm __volatile("mov cr.itir=%0" :: "r"(28 << 2));
 	__asm __volatile("ptr.i %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
 	__asm __volatile("ptr.d %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
 	__asm __volatile("srlz.i;;");
-	__asm __volatile("itr.i itr[%0]=%1;;"
-			 :: "r"(0), "r"(*(u_int64_t*)&pte));
+	__asm __volatile("itr.i itr[%0]=%1;;" :: "r"(0), "r"(pte));
 	__asm __volatile("srlz.i;;");
-	__asm __volatile("itr.d dtr[%0]=%1;;"
-			 :: "r"(0), "r"(*(u_int64_t*)&pte));
+	__asm __volatile("itr.d dtr[%0]=%1;;" :: "r"(0), "r"(pte));
 	__asm __volatile("srlz.i;;");
 
 	enter_kernel(hdr->e_entry, bi);

==== //depot/projects/smpng/sys/boot/efi/loader/main.c#13 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/efi/loader/main.c,v 1.21 2004/08/10 02:08:57 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/efi/loader/main.c,v 1.22 2004/09/23 18:37:36 marcel Exp $");
 
 #include <stand.h>
 #include <string.h>
@@ -387,7 +387,7 @@
 	struct ia64_pal_result res;
 	int i, maxtr;
 	struct {
-		struct ia64_pte	pte;
+		pt_entry_t	pte;
 		struct ia64_itir itir;
 		uint64_t	ifa;
 		struct ia64_rr	rr;
@@ -436,28 +436,24 @@
 			continue;
 
 		if (!(res.pal_result[0] & 1))
-			buf.pte.pte_ar = 0;
+			buf.pte &= ~PTE_AR_MASK;
 		if (!(res.pal_result[0] & 2))
-			buf.pte.pte_pl = 0;
+			buf.pte &= ~PTE_PL_MASK;
 		if (!(res.pal_result[0] & 4))
-			buf.pte.pte_d = 0;
+			buf.pte &= ~PTE_DIRTY;
 		if (!(res.pal_result[0] & 8))
-			buf.pte.pte_ma = 0;
-		sprintf(lbuf,
-	"%03d %06x %013lx %013lx %4s %d  %d  %d  %d %d %-3s %d %06x\n",
-			i,
-			buf.rr.rr_rid,
-			buf.ifa >> 12,
-			buf.pte.pte_ppn,
-			psnames[buf.itir.itir_ps],
-			buf.pte.pte_ed,
-			buf.pte.pte_ar,
-			buf.pte.pte_pl,
-			buf.pte.pte_d,
-			buf.pte.pte_a,
-			manames[buf.pte.pte_ma],
-			buf.pte.pte_p,
-			buf.itir.itir_key);
+			buf.pte &= ~PTE_MA_MASK;
+		sprintf(lbuf, "%03d %06x %013lx %013lx %4s %d  %d  %d  %d %d "
+		    "%-3s %d %06x\n", i, buf.rr.rr_rid, buf.ifa >> 12,
+		    (buf.pte & PTE_PPN_MASK) >> 12, psnames[buf.itir.ps],
+		    (buf.pte & PTE_ED) ? 1 : 0,
+		    (int)(buf.pte & PTE_AR_MASK) >> 9,
+		    (int)(buf.pte & PTE_PL_MASK) >> 7,
+		    (buf.pte & PTE_DIRTY) ? 1 : 0,
+		    (buf.pte & PTE_ACCESSED) ? 1 : 0,
+		    manames[(buf.pte & PTE_MA_MASK) >> 2],
+		    (buf.pte & PTE_PRESENT) ? 1 : 0,
+		    buf.itir.key);
 		pager_output(lbuf);
 	}
 	pager_close();

==== //depot/projects/smpng/sys/coda/coda_vfsops.c#18 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.53 2004/09/01 01:19:51 brooks Exp $");
+__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.54 2004/09/23 12:19:24 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -152,7 +152,7 @@
     /*
      * See if the device table matches our expectations.
      */
-    if (devsw(dev)->d_open != vc_nb_open)
+    if (dev->si_devsw->d_open != vc_nb_open)
     {
 	MARK_INT_FAIL(CODA_MOUNT_STATS);
 	return(ENXIO);

==== //depot/projects/smpng/sys/conf/NOTES#82 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1278 2004/09/16 20:35:27 glebius Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1279 2004/09/23 08:34:50 phk Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1093,20 +1093,6 @@
 device		snp		#Snoop device - to look at pty/vty/etc..
 device		ccd		#Concatenated disk driver
 
-# Configuring Vinum into the kernel is not necessary, since the kld
-# module gets started automatically when vinum(8) starts.  This
-# device is also untested.  Use at your own risk.
-#
-# The option VINUMDEBUG must match the value set in CFLAGS
-# in src/sbin/vinum/Makefile.  Failure to do so will result in
-# the following message from vinum(8):
-#
-# Can't get vinum config: Invalid argument
-#
-# see vinum(4) for more reasons not to use these options.
-device		vinum		#Vinum concat/mirror/raid driver
-options 	VINUMDEBUG	#enable Vinum debugging hooks
-
 # Kernel side iconv library
 options 	LIBICONV
 

==== //depot/projects/smpng/sys/conf/files#122 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.953 2004/09/16 20:35:27 glebius Exp $
+# $FreeBSD: src/sys/conf/files,v 1.954 2004/09/23 08:34:50 phk Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -829,20 +829,6 @@
 dev/usb/usbdi.c		optional usb
 dev/usb/usbdi_util.c	optional usb
 dev/utopia/utopia.c		optional utopia
-dev/vinum/vinum.c		optional vinum
-dev/vinum/vinumconfig.c		optional vinum
-dev/vinum/vinumdaemon.c		optional vinum
-dev/vinum/vinuminterrupt.c	optional vinum
-dev/vinum/vinumio.c		optional vinum
-dev/vinum/vinumioctl.c		optional vinum
-dev/vinum/vinumlock.c		optional vinum
-dev/vinum/vinummemory.c		optional vinum
-dev/vinum/vinumparser.c		optional vinum
-dev/vinum/vinumraid5.c		optional vinum
-dev/vinum/vinumrequest.c	optional vinum
-dev/vinum/vinumrevive.c		optional vinum
-dev/vinum/vinumstate.c		optional vinum
-dev/vinum/vinumutil.c		optional vinum
 dev/vge/if_vge.c		optional vge
 dev/vx/if_vx.c			optional vx
 dev/vx/if_vx_eisa.c		optional vx eisa

==== //depot/projects/smpng/sys/conf/kern.post.mk#39 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.69 2004/09/17 09:17:33 ru Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.70 2004/09/23 08:34:50 phk Exp $
 
 # Part of a unified Makefile for building kernels.  This part includes all
 # the definitions that need to be after all the % directives except %RULES
@@ -59,8 +59,7 @@
 gdbinit:
 	grep -v '# XXX' ${S}/../tools/debugscripts/dot.gdbinit | \
 	    sed "s:MODPATH:${.OBJDIR}/modules:" > .gdbinit
-	cp ${S}/../tools/debugscripts/gdbinit.kernel \
-	    ${S}/../tools/debugscripts/gdbinit.vinum ${.CURDIR}
+	cp ${S}/../tools/debugscripts/gdbinit.kernel ${.CURDIR}
 .if exists(${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH})
 	cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH} \
 	    ${.CURDIR}/gdbinit.machine

==== //depot/projects/smpng/sys/conf/options#87 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.484 2004/09/16 20:35:27 glebius Exp $
+# $FreeBSD: src/sys/conf/options,v 1.485 2004/09/23 08:34:50 phk Exp $
 #
 #        On the handling of kernel options
 #
@@ -570,9 +570,6 @@
 UVSCOM_DEFAULT_OPKTSIZE	opt_uvscom.h
 UVSCOM_INTR_INTERVAL	opt_uvscom.h
 
-# Vinum options
-VINUMDEBUG		opt_vinum.h
-
 # Embedded system options
 INIT_PATH		opt_init_path.h
 

==== //depot/projects/smpng/sys/contrib/pf/net/pfvar.h#5 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/pfvar.h,v 1.8 2004/08/12 13:59:44 mlaier Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/pfvar.h,v 1.9 2004/09/23 12:44:40 mlaier Exp $	*/
 /*	$OpenBSD: pfvar.h,v 1.187 2004/03/22 04:54:18 mcbride Exp $ */
 /* add	$OpenBSD: pfvar.h,v 1.194 2004/05/11 07:34:11 dhartmei Exp $ */
 
@@ -49,16 +49,6 @@
 
 #ifdef __FreeBSD__
 #include <netinet/in.h>
-/*
- * XXX
- *  If we include <netipsec/keydb.h>, we need _KERNEL definition.
- *  This makes pfctl compilation difficult.
- */
-union sockaddr_union {
-	struct sockaddr		sa;
-	struct sockaddr_in	sin;
-	struct sockaddr_in6	sin6;
-};
 #endif
 
 #include <netinet/tcp_fsm.h>
@@ -831,6 +821,15 @@
 #define	pfrts_name	pfrts_t.pfrt_name
 #define pfrts_flags	pfrts_t.pfrt_flags
 
+#ifndef _SOCKADDR_UNION_DEFINED
+#define	_SOCKADDR_UNION_DEFINED
+union sockaddr_union {
+	struct sockaddr		sa;
+	struct sockaddr_in	sin;
+	struct sockaddr_in6	sin6;
+};
+#endif /* _SOCKADDR_UNION_DEFINED */
+
 SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
 struct pfr_kentry {
 	struct radix_node	 pfrke_node[2];

==== //depot/projects/smpng/sys/dev/acpica/acpi_pci.c#15 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.23 2004/08/13 06:21:58 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.24 2004/09/22 15:46:16 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -280,8 +280,8 @@
 
 	if (ACPI_FAILURE(acpi_GetInteger(handle, "_ADR", &address)))
 		return_ACPI_STATUS (AE_OK);
-	slot = address >> 16;
-	func = address & 0xffff;
+	slot = ACPI_ADR_PCI_SLOT(address);
+	func = ACPI_ADR_PCI_FUNC(address);
 	if (device_get_children((device_t)context, &devlist, &devcount) != 0)
 		return_ACPI_STATUS (AE_OK);
 	for (i = 0; i < devcount; i++) {

==== //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#21 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.31 2004/09/20 05:56:01 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.32 2004/09/22 15:46:16 jhb Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -151,7 +151,7 @@
 	}
 
 	printf(" %d.%d.%d\n", entry->busno,
-	    (int)((entry->prt.Address & 0xffff0000) >> 16),
+	    (int)(ACPI_ADR_PCI_SLOT(entry->prt.Address)),
 	    (int)entry->prt.Pin);
 }
 
@@ -981,7 +981,7 @@
 
 		snprintf(prthint, sizeof(prthint),
 		    "hw.acpi.pci.link.%d.%d.%d.irq", entry->busno,
-		    (int)((entry->prt.Address & 0xffff0000) >> 16),
+		    (int)(ACPI_ADR_PCI_SLOT(entry->prt.Address)),
 		    (int)entry->prt.Pin);
 
 		if (getenv_int(prthint, &irq) == 0)
@@ -1069,7 +1069,7 @@
 	TAILQ_FOREACH(entry, &acpi_prt_entries, links) {
 		prt = &entry->prt;
 		if (entry->busno == pci_get_bus(dev) &&
-		    (prt->Address & 0xffff0000) >> 16 == pci_get_slot(dev) &&
+		    ACPI_ADR_PCI_SLOT(prt->Address) == pci_get_slot(dev) &&
 		    prt->Pin == pin)
 			break;
 	}

==== //depot/projects/smpng/sys/dev/acpica/acpi_pcib_acpi.c#13 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.39 2004/08/11 14:52:50 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.40 2004/09/22 15:46:16 jhb Exp $
  */
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -188,8 +188,8 @@
 		device_printf(dev, "couldn't find _ADR\n");
 	} else {
 	    /* XXX: We assume bus 0. */
-	    slot = addr >> 16;
-	    func = addr & 0xffff;
+	    slot = ACPI_ADR_PCI_SLOT(addr);
+	    func = ACPI_ADR_PCI_FUNC(addr);
 	    if (bootverbose)
 		device_printf(dev, "reading config registers from 0:%d:%d\n",
 		    slot, func);

==== //depot/projects/smpng/sys/dev/acpica/acpivar.h#48 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.81 2004/08/23 16:28:42 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.82 2004/09/22 15:46:16 jhb Exp $
  */
 
 #include "acpi_if.h"
@@ -98,6 +98,10 @@
 /* Flags for each device defined in the AML namespace. */
 #define ACPI_FLAG_WAKE_ENABLED	0x1
 
+/* Macros for extracting parts of a PCI address from an _ADR value. */
+#define	ACPI_ADR_PCI_SLOT(adr)	(((adr) & 0xffff0000) >> 16)
+#define	ACPI_ADR_PCI_FUNC(adr)	((adr) & 0xffff)
+
 /*
  * Entry points to ACPI from above are global functions defined in this
  * file, sysctls, and I/O on the control device.  Entry points from below

==== //depot/projects/smpng/sys/dev/cp/if_cp.c#6 (text+ko) ====

@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cp/if_cp.c,v 1.12 2004/08/13 23:02:17 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cp/if_cp.c,v 1.13 2004/09/23 12:21:10 phk Exp $");
 
 #include <sys/param.h>
 
@@ -2411,23 +2411,10 @@
 
 static int cp_modevent (module_t mod, int type, void *unused)
 {
-	struct cdev *dev;
 	static int load_count = 0;
-	struct cdevsw *cdsw;
 
-#if __FreeBSD_version >= 502103
-	dev = findcdev (makedev(CDEV_MAJOR, 0));
-#else
-	dev = makedev (CDEV_MAJOR, 0);
-#endif
 	switch (type) {
 	case MOD_LOAD:
-		if (dev != NULL &&
-		    (cdsw = devsw (dev)) &&
-		    cdsw->d_maj == CDEV_MAJOR) {
-			printf ("Tau-PCI driver is already in system\n");
-			return (ENXIO);
-		}
 #if __FreeBSD_version >= 500000 && defined NETGRAPH
 		if (ng_newtype (&typestruct))
 			printf ("Failed to register ng_cp\n");

==== //depot/projects/smpng/sys/dev/ctau/if_ct.c#9 (text+ko) ====

@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.15 2004/08/27 22:14:26 rik Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.16 2004/09/23 12:21:11 phk Exp $");
 
 #include <sys/param.h>
  
@@ -2338,23 +2338,10 @@
 
 static int ct_modevent (module_t mod, int type, void *unused)
 {
-	struct cdev *dev;
 	static int load_count = 0;
-	struct cdevsw *cdsw;
 
-#if __FreeBSD_version >= 502103
-	dev = findcdev (makedev(CDEV_MAJOR, 0));
-#else
-	dev = makedev (CDEV_MAJOR, 0);
-#endif
 	switch (type) {
 	case MOD_LOAD:
-		if (dev != NULL &&
-		    (cdsw = devsw (dev)) &&
-		    cdsw->d_maj == CDEV_MAJOR) {
-			printf ("Tau-ISA driver is already in system\n");
-			return (ENXIO);
-		}
 #if __FreeBSD_version >= 500000 && defined NETGRAPH
 		if (ng_newtype (&typestruct))
 			printf ("Failed to register ng_ct\n");

==== //depot/projects/smpng/sys/dev/cx/if_cx.c#13 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.31 2004/08/27 22:14:26 rik Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.32 2004/09/23 12:21:11 phk Exp $");
 
 #include <sys/param.h>
 
@@ -2789,23 +2789,10 @@
 
 static int cx_modevent (module_t mod, int type, void *unused)
 {
-	struct cdev *dev;
 	static int load_count = 0;
-	struct cdevsw *cdsw;
 
-#if __FreeBSD_version >= 502103
-	dev = findcdev (makedev(CDEV_MAJOR, 0));
-#else
-	dev = makedev (CDEV_MAJOR, 0);
-#endif
 	switch (type) {
 	case MOD_LOAD:
-		if (dev != NULL &&
-		    (cdsw = devsw (dev)) &&
-		    cdsw->d_maj == CDEV_MAJOR) {
-			printf ("Sigma driver is already in system\n");
-			return (EEXIST);
-		}
 #if __FreeBSD_version >= 500000 && defined NETGRAPH
 		if (ng_newtype (&typestruct))
 			printf ("Failed to register ng_cx\n");

==== //depot/projects/smpng/sys/dev/fdc/fdc.c#9 (text+ko) ====

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.290 2004/09/17 18:50:38 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.291 2004/09/23 21:12:21 joerg Exp $");
 
 #include "opt_fdc.h"
 
@@ -761,8 +761,17 @@
 			if (fdc->bp == NULL)
 				msleep(&fdc->head, &fdc->fdc_mtx,
 				    PRIBIO, "-", hz);
-		} while (fdc->bp == NULL);
+		} while (fdc->bp == NULL &&
+		    (fdc->flags & FDC_KTHREAD_EXIT) == 0);
 		mtx_unlock(&fdc->fdc_mtx);
+
+		if (fdc->bp == NULL)
+			/*
+			 * Nothing to do, worker thread has been
+			 * requested to stop.
+			 */
+			return (0);
+
 		bp = fdc->bp;
 		fd = fdc->fd = bp->bio_driver1;
 		fdc->retry = 0;
@@ -1118,7 +1127,8 @@
 	fdc = arg;
 	int i;
 
-	for (;;) {
+	fdc->flags |= FDC_KTHREAD_ALIVE;
+	while ((fdc->flags & FDC_KTHREAD_EXIT) == 0) {
 		i = fdc_worker(fdc);
 		if (i && debugflags & 0x20) {
 			if (fdc->bp != NULL) {
@@ -1129,6 +1139,8 @@
 		}
 		fdc->retry += i;
 	}
+	fdc->flags &= ~(FDC_KTHREAD_EXIT | FDC_KTHREAD_ALIVE);
+	wakeup(&fdc->fdc_thread);
 }
 
 /*
@@ -1624,7 +1636,13 @@
 	if ((error = bus_generic_detach(dev)))
 		return (error);
 
-	/* XXX: kill thread */
+	/* kill worker thread */
+	fdc->flags |= FDC_KTHREAD_EXIT;
+	mtx_lock(&fdc->fdc_mtx);
+	while ((fdc->flags & FDC_KTHREAD_ALIVE) != 0)
+		msleep(&fdc->fdc_thread, &fdc->fdc_mtx, PRIBIO, "fdcdet", 0);
+	mtx_unlock(&fdc->fdc_mtx);
+
 	/* reset controller, turn motor off */
 	fdout_wr(fdc, 0);
 

==== //depot/projects/smpng/sys/dev/fdc/fdcvar.h#5 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/fdc/fdcvar.h,v 1.6 2004/09/17 18:50:38 imp Exp $
+ * $FreeBSD: src/sys/dev/fdc/fdcvar.h,v 1.7 2004/09/23 21:12:21 joerg Exp $
  */
 
 /* XXX should audit this file to see if additional copyrights needed */
@@ -46,6 +46,8 @@
 #define FDC_HAS_FIFO	0x10
 #define FDC_NEEDS_RESET	0x20
 #define FDC_NODMA	0x40
+#define FDC_KTHREAD_EXIT	0x1000 /* request worker thread to stop */
+#define FDC_KTHREAD_ALIVE	0x2000 /* worker thread is alive */
 	struct	fd_data *fd;	/* The active drive */
 	int	retry;
 	int	fdout;		/* mirror of the w/o digital output reg */

==== //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#22 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.75 2004/02/08 19:16:01 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.76 2004/09/23 05:25:22 mjacob Exp $ */
 /*
  * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions
  * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob
@@ -61,10 +61,9 @@
 #include "opt_ddb.h"
 #include "opt_isp.h"
 
-/*
- * Not quite yet
- */
-/* #define	ISP_DAC_SUPPORTED	1 */
+#ifdef	PAE
+#define	ISP_DAC_SUPPORTED	1
+#endif
 
 /*
  * Efficiency- get rid of SBus code && tests unless we need them.

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

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.99 2004/09/07 08:04:09 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.100 2004/09/23 05:25:22 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -391,15 +391,13 @@
 	}
 
 	/*
-	 * Figure out which we should try first - memory mapping or i/o mapping?
+	 * Which we should try first - memory mapping or i/o mapping?
+	 *
+	 * We used to try memory first followed by i/o on alpha, otherwise
+	 * the reverse, but we should just try memory first all the time now.
 	 */
-#ifdef	__alpha__
 	m1 = PCIM_CMD_MEMEN;
 	m2 = PCIM_CMD_PORTEN;
-#else
-	m1 = PCIM_CMD_PORTEN;
-	m2 = PCIM_CMD_MEMEN;
-#endif
 
 	tval = 0;
         if (resource_int_value(device_get_name(dev), device_get_unit(dev),
@@ -1081,7 +1079,7 @@
 	caddr_t base;
 	u_int32_t len;
 	int i, error, ns;
-	bus_size_t alim, slim;
+	bus_size_t alim, slim, xlim;
 	struct imush im;
 
 	/*
@@ -1093,8 +1091,9 @@
 
 #ifdef	ISP_DAC_SUPPORTED
 	alim = BUS_SPACE_UNRESTRICTED;
+	xlim = BUS_SPACE_MAXADDR_32BIT;
 #else
-	alim = BUS_SPACE_MAXADDR_32BIT;
+	xlim = alim = BUS_SPACE_MAXADDR_32BIT;
 #endif
 	if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) {
 		slim = BUS_SPACE_MAXADDR_32BIT;
@@ -1150,7 +1149,7 @@
 	}
 
 	ns = (len / PAGE_SIZE) + 1;
-	if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim+1, alim, alim,
+	if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim+1, xlim, xlim,
 	    NULL, NULL, len, ns, slim, 0, busdma_lock_mutex, &Giant,
 	    &isp->isp_cdmat)) {
 		isp_prt(isp, ISP_LOGERR,
@@ -1628,6 +1627,9 @@
 static void dma2(void *, bus_dma_segment_t *, int, int);
 
 #ifdef	PAE
+#define	LOWD(x)		((uint32_t) x)
+#define	HIWD(x)		((uint32_t) (x >> 32))
+
 static void
 dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
 {
@@ -1664,7 +1666,6 @@
 	} else {
 		bus_dmamap_sync(pcs->dmat, *dp, BUS_DMASYNC_PREWRITE);
 	}
-
 	datalen = XS_XFRLEN(csio);
 
 	/*
@@ -1678,6 +1679,7 @@
 	 */
 
 	if (IS_FC(isp)) {
+		rq->req_header.rqs_entry_type = RQSTYPE_T3RQS;
 		seglim = ISP_RQDSEG_T3;
 		((ispreqt3_t *)rq)->req_totalcnt = datalen;
 		if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
@@ -1686,6 +1688,7 @@
 			((ispreqt3_t *)rq)->req_flags |= REQFLAG_DATA_OUT;
 		}
 	} else {
+		rq->req_header.rqs_entry_type = RQSTYPE_A64;
 		if (csio->cdb_len > 12) {
 			seglim = 0;
 		} else {
@@ -1704,14 +1707,18 @@
 		if (IS_FC(isp)) {
 			ispreqt3_t *rq3 = (ispreqt3_t *)rq;
 			rq3->req_dataseg[rq3->req_seg_count].ds_base =
-			    dm_segs->ds_addr;
+			    LOWD(dm_segs->ds_addr);
+			rq3->req_dataseg[rq3->req_seg_count].ds_basehi =
+			    HIWD(dm_segs->ds_addr);
 			rq3->req_dataseg[rq3->req_seg_count].ds_count =
 			    dm_segs->ds_len;
 		} else {
 			rq->req_dataseg[rq->req_seg_count].ds_base =
-				dm_segs->ds_addr;
+			    LOWD(dm_segs->ds_addr);
+			rq->req_dataseg[rq->req_seg_count].ds_basehi =
+			    HIWD(dm_segs->ds_addr);
 			rq->req_dataseg[rq->req_seg_count].ds_count =
-				dm_segs->ds_len;
+			    dm_segs->ds_len;
 		}
 		datalen -= dm_segs->ds_len;
 		rq->req_seg_count++;
@@ -1738,7 +1745,9 @@
 		seglim = 0;
 		while (datalen > 0 && seglim < ISP_CDSEG64 && dm_segs != eseg) {
 			crq->req_dataseg[seglim].ds_base =
-			    dm_segs->ds_addr;
+			    LOWD(dm_segs->ds_addr);
+			crq->req_dataseg[seglim].ds_basehi =
+			    HIWD(dm_segs->ds_addr);
 			crq->req_dataseg[seglim].ds_count =
 			    dm_segs->ds_len;
 			rq->req_seg_count++;

==== //depot/projects/smpng/sys/dev/pdq/pdq.c#6 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pdq/pdq.c,v 1.9 2003/08/24 17:54:16 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pdq/pdq.c,v 1.10 2004/09/22 17:16:03 stefanf Exp $");
 
 /*
  * DEC PDQ FDDI Controller O/S independent code
@@ -1579,7 +1579,7 @@
     p = (pdq_uint8_t *) PDQ_OS_MEMALLOC_CONTIG(contig_bytes);
 
     if (p == NULL)
-	printf("%s() - PDQ_OS_MEMALLOC_CONTIG() failed!\n", __FUNCTION__);
+	printf("%s() - PDQ_OS_MEMALLOC_CONTIG() failed!\n", __func__);
 
     if (p != NULL) {
 	pdq_physaddr_t physaddr = PDQ_OS_VA_TO_BUSPA(pdq, p);

==== //depot/projects/smpng/sys/fs/specfs/spec_vnops.c#38 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)spec_vnops.c	8.14 (Berkeley) 5/21/95
- * $FreeBSD: src/sys/fs/specfs/spec_vnops.c,v 1.228 2004/09/19 08:14:55 phk Exp $
+ * $FreeBSD: src/sys/fs/specfs/spec_vnops.c,v 1.230 2004/09/23 14:45:03 phk Exp $
  */
 
 #include <sys/param.h>
@@ -188,8 +188,9 @@
 		vp->v_vflag |= VV_ISTTY;
 
 	VOP_UNLOCK(vp, 0, td);
-	dev_ref(dev);
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if(!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		if (dsw->d_fdopen != NULL)
@@ -201,9 +202,9 @@
 		error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fdidx);
 	else
 		error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td);
-	cdevsw_rel(dsw);
-	if (error != 0)
-		dev_rel(dev);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
 
 	if (error)
@@ -260,14 +261,18 @@
 	VOP_UNLOCK(vp, 0, td);
 	KASSERT(dev->si_refcount > 0,
 	    ("specread() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		error = dsw->d_read(dev, uio, ap->a_ioflag);
 		PICKUP_GIANT();
 	} else
 		error = dsw->d_read(dev, uio, ap->a_ioflag);
-	cdevsw_rel(dsw);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
 	if (uio->uio_resid != resid || (error == 0 && resid != 0))
 		vfs_timestamp(&dev->si_atime);
@@ -304,14 +309,18 @@
 	VOP_UNLOCK(vp, 0, td);
 	KASSERT(dev->si_refcount > 0,
 	    ("spec_write() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		error = dsw->d_write(dev, uio, ap->a_ioflag);
 		PICKUP_GIANT();
 	} else
 		error = dsw->d_write(dev, uio, ap->a_ioflag);
-	cdevsw_rel(dsw);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
 	if (uio->uio_resid != resid || (error == 0 && resid != 0)) {
 		vfs_timestamp(&dev->si_ctime);
@@ -343,7 +352,9 @@
 	dsw = devsw(dev);
 	KASSERT(dev->si_refcount > 0,
 	    ("spec_ioctl() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		error = dsw->d_ioctl(dev, ap->a_command,
@@ -352,7 +363,9 @@
 	} else 
 		error = dsw->d_ioctl(dev, ap->a_command,
 		    ap->a_data, ap->a_fflag, ap->a_td);
-	cdevsw_rel(dsw);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	if (error == ENOIOCTL)
 		error = ENOTTY;
 	return (error);
@@ -376,14 +389,18 @@
 	dsw = devsw(dev);
 	KASSERT(dev->si_refcount > 0,
 	    ("spec_poll() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		/* XXX: not yet DROP_GIANT(); */
 		error = dsw->d_poll(dev, ap->a_events, ap->a_td);
 		/* XXX: not yet PICKUP_GIANT(); */
 	} else
 		error = dsw->d_poll(dev, ap->a_events, ap->a_td);
-	cdevsw_rel(dsw);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	return(error);
 }
 
@@ -403,14 +420,18 @@
 	dsw = devsw(dev);
 	KASSERT(dev->si_refcount > 0,
 	    ("spec_kqfilter() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		error = dsw->d_kqfilter(dev, ap->a_kn);
 		PICKUP_GIANT();
 	} else
 		error = dsw->d_kqfilter(dev, ap->a_kn);
-	cdevsw_rel(dsw);
+	dev_lock();
+	dev->si_threadcount--;
+	dev_unlock();
 	return (error);
 }
 
@@ -455,7 +476,6 @@
 spec_xstrategy(struct vnode *vp, struct buf *bp)
 {
 	struct mount *mp;
-	struct cdevsw *dsw;
 	struct thread *td = curthread;
 	
 	KASSERT(bp->b_iocmd == BIO_READ || bp->b_iocmd == BIO_WRITE,
@@ -487,23 +507,8 @@
 				mp->mnt_stat.f_syncreads++;
 		}
 	}
-	dsw = devsw(bp->b_dev);
-	if (dsw == NULL) {
-		bp->b_error = ENXIO;
-		bp->b_ioflags |= BIO_ERROR;
-		bufdone(bp);
-		return (0);
-	}
-	KASSERT(dsw->d_strategy != NULL,
-	   ("No strategy on dev %s responsible for buffer %p\n",
-	   devtoname(bp->b_dev), bp));
-	
-	if (!(dsw->d_flags & D_NEEDGIANT)) {
-		/* XXX: notyet DROP_GIANT(); */
-		DEV_STRATEGY(bp);
-		/* XXX: notyet PICKUP_GIANT(); */
-	} else
-		DEV_STRATEGY(bp);
+
+	dev_strategy(bp);	
 		
 	return (0);
 }
@@ -595,15 +600,18 @@
 	VI_UNLOCK(vp);
 	KASSERT(dev->si_refcount > 0,
 	    ("spec_close() on un-referenced struct cdev *(%s)", devtoname(dev)));
-	cdevsw_ref(dsw);
+	dev_lock();
+	dev->si_threadcount++;
+	dev_unlock();
 	if (!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		error = dsw->d_close(dev, ap->a_fflag, S_IFCHR, td);
 		PICKUP_GIANT();

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



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