Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Apr 2004 15:19:01 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 51671 for review
Message-ID:  <200404242219.i3OMJ1PU031373@repoman.freebsd.org>

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

Change 51671 by marcel@marcel_nfs on 2004/04/24 15:18:26

	IFC @51667

Affected files ...

.. //depot/projects/gdb/lib/libthr/thread/thr_spinlock.c#3 integrate
.. //depot/projects/gdb/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#13 integrate
.. //depot/projects/gdb/share/Makefile#3 integrate
.. //depot/projects/gdb/share/man/man4/aue.4#2 integrate
.. //depot/projects/gdb/share/snmp/Makefile#1 branch
.. //depot/projects/gdb/share/snmp/mibs/FREEBSD-MIB.txt#1 branch
.. //depot/projects/gdb/share/snmp/mibs/Makefile#1 branch
.. //depot/projects/gdb/sys/alpha/alpha/pmap.c#5 integrate
.. //depot/projects/gdb/sys/compat/freebsd32/freebsd32_misc.c#5 integrate
.. //depot/projects/gdb/sys/dev/acpica/acpi_timer.c#6 integrate
.. //depot/projects/gdb/sys/dev/ata/ata-chipset.c#7 integrate
.. //depot/projects/gdb/sys/dev/ata/ata-pci.c#6 integrate
.. //depot/projects/gdb/sys/dev/puc/pucdata.c#4 integrate
.. //depot/projects/gdb/sys/pci/agp.c#5 integrate
.. //depot/projects/gdb/sys/pci/agp_i810.c#4 integrate
.. //depot/projects/gdb/sys/sys/imgact.h#4 integrate
.. //depot/projects/gdb/sys/vm/vm_kern.c#4 integrate
.. //depot/projects/gdb/sys/vm/vm_map.c#6 integrate
.. //depot/projects/gdb/sys/vm/vm_map.h#4 integrate
.. //depot/projects/gdb/sys/vm/vm_page.c#6 integrate

Differences ...

==== //depot/projects/gdb/lib/libthr/thread/thr_spinlock.c#3 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_spinlock.c,v 1.9 2004/01/22 15:31:56 mtm Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_spinlock.c,v 1.10 2004/04/24 09:38:41 mtm Exp $
  *
  */
 
