Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 2003 13:28:19 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 35354 for review
Message-ID:  <200308012028.h71KSJtg021379@repoman.freebsd.org>

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

Change 35354 by marcel@marcel_nfs on 2003/08/01 13:28:15

	IFC @35353

Affected files ...

.. //depot/projects/ia64/MAINTAINERS#36 integrate
.. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#112 integrate
.. //depot/projects/ia64/rescue/rescue/Makefile#9 integrate
.. //depot/projects/ia64/sbin/fsck_ffs/fsutil.c#13 integrate
.. //depot/projects/ia64/sbin/fsck_ffs/main.c#11 integrate
.. //depot/projects/ia64/sbin/fsck_ffs/setup.c#15 integrate
.. //depot/projects/ia64/sys/conf/files.ia64#43 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.c#25 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.h#17 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_osdep.h#12 integrate
.. //depot/projects/ia64/sys/dev/firewire/if_fwe.c#17 integrate
.. //depot/projects/ia64/sys/ia64/ia64/machdep.c#84 integrate
.. //depot/projects/ia64/sys/kern/kern_ktr.c#14 integrate
.. //depot/projects/ia64/sys/kern/kern_mac.c#29 integrate
.. //depot/projects/ia64/sys/pccard/pcic_pci.c#17 integrate
.. //depot/projects/ia64/sys/vm/uma_core.c#47 integrate
.. //depot/projects/ia64/sys/vm/vm_kern.c#26 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/Makefile#7 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/ada.rc#2 delete
.. //depot/projects/ia64/tools/tools/tinderbox/current.rc#4 delete
.. //depot/projects/ia64/tools/tools/tinderbox/default.rc#2 delete
.. //depot/projects/ia64/tools/tools/tinderbox/dsa.rc#2 delete
.. //depot/projects/ia64/tools/tools/tinderbox/dwp.rc#2 delete
.. //depot/projects/ia64/tools/tools/tinderbox/etc/Makefile#1 branch
.. //depot/projects/ia64/tools/tools/tinderbox/etc/ada.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/current.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/default.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/dsa.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/dwp.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/experimental.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/releng_4.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/etc/stanley.rc#2 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/experimental.rc#3 delete
.. //depot/projects/ia64/tools/tools/tinderbox/releng_4.rc#3 delete
.. //depot/projects/ia64/tools/tools/tinderbox/stanley.rc#3 delete
.. //depot/projects/ia64/tools/tools/tinderbox/www/Makefile#3 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/www/daemon.png#1 branch
.. //depot/projects/ia64/tools/tools/tinderbox/www/index.cgi#5 integrate
.. //depot/projects/ia64/tools/tools/tinderbox/www/valid-css.gif#2 delete
.. //depot/projects/ia64/tools/tools/tinderbox/www/valid-css.png#1 branch
.. //depot/projects/ia64/usr.bin/jot/jot.c#6 integrate
.. //depot/projects/ia64/usr.sbin/pkg_install/lib/match.c#6 integrate

Differences ...

==== //depot/projects/ia64/MAINTAINERS#36 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.76 2003/07/30 10:43:13 bp Exp $
+$FreeBSD: src/MAINTAINERS,v 1.77 2003/08/01 17:54:11 mbr Exp $
 
 subsystem	login	notes
 -----------------------------
@@ -44,7 +44,7 @@
 				Keep in sync with -STABLE.
 etc/sendmail	gshapiro	Pre-commit review requested.
 				Keep in sync with -STABLE.
-dhcp		murray	Needs to pre-approve commits to contrib/isc-dhcp, so
+dhcp		mbr	Needs to pre-approve commits to contrib/isc-dhcp, so
 			changes can be made to the isc.org CVS repository.
 RELENG_4_*	security-officer	Requires Security Officer approval.
 libfetch	des	Advance notification requested.

==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#112 (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.603 2003/07/30 08:36:16 hrs Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.604 2003/08/01 13:46:22 yar Exp $</pubdate>
 
   <copyright>
     <year>2000</year>
@@ -279,7 +279,7 @@
       to limit the scope of the current operation to the ARP entries
       on a particular interface.  This option applies to the display
       operations only.  It should be useful on routers with numerous
-      network interfaces.</para>
+      network interfaces. &merged;</para>
 
     <para>&man.chroot.8; now allows the optional setting of a user,
       primary group, or group list to use inside the chroot

==== //depot/projects/ia64/rescue/rescue/Makefile#9 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/rescue/rescue/Makefile,v 1.14 2003/07/24 07:42:42 gordon Exp $
+#$FreeBSD: src/rescue/rescue/Makefile,v 1.15 2003/08/01 09:04:32 gordon Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/2/93
 
 PROG=	rescue
