PERFORCE change 61375 for review

Julian Elischer julian at FreeBSD.org
Sat Sep 11 22:47:39 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=61375

Change 61375 by julian at julian_ref on 2004/09/12 05:47:26

	IFC at 61373

Affected files ...

.. //depot/projects/nsched/sys/contrib/pf/net/pf.c#7 integrate
.. //depot/projects/nsched/sys/dev/aac/aac.c#6 integrate
.. //depot/projects/nsched/sys/dev/vge/if_vge.c#3 integrate
.. //depot/projects/nsched/sys/geom/bde/g_bde_crypt.c#2 integrate
.. //depot/projects/nsched/sys/geom/bde/g_bde_lock.c#2 integrate
.. //depot/projects/nsched/sys/vm/vm_fault.c#7 integrate

Differences ...

==== //depot/projects/nsched/sys/contrib/pf/net/pf.c#7 (text+ko) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.18 2004/08/12 13:59:44 mlaier Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.19 2004/09/11 11:18:25 mlaier Exp $	*/
 /*	$OpenBSD: pf.c,v 1.433.2.2 2004/07/17 03:22:34 brad Exp $ */
 /* add	$OpenBSD: pf.c,v 1.448 2004/05/11 07:34:11 dhartmei Exp $ */
 
@@ -5619,9 +5619,8 @@
 			} else {
 				ip = mtod(m, struct ip *);	
 				sum = in_pseudo(ip->ip_src.s_addr,
-					ip->ip_dst.s_addr,
-					htonl(m->m_pkthdr.csum_data +
-					    IPPROTO_TCP + ntohs(ip->ip_len)));
+					ip->ip_dst.s_addr, htonl((u_short)len + 
+					m->m_pkthdr.csum_data + IPPROTO_TCP));
 			}
 			sum ^= 0xffff;
 			++hw_assist;

==== //depot/projects/nsched/sys/dev/aac/aac.c#6 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.101 2004/08/13 01:44:09 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.102 2004/09/12 03:19:32 scottl Exp $");
 
 /*
  * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters.
@@ -2339,26 +2339,26 @@
 		aac_release_sync_fib(sc);
 		return;
 	}
-	info = (struct aac_adapter_info *)&fib->data[0];   
-
-	device_printf(sc->aac_dev, "%s %dMHz, %dMB cache memory, %s\n", 
-		      aac_describe_code(aac_cpu_variant, info->CpuVariant),
-		      info->ClockSpeed, info->BufferMem / (1024 * 1024), 
-		      aac_describe_code(aac_battery_platform,
-					info->batteryPlatform));
 
 	/* save the kernel revision structure for later use */
+	info = (struct aac_adapter_info *)&fib->data[0];   
 	sc->aac_revision = info->KernelRevision;
-	device_printf(sc->aac_dev, "Kernel %d.%d-%d, Build %d, S/N %6X\n",
-		      info->KernelRevision.external.comp.major,
-		      info->KernelRevision.external.comp.minor,
-		      info->KernelRevision.external.comp.dash,
-		      info->KernelRevision.buildNumber,
-		      (u_int32_t)(info->SerialNumber & 0xffffff));
+
+	if (bootverbose) {
+		device_printf(sc->aac_dev, "%s %dMHz, %dMB cache memory, %s\n", 
+		    aac_describe_code(aac_cpu_variant, info->CpuVariant),
+		    info->ClockSpeed, info->BufferMem / (1024 * 1024), 
+		    aac_describe_code(aac_battery_platform,
+		    info->batteryPlatform));
 
-	aac_release_sync_fib(sc);
+		device_printf(sc->aac_dev,
+		    "Kernel %d.%d-%d, Build %d, S/N %6X\n",
+		    info->KernelRevision.external.comp.major,
+		    info->KernelRevision.external.comp.minor,
+		    info->KernelRevision.external.comp.dash,
+		    info->KernelRevision.buildNumber,
+		    (u_int32_t)(info->SerialNumber & 0xffffff));
 
-	if (1 || bootverbose) {
 		device_printf(sc->aac_dev, "Supported Options=%b\n",
 			      sc->supported_options,
 			      "\20"
@@ -2376,6 +2376,7 @@
 			      "\14ALARM"
 			      "\15NONDASD");
 	}
+	aac_release_sync_fib(sc);
 }
 
 /*

==== //depot/projects/nsched/sys/dev/vge/if_vge.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.2 2004/09/11 01:07:39 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $");
 
 /*
  * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -1547,7 +1547,6 @@
 	 * This is done in case the transmitter has gone idle.
 	 */
 	if (sc->vge_ldata.vge_tx_free != VGE_TX_DESC_CNT) {
-		CSR_WRITE_2(sc, VGE_TXQCSRS, VGE_TXQCSR_WAK0);
 		CSR_WRITE_1(sc, VGE_CRS1, VGE_CR1_TIMER0_ENABLE);
 	}
 