@@ -80,10 +80,6 @@
 {
 	struct pthread_spinlock *s;
 
-	if (*lock != NULL) {
-		if ((*lock)->s_magic == THR_SPIN_MAGIC)
-			return (EBUSY);
-	}
 	s = (struct pthread_spinlock *)malloc(sizeof(struct pthread_spinlock));
 	if (s == NULL)
 		return (ENOMEM);

==== //depot/projects/gdb/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#13 (text+ko) ====

@@ -3,7 +3,7 @@
 
   <corpauthor>The FreeBSD Project</corpauthor>
 
-  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.720 2004/04/20 18:37:33 hrs Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.721 2004/04/24 17:30:32 hrs Exp $</pubdate>
 
   <copyright>
     <year>2000</year>
@@ -186,6 +186,10 @@
   <sect2 id="kernel">
     <title>Kernel Changes</title>
 
+    <para arch="i386">The &man.acpi.asus.4; driver has been added
+      to use ACPI-controlled hardware features  such as hot keys and
+      LCD on ASUSTek laptops.</para>
+
     <para arch="i386">The &man.acpi.toshiba.4; driver has been added
       to use Toshiba's Hardware Control Interface to manipulate
       certain hardware features on Toshiba laptops.</para>
@@ -358,7 +362,7 @@
 
       <para>The &man.ng.hub.4; Netgraph node type, which supports
         a simple packet distribution that acts like an Ethernet hub
-        has been added.</para>
+        has been added.  &merged;</para>
 
       <para>The &man.ng.vlan.4; Netgraph node type, which supports
         IEEE 802.1Q VLAN tagging has been added.  &merged;</para>
@@ -390,7 +394,7 @@
 	support for USB Ethernet adapters based on the Davicom DM9601
 	chipset.</para>
 
-      <para>The &man.vr.4; driver now supports &man.polling.4;.</para>
+      <para>The &man.vr.4; driver now supports &man.polling.4;.  &merged;</para>
 
       <para>The hardware TX checksum support in the &man.xl.4; driver
 	has been disabled as it does not work correctly and slows down
@@ -401,7 +405,7 @@
 	(&man.dc.4;, &man.fxp.4;, &man.em.4;, &man.nge.4;, &man.re.4;,
 	&man.rl.4;, &man.sis.4;, &man.ste.4;, and &man.vr.4;)
 	now also support this capability and it can be controlled
-	via &man.ifconfig.8;.</para>
+	via &man.ifconfig.8;.  &merged;</para>
     </sect3>
 
     <sect3 id="net-proto">
@@ -414,6 +418,20 @@
       <para>The &man.gre.4; tunnel driver now supports WCCP version
 	2.</para>
 
+      <para>&man.ipfw.4; rules now support the <literal>versrcreach</literal>
+        option to verify that a valid route to the source address
+	of a packet exists in the routing table.
+	This option is very useful for routers with a complete view of
+	the Internet (BGP) in the routing table to reject packets with
+	spoofed or unroutable source addresses.  For example,
+
+	<programlisting>deny ip from any to any not versrcreach</programlisting>
+
+	is equivalent to the following in Cisco IOS syntax:
+
+	<programlisting>ip verify unicast source reachable-via any</programlisting>
+      </para>
+
       <para>Some bugs in the IPsec implementation from the KAME
 	Project have been fixed.  These bugs were related to freeing
 	memory objects before all references to them were removed, and
@@ -455,7 +473,9 @@
 	be increasing, no matter how quickly the port is recycled.</para>
 
       <para>The random ephemeral port allocation, which come from OpenBSD
-	has been implemented.</para>
+	has been implemented.  This is enabled by default and can be disabled
+	using the <varname>net.inet.ip.portrange.randomized</varname>
+	sysctl.  &merged;</para>
     </sect3>
 
     <sect3 id="disks">
@@ -649,6 +669,9 @@
       for the benefit of the <filename role="package">misc/utf8locale</filename>
       port.</para>
 
+    <para>An Israel Hebrew locale <literal>he_IL.UTF-8</literal>
+      has been added.</para>
+
     <para>The &man.logins.1; utility has been added to display
       information about user and system accounts.</para>
 

==== //depot/projects/gdb/share/Makefile#3 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
-# $FreeBSD: src/share/Makefile,v 1.31 2004/01/20 13:09:29 ru Exp $
+# $FreeBSD: src/share/Makefile,v 1.32 2004/04/24 19:54:54 phk Exp $
 
 # Do not include `info' in the SUBDIR list, it is handled separately.
 
@@ -18,6 +18,7 @@
 	numericdef \
 	${_sendmail} \
 	skel \
+	snmp \
 	syscons \
 	tabset \
 	termcap \

==== //depot/projects/gdb/share/man/man4/aue.4#2 (text+ko) ====

@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/aue.4,v 1.17 2004/01/09 15:47:54 simon Exp $
+.\" $FreeBSD: src/share/man/man4/aue.4,v 1.18 2004/04/24 12:30:59 simon Exp $
 .\"
 .Dd December 25, 1999
 .Dt AUE 4
@@ -79,6 +79,8 @@
 .It
 Planex UE-200TX
 .It
+Sandberg USB to Network Link (model number 133\-06)
+.It
 Siemens Speedstream
 .It
 SmartBridges smartNIC

==== //depot/projects/gdb/sys/alpha/alpha/pmap.c#5 (text+ko) ====

@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.143 2004/04/11 05:08:26 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.144 2004/04/24 20:53:54 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1194,8 +1194,6 @@
 		VM_OBJECT_LOCK(pmap->pm_pteobj);
 	m = vm_page_grab(pmap->pm_pteobj, ptepindex,
 	    VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
-	if ((m->flags & PG_ZERO) == 0)
-		pmap_zero_page(m);
 
 	KASSERT(m->queue == PQ_NONE,
 		("_pmap_allocpte: %p->queue != PQ_NONE", m));
@@ -1242,7 +1240,6 @@
 
 	vm_page_lock_queues();
 	m->valid = VM_PAGE_BITS_ALL;
-	vm_page_flag_clear(m, PG_ZERO);
 	vm_page_wakeup(m);
 	vm_page_unlock_queues();
 	if (!is_object_locked)

==== //depot/projects/gdb/sys/compat/freebsd32/freebsd32_misc.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.21 2004/04/14 23:17:37 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.22 2004/04/24 04:31:59 marcel Exp $");
 
 #include "opt_compat.h"
 
@@ -120,6 +120,7 @@
 	return (error);
 }
 
+#ifdef COMPAT_FREEBSD4
 static void
 copy_statfs(struct statfs *in, struct statfs32 *out)
 {
@@ -146,7 +147,9 @@
 	bcopy(in->f_mntfromname,
 	      out->f_mntfromname, min(MNAMELEN, FREEBSD4_MNAMELEN));
 }
+#endif
 
+#ifdef COMPAT_FREEBSD4
 int
 freebsd4_freebsd32_getfsstat(struct thread *td, struct freebsd4_freebsd32_getfsstat_args *uap)
 {
@@ -179,6 +182,7 @@
 	}
 	return (error);
 }