@@ -248,8 +248,8 @@
 
 .ORDER: $(OUTPUTS) objs
 $(OUTPUTS): $(CONF)
-	MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) -c $(OUTC) \
-	    $(CONF)
+	MAKEFLAGS= MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) \
+	    -c $(OUTC) $(CONF)
 
 $(PROG): $(OUTPUTS) objs
 	MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK) 

==== //depot/projects/ia64/sbin/fsck_ffs/fsutil.c#13 (text+ko) ====

@@ -37,7 +37,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/fsck_ffs/fsutil.c,v 1.21 2003/05/03 18:41:57 obrien Exp $");
+__FBSDID("$FreeBSD: src/sbin/fsck_ffs/fsutil.c,v 1.22 2003/08/01 11:31:19 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/time.h>
@@ -285,7 +285,7 @@
 			cmd.size = markclean ? -1 : 1;
 			if (sysctlbyname("vfs.ffs.setflags", 0, 0,
 			    &cmd, sizeof cmd) == -1)
-				rwerror("SET FILESYSTEM FLAGS", FS_UNCLEAN);
+				rwerror("SET FILE SYSTEM FLAGS", FS_UNCLEAN);
 			if (!preen) {
 				printf("\n***** FILE SYSTEM MARKED %s *****\n",
 				    markclean ? "CLEAN" : "DIRTY");

==== //depot/projects/ia64/sbin/fsck_ffs/main.c#11 (text+ko) ====

@@ -43,7 +43,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/fsck_ffs/main.c,v 1.37 2003/05/03 18:41:57 obrien Exp $");
+__FBSDID("$FreeBSD: src/sbin/fsck_ffs/main.c,v 1.38 2003/08/01 11:31:19 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -261,7 +261,7 @@
 					 * file system is clean;
 					 * skip snapshot and report it clean
 					 */
-					pwarn("FILESYSTEM CLEAN; %s\n",
+					pwarn("FILE SYSTEM CLEAN; %s\n",
 					    "SKIPPING CHECKS");
 					goto clean;
 				}

==== //depot/projects/ia64/sbin/fsck_ffs/setup.c#15 (text+ko) ====

@@ -37,7 +37,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.43 2003/05/03 18:41:57 obrien Exp $");
+__FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.44 2003/08/01 11:31:19 ru Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -188,7 +188,7 @@
 		bflag = 0;
 	}
 	if (skipclean && preen && sblock.fs_clean) {
-		pwarn("FILESYSTEM CLEAN; SKIPPING CHECKS\n");
+		pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n");
 		return (-1);
 	}
 	maxfsblock = sblock.fs_size;

==== //depot/projects/ia64/sys/conf/files.ia64#43 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.ia64,v 1.54 2003/08/01 02:25:32 ambrisko Exp $
+# $FreeBSD: src/sys/conf/files.ia64,v 1.55 2003/08/01 05:28:43 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and

==== //depot/projects/ia64/sys/dev/em/if_em.c#25 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.27 2003/07/01 15:51:55 scottl Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.28 2003/08/01 17:33:59 jdp Exp $*/
 
 #include <dev/em/if_em.h>
 
@@ -163,6 +163,10 @@
 static int  em_is_valid_ether_addr(u_int8_t *);
 static int  em_sysctl_stats(SYSCTL_HANDLER_ARGS);
 static int  em_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
+static int  em_sysctl_int_delay(SYSCTL_HANDLER_ARGS);
+static void em_add_int_delay_sysctl(struct adapter *, const char *,
+				    const char *, struct em_int_delay_info *,
+				    int, int);
 
 /*********************************************************************
  *  FreeBSD Device Interface Entry Points                    
@@ -187,6 +191,23 @@
 MODULE_DEPEND(em, ether, 1, 1, 1);
 
 /*********************************************************************
+ *  Tunable default values.
+ *********************************************************************/
+
+#define E1000_TICKS_TO_USECS(ticks)	((1024 * (ticks) + 500) / 1000)
+#define E1000_USECS_TO_TICKS(usecs)	((1000 * (usecs) + 512) / 1024)
+
+static int em_tx_int_delay_dflt = E1000_TICKS_TO_USECS(EM_TIDV);
+static int em_rx_int_delay_dflt = E1000_TICKS_TO_USECS(EM_RDTR);
+static int em_tx_abs_int_delay_dflt = E1000_TICKS_TO_USECS(EM_TADV);
+static int em_rx_abs_int_delay_dflt = E1000_TICKS_TO_USECS(EM_RADV);
+
+TUNABLE_INT("hw.em.tx_int_delay", &em_tx_int_delay_dflt);
+TUNABLE_INT("hw.em.rx_int_delay", &em_rx_int_delay_dflt);
+TUNABLE_INT("hw.em.tx_abs_int_delay", &em_tx_abs_int_delay_dflt);
+TUNABLE_INT("hw.em.rx_abs_int_delay", &em_rx_abs_int_delay_dflt);
+
+/*********************************************************************
  *  Device identification routine
  *
  *  em_probe determines if the driver should be loaded on
@@ -305,14 +326,30 @@
 
 	/* Determine hardware revision */
 	em_identify_hardware(adapter);
+
+	/* Set up some sysctls for the tunable interrupt delays */
+	em_add_int_delay_sysctl(adapter, "rx_int_delay",
+	    "receive interrupt delay in usecs", &adapter->rx_int_delay,
+	    E1000_REG_OFFSET(&adapter->hw, RDTR), em_rx_int_delay_dflt);
+	em_add_int_delay_sysctl(adapter, "tx_int_delay",
+	    "transmit interrupt delay in usecs", &adapter->tx_int_delay,
+	    E1000_REG_OFFSET(&adapter->hw, TIDV), em_tx_int_delay_dflt);
+	if (adapter->hw.mac_type >= em_82540) {
+		em_add_int_delay_sysctl(adapter, "rx_abs_int_delay",
+		    "receive interrupt delay limit in usecs",
+		    &adapter->rx_abs_int_delay,
+		    E1000_REG_OFFSET(&adapter->hw, RADV),
+		    em_rx_abs_int_delay_dflt);
+		em_add_int_delay_sysctl(adapter, "tx_abs_int_delay",
+		    "transmit interrupt delay limit in usecs",
+		    &adapter->tx_abs_int_delay,
+		    E1000_REG_OFFSET(&adapter->hw, TADV),
+		    em_tx_abs_int_delay_dflt);
+	}
       
 	/* Parameters (to be read from user) */   
         adapter->num_tx_desc = EM_MAX_TXD;
         adapter->num_rx_desc = EM_MAX_RXD;
-        adapter->tx_int_delay = EM_TIDV;
-        adapter->tx_abs_int_delay = EM_TADV;
-        adapter->rx_int_delay = EM_RDTR;
-        adapter->rx_abs_int_delay = EM_RADV;
         adapter->hw.autoneg = DO_AUTO_NEG;
         adapter->hw.wait_autoneg_complete = WAIT_FOR_AUTO_NEG_DEFAULT;
         adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT;
@@ -1982,9 +2019,10 @@
         }
 
 	E1000_WRITE_REG(&adapter->hw, TIPG, reg_tipg);
-	E1000_WRITE_REG(&adapter->hw, TIDV, adapter->tx_int_delay);
+	E1000_WRITE_REG(&adapter->hw, TIDV, adapter->tx_int_delay.value);
 	if(adapter->hw.mac_type >= em_82540)
-		E1000_WRITE_REG(&adapter->hw, TADV, adapter->tx_abs_int_delay);
+		E1000_WRITE_REG(&adapter->hw, TADV,
+		    adapter->tx_abs_int_delay.value);
 
 	/* Program the Transmit Control Register */
 	reg_tctl = E1000_TCTL_PSP | E1000_TCTL_EN |
@@ -1999,7 +2037,7 @@
 	/* Setup Transmit Descriptor Settings for this adapter */   
 	adapter->txd_cmd = E1000_TXD_CMD_IFCS | E1000_TXD_CMD_RS;
 
-	if (adapter->tx_int_delay > 0)
+	if (adapter->tx_int_delay.value > 0)
 		adapter->txd_cmd |= E1000_TXD_CMD_IDE;
 
 	return;
@@ -2368,10 +2406,11 @@
 
 	/* Set the Receive Delay Timer Register */
 	E1000_WRITE_REG(&adapter->hw, RDTR, 
-			adapter->rx_int_delay | E1000_RDT_FPDB);
+			adapter->rx_int_delay.value | E1000_RDT_FPDB);
 
 	if(adapter->hw.mac_type >= em_82540) {
-		E1000_WRITE_REG(&adapter->hw, RADV, adapter->rx_abs_int_delay);
+		E1000_WRITE_REG(&adapter->hw, RADV,
+		    adapter->rx_abs_int_delay.value);
 
                 /* Set the interrupt throttling rate.  Value is calculated
                  * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) */
@@ -2999,3 +3038,63 @@
 
         return error;
 }