==== //depot/projects/nsched/sys/geom/bde/g_bde_crypt.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.19 2004/01/23 11:47:06 phk Exp $
+ * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.20 2004/09/11 17:58:53 phk Exp $
  *
  * This source file contains the functions responsible for the crypto, keying
  * and mapping operations on the I/O requests.
@@ -311,7 +311,7 @@
 	/* Compensate for lock sectors */
 	for (u = 0; u < G_BDE_MAXKEYS; u++) {
 		/* Find the start of this lock sector */
-		ko = kp->lsector[u] & ~(kp->sectorsize - 1);
+		ko = kp->lsector[u] & ~((uint64_t)kp->sectorsize - 1);
 
 		if (wp->kso >= ko)
 			wp->kso += kp->sectorsize;

==== //depot/projects/nsched/sys/geom/bde/g_bde_lock.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/geom/bde/g_bde_lock.c,v 1.12 2003/10/07 09:28:07 phk Exp $
+ * $FreeBSD: src/sys/geom/bde/g_bde_lock.c,v 1.13 2004/09/11 17:57:51 phk Exp $
  *
  * This souce file contains routines which operates on the lock sectors, both
  * for the kernel and the userland program gbde(1).
@@ -428,10 +428,9 @@
 		return (ENOENT);
 
 	/* If we have an unsorted lock-sequence, refuse */
-	if (gl->lsector[0] > gl->lsector[1] ||
-	    gl->lsector[1] > gl->lsector[2] ||
-	    gl->lsector[2] > gl->lsector[3])
-		return (EINVAL);
+	for (i = 0; i < G_BDE_MAXKEYS - 1; i++)
+		if (gl->lsector[i] >= gl->lsector[i + 1])
+			return (EINVAL);
 
 	/* Finally, find out which key was used by matching the byte offset */
 	for (i = 0; i < G_BDE_MAXKEYS; i++)

==== //depot/projects/nsched/sys/vm/vm_fault.c#7 (text+ko) ====

@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.196 2004/09/03 05:11:32 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.197 2004/09/11 18:49:59 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -172,7 +172,7 @@
 		mtx_unlock(&Giant);
 		fs->vp = NULL;
 	}
-	if (dealloc)
+	if (dealloc && !fs->map->system_map)
 		VM_UNLOCK_GIANT();
 }
 
@@ -291,11 +291,14 @@
 	 *
 	 * XXX vnode_pager_lock() can block without releasing the map lock.
 	 */
-	mtx_lock(&Giant);
+	if (!fs.map->system_map)
+		mtx_lock(&Giant);
 	VM_OBJECT_LOCK(fs.first_object);
 	vm_object_reference_locked(fs.first_object);
 	fs.vp = vnode_pager_lock(fs.first_object);
-	if (debug_mpsafevm)
+	KASSERT(fs.vp == NULL || !fs.map->system_map,
+	    ("vm_fault: vnode-backed object mapped by system map"));
+	if (debug_mpsafevm && !fs.map->system_map)
 		mtx_unlock(&Giant);
 	vm_object_pip_add(fs.first_object, 1);
 
@@ -369,7 +372,8 @@
 				if (!vm_page_sleep_if_busy(fs.m, TRUE, "vmpfw"))
 					vm_page_unlock_queues();
 				atomic_add_int(&cnt.v_intrans, 1);
-				VM_UNLOCK_GIANT();
+				if (!fs.map->system_map)
+					VM_UNLOCK_GIANT();
 				vm_object_deallocate(fs.first_object);
 				goto RetryFault;
 			}
@@ -1026,13 +1030,9 @@
 	 * read-only sections.
 	 */
 	for (va = start; va < end; va += PAGE_SIZE) {
-		if (map->system_map)
-			mtx_lock(&Giant);
 		rv = vm_fault(map, va,
 		    user_wire ? VM_PROT_READ : VM_PROT_READ | VM_PROT_WRITE,
 		    user_wire ? VM_FAULT_USER_WIRE : VM_FAULT_CHANGE_WIRING);
-		if (map->system_map)
-			mtx_unlock(&Giant);
 		if (rv) {
 			if (va != start)
 				vm_fault_unwire(map, start, va, fictitious);


More information about the p4-projects mailing list