+#endif
 
 struct sigaltstack32 {
 	u_int32_t	ss_sp;
@@ -869,6 +873,7 @@
 	return (error);
 }
 
+#ifdef COMPAT_FREEBSD4
 int
 freebsd4_freebsd32_statfs(struct thread *td, struct freebsd4_freebsd32_statfs_args *uap)
 {
@@ -895,7 +900,9 @@
 	}
 	return (error);
 }
+#endif
 
+#ifdef COMPAT_FREEBSD4
 int
 freebsd4_freebsd32_fstatfs(struct thread *td, struct freebsd4_freebsd32_fstatfs_args *uap)
 {
@@ -922,7 +929,9 @@
 	}
 	return (error);
 }
+#endif
 
+#ifdef COMPAT_FREEBSD4
 int
 freebsd4_freebsd32_fhstatfs(struct thread *td, struct freebsd4_freebsd32_fhstatfs_args *uap)
 {
@@ -949,6 +958,7 @@
 	}
 	return (error);
 }
+#endif
 
 int
 freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap)

==== //depot/projects/gdb/sys/dev/acpica/acpi_timer.c#6 (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_timer.c,v 1.31 2004/04/22 01:50:08 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi_timer.c,v 1.32 2004/04/24 16:25:00 njl Exp $
  */
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -99,12 +99,7 @@
 static u_int
 acpi_timer_read()
 {
-    uint32_t tv;
-
-    tv = bus_space_read_4(acpi_timer_bst, acpi_timer_bsh, 0);
-    bus_space_barrier(acpi_timer_bst, acpi_timer_bsh, 0, 4,
-	BUS_SPACE_BARRIER_READ);
-    return (tv);
+    return (bus_space_read_4(acpi_timer_bst, acpi_timer_bsh, 0));
 }
 
 /*
@@ -277,9 +272,13 @@
 {
     uint32_t	last, this;
     int		min, max, n, delta;
+    register_t	s;
 
     min = 10000000;
     max = 0;
+
+    /* Test the timer with interrupts disabled to get accurate results. */
+    s = intr_disable();
     last = acpi_timer_read();
     for (n = 0; n < N; n++) {
 	this = acpi_timer_read();
@@ -290,6 +289,8 @@
 	    min = delta;
 	last = this;
     }
+    intr_restore(s);
+
     if (max - min > 2)
 	n = 0;
     else if (min < 0 || max == 0)

==== //depot/projects/gdb/sys/dev/ata/ata-chipset.c#7 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.69 2004/04/21 20:03:26 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.70 2004/04/24 15:54:20 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -2350,15 +2350,15 @@
 	break;
     case SIS66:
     case SIS100OLD:
-	pci_write_config(dev, 0x52, pci_read_config(dev, 0x52, 1) | 0x04, 1);
+	pci_write_config(dev, 0x52, pci_read_config(dev, 0x52, 1) & ~0x04, 1);
 	break;
     case SIS100NEW:
     case SIS133OLD:
-	pci_write_config(dev, 0x49, pci_read_config(dev, 0x49, 1) | 0x01, 1);
+	pci_write_config(dev, 0x49, pci_read_config(dev, 0x49, 1) & ~0x01, 1);
 	break;
     case SIS133NEW:
-	pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 2) & 0xfff7, 2);
-	pci_write_config(dev, 0x52, pci_read_config(dev, 0x52, 2) & 0xfff7, 2);
+	pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 2) | 0x0008, 2);
+	pci_write_config(dev, 0x52, pci_read_config(dev, 0x52, 2) | 0x0008, 2);
 	break;
     case SISSATA:
 	pci_write_config(dev, 0x04, pci_read_config(dev, 0x04, 2) & ~0x0400, 2);

==== //depot/projects/gdb/sys/dev/ata/ata-pci.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.80 2004/04/21 20:03:26 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.81 2004/04/24 16:32:06 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -177,25 +177,9 @@
     ctlr->locking = ata_pci_locknoop;
 
     progif = pci_read_config(dev, PCIR_PROGIF, 1);
-    if ((progif & 0x85) == 0x80)
+    if ((progif & 0x80))
 	prisec = 1;
 