+
+static int
+em_sysctl_int_delay(SYSCTL_HANDLER_ARGS)
+{
+	struct em_int_delay_info *info;
+	struct adapter *adapter;
+	u_int32_t regval;
+	int error;
+	int usecs;
+	int ticks;
+	int s;
+
+	info = (struct em_int_delay_info *)arg1;
+	adapter = info->adapter;
+	usecs = info->value;
+	error = sysctl_handle_int(oidp, &usecs, 0, req);
+	if (error != 0 || req->newptr == NULL)
+		return error;
+	if (usecs < 0 || usecs > E1000_TICKS_TO_USECS(65535))
+		return EINVAL;
+	info->value = usecs;
+	ticks = E1000_USECS_TO_TICKS(usecs);
+	
+	s = splimp();
+	regval = E1000_READ_OFFSET(&adapter->hw, info->offset);
+	regval = (regval & ~0xffff) | (ticks & 0xffff);
+	/* Handle a few special cases. */
+	switch (info->offset) {
+	case E1000_RDTR:
+	case E1000_82542_RDTR:
+		regval |= E1000_RDT_FPDB;
+		break;
+	case E1000_TIDV:
+	case E1000_82542_TIDV:
+		if (ticks == 0) {
+			adapter->txd_cmd &= ~E1000_TXD_CMD_IDE;
+			/* Don't write 0 into the TIDV register. */
+			regval++;
+		} else
+			adapter->txd_cmd |= E1000_TXD_CMD_IDE;
+		break;
+	}
+	E1000_WRITE_OFFSET(&adapter->hw, info->offset, regval);
+	splx(s);
+	return 0;
+}
+
+static void
+em_add_int_delay_sysctl(struct adapter *adapter, const char *name,
+    const char *description, struct em_int_delay_info *info,
+    int offset, int value)
+{
+	info->adapter = adapter;
+	info->offset = offset;
+	info->value = value;
+	SYSCTL_ADD_PROC(&adapter->sysctl_ctx,
+	    SYSCTL_CHILDREN(adapter->sysctl_tree),
+	    OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW,
+	    info, 0, em_sysctl_int_delay, "I", description);
+}