-    /* if this device supports PCI native addressing use it */
-#if 0
-    if ((progif & 0x8a) == 0x8a) {
-	if (pci_read_config(dev, PCIR_BAR(0), 4) &&
- 	    pci_read_config(dev, PCIR_BAR(2), 4)) {
-	    device_printf(dev, "setting native PCI addressing mode ");
-	    pci_write_config(dev, PCIR_PROGIF, progif | 0x05, 1);
-	    if ((pci_read_config(dev, PCIR_PROGIF, 1) & 0x05) != 0x05) {
-	        pci_write_config(dev, PCIR_PROGIF, progif & ~0x05, 1);
-		printf("failed, using compat method\n");
-	    }
-	    else
-		printf("succeded\n");
-	}
-    }
-#endif
     /* if needed try to enable busmastering */
     cmd = pci_read_config(dev, PCIR_COMMAND, 2);
     if (!(cmd & PCIM_CMD_BUSMASTEREN)) {

==== //depot/projects/gdb/sys/dev/puc/pucdata.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.43 2004/04/18 14:37:27 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.44 2004/04/24 13:04:00 sobomax Exp $");
 
 /*
  * PCI "universal" communications card driver configuration data (used to
@@ -1063,6 +1063,51 @@
 	    },
 	},
 
+	{   "IC Book Labs Gunboat x2 Low Profile",
+	    {   0xb00c, 0x0a1c, 0,      0       },
+	    {   0xffff, 0xffff, 0,      0       },
+	    {
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
+	    },
+	},
+
+	{   "IC Book Labs Gunboat x4 Lite",
+	    {   0xb00c, 0x021c, 0,      0       },
+	    {   0xffff, 0xffff, 0,      0       },
+	    {
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ },
+	    },
+	    PUC_ILR_TYPE_DIGI, { 0x07 },
+	},
+
+	{   "IC Book Labs Gunboat x4 Pro",
+	    {   0xb00c, 0x031c, 0,      0       },
+	    {   0xffff, 0xffff, 0,      0       },
+	    {
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ },
+	    },
+	    PUC_ILR_TYPE_DIGI, { 0x07 },
+	},
+
+	{   "IC Book Labs Gunboat x4 Low Profile",
+	    {   0xb00c, 0x0b1c, 0,      0       },
+	    {   0xffff, 0xffff, 0,      0       },
+	    {
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ },
+	    },
+	    PUC_ILR_TYPE_DIGI, { 0x07 },
+	},
+
 	{   "IC Book Labs Ironclad x8 Lite",
 	    {	0xb00c,	0x041c,	0,	0	},
 	    {	0xffff,	0xffff,	0,	0	},

==== //depot/projects/gdb/sys/pci/agp.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/agp.c,v 1.38 2004/03/17 17:50:52 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/agp.c,v 1.39 2004/04/24 20:53:54 alc Exp $");
 
 #include "opt_bus.h"
 
@@ -524,8 +524,6 @@
 		m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i),
 		    VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
 		VM_OBJECT_UNLOCK(mem->am_obj);
-		if ((m->flags & PG_ZERO) == 0)
-			pmap_zero_page(m);
 		AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m));
 
 		/*

==== //depot/projects/gdb/sys/pci/agp_i810.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/agp_i810.c,v 1.27 2004/04/03 22:55:12 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/agp_i810.c,v 1.28 2004/04/24 20:53:54 alc Exp $");
 
 #include "opt_bus.h"
 
@@ -612,8 +612,6 @@
 		m = vm_page_grab(mem->am_obj, 0,
 		    VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
 		VM_OBJECT_UNLOCK(mem->am_obj);
-		if ((m->flags & PG_ZERO) == 0)
-			pmap_zero_page(m);
 		vm_page_lock_queues();
 		mem->am_physical = VM_PAGE_TO_PHYS(m);
 		vm_page_wakeup(m);

==== //depot/projects/gdb/sys/sys/imgact.h#4 (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/sys/imgact.h,v 1.35 2004/04/23 03:01:40 alc Exp $
+ * $FreeBSD: src/sys/sys/imgact.h,v 1.36 2004/04/24 06:44:33 bde Exp $
  */
 
 #ifndef _SYS_IMGACT_H_
@@ -34,12 +34,6 @@
 
 #define MAXSHELLCMDLEN	128
 
-struct label;
-struct sf_buf;
-struct sysentvec;
-struct thread;
-struct vm_object;
-
 struct image_params {
 	struct proc *proc;	/* our process struct */
 	char **userspace_argv;	/* system call argument */
@@ -67,6 +61,9 @@
 };
 
 #ifdef _KERNEL
+struct sysentvec;
+struct thread;
+
 int	exec_check_permissions(struct image_params *);
 register_t *exec_copyout_strings(struct image_params *);
 int	exec_extract_strings(struct image_params *);

==== //depot/projects/gdb/sys/vm/vm_kern.c#4 (text+ko) ====

@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.115 2004/04/06 20:15:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.116 2004/04/24 20:53:55 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -198,8 +198,6 @@
 
 		mem = vm_page_grab(kernel_object, OFF_TO_IDX(offset + i),
 				VM_ALLOC_ZERO | VM_ALLOC_RETRY);
-		if ((mem->flags & PG_ZERO) == 0)
-			pmap_zero_page(mem);
 		mem->valid = VM_PAGE_BITS_ALL;
 		vm_page_lock_queues();
 		vm_page_unmanage(mem);

==== //depot/projects/gdb/sys/vm/vm_map.c#6 (text+ko) ====

@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.332 2004/04/06 20:15:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.333 2004/04/24 03:46:44 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -877,7 +877,7 @@
 #endif
 
 	if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) {
-		vm_map_pmap_enter(map, start,
+		vm_map_pmap_enter(map, start, prot,
 				    object, OFF_TO_IDX(offset), end - start,
 				    cow & MAP_PREFAULT_PARTIAL);
 	}
@@ -1243,19 +1243,19 @@
 /*
  *	vm_map_pmap_enter:
  *
- *	Preload the mappings for the given object into the specified
+ *	Preload read-only mappings for the given object into the specified
  *	map.  This eliminates the soft faults on process startup and
  *	immediately after an mmap(2).
  */
 void
-vm_map_pmap_enter(vm_map_t map, vm_offset_t addr,
+vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot,
     vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags)
 {
 	vm_offset_t tmpidx;
 	int psize;
 	vm_page_t p, mpte;
 
-	if (object == NULL)
+	if ((prot & VM_PROT_READ) == 0 || object == NULL)
 		return;
 	mtx_lock(&Giant);
 	VM_OBJECT_LOCK(object);
@@ -1547,6 +1547,7 @@
 			if (behav == MADV_WILLNEED) {
 				vm_map_pmap_enter(map,
 				    useStart,
+				    current->protection,
 				    current->object.vm_object,
 				    pindex,
 				    (count << PAGE_SHIFT),

==== //depot/projects/gdb/sys/vm/vm_map.h#4 (text+ko) ====

@@ -57,7 +57,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/vm/vm_map.h,v 1.108 2004/04/06 20:15:36 imp Exp $
+ * $FreeBSD: src/sys/vm/vm_map.h,v 1.109 2004/04/24 03:46:44 alc Exp $
  */
 
 /*
@@ -333,7 +333,7 @@
     vm_pindex_t *, vm_prot_t *, boolean_t *);
 void vm_map_lookup_done (vm_map_t, vm_map_entry_t);
 boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *);
-void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr,
+void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot,
     vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags);
 int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t);
 int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t);

==== //depot/projects/gdb/sys/vm/vm_page.c#6 (text+ko) ====

@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.279 2004/04/06 20:15:37 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_page.c,v 1.281 2004/04/24 21:36:23 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1421,7 +1421,8 @@
 /*
  * Grab a page, waiting until we are waken up due to the page
  * changing state.  We keep on waiting, if the page continues
- * to be in the object.  If the page doesn't exist, allocate it.
+ * to be in the object.  If the page doesn't exist, first allocate it
+ * and then conditionally zero it.
  *
  * This routine may block.
  */
@@ -1447,21 +1448,21 @@
 				vm_page_wire(m);
 			vm_page_busy(m);
 			vm_page_unlock_queues();
-			return m;
+			return (m);
 		}
 	}
-
 	m = vm_page_alloc(object, pindex, allocflags & ~VM_ALLOC_RETRY);
 	if (m == NULL) {
 		VM_OBJECT_UNLOCK(object);
 		VM_WAIT;
 		VM_OBJECT_LOCK(object);
 		if ((allocflags & VM_ALLOC_RETRY) == 0)
-			return NULL;
+			return (NULL);
 		goto retrylookup;
 	}
-
-	return m;
+	if (allocflags & VM_ALLOC_ZERO && (m->flags & PG_ZERO) == 0)
+		pmap_zero_page(m);
+	return (m);
 }
 
 /*



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