==== //depot/projects/ia64/sys/dev/em/if_em.h#17 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.18 2003/07/17 19:02:34 jdp Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.19 2003/08/01 17:33:59 jdp Exp $*/
 
 #ifndef _EM_H_DEFINED_
 #define _EM_H_DEFINED_
@@ -294,6 +294,13 @@
 	OFFLOAD_UDP_IP
 } XSUM_CONTEXT_T;
 
+struct adapter;
+struct em_int_delay_info {
+	struct adapter *adapter;	/* Back-pointer to the adapter struct */
+	int offset;			/* Register offset to read/write */
+	int value;			/* Current value in usecs */
+};
+
 /* Our adapter structure */
 struct adapter {
 	struct arpcom   interface_data;
@@ -320,10 +327,10 @@
 	u_int16_t       link_speed;
 	u_int16_t       link_duplex;
 	u_int32_t       smartspeed;
-	u_int32_t       tx_int_delay;
-	u_int32_t       tx_abs_int_delay;
-	u_int32_t       rx_int_delay;
-	u_int32_t       rx_abs_int_delay;
+	struct em_int_delay_info tx_int_delay;
+	struct em_int_delay_info tx_abs_int_delay;
+	struct em_int_delay_info rx_int_delay;
+	struct em_int_delay_info rx_abs_int_delay;
 
 	XSUM_CONTEXT_T  active_checksum_context;
 

==== //depot/projects/ia64/sys/dev/em/if_em_osdep.h#12 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em_osdep.h,v 1.11 2003/05/02 21:17:08 pdeuskar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em_osdep.h,v 1.12 2003/08/01 17:33:59 jdp Exp $*/
 
 #ifndef _FREEBSD_OS_H_
 #define _FREEBSD_OS_H_
@@ -89,38 +89,36 @@
 	struct device     *dev;
 };
 
-#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
+#define E1000_WRITE_FLUSH(hw) E1000_READ_REG(hw, STATUS)
+
+/* Read from an absolute offset in the adapter's memory space */
+#define E1000_READ_OFFSET(hw, offset) \
+    bus_space_read_4( ((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
+                      ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
+                      offset)
 
-#define E1000_READ_REG(a, reg) (\
-   bus_space_read_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                     ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-                     ((a)->mac_type >= em_82543) ? E1000_##reg : E1000_82542_##reg))
+/* Write to an absolute offset in the adapter's memory space */
+#define E1000_WRITE_OFFSET(hw, offset, value) \
+    bus_space_write_4( ((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
+                       ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
+                       offset, \
+                       value)
 
-#define E1000_WRITE_REG(a, reg, value) (\
-   bus_space_write_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                     ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-		     ((a)->mac_type >= em_82543) ? E1000_##reg : E1000_82542_##reg, \
-                     value))
+/* Convert a register name to its offset in the adapter's memory space */
+#define E1000_REG_OFFSET(hw, reg) \
+    ((hw)->mac_type >= em_82543 ? E1000_##reg : E1000_82542_##reg)
 
-#define E1000_READ_REG_ARRAY(a, reg, offset) (\
- ((a)->mac_type >= em_82543) ? \
-   bus_space_read_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                     ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-                     (E1000_##reg + ((offset) << 2))): \
-   bus_space_read_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                      ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-                       (E1000_82542_##reg + ((offset) << 2))))
+#define E1000_READ_REG(hw, reg) \
+    E1000_READ_OFFSET(hw, E1000_REG_OFFSET(hw, reg))
 
+#define E1000_WRITE_REG(hw, reg, value) \
+    E1000_WRITE_OFFSET(hw, E1000_REG_OFFSET(hw, reg), value)
 
-#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) (\
-  ((a)->mac_type >= em_82543) ? \
-      bus_space_write_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                      ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-                      (E1000_##reg + ((offset) << 2)), value): \
-      bus_space_write_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
-                      ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
-                      (E1000_82542_##reg + ((offset) << 2)), value))
+#define E1000_READ_REG_ARRAY(hw, reg, index) \
+    E1000_READ_OFFSET(hw, E1000_REG_OFFSET(hw, reg) + ((index) << 2))
 
+#define E1000_WRITE_REG_ARRAY(hw, reg, index, value) \
+    E1000_WRITE_OFFSET(hw, E1000_REG_OFFSET(hw, reg) + ((index) << 2), value)
 
 #endif  /* _FREEBSD_OS_H_ */
 

==== //depot/projects/ia64/sys/dev/firewire/if_fwe.c#17 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.17 2003/08/01 02:13:25 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.18 2003/08/01 17:19:12 simokawa Exp $
  */
 
 #include "opt_inet.h"
@@ -298,13 +298,11 @@
 		for (i = START; i < fc->nisodma; i ++) {
 			xferq = fc->ir[i];
 			if ((xferq->flag & FWXFERQ_OPEN) == 0)
-				break;
+				goto found;
 		}
-
-		if (i >= fc->nisodma) {
-			printf("no free dma channel\n");
-			return;
-		}
+		printf("no free dma channel\n");
+		return;
+found:
 		fwe->dma_ch = i;
 		fwe->stream_ch = stream_ch;
 		fwe->pkt_hdr.mode.stream.chtag = fwe->stream_ch;

==== //depot/projects/ia64/sys/ia64/ia64/machdep.c#84 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.144 2003/07/31 01:29:09 peter Exp $
+ * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.145 2003/08/01 07:21:34 marcel Exp $
  */
 
 #include "opt_acpi.h"
@@ -1235,7 +1235,7 @@
 	tf = td->td_frame;
 	regs->r_special = tf->tf_special;
 	regs->r_scratch = tf->tf_scratch;
-	/* XXX preserved */
+	save_callee_saved(&regs->r_preserved);
 	return (0);
 }
 
@@ -1247,7 +1247,7 @@
 	tf = td->td_frame;
 	tf->tf_special = regs->r_special;
 	tf->tf_scratch = regs->r_scratch;
-	/* XXX preserved */
+	restore_callee_saved(&regs->r_preserved);
 	return (0);
 }
 
@@ -1275,7 +1275,7 @@
 	ia64_highfp_save(td);
 
 	fpregs->fpr_scratch = frame->tf_scratch_fp;
-	/* XXX preserved_fp */
+	save_callee_saved_fp(&fpregs->fpr_preserved);
 	fpregs->fpr_high = pcb->pcb_high_fp;
 	return (0);
 }
@@ -1290,7 +1290,7 @@
 	ia64_highfp_drop(td);
 
 	frame->tf_scratch_fp = fpregs->fpr_scratch;
-	/* XXX preserved_fp */
+	restore_callee_saved_fp(&fpregs->fpr_preserved);
 	pcb->pcb_high_fp = fpregs->fpr_high;
 	return (0);
 }

==== //depot/projects/ia64/sys/kern/kern_ktr.c#14 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_ktr.c,v 1.40 2003/07/31 17:29:42 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_ktr.c,v 1.41 2003/08/01 17:00:49 obrien Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ktr.h"
@@ -267,7 +267,7 @@
 
 DB_SHOW_COMMAND(ktr, db_ktr_all)
 {
-	int c, quit;
+	int lines, quit;
 	
 	quit = 0;
 	lines = NUM_LINES_PER_PAGE;

==== //depot/projects/ia64/sys/kern/kern_mac.c#29 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_mac.c,v 1.93 2003/06/23 01:26:33 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_mac.c,v 1.94 2003/08/01 15:45:14 rwatson Exp $");
 
 #include "opt_mac.h"
 #include "opt_devfs.h"
@@ -121,7 +121,6 @@
  */
 static int	ea_warn_once = 0;
 
-#ifndef MAC_ALWAYS_LABEL_MBUF
 /*
  * Flag to indicate whether or not we should allocate label storage for
  * new mbufs.  Since most dynamic policies we currently work with don't
@@ -133,6 +132,7 @@
  * already has to deal with uninitialized labels, this probably won't
  * be a problem.  Note: currently no locking.  Will this be a problem?
  */
+#ifndef MAC_ALWAYS_LABEL_MBUF
 static int	mac_labelmbufs = 0;
 #endif
 
@@ -514,36 +514,28 @@
 
 /*
  * After the policy list has changed, walk the list to update any global
- * flags.
+ * flags.  Currently, we support only one flag, and it's conditionally
+ * defined; as a result, the entire function is conditional.  Eventually,
+ * the #else case might also iterate across the policies.
  */
 static void
 mac_policy_updateflags(void)
 {
+#ifndef MAC_ALWAYS_LABEL_MBUF
 	struct mac_policy_conf *tmpc;
-#ifndef MAC_ALWAYS_LABEL_MBUF
 	int labelmbufs;
-#endif
 
 	mac_policy_assert_exclusive();
 
-#ifndef MAC_ALWAYS_LABEL_MBUF
 	labelmbufs = 0;
-#endif
-
 	LIST_FOREACH(tmpc, &mac_static_policy_list, mpc_list) {
-#ifndef MAC_ALWAYS_LABEL_MBUF
 		if (tmpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_LABELMBUFS)
 			labelmbufs++;
-#endif
 	}
 	LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) {
-#ifndef MAC_ALWAYS_LABEL_MBUF
 		if (tmpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_LABELMBUFS)
 			labelmbufs++;
-#endif
 	}
-
-#ifndef MAC_ALWAYS_LABEL_MBUF
 	mac_labelmbufs = (labelmbufs != 0);
 #endif
 }
@@ -883,24 +875,22 @@
 
 #ifndef MAC_ALWAYS_LABEL_MBUF
 	/*
-	 * Don't reserve space for labels on mbufs unless we have a policy
-	 * that uses the labels.
+	 * If conditionally allocating mbuf labels, don't allocate unless
+	 * they are required.
 	 */
-	if (mac_labelmbufs) {
+	if (!mac_labelmbufs)
+		return (0);
 #endif
-		tag = m_tag_get(PACKET_TAG_MACLABEL, sizeof(struct label),
-		    flag);
-		if (tag == NULL)
-			return (ENOMEM);
-		error = mac_init_mbuf_tag(tag, flag);
-		if (error) {
-			m_tag_free(tag);
-			return (error);
-		}
-		m_tag_prepend(m, tag);
-#ifndef MAC_ALWAYS_LABEL_MBUF
+	tag = m_tag_get(PACKET_TAG_MACLABEL, sizeof(struct label),
+	    flag);
+	if (tag == NULL)
+		return (ENOMEM);
+	error = mac_init_mbuf_tag(tag, flag);
+	if (error) {
+		m_tag_free(tag);
+		return (error);
 	}
-#endif
+	m_tag_prepend(m, tag);
 	return (0);
 }
 

==== //depot/projects/ia64/sys/pccard/pcic_pci.c#17 (text+ko) ====

@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/pccard/pcic_pci.c,v 1.125 2003/06/12 04:46:43 imp Exp $
+ * $FreeBSD: src/sys/pccard/pcic_pci.c,v 1.126 2003/08/01 16:10:48 imp Exp $
  */
 
 #define OBSOLETE_IN_6
@@ -438,6 +438,8 @@
 	 * The 68xx datasheets make it hard to know what the right thing
 	 * to do here is.  We do what we know, which is nothing, and
 	 * hope for the best.
+	 *
+	 * XXX NEWCARD may have some useful code here.
 	 */
 	/* XXX */
 	return (0);

==== //depot/projects/ia64/sys/vm/uma_core.c#47 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.69 2003/07/30 18:55:15 bmilekic Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.70 2003/08/01 17:42:27 bmilekic Exp $");
 
 /* I should really use ktr.. */
 /*
@@ -513,10 +513,12 @@
 		bucket_drain(zone, cache->uc_allocbucket);
 		bucket_drain(zone, cache->uc_freebucket);
 		if (destroy) {
-			uma_zfree_internal(bucketzone, cache->uc_allocbucket,
-			    NULL, 0);
-			uma_zfree_internal(bucketzone, cache->uc_freebucket,
-			    NULL, 0);
+			if (cache->uc_allocbucket != NULL)
+				uma_zfree_internal(bucketzone,
+				    cache->uc_allocbucket, NULL, 0);
+			if (cache->uc_freebucket != NULL)
+				uma_zfree_internal(bucketzone,
+				    cache->uc_freebucket, NULL, 0);
 			cache->uc_allocbucket = cache->uc_freebucket = NULL;
 		}
 	}

==== //depot/projects/ia64/sys/vm/vm_kern.c#26 (text+ko) ====

@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.101 2003/07/27 18:31:32 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_kern.c,v 1.102 2003/08/01 19:51:43 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,11 @@
 /*
  *	kmem_alloc_nofault:
  *
- *	Same as kmem_alloc_pageable, except that it create a nofault entry.
+ *	Allocate a virtual address range with no underlying object and
+ *	no initial mapping to physical memory.  Any mapping from this
+ *	range to physical memory must be explicitly created prior to
+ *	its use, typically with pmap_qenter().  Any attempt to create
+ *	a mapping on demand through vm_fault() will result in a panic. 
  */
 vm_offset_t
 kmem_alloc_nofault(map, size)

==== //depot/projects/ia64/tools/tools/tinderbox/Makefile#7 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/tools/tools/tinderbox/Makefile,v 1.8 2003/07/28 09:49:27 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/Makefile,v 1.9 2003/08/01 07:24:30 des Exp $
 
 BINDIR		?= ${HOME}/bin
 BINOWN		?= ${USER}
@@ -10,16 +10,6 @@
 MANGRP		?= ${USER}
 MAN		 = tbmaster.1 tinderbox.1
 
-SUBDIR		 = www
-
-RCFILES		 = default.rc releng_4.rc current.rc experimental.rc
-RCFILES		+= ada.rc dsa.rc dwp.rc stanley.rc
-ETCDIR		?= ${HOME}/etc
-ETCOWN		?= ${USER}
-ETCGRP		?= ${USER}
-
-beforeinstall:
-	(cd ${.CURDIR} &&\
-	    ${INSTALL} -m 0644 -o ${ETCOWN} -g ${ETCGRP} ${RCFILES} ${ETCDIR})
+SUBDIR		 = etc www
 
 .include <bsd.prog.mk>

==== //depot/projects/ia64/tools/tools/tinderbox/etc/ada.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox setup for ada.des.no
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/ada.rc,v 1.1 2003/07/23 20:16:36 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/ada.rc,v 1.2 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= Tinderbox development

==== //depot/projects/ia64/tools/tools/tinderbox/etc/current.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # CURRENT tinderbox setup
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/current.rc,v 1.3 2003/07/25 22:17:28 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/current.rc,v 1.4 2003/08/01 07:24:31 des Exp $
 #
 
 branches	= CURRENT

==== //depot/projects/ia64/tools/tools/tinderbox/etc/default.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox defaults
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/default.rc,v 1.1 2003/07/23 20:16:36 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/default.rc,v 1.2 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= %%branch%% tinderbox

==== //depot/projects/ia64/tools/tools/tinderbox/etc/dsa.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox setup for dsa.des.no
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/dsa.rc,v 1.1 2003/07/23 20:16:36 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/dsa.rc,v 1.2 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= Tinderbox development

==== //depot/projects/ia64/tools/tools/tinderbox/etc/dwp.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox setup for dwp.des.no
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/dwp.rc,v 1.1 2003/07/23 20:16:36 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/dwp.rc,v 1.2 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= Tinderbox development

==== //depot/projects/ia64/tools/tools/tinderbox/etc/experimental.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox setup for experimental platforms.
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/experimental.rc,v 1.4 2003/07/31 07:52:06 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/experimental.rc,v 1.5 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= Experimental platforms

==== //depot/projects/ia64/tools/tools/tinderbox/etc/releng_4.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # RELENG_4 tinderbox setup
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/releng_4.rc,v 1.2 2003/07/25 07:18:06 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/releng_4.rc,v 1.3 2003/08/01 07:24:31 des Exp $
 #
 
 branches	= RELENG_4

==== //depot/projects/ia64/tools/tools/tinderbox/etc/stanley.rc#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # Tinderbox setup for stanley.rtp.freebsd.org
 #
-# $FreeBSD: src/tools/tools/tinderbox/etc/stanley.rc,v 1.3 2003/07/28 09:44:54 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/etc/stanley.rc,v 1.4 2003/08/01 07:24:31 des Exp $
 #
 
 comment		= Tinderbox stress test

==== //depot/projects/ia64/tools/tools/tinderbox/www/Makefile#3 (text+ko) ====

@@ -1,13 +1,15 @@
-# $FreeBSD: src/tools/tools/tinderbox/www/Makefile,v 1.2 2003/05/17 14:15:59 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/www/Makefile,v 1.3 2003/08/01 07:55:13 des Exp $
 
 CGI		 = index.cgi
-DATA		 = tb.css valid-css.gif valid-xhtml10.png
+DATA		 = tb.css daemon.png valid-css.png valid-xhtml10.png
 WWWDIR		?= ${HOME}/public_html
+WWWOWN		?= ${USER}
+WWWGRP		?= ${USER}
 
 realinstall:
-	${INSTALL} -m 0755 ${.CURDIR}/${CGI} ${WWWDIR}
+	${INSTALL} -m0755 -o${WWWOWN} -g${WWWGRP} ${.CURDIR}/${CGI} ${WWWDIR}
 .for FILE in ${DATA}
-	${INSTALL} -m 0644 ${.CURDIR}/${FILE} ${WWWDIR}
+	${INSTALL} -m0644 -o${WWWOWN} -g${WWWGRP} ${.CURDIR}/${FILE} ${WWWDIR}
 .endfor
 
 .include <bsd.prog.mk>

==== //depot/projects/ia64/tools/tools/tinderbox/www/index.cgi#5 (text+ko) ====

@@ -26,7 +26,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# $FreeBSD: src/tools/tools/tinderbox/www/index.cgi,v 1.8 2003/07/18 07:43:43 des Exp $
+# $FreeBSD: src/tools/tools/tinderbox/www/index.cgi,v 1.9 2003/08/01 07:55:13 des Exp $
 #
 
 use 5.006_001;
@@ -86,6 +86,7 @@
     <meta name=\"robots\" content=\"nofollow\" />
     <meta http-equiv=\"refresh\" content=\"600\" />
     <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"tb.css\" />
+    <link rel=\"shortcut icon\" type=\"image/png\" href=\"daemon.png\" />
   </head>
   <body>
     <h1>FreeBSD tinderbox logs</h1>

==== //depot/projects/ia64/usr.bin/jot/jot.c#6 (text+ko) ====

@@ -43,7 +43,7 @@
 #endif
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/jot/jot.c,v 1.24 2002/07/05 15:58:27 mike Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/jot/jot.c,v 1.25 2003/08/01 16:23:24 das Exp $");
 
 /*
  * jot - print sequential or random data
@@ -275,7 +275,7 @@
 	if (randomize) {
 		*x = (ender - begin) * (ender > begin ? 1 : -1);
 		for (*i = 1; *i <= reps || infinity; (*i)++) {
-			*y = arc4random() / (double)UINT32_MAX;
+			*y = arc4random() / ((double)UINT32_MAX + 1);
 			if (putdata(*y * *x + begin, reps - *i))
 				errx(1, "range error in conversion");
 		}

==== //depot/projects/ia64/usr.sbin/pkg_install/lib/match.c#6 (text+ko) ====

@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/pkg_install/lib/match.c,v 1.13 2002/09/21 01:28:41 wollman Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/pkg_install/lib/match.c,v 1.14 2003/08/01 17:26:41 bmilekic Exp $");
 
 #include "lib.h"
 #include <err.h>
@@ -212,7 +212,7 @@
 		continue;
 	    cmd = plist_cmd(tmp + 1, &cp);
 	    if (cmd == PLIST_ORIGIN) {
-		if (strcmp(origin, cp) == 0)
+		if (strncmp(origin, cp, strlen(origin)) == 0)
 		    storeappend(store, installed[i]);
 		break;
 	    }



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