From owner-svn-src-user@FreeBSD.ORG  Sun Oct 24 04:38:56 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92E4F106566B;
	Sun, 24 Oct 2010 04:38:56 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F87E8FC12;
	Sun, 24 Oct 2010 04:38:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9O4cuVF017547;
	Sun, 24 Oct 2010 04:38:56 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9O4cufb017542;
	Sun, 24 Oct 2010 04:38:56 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201010240438.o9O4cufb017542@svn.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Sun, 24 Oct 2010 04:38:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214259 - in user/nwhitehorn/ps3: conf
	dev/usb/controller powerpc/ps3
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Oct 2010 04:38:56 -0000

Author: nwhitehorn
Date: Sun Oct 24 04:38:56 2010
New Revision: 214259
URL: http://svn.freebsd.org/changeset/base/214259

Log:
  Checkpoint USB support on the PS3. It can see the EHCI registers and reset
  the controller, etc., but will not actually work until busdma has IOMMU
  support in it.

Added:
  user/nwhitehorn/ps3/powerpc/ps3/ehci_ps3.c   (contents, props changed)
Modified:
  user/nwhitehorn/ps3/conf/files.powerpc
  user/nwhitehorn/ps3/dev/usb/controller/ehci.c
  user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c

Modified: user/nwhitehorn/ps3/conf/files.powerpc
==============================================================================
--- user/nwhitehorn/ps3/conf/files.powerpc	Sun Oct 24 03:20:54 2010	(r214258)
+++ user/nwhitehorn/ps3/conf/files.powerpc	Sun Oct 24 04:38:56 2010	(r214259)
@@ -191,6 +191,7 @@ powerpc/powerpc/suswintr.c	standard
 powerpc/powerpc/syncicache.c	standard
 powerpc/powerpc/sys_machdep.c	standard
 powerpc/powerpc/uio_machdep.c	standard
+powerpc/ps3/ehci_ps3.c		optional	ps3 ehci
 powerpc/ps3/if_glc.c		optional	ps3 glc
 powerpc/ps3/mmu_ps3.c		optional	ps3
 powerpc/ps3/platform_ps3.c	optional	ps3

Modified: user/nwhitehorn/ps3/dev/usb/controller/ehci.c
==============================================================================
--- user/nwhitehorn/ps3/dev/usb/controller/ehci.c	Sun Oct 24 03:20:54 2010	(r214258)
+++ user/nwhitehorn/ps3/dev/usb/controller/ehci.c	Sun Oct 24 04:38:56 2010	(r214259)
@@ -268,9 +268,9 @@ ehci_init(ehci_softc_t *sc)
 	}
 #endif
 
-	sc->sc_offs = EREAD1(sc, EHCI_CAPLENGTH);
+	sc->sc_offs = EREAD4(sc, EHCI_CAPLENGTH) & 0xff;
 
-	version = EREAD2(sc, EHCI_HCIVERSION);
+	version = EREAD4(sc, EHCI_HCIVERSION & ~3) >> 16;
 	device_printf(sc->sc_bus.bdev, "EHCI version %x.%x\n",
 	    version >> 8, version & 0xff);
 

Added: user/nwhitehorn/ps3/powerpc/ps3/ehci_ps3.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/nwhitehorn/ps3/powerpc/ps3/ehci_ps3.c	Sun Oct 24 04:38:56 2010	(r214259)
@@ -0,0 +1,173 @@
+/*-
+ * Copyright (C) 2010 Nathan Whitehorn
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/stdint.h>
+#include <sys/stddef.h>
+#include <sys/param.h>
+#include <sys/queue.h>
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/linker_set.h>
+#include <sys/module.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <sys/condvar.h>
+#include <sys/sysctl.h>
+#include <sys/sx.h>
+#include <sys/unistd.h>
+#include <sys/callout.h>
+#include <sys/malloc.h>
+#include <sys/priv.h>
+
+#include <sys/rman.h>
+
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+
+#include <dev/usb/usb_core.h>
+#include <dev/usb/usb_busdma.h>
+#include <dev/usb/usb_process.h>
+#include <dev/usb/usb_util.h>
+
+#include <dev/usb/usb_controller.h>
+#include <dev/usb/usb_bus.h>
+#include <dev/usb/controller/ehci.h>
+#include <dev/usb/controller/ehcireg.h>
+
+#include "ps3bus.h"
+
+struct ps3_ehci_softc {
+	ehci_softc_t            base;
+	struct bus_space         tag;
+};
+
+static int
+ehci_ps3_probe(device_t dev)
+{
+	if (ps3bus_get_bustype(dev) != PS3_BUSTYPE_SYSBUS ||
+	    ps3bus_get_devtype(dev) != PS3_DEVTYPE_USB)
+		return (ENXIO);
+
+	device_set_desc(dev, "Playstation 3 USB 2.0 controller");
+	return (BUS_PROBE_SPECIFIC);
+}
+
+static int
+ehci_ps3_attach(device_t dev)
+{
+	ehci_softc_t *sc = device_get_softc(dev);
+	int rid, err;
+
+	sc->sc_bus.parent = dev;
+	sc->sc_bus.devices = sc->sc_devices;
+	sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
+
+	if (usb_bus_mem_alloc_all(&sc->sc_bus,
+	    USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc))
+		return (ENOMEM);
+
+	rid = 1;
+	sc->sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
+	    &rid, RF_ACTIVE);
+
+	if (!sc->sc_io_res) {
+		device_printf(dev, "Could not map memory\n");
+		goto error;
+	}
+
+	sc->sc_io_tag = rman_get_bustag(sc->sc_io_res);
+	sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res);
+	sc->sc_io_size = rman_get_size(sc->sc_io_res);
+
+	rid = 1;
+	sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+	    RF_SHAREABLE | RF_ACTIVE);
+
+	if (sc->sc_irq_res == NULL) {
+		device_printf(dev, "Could not allocate irq\n");
+		return (ENXIO);
+	}
+
+	sc->sc_bus.bdev = device_add_child(dev, "usbus", -1);
+	if (!sc->sc_bus.bdev) {
+		device_printf(dev, "Could not add USB device\n");
+		return (ENXIO);
+	}
+
+	device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
+
+	sprintf(sc->sc_vendor, "Sony");
+
+	err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
+	    NULL, (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl);
+	if (err) {
+		device_printf(dev, "Could not setup error irq, %d\n", err);
+		goto error;
+	}
+
+	sc->sc_flags |= EHCI_SCFLG_BIGEMMIO;
+	err = ehci_init(sc);
+	if (err) {
+		device_printf(dev, "USB init failed err=%d\n", err);
+		goto error;
+	}
+
+	err = device_probe_and_attach(sc->sc_bus.bdev);
+	if (err == 0)
+		return (0);
+
+error:
+	return (ENXIO);
+}
+
+static device_method_t ehci_ps3_methods[] = {
+	/* Device interface */
+	DEVMETHOD(device_probe, ehci_ps3_probe),
+	DEVMETHOD(device_attach, ehci_ps3_attach),
+
+	/* Bus interface */
+	DEVMETHOD(bus_print_child, bus_generic_print_child),
+
+	{0, 0}
+};
+
+static driver_t ehci_ps3_driver = {
+	"ehci",
+	ehci_ps3_methods,
+	sizeof(ehci_softc_t),
+};
+
+static devclass_t ehci_ps3_devclass;
+
+DRIVER_MODULE(ehci_ps3, ps3bus, ehci_ps3_driver, ehci_ps3_devclass, 0, 0);
+MODULE_DEPEND(ehci_ps3, usb, 1, 1, 1);
+

Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Sun Oct 24 03:20:54 2010	(r214258)
+++ user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Sun Oct 24 04:38:56 2010	(r214259)
@@ -32,9 +32,16 @@
 #include <sys/malloc.h>
 #include <sys/bus.h>
 #include <sys/cpu.h>
-#include <machine/bus.h>
+#include <sys/resource.h>
+#include <sys/rman.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
 
-#include <dev/ofw/openfirm.h>
+#include <machine/bus.h>
+#include <machine/platform.h>
+#include <machine/pmap.h>
+#include <machine/resource.h>
 
 #include "ps3bus.h"
 #include "ps3-hvcall.h"
@@ -87,10 +94,14 @@ static device_method_t ps3bus_methods[] 
 	{ 0, 0 }
 };
 
+struct ps3bus_softc {
+	struct rman sc_mem_rman;
+};
+
 static driver_t ps3bus_driver = {
 	"ps3bus",
 	ps3bus_methods,
-	0
+	sizeof(struct ps3bus_softc)
 };
 
 static devclass_t ps3bus_devclass;
@@ -118,16 +129,16 @@ ps3bus_probe(device_t dev) 
 }
 
 static void
-ps3bus_resources_init(int bus_index, int dev_index, struct resource_list *rl)
+ps3bus_resources_init(struct rman *rm, int bus_index, int dev_index,
+    struct ps3bus_devinfo *dinfo)
 {
 	uint64_t irq_type, irq, outlet;
 	uint64_t reg_type, paddr, len;
-	uint64_t bus, dev, ppe;
-	uint64_t junk;
+	uint64_t ppe, junk;
 	int i, result;
 	int thread;
 
-	resource_list_init(rl);
+	resource_list_init(&dinfo->resources);
 
 	lv1_get_logical_ppe_id(&ppe);
 	thread = 32 - fls(mfctrl());
@@ -142,21 +153,13 @@ ps3bus_resources_init(int bus_index, int
 		if (result != 0)
 			break;
 
-		lv1_get_repository_node_value(PS3_LPAR_ID_PME,
-		    (lv1_repository_string("bus") >> 32) | bus_index,
-		    lv1_repository_string("id"), 0, 0, &bus, &junk);
-		lv1_get_repository_node_value(PS3_LPAR_ID_PME,
-		    (lv1_repository_string("bus") >> 32) | bus_index,
-		    lv1_repository_string("dev") | dev_index,
-		    lv1_repository_string("id"), 0, &dev, &junk);
-
 		switch (irq_type) {
 		case SB_IRQ:
 			lv1_construct_event_receive_port(&outlet);
 			lv1_connect_irq_plug_ext(ppe, thread, outlet, outlet,
 			    0);
-			lv1_connect_interrupt_event_receive_port(bus, dev,
-			    outlet, irq);
+			lv1_connect_interrupt_event_receive_port(dinfo->bus,
+			    dinfo->dev, outlet, irq);
 			break;
 		case OHCI_IRQ:
 		case EHCI_IRQ:
@@ -165,12 +168,13 @@ ps3bus_resources_init(int bus_index, int
 			    0);
 			break;
 		default:
-			printf("Unknown IRQ type %ld for device %ld.%ld\n",
-			    irq_type, bus, dev);
+			printf("Unknown IRQ type %ld for device %d.%d\n",
+			    irq_type, dinfo->bus, dinfo->dev);
 			break;
 		}
 
-		resource_list_add(rl, SYS_RES_IRQ, i, outlet, outlet, 1);
+		resource_list_add(&dinfo->resources, SYS_RES_IRQ, i,
+		    outlet, outlet, 1);
 	}
 
 	/* Scan for registers */
@@ -190,14 +194,26 @@ ps3bus_resources_init(int bus_index, int
 		    lv1_repository_string("reg") | i, 
 		    lv1_repository_string("data"), &paddr, &len);
 
-		resource_list_add(rl, SYS_RES_MEMORY, i, paddr, paddr + len,
-		    len);
+		result = lv1_map_device_mmio_region(dinfo->bus, dinfo->dev,
+		    paddr, len, 12 /* log_2(4 KB) */, &paddr);
+
+		if (result != 0) {
+			printf("Mapping registers failed for device "
+			    "%d.%d (%ld.%ld): %d\n", dinfo->bus, dinfo->dev,
+			    dinfo->bustype, dinfo->devtype, result);
+			continue;
+		}
+
+		rman_manage_region(rm, paddr, paddr + len - 1);
+		resource_list_add(&dinfo->resources, SYS_RES_MEMORY, i,
+		    paddr, paddr + len, len);
 	}
 }
 
 static int 
 ps3bus_attach(device_t self) 
 {
+	struct ps3bus_softc *sc;
 	struct ps3bus_devinfo *dinfo;
 	int bus_index, dev_index, result;
 	uint64_t bustype, bus, devs;
@@ -205,6 +221,11 @@ ps3bus_attach(device_t self) 
 	uint64_t junk;
 	device_t cdev;
 
+	sc = device_get_softc(self);
+	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
+	sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O";
+	rman_init(&sc->sc_mem_rman);
+
 	/*
 	 * Probe all the PS3's buses.
 	 */
@@ -256,8 +277,8 @@ ps3bus_attach(device_t self) 
 			if (dinfo->bustype == PS3_BUSTYPE_SYSBUS)
 				lv1_open_device(bus, dev, 0);
 
-			ps3bus_resources_init(bus_index, dev_index,
-			    &dinfo->resources);
+			ps3bus_resources_init(&sc->sc_mem_rman, bus_index,
+			    dev_index, dinfo);
 
 			cdev = device_add_child(self, NULL, -1);
 			if (cdev == NULL) {
@@ -319,9 +340,47 @@ static struct resource *
 ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid,
     u_long start, u_long end, u_long count, u_int flags)
 {
-	struct ps3bus_devinfo *dinfo = device_get_ivars(child);
+	struct	ps3bus_devinfo *dinfo;
+	struct	ps3bus_softc *sc;
+	int	needactivate;
+        struct	resource *rv;
+        struct	rman *rm;
+        u_long	adjstart, adjend, adjcount;
+        struct	resource_list_entry *rle;
+
+	sc = device_get_softc(bus);
+	dinfo = device_get_ivars(child);
+	needactivate = flags & RF_ACTIVE;
+	flags &= ~RF_ACTIVE;
 
 	switch (type) {
+	case SYS_RES_MEMORY:
+		rle = resource_list_find(&dinfo->resources, SYS_RES_MEMORY,
+		    *rid);
+		if (rle == NULL) {
+			device_printf(bus, "no rle for %s memory %d\n",
+				      device_get_nameunit(child), *rid);
+			return (NULL);
+		}
+
+		if (start < rle->start)
+			adjstart = rle->start;
+		else if (start > rle->end)
+			adjstart = rle->end;
+		else
+			adjstart = start;
+
+		if (end < rle->start)
+			adjend = rle->start;
+		else if (end > rle->end)
+			adjend = rle->end;
+		else
+			adjend = end;
+
+		adjcount = adjend - adjstart;
+
+		rm = &sc->sc_mem_rman;
+		break;
 	case SYS_RES_IRQ:
 		return (resource_list_alloc(&dinfo->resources, bus, child,
 		    type, rid, start, end, count, flags));
@@ -331,16 +390,57 @@ ps3bus_alloc_resource(device_t bus, devi
 		return (NULL);
         }
 
-	return (NULL);
+	rv = rman_reserve_resource(rm, adjstart, adjend, adjcount, flags,
+	    child);
+	if (rv == NULL) {
+		device_printf(bus,
+			"failed to reserve resource %#lx - %#lx (%#lx)"
+			" for %s\n", adjstart, adjend, adjcount,
+			device_get_nameunit(child));
+		return (NULL);
+	}
+
+	rman_set_rid(rv, *rid);
+
+	if (needactivate) {
+		if (bus_activate_resource(child, type, *rid, rv) != 0) {
+			device_printf(bus,
+				"failed to activate resource for %s\n",
+				device_get_nameunit(child));
+				rman_release_resource(rv);
+			return (NULL);
+		}
+	}
+
+	return (rv);
 }
 
 static int
 ps3bus_activate_resource(device_t bus, device_t child, int type, int rid,
     struct resource *res)
 {
+	void *p;
+
 	if (type == SYS_RES_IRQ)
 		return (bus_activate_resource(bus, type, rid, res));
 
+	if (type == SYS_RES_MEMORY) {
+		vm_offset_t start;
+
+		start = (vm_offset_t) rman_get_start(res);
+
+		if (bootverbose)
+			printf("ps3 mapdev: start %zx, len %ld\n", start,
+			       rman_get_size(res));
+
+		p = pmap_mapdev(start, (vm_size_t) rman_get_size(res));
+		if (p == NULL)
+			return (ENOMEM);
+		rman_set_virtual(res, p);
+		rman_set_bustag(res, &bs_be_tag);
+		rman_set_bushandle(res, (u_long)p);
+	}
+
 	return (rman_activate_resource(res));
 }
 

From owner-svn-src-user@FreeBSD.ORG  Mon Oct 25 02:16:35 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52DD7106564A;
	Mon, 25 Oct 2010 02:16:35 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3EFB58FC17;
	Mon, 25 Oct 2010 02:16:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9P2GZ7p047792;
	Mon, 25 Oct 2010 02:16:35 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9P2GZFj047785;
	Mon, 25 Oct 2010 02:16:35 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201010250216.o9P2GZFj047785@svn.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Mon, 25 Oct 2010 02:16:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214312 - in user/nwhitehorn/ps3: conf powerpc/include
	powerpc/powerpc powerpc/ps3
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2010 02:16:35 -0000

Author: nwhitehorn
Date: Mon Oct 25 02:16:35 2010
New Revision: 214312
URL: http://svn.freebsd.org/changeset/base/214312

Log:
  Initial IOMMU support for the PS3 and generic bus dma hooks to allow it.
  USB still doesn't work.

Added:
  user/nwhitehorn/ps3/powerpc/powerpc/iommu_if.m
Modified:
  user/nwhitehorn/ps3/conf/files.powerpc
  user/nwhitehorn/ps3/powerpc/include/bus_dma.h
  user/nwhitehorn/ps3/powerpc/powerpc/busdma_machdep.c
  user/nwhitehorn/ps3/powerpc/ps3/if_glc.c
  user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c

Modified: user/nwhitehorn/ps3/conf/files.powerpc
==============================================================================
--- user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 01:22:36 2010	(r214311)
+++ user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 02:16:35 2010	(r214312)
@@ -174,6 +174,7 @@ powerpc/powerpc/fuswintr.c	standard
 powerpc/powerpc/gdb_machdep.c	optional	gdb
 powerpc/powerpc/in_cksum.c	optional	inet
 powerpc/powerpc/intr_machdep.c	standard
+powerpc/powerpc/iommu_if.m	standard
 powerpc/powerpc/mem.c		optional	mem
 powerpc/powerpc/mmu_if.m	standard
 powerpc/powerpc/mp_machdep.c	optional	smp

Modified: user/nwhitehorn/ps3/powerpc/include/bus_dma.h
==============================================================================
--- user/nwhitehorn/ps3/powerpc/include/bus_dma.h	Mon Oct 25 01:22:36 2010	(r214311)
+++ user/nwhitehorn/ps3/powerpc/include/bus_dma.h	Mon Oct 25 02:16:35 2010	(r214312)
@@ -30,4 +30,8 @@
 
 #include <sys/bus_dma.h>
 
+struct device;
+
+int bus_dma_tag_set_iommu(bus_dma_tag_t, struct device *iommu, void *cookie);
+
 #endif /* _POWERPC_BUS_DMA_H_ */

Modified: user/nwhitehorn/ps3/powerpc/powerpc/busdma_machdep.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/powerpc/busdma_machdep.c	Mon Oct 25 01:22:36 2010	(r214311)
+++ user/nwhitehorn/ps3/powerpc/powerpc/busdma_machdep.c	Mon Oct 25 02:16:35 2010	(r214312)
@@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$");
 #include <machine/bus.h>
 #include <machine/md_var.h>
 
+#include "iommu_if.h"
+
 #define MAX_BPAGES MIN(8192, physmem/40)
 
 struct bounce_zone;
@@ -73,8 +75,9 @@ struct bus_dma_tag {
 	int		  map_count;
 	bus_dma_lock_t	 *lockfunc;
 	void		 *lockfuncarg;
-	bus_dma_segment_t *segments;
 	struct bounce_zone *bounce_zone;
+	device_t	  iommu;
+	void		 *iommu_cookie;
 };
 
 struct bounce_page {
@@ -121,6 +124,8 @@ struct bus_dmamap {
 	bus_dma_tag_t	       dmat;
 	void		      *buf;		/* unmapped buffer pointer */
 	bus_size_t	       buflen;		/* unmapped buffer length */
+	bus_dma_segment_t     *segments;
+	int		       nsegs;
 	bus_dmamap_callback_t *callback;
 	void		      *callback_arg;
 	STAILQ_ENTRY(bus_dmamap) links;
@@ -128,7 +133,6 @@ struct bus_dmamap {
 
 static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
 static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
-static struct bus_dmamap nobounce_dmamap;
 
 static void init_bounce_pages(void *dummy);
 static int alloc_bounce_zone(bus_dma_tag_t dmat);
@@ -258,7 +262,6 @@ bus_dma_tag_create(bus_dma_tag_t parent,
 		newtag->lockfunc = dflt_lock;
 		newtag->lockfuncarg = NULL;
 	}
-	newtag->segments = NULL;
 
 	/* Take into account any restrictions imposed by our parent tag */
 	if (parent != NULL) {
@@ -280,6 +283,8 @@ bus_dma_tag_create(bus_dma_tag_t parent,
 		}
 		if (newtag->parent != NULL)
 			atomic_add_int(&parent->ref_count, 1);
+		newtag->iommu = parent->iommu;
+		newtag->iommu_cookie = parent->iommu_cookie;
 	}
 
 	if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem)
@@ -343,8 +348,6 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
 			parent = dmat->parent;
 			atomic_subtract_int(&dmat->ref_count, 1);
 			if (dmat->ref_count == 0) {
-				if (dmat->segments != NULL)
-					free(dmat->segments, M_DEVBUF);
 				free(dmat, M_DEVBUF);
 				/*
 				 * Last reference count, so
@@ -372,17 +375,15 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 
 	error = 0;
 
-	if (dmat->segments == NULL) {
-		dmat->segments = (bus_dma_segment_t *)malloc(
-		    sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
-		    M_NOWAIT);
-		if (dmat->segments == NULL) {
-			CTR3(KTR_BUSDMA, "%s: tag %p error %d",
-			    __func__, dmat, ENOMEM);
-			return (ENOMEM);
-		}
+	*mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF,
+				     M_NOWAIT | M_ZERO);
+	if (*mapp == NULL) {
+		CTR3(KTR_BUSDMA, "%s: tag %p error %d",
+		    __func__, dmat, ENOMEM);
+		return (ENOMEM);
 	}
 
+
 	/*
 	 * Bouncing might be required if the driver asks for an active
 	 * exclusion region, a data alignment that is stricter than 1, and/or
@@ -400,14 +401,6 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 		}
 		bz = dmat->bounce_zone;
 
-		*mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF,
-					     M_NOWAIT | M_ZERO);
-		if (*mapp == NULL) {
-			CTR3(KTR_BUSDMA, "%s: tag %p error %d",
-			    __func__, dmat, ENOMEM);
-			return (ENOMEM);
-		}
-
 		/* Initialize the new map */
 		STAILQ_INIT(&((*mapp)->bpages));
 
@@ -437,9 +430,18 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 			}
 		}
 		bz->map_count++;
-	} else {
-		*mapp = NULL;
 	}
+
+	(*mapp)->nsegs = 0;
+	(*mapp)->segments = (bus_dma_segment_t *)malloc(
+	    sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
+	    M_NOWAIT);
+	if ((*mapp)->segments == NULL) {
+		CTR3(KTR_BUSDMA, "%s: tag %p error %d",
+		    __func__, dmat, ENOMEM);
+		return (ENOMEM);
+	}
+
 	if (error == 0)
 		dmat->map_count++;
 	CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
@@ -454,7 +456,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 int
 bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
 {
-	if (map != NULL && map != &nobounce_dmamap) {
+	if (dmat->flags & BUS_DMA_COULD_BOUNCE) {
 		if (STAILQ_FIRST(&map->bpages) != NULL) {
 			CTR3(KTR_BUSDMA, "%s: tag %p error %d",
 			    __func__, dmat, EBUSY);
@@ -462,8 +464,9 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b
 		}
 		if (dmat->bounce_zone)
 			dmat->bounce_zone->map_count--;
-		free(map, M_DEVBUF);
 	}
+	free(map->segments, M_DEVBUF);
+	free(map, M_DEVBUF);
 	dmat->map_count--;
 	CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
 	return (0);
@@ -486,19 +489,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 	else
 		mflags = M_WAITOK;
 
-	/* If we succeed, no mapping/bouncing will be required */
-	*mapp = NULL;
+	bus_dmamap_create(dmat, flags, mapp);
 
-	if (dmat->segments == NULL) {
-		dmat->segments = (bus_dma_segment_t *)malloc(
-		    sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
-		    mflags);
-		if (dmat->segments == NULL) {
-			CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
-			    __func__, dmat, dmat->flags, ENOMEM);
-			return (ENOMEM);
-		}
-	}
 	if (flags & BUS_DMA_ZERO)
 		mflags |= M_ZERO;
 
@@ -535,7 +527,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 #ifdef NOTYET
 	if (flags & BUS_DMA_NOCACHE)
 		pmap_change_attr((vm_offset_t)*vaddr, dmat->maxsize,
-		    PAT_UNCACHEABLE);
+		    VM_MEMATTR_UNCACHEABLE);
 #endif
 	CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
 	    __func__, dmat, dmat->flags, 0);
@@ -549,14 +541,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi
 void
 bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
 {
-	/*
-	 * dmamem does not need to be bounced, so the map should be
-	 * NULL
-	 */
-	if (map != NULL)
-		panic("bus_dmamem_free: Invalid map freed\n");
+	bus_dmamap_destroy(dmat, map);
+
 #ifdef NOTYET
-	pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, PAT_WRITE_BACK);
+	pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, VM_MEMATTR_DEFAULT);
 #endif
 	if ((dmat->maxsize <= PAGE_SIZE) &&
 	   (dmat->alignment < dmat->maxsize) &&
@@ -591,18 +579,13 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 	bus_addr_t paddr;
 	int seg;
 
-	if (map == NULL)
-		map = &nobounce_dmamap;
-
-	if ((map != &nobounce_dmamap && map->pagesneeded == 0) 
-	 && ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) {
+	if (map->pagesneeded == 0 && ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) {
 		vm_offset_t	vendaddr;
 
 		CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, "
 		    "alignment= %d", dmat->lowaddr, ptoa((vm_paddr_t)Maxmem),
 		    dmat->boundary, dmat->alignment);
-		CTR3(KTR_BUSDMA, "map= %p, nobouncemap= %p, pagesneeded= %d",
-		    map, &nobounce_dmamap, map->pagesneeded);
+		CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d", map, map->pagesneeded);
 		/*
 		 * Count the number of bounce pages
 		 * needed in order to complete this transfer
@@ -731,29 +714,36 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_
 		bus_size_t buflen, bus_dmamap_callback_t *callback,
 		void *callback_arg, int flags)
 {
-	bus_addr_t		lastaddr = 0;
-	int			error, nsegs = 0;
+	bus_addr_t	lastaddr = 0;
+	int		error;
 
-	if (map != NULL) {
+	if (dmat->flags & BUS_DMA_COULD_BOUNCE) {
 		flags |= BUS_DMA_WAITOK;
 		map->callback = callback;
 		map->callback_arg = callback_arg;
 	}
 
+	map->nsegs = 0;
 	error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, NULL, flags,
-	     &lastaddr, dmat->segments, &nsegs, 1);
+	     &lastaddr, map->segments, &map->nsegs, 1);
+	map->nsegs++;
 
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
-	    __func__, dmat, dmat->flags, error, nsegs + 1);
+	    __func__, dmat, dmat->flags, error, map->nsegs);
 
 	if (error == EINPROGRESS) {
 		return (error);
 	}
 
+	if (dmat->iommu != NULL)
+		IOMMU_MAP(dmat->iommu, map->segments, &map->nsegs, dmat->lowaddr,
+		    dmat->highaddr, dmat->alignment, dmat->boundary,
+		    dmat->iommu_cookie);
+
 	if (error)
-		(*callback)(callback_arg, dmat->segments, 0, error);
+		(*callback)(callback_arg, map->segments, 0, error);
 	else
-		(*callback)(callback_arg, dmat->segments, nsegs + 1, 0);
+		(*callback)(callback_arg, map->segments, map->nsegs, 0);
 
 	/*
 	 * Return ENOMEM to the caller so that it can pass it up the stack.
@@ -775,12 +765,12 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat,
 		     bus_dmamap_callback2_t *callback, void *callback_arg,
 		     int flags)
 {
-	int nsegs, error;
+	int error;
 
 	M_ASSERTPKTHDR(m0);
 
 	flags |= BUS_DMA_NOWAIT;
-	nsegs = 0;
+	map->nsegs = 0;
 	error = 0;
 	if (m0->m_pkthdr.len <= dmat->maxsize) {
 		int first = 1;
@@ -792,7 +782,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat,
 				error = _bus_dmamap_load_buffer(dmat, map,
 						m->m_data, m->m_len,
 						NULL, flags, &lastaddr,
-						dmat->segments, &nsegs, first);
+						map->segments, &map->nsegs, first);
 				first = 0;
 			}
 		}
@@ -800,15 +790,21 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat,
 		error = EINVAL;
 	}
 
+	map->nsegs++;
+	if (dmat->iommu != NULL)
+		IOMMU_MAP(dmat->iommu, map->segments, &map->nsegs, dmat->lowaddr,
+		    dmat->highaddr, dmat->alignment, dmat->boundary,
+		    dmat->iommu_cookie);
+
 	if (error) {
 		/* force "no valid mappings" in callback */
-		(*callback)(callback_arg, dmat->segments, 0, 0, error);
+		(*callback)(callback_arg, map->segments, 0, 0, error);
 	} else {
-		(*callback)(callback_arg, dmat->segments,
-			    nsegs+1, m0->m_pkthdr.len, error);
+		(*callback)(callback_arg, map->segments,
+			    map->nsegs, m0->m_pkthdr.len, error);
 	}
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
-	    __func__, dmat, dmat->flags, error, nsegs + 1);
+	    __func__, dmat, dmat->flags, error, map->nsegs);
 	return (error);
 }
 
@@ -844,6 +840,15 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dm
 
 	/* XXX FIXME: Having to increment nsegs is really annoying */
 	++*nsegs;
+
+	if (dmat->iommu != NULL)
+		IOMMU_MAP(dmat->iommu, segs, nsegs, dmat->lowaddr,
+		    dmat->highaddr, dmat->alignment, dmat->boundary,
+		    dmat->iommu_cookie);
+
+	map->nsegs = *nsegs;
+	memcpy(map->segments, segs, map->nsegs*sizeof(segs[0]));
+
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
 	    __func__, dmat, dmat->flags, error, *nsegs);
 	return (error);
@@ -859,7 +864,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, 
 		    int flags)
 {
 	bus_addr_t lastaddr = 0;
-	int nsegs, error, first, i;
+	int error, first, i;
 	bus_size_t resid;
 	struct iovec *iov;
 	pmap_t pmap;
@@ -875,7 +880,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, 
 	} else
 		pmap = NULL;
 
-	nsegs = 0;
+	map->nsegs = 0;
 	error = 0;
 	first = 1;
 	for (i = 0; i < uio->uio_iovcnt && resid != 0 && !error; i++) {
@@ -890,22 +895,28 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, 
 		if (minlen > 0) {
 			error = _bus_dmamap_load_buffer(dmat, map,
 					addr, minlen, pmap, flags, &lastaddr,
-					dmat->segments, &nsegs, first);
+					map->segments, &map->nsegs, first);
 			first = 0;
 
 			resid -= minlen;
 		}
 	}
 
+	map->nsegs++;
+	if (dmat->iommu != NULL)
+		IOMMU_MAP(dmat->iommu, map->segments, &map->nsegs, dmat->lowaddr,
+		    dmat->highaddr, dmat->alignment, dmat->boundary,
+		    dmat->iommu_cookie);
+
 	if (error) {
 		/* force "no valid mappings" in callback */
-		(*callback)(callback_arg, dmat->segments, 0, 0, error);
+		(*callback)(callback_arg, map->segments, 0, 0, error);
 	} else {
-		(*callback)(callback_arg, dmat->segments,
-			    nsegs+1, uio->uio_resid, error);
+		(*callback)(callback_arg, map->segments,
+			    map->nsegs, uio->uio_resid, error);
 	}
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
-	    __func__, dmat, dmat->flags, error, nsegs + 1);
+	    __func__, dmat, dmat->flags, error, map->nsegs);
 	return (error);
 }
 
@@ -917,6 +928,11 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b
 {
 	struct bounce_page *bpage;
 
+	if (dmat->iommu) {
+		IOMMU_UNMAP(dmat->iommu, map->segments, map->nsegs, dmat->iommu_cookie);
+		map->nsegs = 0;
+	}
+
 	while ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) {
 		STAILQ_REMOVE_HEAD(&map->bpages, links);
 		free_bounce_page(dmat, bpage);
@@ -1122,8 +1138,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
 	struct bounce_page *bpage;
 
 	KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag"));
-	KASSERT(map != NULL && map != &nobounce_dmamap,
-	    ("add_bounce_page: bad map %p", map));
 
 	bz = dmat->bounce_zone;
 	if (map->pagesneeded == 0)
@@ -1210,3 +1224,13 @@ busdma_swi(void)
 	}
 	mtx_unlock(&bounce_lock);
 }
+
+int
+bus_dma_tag_set_iommu(bus_dma_tag_t tag, struct device *iommu, void *cookie)
+{
+	tag->iommu = iommu;
+	tag->iommu_cookie = cookie;
+
+	return (0);
+}
+

Added: user/nwhitehorn/ps3/powerpc/powerpc/iommu_if.m
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/nwhitehorn/ps3/powerpc/powerpc/iommu_if.m	Mon Oct 25 02:16:35 2010	(r214312)
@@ -0,0 +1,54 @@
+#-
+# Copyright (c) 2010 Nathan Whitehorn
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# from: src/sys/kern/bus_if.m,v 1.21 2002/04/21 11:16:10 markm Exp
+# $FreeBSD: user/nwhitehorn/ps3/powerpc/powerpc/pic_if.m 209486 2010-06-23 22:33:03Z nwhitehorn $
+#
+
+#include <machine/bus.h>
+
+#include <sys/bus.h>
+#include <sys/bus_dma.h>
+
+INTERFACE iommu;
+
+METHOD int map {
+	device_t	iommu;
+	bus_dma_segment_t *segs;
+	int		*nsegs;
+	bus_addr_t	lowaddr;
+	bus_addr_t	highaddr;
+	bus_size_t	alignment;
+	bus_size_t	boundary;
+	void		*cookie;
+};
+
+METHOD int unmap {
+	device_t	iommu;
+	bus_dma_segment_t *segs;
+	int		nsegs;
+	void		*cookie;
+};
+

Modified: user/nwhitehorn/ps3/powerpc/ps3/if_glc.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/ps3/if_glc.c	Mon Oct 25 01:22:36 2010	(r214311)
+++ user/nwhitehorn/ps3/powerpc/ps3/if_glc.c	Mon Oct 25 02:16:35 2010	(r214312)
@@ -116,36 +116,13 @@ glc_getphys(void *xaddr, bus_dma_segment
 	*(bus_addr_t *)xaddr = segs[0].ds_addr;
 }
 
-static bus_addr_t
-glc_map_addr(struct glc_softc *sc, bus_addr_t lpar_addr)
-{
-	static struct mem_region *regions = NULL;
-	static int rcount;
-	int i;
-
-	if (regions == NULL)
-		mem_regions(&regions, &rcount, &regions, &rcount);
-
-	for (i = 0; i < rcount; i++) {
-		if (lpar_addr >= regions[i].mr_start &&
-		    lpar_addr < regions[i].mr_start + regions[i].mr_size)
-			break;
-	}
-
-	if (i == rcount)
-		panic("glc: unable to map address %#lx", lpar_addr);
-
-	return (sc->sc_dma_base[i] + (lpar_addr - regions[i].mr_start));
-}
-
 static int 
 glc_attach(device_t dev) 
 {
 	struct glc_softc *sc;
 	struct glc_txsoft *txs;
-	struct mem_region *regions;
 	uint64_t mac64, val, junk;
-	int i, err, rcount;
+	int i, err;
 
 	sc = device_get_softc(dev);
 
@@ -214,28 +191,6 @@ glc_attach(device_t dev) 
 	 * Set up DMA.
 	 */
 
-	/* XXX: following should be integrated to busdma */
-	mem_regions(&regions, &rcount, &regions, &rcount);
-	for (i = 0; i < rcount; i++) {
-		err = lv1_allocate_device_dma_region(sc->sc_bus, sc->sc_dev,
-		    regions[i].mr_size, 24 /* log_2(16 MB) */,
-		    0 /* 32-bit transfers */, &sc->sc_dma_base[i]);
-		if (err != 0) {
-			device_printf(dev,
-			    "could not allocate DMA region %d: %d\n", i, err);
-			goto fail;
-		}
-
-		err = lv1_map_device_dma_region(sc->sc_bus, sc->sc_dev,
-		    regions[i].mr_start, sc->sc_dma_base[i], regions[i].mr_size,
-		    0xf800000000000000UL /* see Cell IO/MMU docs */);
-		if (err != 0) {
-			device_printf(dev,
-			    "could not map DMA region %d: %d\n", i, err);
-			goto fail;
-		}
-	}
-
 	err = bus_dma_tag_create(bus_get_dma_tag(dev), 32, 0,
 	    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
 	    129*sizeof(struct glc_dmadesc), 1, 128*sizeof(struct glc_dmadesc),
@@ -326,7 +281,6 @@ glc_attach(device_t dev) 
 
 	return (0);
 
-fail:
 	mtx_destroy(&sc->sc_mtx);
 	if_free(sc->sc_ifp);
 	return (ENXIO);
@@ -367,8 +321,8 @@ glc_init_locked(struct glc_softc *sc)
 	txs = STAILQ_FIRST(&sc->sc_txdirtyq);
 	if (txs != NULL) {
 		lv1_net_start_tx_dma(sc->sc_bus, sc->sc_dev,
-		    glc_map_addr(sc, sc->sc_txdmadesc_phys +
-		    txs->txs_firstdesc*sizeof(struct glc_dmadesc)), 0);
+		    sc->sc_txdmadesc_phys +
+		    txs->txs_firstdesc*sizeof(struct glc_dmadesc), 0);
 	}
 
 	lv1_net_start_rx_dma(sc->sc_bus, sc->sc_dev,
@@ -613,15 +567,14 @@ glc_add_rxbuf_dma(struct glc_softc *sc, 
 	struct glc_rxsoft *rxs = &sc->sc_rxsoft[idx];
 	
 	bzero(&sc->sc_rxdmadesc[idx], sizeof(sc->sc_rxdmadesc[idx]));
-	sc->sc_rxdmadesc[idx].paddr = glc_map_addr(sc, rxs->segment.ds_addr);
+	sc->sc_rxdmadesc[idx].paddr = rxs->segment.ds_addr;
 	sc->sc_rxdmadesc[idx].len = rxs->segment.ds_len;
-	sc->sc_rxdmadesc[idx].next = glc_map_addr(sc, sc->sc_rxdmadesc_phys +
-	    ((idx + 1) % GLC_MAX_RX_PACKETS)*sizeof(sc->sc_rxdmadesc[idx]));
+	sc->sc_rxdmadesc[idx].next = sc->sc_rxdmadesc_phys +
+	    ((idx + 1) % GLC_MAX_RX_PACKETS)*sizeof(sc->sc_rxdmadesc[idx]);
 	sc->sc_rxdmadesc[idx].cmd_stat = GELIC_DESCR_OWNED;
 
 	rxs->rxs_desc_slot = idx;
-	rxs->rxs_desc = glc_map_addr(sc, sc->sc_rxdmadesc_phys +
-	    idx*sizeof(struct glc_dmadesc));
+	rxs->rxs_desc = sc->sc_rxdmadesc_phys + idx*sizeof(struct glc_dmadesc);
 
         return (0);
 }
@@ -684,16 +637,15 @@ glc_encap(struct glc_softc *sc, struct m
 	txs->txs_firstdesc = sc->next_txdma_slot;
 
 	idx = txs->txs_firstdesc;
-	firstslotphys = glc_map_addr(sc, sc->sc_txdmadesc_phys +
-	    txs->txs_firstdesc*sizeof(struct glc_dmadesc));
+	firstslotphys = sc->sc_txdmadesc_phys +
+	    txs->txs_firstdesc*sizeof(struct glc_dmadesc);
 
 	for (i = 0; i < nsegs; i++) {
 		bzero(&sc->sc_txdmadesc[idx], sizeof(sc->sc_txdmadesc[idx]));
-		sc->sc_txdmadesc[idx].paddr = glc_map_addr(sc, segs[i].ds_addr);
+		sc->sc_txdmadesc[idx].paddr = segs[i].ds_addr;
 		sc->sc_txdmadesc[idx].len = segs[i].ds_len;
-		sc->sc_txdmadesc[idx].next = glc_map_addr(sc,
-		    sc->sc_txdmadesc_phys +
-		    ((idx + 1) % GLC_MAX_TX_PACKETS)*sizeof(struct glc_dmadesc));
+		sc->sc_txdmadesc[idx].next = sc->sc_txdmadesc_phys +
+		    ((idx + 1) % GLC_MAX_TX_PACKETS)*sizeof(struct glc_dmadesc);
 		sc->sc_txdmadesc[idx].cmd_stat |= GELIC_CMDSTAT_NOIPSEC;
 
 		if (i+1 == nsegs) {
@@ -836,8 +788,8 @@ glc_txintr(struct glc_softc *sc)
 
 	if (kickstart && txs != NULL) {
 		lv1_net_start_tx_dma(sc->sc_bus, sc->sc_dev,
-		    glc_map_addr(sc, sc->sc_txdmadesc_phys +
-		    txs->txs_firstdesc*sizeof(struct glc_dmadesc)), 0);
+		    sc->sc_txdmadesc_phys +
+		    txs->txs_firstdesc*sizeof(struct glc_dmadesc), 0);
 	}
 
 	if (progress) {

Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 01:22:36 2010	(r214311)
+++ user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 02:16:35 2010	(r214312)
@@ -45,6 +45,7 @@
 
 #include "ps3bus.h"
 #include "ps3-hvcall.h"
+#include "iommu_if.h"
 
 static void	ps3bus_identify(driver_t *, device_t);
 static int	ps3bus_probe(device_t);
@@ -57,6 +58,11 @@ static struct resource *ps3bus_alloc_res
 		    u_long count, u_int flags);
 static int	ps3bus_activate_resource(device_t bus, device_t child, int type,
 		    int rid, struct resource *res);
+static bus_dma_tag_t ps3bus_get_dma_tag(device_t dev, device_t child);
+static int	ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs,		    bus_addr_t min, bus_addr_t max, bus_size_t alignment,
+		    bus_size_t boundary, void *cookie);
+static int	ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs,
+		    int nsegs, void *cookie);
 
 struct ps3bus_devinfo {
 	int bus;
@@ -65,6 +71,10 @@ struct ps3bus_devinfo {
 	uint64_t devtype;
 
 	struct resource_list resources;
+	bus_dma_tag_t dma_tag;
+
+	struct mtx iommu_mtx;
+	bus_addr_t dma_base[4];
 };
 
 static MALLOC_DEFINE(M_PS3BUS, "ps3bus", "PS3 system bus device information");
@@ -84,6 +94,7 @@ static device_method_t ps3bus_methods[] 
 	/* Bus interface */
 	DEVMETHOD(bus_driver_added,	bus_generic_driver_added),
 	DEVMETHOD(bus_add_child,	bus_generic_add_child),
+	DEVMETHOD(bus_get_dma_tag,	ps3bus_get_dma_tag),
 	DEVMETHOD(bus_print_child,	ps3bus_print_child),
 	DEVMETHOD(bus_read_ivar,	ps3bus_read_ivar),
 	DEVMETHOD(bus_alloc_resource,	ps3bus_alloc_resource),
@@ -91,11 +102,17 @@ static device_method_t ps3bus_methods[] 
 	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
 	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
+	/* IOMMU interface */
+	DEVMETHOD(iommu_map,		ps3_iommu_map),
+	DEVMETHOD(iommu_unmap,		ps3_iommu_unmap),
+
 	{ 0, 0 }
 };
 
 struct ps3bus_softc {
 	struct rman sc_mem_rman;
+	struct mem_region *regions;
+	int rcount;
 };
 
 static driver_t ps3bus_driver = {
@@ -226,6 +243,9 @@ ps3bus_attach(device_t self) 
 	sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O";
 	rman_init(&sc->sc_mem_rman);
 
+	/* Get memory regions for DMA */
+	mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount);
+
 	/*
 	 * Probe all the PS3's buses.
 	 */
@@ -287,6 +307,8 @@ ps3bus_attach(device_t self) 
 				free(dinfo, M_PS3BUS);
 				continue;
 			}
+
+			mtx_init(&dinfo->iommu_mtx, "iommu", NULL, MTX_DEF);
 			device_set_ivars(cdev, dinfo);
 		}
 	}
@@ -444,3 +466,90 @@ ps3bus_activate_resource(device_t bus, d
 	return (rman_activate_resource(res));
 }
 
+static bus_dma_tag_t
+ps3bus_get_dma_tag(device_t dev, device_t child)
+{
+	struct ps3bus_devinfo *dinfo = device_get_ivars(child);
+	struct ps3bus_softc *sc = device_get_softc(dev);
+	int i, err;
+
+	mtx_lock(&dinfo->iommu_mtx);
+	if (dinfo->dma_tag != NULL) {
+		mtx_unlock(&dinfo->iommu_mtx);
+		return (dinfo->dma_tag);
+	}
+printf("Allocating tag for device %d.%d:\n", dinfo->bus, dinfo->dev);
+
+	for (i = 0; i < sc->rcount; i++) {
+		err = lv1_allocate_device_dma_region(dinfo->bus, dinfo->dev,
+		    sc->regions[i].mr_size, 24 /* log_2(16 MB) */,
+		    0 /* 32-bit transfers */, &dinfo->dma_base[i]);
+		if (err != 0) {
+			device_printf(child,
+			    "could not allocate DMA region %d: %d\n", i, err);
+			goto fail;
+		}
+
+		err = lv1_map_device_dma_region(dinfo->bus, dinfo->dev,
+		    sc->regions[i].mr_start, dinfo->dma_base[i],
+		    sc->regions[i].mr_size,
+		    0xf800000000000000UL /* see Cell IO/MMU docs */);
+		if (err != 0) {
+			device_printf(child,
+			    "could not map DMA region %d: %d\n", i, err);
+			goto fail;
+		}
+printf("\tPhys mem %#lx mapped to %#lx\n", sc->regions[i].mr_start, dinfo->dma_base[i]);
+	}
+
+	err = bus_dma_tag_create(bus_get_dma_tag(dev),
+	    1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
+	    NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT,
+	    0, NULL, NULL, &dinfo->dma_tag);
+
+	bus_dma_tag_set_iommu(dinfo->dma_tag, dev, dinfo);
+
+fail:
+	mtx_unlock(&dinfo->iommu_mtx);
+
+	if (err)
+		return (NULL);
+
+	return (dinfo->dma_tag);
+}
+
+static int
+ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs,
+    bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_size_t boundary,
+    void *cookie)
+{
+	struct ps3bus_devinfo *dinfo = cookie;
+	struct ps3bus_softc *sc = device_get_softc(dev);
+	int i, j;
+
+	for (i = 0; i < *nsegs; i++) {
+		for (j = 0; j < sc->rcount; j++) {
+			if (segs[i].ds_addr >= sc->regions[j].mr_start &&
+			    segs[i].ds_addr < sc->regions[j].mr_start +
+			      sc->regions[j].mr_size)
+				break;
+		}
+		KASSERT(j < sc->rcount,
+		    ("Trying to map address %#lx not in physical memory",
+		    segs[i].ds_addr));
+
+		segs[i].ds_addr = dinfo->dma_base[j] +
+		    (segs[i].ds_addr - sc->regions[j].mr_start);
+	}
+
+	return (0);
+}
+
+
+static int
+ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, void *cookie)
+{
+
+	return (0);
+}
+

From owner-svn-src-user@FreeBSD.ORG  Mon Oct 25 03:21:40 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 80AC0106564A;
	Mon, 25 Oct 2010 03:21:40 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EB5C8FC14;
	Mon, 25 Oct 2010 03:21:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9P3LeE8049249;
	Mon, 25 Oct 2010 03:21:40 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9P3LeRP049247;
	Mon, 25 Oct 2010 03:21:40 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201010250321.o9P3LeRP049247@svn.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Mon, 25 Oct 2010 03:21:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214313 - user/nwhitehorn/ps3/powerpc/ps3
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2010 03:21:40 -0000

Author: nwhitehorn
Date: Mon Oct 25 03:21:40 2010
New Revision: 214313
URL: http://svn.freebsd.org/changeset/base/214313

Log:
  Remove some debugging printfs that snuck in.

Modified:
  user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c

Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 02:16:35 2010	(r214312)
+++ user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 03:21:40 2010	(r214313)
@@ -478,7 +478,6 @@ ps3bus_get_dma_tag(device_t dev, device_
 		mtx_unlock(&dinfo->iommu_mtx);
 		return (dinfo->dma_tag);
 	}
-printf("Allocating tag for device %d.%d:\n", dinfo->bus, dinfo->dev);
 
 	for (i = 0; i < sc->rcount; i++) {
 		err = lv1_allocate_device_dma_region(dinfo->bus, dinfo->dev,
@@ -499,7 +498,6 @@ printf("Allocating tag for device %d.%d:
 			    "could not map DMA region %d: %d\n", i, err);
 			goto fail;
 		}
-printf("\tPhys mem %#lx mapped to %#lx\n", sc->regions[i].mr_start, dinfo->dma_base[i]);
 	}
 
 	err = bus_dma_tag_create(bus_get_dma_tag(dev),

From owner-svn-src-user@FreeBSD.ORG  Mon Oct 25 03:45:27 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8A45C1065670;
	Mon, 25 Oct 2010 03:45:27 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7858F8FC12;
	Mon, 25 Oct 2010 03:45:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9P3jRnM049766;
	Mon, 25 Oct 2010 03:45:27 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9P3jR1d049764;
	Mon, 25 Oct 2010 03:45:27 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201010250345.o9P3jR1d049764@svn.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Mon, 25 Oct 2010 03:45:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214314 - user/nwhitehorn/ps3/powerpc/ps3
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2010 03:45:27 -0000

Author: nwhitehorn
Date: Mon Oct 25 03:45:27 2010
New Revision: 214314
URL: http://svn.freebsd.org/changeset/base/214314

Log:
  Set the correct DMA region flags for USB devices. This makes USB work (and
  so local consoles as well).
  
  Obtained from:	NetBSD

Modified:
  user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c

Modified: user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c
==============================================================================
--- user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 03:21:40 2010	(r214313)
+++ user/nwhitehorn/ps3/powerpc/ps3/ps3bus.c	Mon Oct 25 03:45:27 2010	(r214314)
@@ -471,7 +471,7 @@ ps3bus_get_dma_tag(device_t dev, device_
 {
 	struct ps3bus_devinfo *dinfo = device_get_ivars(child);
 	struct ps3bus_softc *sc = device_get_softc(dev);
-	int i, err;
+	int i, err, flags;
 
 	mtx_lock(&dinfo->iommu_mtx);
 	if (dinfo->dma_tag != NULL) {
@@ -479,10 +479,15 @@ ps3bus_get_dma_tag(device_t dev, device_
 		return (dinfo->dma_tag);
 	}
 
+	flags = 0; /* 32-bit mode */
+	if (dinfo->bustype == PS3_BUSTYPE_SYSBUS &&
+	    dinfo->devtype == PS3_DEVTYPE_USB)
+		flags = 2; /* 8-bit mode */
+
 	for (i = 0; i < sc->rcount; i++) {
 		err = lv1_allocate_device_dma_region(dinfo->bus, dinfo->dev,
-		    sc->regions[i].mr_size, 24 /* log_2(16 MB) */,
-		    0 /* 32-bit transfers */, &dinfo->dma_base[i]);
+		    sc->regions[i].mr_size, 24 /* log_2(16 MB) */, flags,
+		    &dinfo->dma_base[i]);
 		if (err != 0) {
 			device_printf(child,
 			    "could not allocate DMA region %d: %d\n", i, err);

From owner-svn-src-user@FreeBSD.ORG  Mon Oct 25 15:58:32 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4AA2B106566B;
	Mon, 25 Oct 2010 15:58:32 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 346E88FC0A;
	Mon, 25 Oct 2010 15:58:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9PFwWoQ070301;
	Mon, 25 Oct 2010 15:58:32 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9PFwV8K070279;
	Mon, 25 Oct 2010 15:58:31 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201010251558.o9PFwV8K070279@svn.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Mon, 25 Oct 2010 15:58:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214350 - in user/nwhitehorn/ps3: amd64/amd64
	amd64/include arm/at91 arm/econa arm/mv arm/xscale/ixp425
	boot/common boot/i386/boot2 boot/pc98/boot2 cam cam/ata
	cam/scsi cddl/contrib/ope...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2010 15:58:32 -0000

Author: nwhitehorn
Date: Mon Oct 25 15:58:31 2010
New Revision: 214350
URL: http://svn.freebsd.org/changeset/base/214350

Log:
  IFC @ r214349

Added:
  user/nwhitehorn/ps3/dev/iicbus/ds1775.c
     - copied unchanged from r214349, head/sys/dev/iicbus/ds1775.c
  user/nwhitehorn/ps3/dev/iicbus/max6690.c
     - copied unchanged from r214349, head/sys/dev/iicbus/max6690.c
  user/nwhitehorn/ps3/dev/xen/control/
     - copied from r214349, head/sys/dev/xen/control/
  user/nwhitehorn/ps3/net/if_debug.c
     - copied unchanged from r214349, head/sys/net/if_debug.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl_none.c
     - copied unchanged from r214349, head/sys/net80211/ieee80211_ratectl_none.c
  user/nwhitehorn/ps3/netinet/in_debug.c
     - copied unchanged from r214349, head/sys/netinet/in_debug.c
  user/nwhitehorn/ps3/nfs/nfs_mountcommon.h
     - copied unchanged from r214349, head/sys/nfs/nfs_mountcommon.h
  user/nwhitehorn/ps3/powerpc/powermac/fcu.c
     - copied unchanged from r214349, head/sys/powerpc/powermac/fcu.c
  user/nwhitehorn/ps3/xen/blkif.h
     - copied unchanged from r214349, head/sys/xen/blkif.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbus.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb.h
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb.h
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_back.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_back.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_front.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_front.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_if.m
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_if.m
  user/nwhitehorn/ps3/xen/xenstore/
     - copied from r214349, head/sys/xen/xenstore/
Deleted:
  user/nwhitehorn/ps3/xen/reboot.c
  user/nwhitehorn/ps3/xen/xenbus/init.txt
  user/nwhitehorn/ps3/xen/xenbus/xenbus_client.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_comms.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_comms.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus_dev.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_probe.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_probe_backend.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_xs.c
Modified:
  user/nwhitehorn/ps3/amd64/amd64/fpu.c
  user/nwhitehorn/ps3/amd64/amd64/pmap.c
  user/nwhitehorn/ps3/amd64/include/profile.h
  user/nwhitehorn/ps3/arm/at91/if_ate.c
  user/nwhitehorn/ps3/arm/at91/if_macb.c
  user/nwhitehorn/ps3/arm/econa/if_ece.c
  user/nwhitehorn/ps3/arm/mv/mv_sata.c
  user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c
  user/nwhitehorn/ps3/boot/common/gpt.c
  user/nwhitehorn/ps3/boot/i386/boot2/boot2.c
  user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c
  user/nwhitehorn/ps3/cam/ata/ata_da.c
  user/nwhitehorn/ps3/cam/cam_xpt.c
  user/nwhitehorn/ps3/cam/scsi/scsi_da.c
  user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/nwhitehorn/ps3/compat/linux/linux_util.h
  user/nwhitehorn/ps3/conf/files
  user/nwhitehorn/ps3/conf/files.amd64
  user/nwhitehorn/ps3/conf/files.powerpc
  user/nwhitehorn/ps3/dev/acpica/acpi.c
  user/nwhitehorn/ps3/dev/acpica/acpi_if.m
  user/nwhitehorn/ps3/dev/acpica/acpi_pci.c
  user/nwhitehorn/ps3/dev/ae/if_ae.c
  user/nwhitehorn/ps3/dev/ae/if_aevar.h
  user/nwhitehorn/ps3/dev/age/if_age.c
  user/nwhitehorn/ps3/dev/ahci/ahci.c
  user/nwhitehorn/ps3/dev/aic7xxx/aicasm/aicasm_macro_scan.l
  user/nwhitehorn/ps3/dev/aic7xxx/aicasm/aicasm_scan.l
  user/nwhitehorn/ps3/dev/alc/if_alc.c
  user/nwhitehorn/ps3/dev/ale/if_ale.c
  user/nwhitehorn/ps3/dev/ata/ata-all.c
  user/nwhitehorn/ps3/dev/ata/ata-all.h
  user/nwhitehorn/ps3/dev/ata/ata-pci.c
  user/nwhitehorn/ps3/dev/ata/ata-sata.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-ahci.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-intel.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-marvell.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-nvidia.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-promise.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-siliconimage.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-via.c
  user/nwhitehorn/ps3/dev/bce/if_bce.c
  user/nwhitehorn/ps3/dev/bfe/if_bfe.c
  user/nwhitehorn/ps3/dev/bge/if_bge.c
  user/nwhitehorn/ps3/dev/bge/if_bgereg.h
  user/nwhitehorn/ps3/dev/bm/if_bm.c
  user/nwhitehorn/ps3/dev/cas/if_cas.c
  user/nwhitehorn/ps3/dev/cas/if_casvar.h
  user/nwhitehorn/ps3/dev/dc/dcphy.c
  user/nwhitehorn/ps3/dev/dc/if_dc.c
  user/nwhitehorn/ps3/dev/dc/if_dcreg.h
  user/nwhitehorn/ps3/dev/dc/pnphy.c
  user/nwhitehorn/ps3/dev/ed/if_ed_pccard.c
  user/nwhitehorn/ps3/dev/et/if_et.c
  user/nwhitehorn/ps3/dev/firewire/fwohci.c
  user/nwhitehorn/ps3/dev/fxp/if_fxp.c
  user/nwhitehorn/ps3/dev/gem/if_gem.c
  user/nwhitehorn/ps3/dev/gem/if_gemvar.h
  user/nwhitehorn/ps3/dev/hme/if_hme.c
  user/nwhitehorn/ps3/dev/if_ndis/if_ndis.c
  user/nwhitehorn/ps3/dev/iwi/if_iwi.c
  user/nwhitehorn/ps3/dev/jme/if_jme.c
  user/nwhitehorn/ps3/dev/lge/if_lge.c
  user/nwhitehorn/ps3/dev/md/md.c
  user/nwhitehorn/ps3/dev/mfi/mfireg.h
  user/nwhitehorn/ps3/dev/mge/if_mge.c
  user/nwhitehorn/ps3/dev/mge/if_mgevar.h
  user/nwhitehorn/ps3/dev/mii/acphy.c
  user/nwhitehorn/ps3/dev/mii/amphy.c
  user/nwhitehorn/ps3/dev/mii/atphy.c
  user/nwhitehorn/ps3/dev/mii/axphy.c
  user/nwhitehorn/ps3/dev/mii/bmtphy.c
  user/nwhitehorn/ps3/dev/mii/brgphy.c
  user/nwhitehorn/ps3/dev/mii/ciphy.c
  user/nwhitehorn/ps3/dev/mii/e1000phy.c
  user/nwhitehorn/ps3/dev/mii/exphy.c
  user/nwhitehorn/ps3/dev/mii/gentbi.c
  user/nwhitehorn/ps3/dev/mii/icsphy.c
  user/nwhitehorn/ps3/dev/mii/inphy.c
  user/nwhitehorn/ps3/dev/mii/ip1000phy.c
  user/nwhitehorn/ps3/dev/mii/jmphy.c
  user/nwhitehorn/ps3/dev/mii/lxtphy.c
  user/nwhitehorn/ps3/dev/mii/mii.c
  user/nwhitehorn/ps3/dev/mii/mii.h
  user/nwhitehorn/ps3/dev/mii/mii_physubr.c
  user/nwhitehorn/ps3/dev/mii/miivar.h
  user/nwhitehorn/ps3/dev/mii/mlphy.c
  user/nwhitehorn/ps3/dev/mii/nsgphy.c
  user/nwhitehorn/ps3/dev/mii/nsphy.c
  user/nwhitehorn/ps3/dev/mii/nsphyter.c
  user/nwhitehorn/ps3/dev/mii/pnaphy.c
  user/nwhitehorn/ps3/dev/mii/qsphy.c
  user/nwhitehorn/ps3/dev/mii/rgephy.c
  user/nwhitehorn/ps3/dev/mii/rlphy.c
  user/nwhitehorn/ps3/dev/mii/rlswitch.c
  user/nwhitehorn/ps3/dev/mii/ruephy.c
  user/nwhitehorn/ps3/dev/mii/smcphy.c
  user/nwhitehorn/ps3/dev/mii/tdkphy.c
  user/nwhitehorn/ps3/dev/mii/tlphy.c
  user/nwhitehorn/ps3/dev/mii/truephy.c
  user/nwhitehorn/ps3/dev/mii/ukphy.c
  user/nwhitehorn/ps3/dev/mii/xmphy.c
  user/nwhitehorn/ps3/dev/mps/mps.c
  user/nwhitehorn/ps3/dev/mps/mps_user.c
  user/nwhitehorn/ps3/dev/mps/mpsvar.h
  user/nwhitehorn/ps3/dev/msk/if_msk.c
  user/nwhitehorn/ps3/dev/mvs/mvs.c
  user/nwhitehorn/ps3/dev/mvs/mvs_pci.c
  user/nwhitehorn/ps3/dev/mvs/mvs_soc.c
  user/nwhitehorn/ps3/dev/nfe/if_nfe.c
  user/nwhitehorn/ps3/dev/nge/if_nge.c
  user/nwhitehorn/ps3/dev/nve/if_nve.c
  user/nwhitehorn/ps3/dev/pci/pci.c
  user/nwhitehorn/ps3/dev/pci/pci_pci.c
  user/nwhitehorn/ps3/dev/pci/pci_private.h
  user/nwhitehorn/ps3/dev/pci/pcireg.h
  user/nwhitehorn/ps3/dev/pci/pcivar.h
  user/nwhitehorn/ps3/dev/pcn/if_pcn.c
  user/nwhitehorn/ps3/dev/re/if_re.c
  user/nwhitehorn/ps3/dev/sf/if_sf.c
  user/nwhitehorn/ps3/dev/sge/if_sge.c
  user/nwhitehorn/ps3/dev/siis/siis.c
  user/nwhitehorn/ps3/dev/sis/if_sis.c
  user/nwhitehorn/ps3/dev/sk/if_sk.c
  user/nwhitehorn/ps3/dev/smc/if_smc.c
  user/nwhitehorn/ps3/dev/sound/pcm/channel.c
  user/nwhitehorn/ps3/dev/ste/if_ste.c
  user/nwhitehorn/ps3/dev/stge/if_stge.c
  user/nwhitehorn/ps3/dev/tl/if_tl.c
  user/nwhitehorn/ps3/dev/tl/if_tlreg.h
  user/nwhitehorn/ps3/dev/tsec/if_tsec.c
  user/nwhitehorn/ps3/dev/tx/if_tx.c
  user/nwhitehorn/ps3/dev/usb/controller/ehci.c
  user/nwhitehorn/ps3/dev/usb/controller/ehci.h
  user/nwhitehorn/ps3/dev/usb/controller/ehci_pci.c
  user/nwhitehorn/ps3/dev/usb/controller/ehcireg.h
  user/nwhitehorn/ps3/dev/usb/net/usb_ethernet.c
  user/nwhitehorn/ps3/dev/usb/quirk/usb_quirk.c
  user/nwhitehorn/ps3/dev/usb/serial/u3g.c
  user/nwhitehorn/ps3/dev/usb/serial/uftdi.c
  user/nwhitehorn/ps3/dev/usb/serial/usb_serial.c
  user/nwhitehorn/ps3/dev/usb/storage/umass.c
  user/nwhitehorn/ps3/dev/usb/usb_device.c
  user/nwhitehorn/ps3/dev/usb/usb_freebsd.h
  user/nwhitehorn/ps3/dev/usb/usb_ioctl.h
  user/nwhitehorn/ps3/dev/usb/usbdevs
  user/nwhitehorn/ps3/dev/usb/wlan/if_rum.c
  user/nwhitehorn/ps3/dev/vge/if_vge.c
  user/nwhitehorn/ps3/dev/vr/if_vr.c
  user/nwhitehorn/ps3/dev/vr/if_vrreg.h
  user/nwhitehorn/ps3/dev/wb/if_wb.c
  user/nwhitehorn/ps3/dev/xen/balloon/balloon.c
  user/nwhitehorn/ps3/dev/xen/blkback/blkback.c
  user/nwhitehorn/ps3/dev/xen/blkfront/blkfront.c
  user/nwhitehorn/ps3/dev/xen/blkfront/block.h
  user/nwhitehorn/ps3/dev/xen/netfront/netfront.c
  user/nwhitehorn/ps3/dev/xen/xenpci/evtchn.c
  user/nwhitehorn/ps3/dev/xen/xenpci/xenpci.c
  user/nwhitehorn/ps3/dev/xl/if_xl.c
  user/nwhitehorn/ps3/fs/msdosfs/msdosfs_lookup.c
  user/nwhitehorn/ps3/fs/nfs/nfs_var.h
  user/nwhitehorn/ps3/fs/nfs/nfsdport.h
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clnode.c
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clvfsops.c
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clvnops.c
  user/nwhitehorn/ps3/fs/nfsclient/nfsmount.h
  user/nwhitehorn/ps3/fs/nfsserver/nfs_nfsdport.c
  user/nwhitehorn/ps3/geom/eli/g_eli.c
  user/nwhitehorn/ps3/geom/eli/g_eli.h
  user/nwhitehorn/ps3/geom/eli/g_eli_ctl.c
  user/nwhitehorn/ps3/geom/eli/g_eli_integrity.c
  user/nwhitehorn/ps3/geom/eli/g_eli_key.c
  user/nwhitehorn/ps3/geom/eli/g_eli_privacy.c
  user/nwhitehorn/ps3/geom/geom_dev.c
  user/nwhitehorn/ps3/i386/i386/elan-mmcr.c
  user/nwhitehorn/ps3/i386/i386/identcpu.c
  user/nwhitehorn/ps3/i386/i386/initcpu.c
  user/nwhitehorn/ps3/i386/i386/longrun.c
  user/nwhitehorn/ps3/i386/i386/perfmon.c
  user/nwhitehorn/ps3/i386/include/profile.h
  user/nwhitehorn/ps3/i386/isa/npx.c
  user/nwhitehorn/ps3/i386/xen/xen_machdep.c
  user/nwhitehorn/ps3/kern/init_main.c
  user/nwhitehorn/ps3/kern/kern_cpuset.c
  user/nwhitehorn/ps3/kern/kern_exec.c
  user/nwhitehorn/ps3/kern/kern_exit.c
  user/nwhitehorn/ps3/kern/kern_fork.c
  user/nwhitehorn/ps3/kern/kern_kthread.c
  user/nwhitehorn/ps3/kern/kern_ktrace.c
  user/nwhitehorn/ps3/kern/kern_resource.c
  user/nwhitehorn/ps3/kern/kern_shutdown.c
  user/nwhitehorn/ps3/kern/kern_syscalls.c
  user/nwhitehorn/ps3/kern/kern_thr.c
  user/nwhitehorn/ps3/kern/kern_thread.c
  user/nwhitehorn/ps3/kern/subr_acl_nfs4.c
  user/nwhitehorn/ps3/kern/subr_clock.c
  user/nwhitehorn/ps3/kern/vfs_bio.c
  user/nwhitehorn/ps3/kern/vfs_cache.c
  user/nwhitehorn/ps3/kern/vfs_mount.c
  user/nwhitehorn/ps3/kern/vfs_mountroot.c
  user/nwhitehorn/ps3/mips/atheros/if_arge.c
  user/nwhitehorn/ps3/mips/cavium/octe/octe.c
  user/nwhitehorn/ps3/mips/idt/if_kr.c
  user/nwhitehorn/ps3/mips/rmi/board.c
  user/nwhitehorn/ps3/mips/rmi/dev/nlge/if_nlge.c
  user/nwhitehorn/ps3/mips/rmi/xlr_machdep.c
  user/nwhitehorn/ps3/modules/acpi/acpi/Makefile
  user/nwhitehorn/ps3/modules/mii/Makefile
  user/nwhitehorn/ps3/modules/mps/Makefile
  user/nwhitehorn/ps3/modules/wlan/Makefile
  user/nwhitehorn/ps3/net/if.c
  user/nwhitehorn/ps3/net/if.h
  user/nwhitehorn/ps3/net/if_llatbl.c
  user/nwhitehorn/ps3/net/if_llatbl.h
  user/nwhitehorn/ps3/net/rtsock.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl.h
  user/nwhitehorn/ps3/netinet/in.c
  user/nwhitehorn/ps3/netinet/ip_ipsec.c
  user/nwhitehorn/ps3/netinet/libalias/libalias.3
  user/nwhitehorn/ps3/netinet/tcp_reass.c
  user/nwhitehorn/ps3/netinet6/ip6_ipsec.c
  user/nwhitehorn/ps3/netipsec/ipsec_output.c
  user/nwhitehorn/ps3/netipsec/key.c
  user/nwhitehorn/ps3/netipsec/keydb.h
  user/nwhitehorn/ps3/nfs/nfs_lock.c
  user/nwhitehorn/ps3/nfs/nfs_lock.h
  user/nwhitehorn/ps3/nfsclient/nfs.h
  user/nwhitehorn/ps3/nfsclient/nfs_bio.c
  user/nwhitehorn/ps3/nfsclient/nfs_nfsiod.c
  user/nwhitehorn/ps3/nfsclient/nfs_node.c
  user/nwhitehorn/ps3/nfsclient/nfs_vfsops.c
  user/nwhitehorn/ps3/nfsclient/nfs_vnops.c
  user/nwhitehorn/ps3/nfsclient/nfsmount.h
  user/nwhitehorn/ps3/nfsclient/nfsnode.h
  user/nwhitehorn/ps3/nfsserver/nfs_serv.c
  user/nwhitehorn/ps3/nlm/nlm_advlock.c
  user/nwhitehorn/ps3/nlm/nlm_prot_impl.c
  user/nwhitehorn/ps3/pc98/pc98/machdep.c
  user/nwhitehorn/ps3/pci/if_rl.c
  user/nwhitehorn/ps3/powerpc/conf/GENERIC
  user/nwhitehorn/ps3/powerpc/conf/GENERIC64
  user/nwhitehorn/ps3/powerpc/conf/NOTES
  user/nwhitehorn/ps3/powerpc/mambo/mambo_console.c
  user/nwhitehorn/ps3/security/mac/mac_vfs.c
  user/nwhitehorn/ps3/sparc64/include/tick.h
  user/nwhitehorn/ps3/sparc64/sparc64/machdep.c
  user/nwhitehorn/ps3/sparc64/sparc64/mp_machdep.c
  user/nwhitehorn/ps3/sparc64/sparc64/tick.c
  user/nwhitehorn/ps3/sys/ktrace.h
  user/nwhitehorn/ps3/sys/proc.h
  user/nwhitehorn/ps3/sys/sockio.h
  user/nwhitehorn/ps3/sys/systm.h
  user/nwhitehorn/ps3/vm/swap_pager.c
  user/nwhitehorn/ps3/vm/uma.h
  user/nwhitehorn/ps3/vm/uma_core.c
  user/nwhitehorn/ps3/vm/vm_map.c
  user/nwhitehorn/ps3/vm/vm_map.h
  user/nwhitehorn/ps3/x86/isa/atrtc.c
  user/nwhitehorn/ps3/x86/x86/local_apic.c
  user/nwhitehorn/ps3/xen/evtchn/evtchn.c
  user/nwhitehorn/ps3/xen/gnttab.c
  user/nwhitehorn/ps3/xen/gnttab.h
  user/nwhitehorn/ps3/xen/interface/grant_table.h
  user/nwhitehorn/ps3/xen/interface/hvm/params.h
  user/nwhitehorn/ps3/xen/interface/io/blkif.h
  user/nwhitehorn/ps3/xen/interface/io/protocols.h
  user/nwhitehorn/ps3/xen/interface/io/ring.h
  user/nwhitehorn/ps3/xen/interface/io/xenbus.h
  user/nwhitehorn/ps3/xen/xen_intr.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus_if.m
  user/nwhitehorn/ps3/xen/xenbus/xenbusvar.h
Directory Properties:
  user/nwhitehorn/ps3/   (props changed)
  user/nwhitehorn/ps3/amd64/include/xen/   (props changed)
  user/nwhitehorn/ps3/boot/powerpc/ps3/   (props changed)
  user/nwhitehorn/ps3/cddl/contrib/opensolaris/   (props changed)
  user/nwhitehorn/ps3/contrib/dev/acpica/   (props changed)
  user/nwhitehorn/ps3/contrib/pf/   (props changed)
  user/nwhitehorn/ps3/contrib/x86emu/   (props changed)
  user/nwhitehorn/ps3/dev/xen/xenpci/   (props changed)
  user/nwhitehorn/ps3/powerpc/ps3/   (props changed)

Modified: user/nwhitehorn/ps3/amd64/amd64/fpu.c
==============================================================================
--- user/nwhitehorn/ps3/amd64/amd64/fpu.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/amd64/fpu.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -113,14 +113,14 @@ static	struct savefpu		fpu_initialstate;
 void
 fpuinit(void)
 {
-	register_t savecrit;
+	register_t saveintr;
 	u_int mxcsr;
 	u_short control;
 
 	/*
 	 * It is too early for critical_enter() to work on AP.
 	 */
-	savecrit = intr_disable();
+	saveintr = intr_disable();
 	stop_emulating();
 	fninit();
 	control = __INITIAL_FPUCW__;
@@ -137,7 +137,7 @@ fpuinit(void)
 		bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm));
 	}
 	start_emulating();
-	intr_restore(savecrit);
+	intr_restore(saveintr);
 }
 
 /*

Modified: user/nwhitehorn/ps3/amd64/amd64/pmap.c
==============================================================================
--- user/nwhitehorn/ps3/amd64/amd64/pmap.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/amd64/pmap.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -1163,26 +1163,33 @@ pmap_is_current(pmap_t pmap)
 vm_paddr_t 
 pmap_extract(pmap_t pmap, vm_offset_t va)
 {
-	vm_paddr_t rtval;
+	pdp_entry_t *pdpe;
+	pd_entry_t *pde;
 	pt_entry_t *pte;
-	pd_entry_t pde, *pdep;
+	vm_paddr_t pa;
 
-	rtval = 0;
+	pa = 0;
 	PMAP_LOCK(pmap);
-	pdep = pmap_pde(pmap, va);
-	if (pdep != NULL) {
-		pde = *pdep;
-		if (pde) {
-			if ((pde & PG_PS) != 0)
-				rtval = (pde & PG_PS_FRAME) | (va & PDRMASK);
-			else {
-				pte = pmap_pde_to_pte(pdep, va);
-				rtval = (*pte & PG_FRAME) | (va & PAGE_MASK);
+	pdpe = pmap_pdpe(pmap, va);
+	if (pdpe != NULL && (*pdpe & PG_V) != 0) {
+		if ((*pdpe & PG_PS) != 0)
+			pa = (*pdpe & PG_PS_FRAME) | (va & PDPMASK);
+		else {
+			pde = pmap_pdpe_to_pde(pdpe, va);
+			if ((*pde & PG_V) != 0) {
+				if ((*pde & PG_PS) != 0) {
+					pa = (*pde & PG_PS_FRAME) |
+					    (va & PDRMASK);
+				} else {
+					pte = pmap_pde_to_pte(pde, va);
+					pa = (*pte & PG_FRAME) |
+					    (va & PAGE_MASK);
+				}
 			}
 		}
 	}
 	PMAP_UNLOCK(pmap);
-	return (rtval);
+	return (pa);
 }
 
 /*

Modified: user/nwhitehorn/ps3/amd64/include/profile.h
==============================================================================
--- user/nwhitehorn/ps3/amd64/include/profile.h	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/include/profile.h	Mon Oct 25 15:58:31 2010	(r214350)
@@ -77,17 +77,17 @@
 #error this file needs to be ported to your compiler
 #endif /* !__GNUCLIKE_ASM */
 #else /* !GUPROF */
-#define	MCOUNT_DECL(s)	u_long s;
+#define	MCOUNT_DECL(s)	register_t s;
 #ifdef SMP
 extern int	mcount_lock;
-#define	MCOUNT_ENTER(s)	{ s = read_rflags(); disable_intr(); \
+#define	MCOUNT_ENTER(s)	{ s = intr_disable(); \
  			  while (!atomic_cmpset_acq_int(&mcount_lock, 0, 1)) \
 			  	/* nothing */ ; }
 #define	MCOUNT_EXIT(s)	{ atomic_store_rel_int(&mcount_lock, 0); \
-			  write_rflags(s); }
+			  intr_restore(s); }
 #else
-#define	MCOUNT_ENTER(s)	{ s = read_rflags(); disable_intr(); }
-#define	MCOUNT_EXIT(s)	(write_rflags(s))
+#define	MCOUNT_ENTER(s)	{ s = intr_disable(); }
+#define	MCOUNT_EXIT(s)	(intr_restore(s))
 #endif
 #endif /* GUPROF */
 

Modified: user/nwhitehorn/ps3/arm/at91/if_ate.c
==============================================================================
--- user/nwhitehorn/ps3/arm/at91/if_ate.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/at91/if_ate.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -318,9 +318,10 @@ ate_attach(device_t dev)
 	}
 
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, ate_ifmedia_upd, ate_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	err = mii_attach(dev, &sc->miibus, ifp, ate_ifmedia_upd,
+	    ate_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 	/*

Modified: user/nwhitehorn/ps3/arm/at91/if_macb.c
==============================================================================
--- user/nwhitehorn/ps3/arm/at91/if_macb.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/at91/if_macb.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include <arm/at91/if_macbvar.h>
 #include <arm/at91/at91_piovar.h>
 
-#include <arm/at91/at91_pio_sam9.h>
 #include <arm/at91/at91sam9g20reg.h>
 
 #include <machine/bus.h>
@@ -1365,9 +1364,10 @@ macb_attach(device_t dev)
 	write_4(sc, EMAC_NCR, MPE_ENABLE); //enable MPE
 
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, macb_ifmedia_upd, macb_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	err = mii_attach(dev, &sc->miibus, ifp, macb_ifmedia_upd,
+	    macb_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 

Modified: user/nwhitehorn/ps3/arm/econa/if_ece.c
==============================================================================
--- user/nwhitehorn/ps3/arm/econa/if_ece.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/econa/if_ece.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -353,10 +353,11 @@ ece_attach(device_t dev)
 	}
 	ece_set_mac(sc, eaddr);
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, ece_ifmedia_upd,
-		    ece_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	/* Only one PHY at address 0 in this device. */
+	err = mii_attach(dev, &sc->miibus, ifp, ece_ifmedia_upd,
+	    ece_ifmedia_sts, BMSR_DEFCAPMASK, 0, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 	ifp->if_softc = sc;
@@ -1904,9 +1905,6 @@ static int
 ece_miibus_readreg(device_t dev, int phy, int reg)
 {
 	struct ece_softc *sc;
-	/* Only one phy in this device. */
-	if (phy>0)
-		return (0);
 	sc = device_get_softc(dev);
 	return (phy_read(sc, phy, reg));
 }

Modified: user/nwhitehorn/ps3/arm/mv/mv_sata.c
==============================================================================
--- user/nwhitehorn/ps3/arm/mv/mv_sata.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/mv/mv_sata.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -710,7 +710,7 @@ sata_channel_status(device_t dev)
 	if ((icr & SATA_ICR_DEV(ch->unit)) || iecr) {
 		/* Disable EDMA before accessing SATA registers */
 		sata_edma_ctrl(dev, 0);
-		ata_sata_phy_check_events(dev);
+		ata_sata_phy_check_events(dev, -1);
 
 		/* Ack device and error interrupt */
 		SATA_OUTL(sc, SATA_ICR, ~SATA_ICR_DEV(ch->unit));

Modified: user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c
==============================================================================
--- user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -137,7 +137,6 @@ struct npe_softc {
 	int		rx_freeqid;	/* rx free buffers qid */
 	int		tx_qid;		/* tx qid */
 	int		tx_doneqid;	/* tx completed qid */
-	int		sc_phy;		/* PHY id */
 	struct ifmib_iso_8802_3 mibdata;
 	bus_dma_tag_t	sc_stats_tag;	/* bus dma tag for stats block */
 	struct npestats	*sc_stats;
@@ -668,7 +667,7 @@ static int
 npe_activate(device_t dev)
 {
 	struct npe_softc *sc = device_get_softc(dev);
-	int error, i, macbase, miibase;
+	int error, i, macbase, miibase, phy;
 
 	/*
 	 * Setup NEP ID, MAC, and MII bindings.  We allow override
@@ -693,8 +692,8 @@ npe_activate(device_t dev)
 	}
 
 	/* PHY */
-	if (!override_unit(dev, "phy", &sc->sc_phy, 0, MII_NPHY-1))
-		sc->sc_phy = npeconfig[sc->sc_npeid].phy;
+	if (!override_unit(dev, "phy", &phy, 0, MII_NPHY - 1))
+		phy = npeconfig[sc->sc_npeid].phy;
 	if (!override_addr(dev, "mii", &miibase))
 		miibase = npeconfig[sc->sc_npeid].miibase;
 	device_printf(sc->sc_dev, "MII at 0x%x\n", miibase);
@@ -721,10 +720,12 @@ npe_activate(device_t dev)
 		return error;
 	}
 
-	/* probe for PHY */
-	if (mii_phy_probe(dev, &sc->sc_mii, npe_ifmedia_update, npe_ifmedia_status)) {
-		device_printf(dev, "cannot find PHY %d.\n", sc->sc_phy);
-		return ENXIO;
+	/* attach PHY */
+	error = mii_attach(dev, &sc->sc_mii, sc->sc_ifp, npe_ifmedia_update,
+	    npe_ifmedia_status, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0);
+	if (error != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
+		return error;
 	}
 
 	error = npe_dma_setup(sc, &sc->txdma, "tx", npe_txbuf, NPE_MAXSEG);
@@ -1700,8 +1701,6 @@ npe_miibus_readreg(device_t dev, int phy
 	struct npe_softc *sc = device_get_softc(dev);
 	uint32_t v;
 
-	if (phy != sc->sc_phy)		/* XXX no auto-detect */
-		return 0xffff;
 	v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL) | NPE_MII_GO;
 	npe_mii_mdio_write(sc, NPE_MAC_MDIO_CMD, v);
 	if (npe_mii_mdio_wait(sc))
@@ -1717,8 +1716,6 @@ npe_miibus_writereg(device_t dev, int ph
 	struct npe_softc *sc = device_get_softc(dev);
 	uint32_t v;
 
-	if (phy != sc->sc_phy)		/* XXX */
-		return (0);
 	v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL)
 	  | data | NPE_MII_WRITE
 	  | NPE_MII_GO;

Modified: user/nwhitehorn/ps3/boot/common/gpt.c
==============================================================================
--- user/nwhitehorn/ps3/boot/common/gpt.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/common/gpt.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -49,7 +49,7 @@ static int curent, bootonce;
 
 /*
  * Buffer below 64kB passed on gptread(), which can hold at least
- * one sector od data (512 bytes).
+ * one sector of data (512 bytes).
  */
 static char *secbuf;
 
@@ -62,7 +62,7 @@ gptupdate(const char *which, struct dsk 
 
 	/*
 	 * We need to update the following for both primary and backup GPT:
-	 * 1. Sector on disk that contains curent partition.
+	 * 1. Sector on disk that contains current partition.
 	 * 2. Partition table checksum.
 	 * 3. Header checksum.
 	 * 4. Header on disk.

Modified: user/nwhitehorn/ps3/boot/i386/boot2/boot2.c
==============================================================================
--- user/nwhitehorn/ps3/boot/i386/boot2/boot2.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/i386/boot2/boot2.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -348,7 +348,7 @@ load(void)
 	    return;
 	p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
 	bootinfo.bi_symtab = VTOP(p);
-	memcpy(p, &hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
+	*(uint32_t*)p = hdr.ex.a_syms;
 	p += sizeof(hdr.ex.a_syms);
 	if (hdr.ex.a_syms) {
 	    if (xfsread(ino, p, hdr.ex.a_syms))
@@ -385,7 +385,7 @@ load(void)
 	    if (xfsread(ino, &es, sizeof(es)))
 		return;
 	    for (i = 0; i < 2; i++) {
-		memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
+		*(Elf32_Word *)p = es[i].sh_size;
 		p += sizeof(es[i].sh_size);
 		fs_off = es[i].sh_offset;
 		if (xfsread(ino, p, es[i].sh_size))

Modified: user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c
==============================================================================
--- user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -485,7 +485,7 @@ load(void)
 	    return;
 	p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
 	bootinfo.bi_symtab = VTOP(p);
-	memcpy(p, &hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
+	*(uint32_t*)p = hdr.ex.a_syms;
 	p += sizeof(hdr.ex.a_syms);
 	if (hdr.ex.a_syms) {
 	    if (xfsread(ino, p, hdr.ex.a_syms))
@@ -522,7 +522,7 @@ load(void)
 	    if (xfsread(ino, &es, sizeof(es)))
 		return;
 	    for (i = 0; i < 2; i++) {
-		memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
+		*(Elf32_Word *)p = es[i].sh_size;
 		p += sizeof(es[i].sh_size);
 		fs_off = es[i].sh_offset;
 		if (xfsread(ino, p, es[i].sh_size))

Modified: user/nwhitehorn/ps3/cam/ata/ata_da.c
==============================================================================
--- user/nwhitehorn/ps3/cam/ata/ata_da.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/ata/ata_da.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/eventhandler.h>
 #include <sys/malloc.h>
 #include <sys/cons.h>
+#include <sys/reboot.h>
 #include <geom/geom_disk.h>
 #endif /* _KERNEL */
 
@@ -79,7 +80,8 @@ typedef enum {
 	ADA_FLAG_CAN_TRIM	= 0x080,
 	ADA_FLAG_OPEN		= 0x100,
 	ADA_FLAG_SCTX_INIT	= 0x200,
-	ADA_FLAG_CAN_CFA        = 0x400
+	ADA_FLAG_CAN_CFA        = 0x400,
+	ADA_FLAG_CAN_POWERMGT   = 0x800
 } ada_flags;
 
 typedef enum {
@@ -180,6 +182,10 @@ static void		adashutdown(void *arg, int 
 #define	ADA_DEFAULT_SEND_ORDERED	1
 #endif
 
+#ifndef	ADA_DEFAULT_SPINDOWN_SHUTDOWN
+#define	ADA_DEFAULT_SPINDOWN_SHUTDOWN	1
+#endif
+
 /*
  * Most platforms map firmware geometry to actual, but some don't.  If
  * not overridden, default to nothing.
@@ -191,6 +197,7 @@ static void		adashutdown(void *arg, int 
 static int ada_retry_count = ADA_DEFAULT_RETRY;
 static int ada_default_timeout = ADA_DEFAULT_TIMEOUT;
 static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED;
+static int ada_spindown_shutdown = ADA_DEFAULT_SPINDOWN_SHUTDOWN;
 
 SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0,
             "CAM Direct Access Disk driver");
@@ -203,6 +210,9 @@ TUNABLE_INT("kern.cam.ada.default_timeou
 SYSCTL_INT(_kern_cam_ada, OID_AUTO, ada_send_ordered, CTLFLAG_RW,
            &ada_send_ordered, 0, "Send Ordered Tags");
 TUNABLE_INT("kern.cam.ada.ada_send_ordered", &ada_send_ordered);
+SYSCTL_INT(_kern_cam_ada, OID_AUTO, spindown_shutdown, CTLFLAG_RW,
+           &ada_spindown_shutdown, 0, "Spin down upon shutdown");
+TUNABLE_INT("kern.cam.ada.spindown_shutdown", &ada_spindown_shutdown);
 
 /*
  * ADA_ORDEREDTAG_INTERVAL determines how often, relative
@@ -665,6 +675,8 @@ adaregister(struct cam_periph *periph, v
 		softc->flags |= ADA_FLAG_CAN_48BIT;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
 		softc->flags |= ADA_FLAG_CAN_FLUSHCACHE;
+	if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT)
+		softc->flags |= ADA_FLAG_CAN_POWERMGT;
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
 	    cgd->inq_flags & SID_CmdQue)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
@@ -1227,6 +1239,56 @@ adashutdown(void * arg, int howto)
 					 /*getcount_only*/0);
 		cam_periph_unlock(periph);
 	}
+
+	if (ada_spindown_shutdown == 0 ||
+	    (howto & (RB_HALT | RB_POWEROFF)) == 0)
+		return;
+
+	TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
+		union ccb ccb;
+
+		/* If we paniced with lock held - not recurse here. */
+		if (cam_periph_owned(periph))
+			continue;
+		cam_periph_lock(periph);
+		softc = (struct ada_softc *)periph->softc;
+		/*
+		 * We only spin-down the drive if it is capable of it..
+		 */
+		if ((softc->flags & ADA_FLAG_CAN_POWERMGT) == 0) {
+			cam_periph_unlock(periph);
+			continue;
+		}
+
+		if (bootverbose)
+			xpt_print(periph->path, "spin-down\n");
+
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+
+		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
+		cam_fill_ataio(&ccb.ataio,
+				    1,
+				    adadone,
+				    CAM_DIR_NONE,
+				    0,
+				    NULL,
+				    0,
+				    ada_default_timeout*1000);
+
+		ata_28bit_cmd(&ccb.ataio, ATA_STANDBY_IMMEDIATE, 0, 0, 0);
+		xpt_polled_action(&ccb);
+
+		if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
+			xpt_print(periph->path, "Spin-down disk failed\n");
+
+		if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0)
+			cam_release_devq(ccb.ccb_h.path,
+					 /*relsim_flags*/0,
+					 /*reduction*/0,
+					 /*timeout*/0,
+					 /*getcount_only*/0);
+		cam_periph_unlock(periph);
+	}
 }
 
 #endif /* _KERNEL */

Modified: user/nwhitehorn/ps3/cam/cam_xpt.c
==============================================================================
--- user/nwhitehorn/ps3/cam/cam_xpt.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/cam_xpt.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/conf.h>
 #include <sys/fcntl.h>
-#include <sys/reboot.h>
 #include <sys/interrupt.h>
 #include <sys/sbuf.h>
 #include <sys/taskqueue.h>
@@ -153,10 +152,6 @@ static struct xpt_softc xsoftc;
 TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay);
 SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN,
            &xsoftc.boot_delay, 0, "Bus registration wait time");
-static int	xpt_power_down = 0;
-TUNABLE_INT("kern.cam.power_down", &xpt_power_down);
-SYSCTL_INT(_kern_cam, OID_AUTO, power_down, CTLFLAG_RW,
-           &xpt_power_down, 0, "Power down devices on shutdown");
 
 /* Queues for our software interrupt handler */
 typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t;
@@ -250,7 +245,6 @@ static struct cam_ed*
 		 xpt_find_device(struct cam_et *target, lun_id_t lun_id);
 static void	 xpt_config(void *arg);
 static xpt_devicefunc_t xptpassannouncefunc;
-static void	 xpt_shutdown(void *arg, int howto);
 static void	 xptaction(struct cam_sim *sim, union ccb *work_ccb);
 static void	 xptpoll(struct cam_sim *sim);
 static void	 camisr(void *);
@@ -4538,12 +4532,6 @@ xpt_config(void *arg)
 #endif /* CAM_DEBUG_BUS */
 #endif /* CAMDEBUG */
 
-	/* Register our shutdown event handler */
-	if ((EVENTHANDLER_REGISTER(shutdown_final, xpt_shutdown, 
-				   NULL, SHUTDOWN_PRI_FIRST)) == NULL) {
-		printf("xpt_config: failed to register shutdown event.\n");
-	}
-
 	periphdriver_init(1);
 	xpt_hold_boot();
 	callout_init(&xsoftc.boot_callout, 1);
@@ -4625,87 +4613,6 @@ xpt_finishconfig_task(void *context, int
 	free(context, M_CAMXPT);
 }
 
-/*
- * Power down all devices when we are going to power down the system.
- */
-static void
-xpt_shutdown_dev_done(struct cam_periph *periph, union ccb *done_ccb)
-{
-
-	/* No-op. We're polling. */
-	return;
-}
-
-static int
-xpt_shutdown_dev(struct cam_ed *device, void *arg)
-{
-	union ccb ccb;
-	struct cam_path path;
-
-	if (device->flags & CAM_DEV_UNCONFIGURED)
-		return (1);
-
-	if (device->protocol == PROTO_ATA) {
-		/* Only power down device if it supports power management. */
-		if ((device->ident_data.support.command1 &
-		    ATA_SUPPORT_POWERMGT) == 0)
-			return (1);
-	} else if (device->protocol != PROTO_SCSI)
-		return (1);
-
-	xpt_compile_path(&path,
-			 NULL,
-			 device->target->bus->path_id,
-			 device->target->target_id,
-			 device->lun_id);
-	xpt_setup_ccb(&ccb.ccb_h, &path, CAM_PRIORITY_NORMAL);
-	if (device->protocol == PROTO_ATA) {
-		cam_fill_ataio(&ccb.ataio,
-				    1,
-				    xpt_shutdown_dev_done,
-				    CAM_DIR_NONE,
-				    0,
-				    NULL,
-				    0,
-				    30*1000);
-		ata_28bit_cmd(&ccb.ataio, ATA_SLEEP, 0, 0, 0);
-	} else {
-		scsi_start_stop(&ccb.csio,
-				/*retries*/1,
-				xpt_shutdown_dev_done,
-				MSG_SIMPLE_Q_TAG,
-				/*start*/FALSE,
-				/*load/eject*/FALSE,
-				/*immediate*/TRUE,
-				SSD_FULL_SIZE,
-				/*timeout*/50*1000);
-	}
-	xpt_polled_action(&ccb);
-
-	if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
-		xpt_print(&path, "Device power down failed\n");
-	if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb.ccb_h.path,
-				 /*relsim_flags*/0,
-				 /*reduction*/0,
-				 /*timeout*/0,
-				 /*getcount_only*/0);
-	xpt_release_path(&path);
-	return (1);
-}
-
-static void
-xpt_shutdown(void * arg, int howto)
-{
-
-	if (!xpt_power_down)
-		return;
-	if ((howto & RB_POWEROFF) == 0)
-		return;
-
-	xpt_for_all_devices(xpt_shutdown_dev, NULL);
-}
-
 cam_status
 xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg,
 		   struct cam_path *path)

Modified: user/nwhitehorn/ps3/cam/scsi/scsi_da.c
==============================================================================
--- user/nwhitehorn/ps3/cam/scsi/scsi_da.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/scsi/scsi_da.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -1667,7 +1667,10 @@ dadone(struct cam_periph *periph, union 
 			 * give them an 'illegal' value we'll avoid that
 			 * here.
 			 */
-			if (block_size >= MAXPHYS || block_size == 0) {
+			if (block_size == 0 && maxsector == 0) {
+				snprintf(announce_buf, sizeof(announce_buf),
+				        "0MB (no media?)");
+			} else if (block_size >= MAXPHYS || block_size == 0) {
 				xpt_print(periph->path,
 				    "unsupportable block size %ju\n",
 				    (uintmax_t) block_size);

Modified: user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -4199,6 +4199,96 @@ ioflags(int ioflags)
 }
 
 static int
+zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage)
+{
+	znode_t *zp = VTOZ(vp);
+	zfsvfs_t *zfsvfs = zp->z_zfsvfs;
+	objset_t *os = zp->z_zfsvfs->z_os;
+	vm_page_t mreq;
+	vm_object_t object;
+	caddr_t va;
+	struct sf_buf *sf;
+	int i, error;
+	int pcount, size;
+
+	ZFS_ENTER(zfsvfs);
+	ZFS_VERIFY_ZP(zp);
+
+	pcount = round_page(count) / PAGE_SIZE;
+	mreq = m[reqpage];
+	object = mreq->object;
+	error = 0;
+
+	KASSERT(vp->v_object == object, ("mismatching object"));
+
+	VM_OBJECT_LOCK(object);
+
+	for (i = 0; i < pcount; i++) {
+		if (i != reqpage) {
+			vm_page_lock(m[i]);
+			vm_page_free(m[i]);
+			vm_page_unlock(m[i]);
+		}
+	}
+
+	if (mreq->valid) {
+		if (mreq->valid != VM_PAGE_BITS_ALL)
+			vm_page_zero_invalid(mreq, TRUE);
+		VM_OBJECT_UNLOCK(object);
+		ZFS_EXIT(zfsvfs);
+		return (VM_PAGER_OK);
+	}
+
+	PCPU_INC(cnt.v_vnodein);
+	PCPU_INC(cnt.v_vnodepgsin);
+
+	if (IDX_TO_OFF(mreq->pindex) >= object->un_pager.vnp.vnp_size) {
+		VM_OBJECT_UNLOCK(object);
+		ZFS_EXIT(zfsvfs);
+		return (VM_PAGER_BAD);
+	}
+
+	size = PAGE_SIZE;
+	if (IDX_TO_OFF(mreq->pindex) + size > object->un_pager.vnp.vnp_size)
+		size = object->un_pager.vnp.vnp_size - IDX_TO_OFF(mreq->pindex);
+
+	VM_OBJECT_UNLOCK(object);
+
+	va = zfs_map_page(mreq, &sf);
+	error = dmu_read(os, zp->z_id, IDX_TO_OFF(mreq->pindex),
+	    size, va, DMU_READ_PREFETCH);
+	if (size != PAGE_SIZE)
+		bzero(va + size, PAGE_SIZE - size);
+	zfs_unmap_page(sf);
+
+	VM_OBJECT_LOCK(object);
+
+	if (!error)
+		mreq->valid = VM_PAGE_BITS_ALL;
+	KASSERT(mreq->dirty == 0, ("zfs_getpages: page %p is dirty", mreq));
+
+	VM_OBJECT_UNLOCK(object);
+
+	ZFS_ACCESSTIME_STAMP(zfsvfs, zp);
+	ZFS_EXIT(zfsvfs);
+	return (error ? VM_PAGER_ERROR : VM_PAGER_OK);
+}
+
+static int
+zfs_freebsd_getpages(ap)
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		vm_page_t *a_m;
+		int a_count;
+		int a_reqpage;
+		vm_ooffset_t a_offset;
+	} */ *ap;
+{
+
+	return (zfs_getpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage));
+}
+
+static int
 zfs_freebsd_open(ap)
 	struct vop_open_args /* {
 		struct vnode *a_vp;
@@ -5314,6 +5404,7 @@ struct vop_vector zfs_vnodeops = {
 	.vop_getacl =		zfs_freebsd_getacl,
 	.vop_setacl =		zfs_freebsd_setacl,
 	.vop_aclcheck =		zfs_freebsd_aclcheck,
+	.vop_getpages =		zfs_freebsd_getpages,
 };
 
 struct vop_vector zfs_fifoops = {

Modified: user/nwhitehorn/ps3/compat/linux/linux_util.h
==============================================================================
--- user/nwhitehorn/ps3/compat/linux/linux_util.h	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/compat/linux/linux_util.h	Mon Oct 25 15:58:31 2010	(r214350)
@@ -31,11 +31,6 @@
  * $FreeBSD$
  */
 
-/*
- * This file is pretty much the same as Christos' svr4_util.h
- * (for now).
- */
-
 #ifndef	_LINUX_UTIL_H_
 #define	_LINUX_UTIL_H_
 

Modified: user/nwhitehorn/ps3/conf/files
==============================================================================
--- user/nwhitehorn/ps3/conf/files	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files	Mon Oct 25 15:58:31 2010	(r214350)
@@ -2384,6 +2384,7 @@ net/if_atmsubr.c		optional atm
 net/if_bridge.c			optional bridge inet | if_bridge inet
 net/if_clone.c			standard
 net/if_dead.c			standard
+net/if_debug.c			optional ddb
 net/if_disc.c			optional disc
 net/if_edsc.c			optional edsc
 net/if_ef.c			optional ef
@@ -2453,6 +2454,7 @@ net80211/ieee80211_power.c	optional wlan
 net80211/ieee80211_proto.c	optional wlan
 net80211/ieee80211_radiotap.c	optional wlan
 net80211/ieee80211_ratectl.c	optional wlan
+net80211/ieee80211_ratectl_none.c optional wlan
 net80211/ieee80211_regdomain.c	optional wlan
 net80211/ieee80211_rssadapt.c	optional wlan wlan_rssadapt
 net80211/ieee80211_scan.c	optional wlan
@@ -2558,6 +2560,7 @@ netinet/if_atm.c		optional atm
 netinet/if_ether.c		optional inet ether
 netinet/igmp.c			optional inet
 netinet/in.c			optional inet
+netinet/in_debug.c		optional inet ddb
 netinet/ip_carp.c		optional inet carp | inet6 carp
 netinet/in_gif.c		optional gif inet | netgraph_gif inet
 netinet/ip_gre.c		optional gre inet
@@ -3007,19 +3010,20 @@ xen/gnttab.c			optional xen | xenhvm
 xen/features.c			optional xen | xenhvm
 xen/evtchn/evtchn.c		optional xen
 xen/evtchn/evtchn_dev.c		optional xen | xenhvm
-xen/reboot.c			optional xen
-xen/xenbus/xenbus_client.c	optional xen | xenhvm
-xen/xenbus/xenbus_comms.c	optional xen | xenhvm
-xen/xenbus/xenbus_dev.c		optional xen | xenhvm
 xen/xenbus/xenbus_if.m		optional xen | xenhvm
-xen/xenbus/xenbus_probe.c	optional xen | xenhvm
-#xen/xenbus/xenbus_probe_backend.c	optional xen
-xen/xenbus/xenbus_xs.c		optional xen | xenhvm
+xen/xenbus/xenbus.c		optional xen | xenhvm
+xen/xenbus/xenbusb_if.m		optional xen | xenhvm
+xen/xenbus/xenbusb.c		optional xen | xenhvm
+xen/xenbus/xenbusb_front.c	optional xen | xenhvm
+xen/xenbus/xenbusb_back.c	optional xen | xenhvm
+xen/xenstore/xenstore.c		optional xen | xenhvm
+xen/xenstore/xenstore_dev.c	optional xen | xenhvm
 dev/xen/balloon/balloon.c	optional xen | xenhvm
+dev/xen/blkfront/blkfront.c	optional xen | xenhvm
+dev/xen/blkback/blkback.c	optional xen | xenhvm
 dev/xen/console/console.c	optional xen
 dev/xen/console/xencons_ring.c	optional xen
-dev/xen/blkfront/blkfront.c	optional xen | xenhvm
+dev/xen/control/control.c	optional xen | xenhvm
 dev/xen/netfront/netfront.c	optional xen | xenhvm
 dev/xen/xenpci/xenpci.c		optional xenpci
 dev/xen/xenpci/evtchn.c         optional xenpci
-dev/xen/xenpci/machine_reboot.c optional xenpci

Modified: user/nwhitehorn/ps3/conf/files.amd64
==============================================================================
--- user/nwhitehorn/ps3/conf/files.amd64	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files.amd64	Mon Oct 25 15:58:31 2010	(r214350)
@@ -87,7 +87,7 @@ acpi_wakecode.h			optional	acpi			\
 	clean		"acpi_wakecode.h"
 acpi_wakedata.h			optional	acpi			\
 	dependency	"acpi_wakecode.o"				\
-	compile-with	'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define	$${what}	0x$${offset}"; done > ${.TARGET}' \
+	compile-with	'${NM} -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define	$${what}	0x$${offset}"; done > ${.TARGET}' \
 	no-obj no-implicit-rule	before-depend				\
 	clean		"acpi_wakedata.h"
 #

Modified: user/nwhitehorn/ps3/conf/files.powerpc
==============================================================================
--- user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 15:58:31 2010	(r214350)
@@ -26,6 +26,8 @@ dev/cfi/cfi_bus_fdt.c		optional	cfi fdt
 dev/fb/fb.c			optional	sc
 dev/fdt/fdt_powerpc.c		optional	fdt
 dev/hwpmc/hwpmc_powerpc.c	optional	hwpmc
+dev/iicbus/ds1775.c		optional	ds1775 powermac
+dev/iicbus/max6690.c		optional	max6690 powermac
 dev/kbd/kbd.c			optional	sc
 dev/mem/memutil.c		optional	mem
 dev/ofw/openfirm.c		optional	aim | fdt
@@ -139,6 +141,7 @@ powerpc/powermac/ata_dbdma.c	optional	po
 powerpc/powermac/cuda.c		optional	powermac cuda
 powerpc/powermac/cpcht.c	optional	powermac pci
 powerpc/powermac/dbdma.c	optional	powermac pci
+powerpc/powermac/fcu.c		optional	powermac fcu
 powerpc/powermac/grackle.c	optional	powermac pci
 powerpc/powermac/hrowpic.c	optional	powermac pci
 powerpc/powermac/kiic.c		optional	powermac kiic

Modified: user/nwhitehorn/ps3/dev/acpica/acpi.c
==============================================================================
--- user/nwhitehorn/ps3/dev/acpica/acpi.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/dev/acpica/acpi.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -66,10 +66,6 @@ __FBSDID("$FreeBSD$");
 #include <dev/acpica/acpivar.h>
 #include <dev/acpica/acpiio.h>
 
-#include "pci_if.h"
-#include <dev/pci/pcivar.h>
-#include <dev/pci/pci_private.h>
-
 #include <vm/vm_param.h>
 
 MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices");
@@ -133,8 +129,7 @@ static ACPI_STATUS acpi_device_scan_cb(A
 		    void *context, void **retval);
 static ACPI_STATUS acpi_device_scan_children(device_t bus, device_t dev,
 		    int max_depth, acpi_scan_cb_t user_fn, void *arg);
-static int	acpi_set_powerstate_method(device_t bus, device_t child,
-		    int state);
+static int	acpi_set_powerstate(device_t child, int state);
 static int	acpi_isa_pnp_probe(device_t bus, device_t child,
 		    struct isa_pnp_id *ids);
 static void	acpi_probe_children(device_t bus);
@@ -205,9 +200,6 @@ static device_method_t acpi_methods[] = 
     DEVMETHOD(acpi_pwr_for_sleep,	acpi_device_pwr_for_sleep),
     DEVMETHOD(acpi_scan_children,	acpi_device_scan_children),
 
-    /* PCI emulation */
-    DEVMETHOD(pci_set_powerstate,	acpi_set_powerstate_method),
-
     /* ISA emulation */
     DEVMETHOD(isa_pnp_probe,		acpi_isa_pnp_probe),
 
@@ -262,12 +254,6 @@ TUNABLE_INT("debug.acpi.interpreter_slac
 SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN,
     &acpi_interpreter_slack, 1, "Turn on interpreter slack mode.");
 
-/* Power devices off and on in suspend and resume.  XXX Remove once tested. */
-static int acpi_do_powerstate = 1;
-TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate);
-SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW,
-    &acpi_do_powerstate, 1, "Turn off devices when suspending.");
-
 /* Reset system clock while resuming.  XXX Remove once tested. */
 static int acpi_reset_clock = 1;
 TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock);
@@ -668,45 +654,43 @@ acpi_attach(device_t dev)
     return_VALUE (error);
 }
 
+static void
+acpi_set_power_children(device_t dev, int state)
+{
+	device_t child, parent;
+	device_t *devlist;
+	struct pci_devinfo *dinfo;
+	int dstate, i, numdevs;
+
+	if (device_get_children(dev, &devlist, &numdevs) != 0)
+		return;
+
+	/*
+	 * Retrieve and set D-state for the sleep state if _SxD is present.
+	 * Skip children who aren't attached since they are handled separately.
+	 */
+	parent = device_get_parent(dev);
+	for (i = 0; i < numdevs; i++) {
+		child = devlist[i];
+		dinfo = device_get_ivars(child);
+		dstate = state;
+		if (device_is_attached(child) &&
+		    acpi_device_pwr_for_sleep(parent, dev, &dstate) == 0)
+			acpi_set_powerstate(child, dstate);
+	}
+	free(devlist, M_TEMP);
+}
+
 static int
 acpi_suspend(device_t dev)
 {
-    device_t child, *devlist;
-    int error, i, numdevs, pstate;
+    int error;
 
     GIANT_REQUIRED;
 
-    /* First give child devices a chance to suspend. */
     error = bus_generic_suspend(dev);
-    if (error)
-	return (error);
-
-    /*
-     * Now, set them into the appropriate power state, usually D3.  If the
-     * device has an _SxD method for the next sleep state, use that power
-     * state instead.
-     */
-    error = device_get_children(dev, &devlist, &numdevs);
-    if (error)
-	return (error);
-    for (i = 0; i < numdevs; i++) {
-	/* If the device is not attached, we've powered it down elsewhere. */
-	child = devlist[i];
-	if (!device_is_attached(child))
-	    continue;
-
-	/*
-	 * Default to D3 for all sleep states.  The _SxD method is optional
-	 * so set the powerstate even if it's absent.
-	 */
-	pstate = PCI_POWERSTATE_D3;
-	error = acpi_device_pwr_for_sleep(device_get_parent(child),
-	    child, &pstate);
-	if ((error == 0 || error == ESRCH) && acpi_do_powerstate)
-	    pci_set_powerstate(child, pstate);
-    }
-    free(devlist, M_TEMP);
-    error = 0;
+    if (error == 0)
+	acpi_set_power_children(dev, ACPI_STATE_D3);
 
     return (error);
 }
@@ -714,28 +698,10 @@ acpi_suspend(device_t dev)
 static int
 acpi_resume(device_t dev)
 {
-    ACPI_HANDLE handle;
-    int i, numdevs, error;
-    device_t child, *devlist;
 
     GIANT_REQUIRED;
 
-    /*
-     * Put all devices in D0 before resuming them.  Call _S0D on each one
-     * since some systems expect this.
-     */
-    error = device_get_children(dev, &devlist, &numdevs);
-    if (error)
-	return (error);
-    for (i = 0; i < numdevs; i++) {
-	child = devlist[i];
-	handle = acpi_get_handle(child);
-	if (handle)
-	    AcpiEvaluateObject(handle, "_S0D", NULL, NULL);
-	if (device_is_attached(child) && acpi_do_powerstate)
-	    pci_set_powerstate(child, PCI_POWERSTATE_D0);
-    }
-    free(devlist, M_TEMP);
+    acpi_set_power_children(dev, ACPI_STATE_D0);
 
     return (bus_generic_resume(dev));
 }
@@ -811,7 +777,7 @@ static void
 acpi_probe_nomatch(device_t bus, device_t child)
 {
 #ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
-    pci_set_powerstate(child, PCI_POWERSTATE_D3);
+    acpi_set_powerstate(child, ACPI_STATE_D3);
 #endif
 }
 
@@ -833,9 +799,9 @@ acpi_driver_added(device_t dev, driver_t
 	child = devlist[i];
 	if (device_get_state(child) == DS_NOTPRESENT) {
 #ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
-	    pci_set_powerstate(child, PCI_POWERSTATE_D0);
+	    acpi_set_powerstate(child, ACPI_STATE_D0);
 	    if (device_probe_and_attach(child) != 0)
-		pci_set_powerstate(child, PCI_POWERSTATE_D3);
+		acpi_set_powerstate(child, ACPI_STATE_D3);
 #else
 	    device_probe_and_attach(child);
 #endif
@@ -1401,9 +1367,7 @@ acpi_device_pwr_for_sleep(device_t bus, 
     ACPI_HANDLE handle;
     ACPI_STATUS status;
     char sxd[8];
-    int error;
 
-    sc = device_get_softc(bus);
     handle = acpi_get_handle(dev);
 
     /*
@@ -1412,7 +1376,7 @@ acpi_device_pwr_for_sleep(device_t bus, 
      * set to D3 and it appears that such legacy devices may
      * need special handling in their drivers.
      */
-    if (handle == NULL ||
+    if (dstate == NULL || handle == NULL ||
 	acpi_MatchHid(handle, "PNP0500") ||
 	acpi_MatchHid(handle, "PNP0501") ||
 	acpi_MatchHid(handle, "PNP0502") ||
@@ -1421,28 +1385,19 @@ acpi_device_pwr_for_sleep(device_t bus, 
 	return (ENXIO);
 
     /*
-     * Override next state with the value from _SxD, if present.  If no
-     * dstate argument was provided, don't fetch the return value.
+     * Override next state with the value from _SxD, if present.
+     * Note illegal _S0D is evaluated because some systems expect this.
      */
+    sc = device_get_softc(bus);
     snprintf(sxd, sizeof(sxd), "_S%dD", sc->acpi_sstate);
-    if (dstate)
-	status = acpi_GetInteger(handle, sxd, dstate);
-    else
-	status = AcpiEvaluateObject(handle, sxd, NULL, NULL);
-
-    switch (status) {
-    case AE_OK:
-	error = 0;
-	break;
-    case AE_NOT_FOUND:
-	error = ESRCH;
-	break;
-    default:
-	error = ENXIO;
-	break;
+    status = acpi_GetInteger(handle, sxd, dstate);
+    if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+	    device_printf(dev, "failed to get %s on %s: %s\n", sxd,
+		acpi_name(handle), AcpiFormatException(status));
+	    return (ENXIO);
     }
 
-    return (error);
+    return (0);
 }

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Mon Oct 25 19:56:02 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E60EE106564A;
	Mon, 25 Oct 2010 19:56:02 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D5EB28FC08;
	Mon, 25 Oct 2010 19:56:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9PJu2mA075763;
	Mon, 25 Oct 2010 19:56:02 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9PJu2TA075761;
	Mon, 25 Oct 2010 19:56:02 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010251956.o9PJu2TA075761@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Mon, 25 Oct 2010 19:56:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214356 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2010 19:56:03 -0000

Author: dougb
Date: Mon Oct 25 19:56:02 2010
New Revision: 214356
URL: http://svn.freebsd.org/changeset/base/214356

Log:
  The BEFOREPORTMK trick no longer works to list MASTER_SITES for all ports
  so switch to the slightly slower but more reliable pm_make without it. This
  will solve the problem of portmaster not fetching all distfiles in the
  background.
  
  In the case statement to select the appropriate release for package
  fetching glob 9.0-CURRENT to handle snapshots as well.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Oct 25 19:43:22 2010	(r214355)
+++ user/dougb/portmaster/portmaster	Mon Oct 25 19:56:02 2010	(r214356)
@@ -3006,7 +3006,7 @@ if [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUIL
 	[ "$$" -eq "$PM_PARENT_PID" -a -n "$DI_FILES" ] && (read_distinfos)&
 
 	# Handle the problem of manual fetching
-	[ -z "$PM_PACKAGES" ] && master_sites=`pm_make_b -V MASTER_SITES`
+	[ -z "$PM_PACKAGES" ] && master_sites=`pm_make -V MASTER_SITES`
 
 	if [ -n "$master_sites" ]; then
 		# PATCHFILES may get added after the first pass, but we want to
@@ -3225,7 +3225,7 @@ fetch_package () {
 				release=packages-${release%%\.*}-stable ;;
 		[678]\.[0-9]-RELEASE*)
 				release=packages-${release%-RELEASE*}-release ;;
-		9\.0-CURRENT)	release=packages-9-current ;;
+		9\.0-CURRENT*)	release=packages-9-current ;;
 		*RC[0-9]*)	release=${release%-RC[0-9]}
 				release=packages-${release}-release ;;
 		*BETA[0-9]*)	release=${release%-BETA[0-9]}

From owner-svn-src-user@FreeBSD.ORG  Tue Oct 26 10:23:50 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E2A3106564A;
	Tue, 26 Oct 2010 10:23:50 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F0CED8FC0C;
	Tue, 26 Oct 2010 10:23:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9QANnH5013709;
	Tue, 26 Oct 2010 10:23:49 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9QANn10013707;
	Tue, 26 Oct 2010 10:23:49 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201010261023.o9QANn10013707@svn.freebsd.org>
From: Ed Schouten <ed@FreeBSD.org>
Date: Tue, 26 Oct 2010 10:23:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214372 - user/ed/compiler-rt/lib/libcompiler_rt
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Oct 2010 10:23:50 -0000

Author: ed
Date: Tue Oct 26 10:23:49 2010
New Revision: 214372
URL: http://svn.freebsd.org/changeset/base/214372

Log:
  Remove __gcc_personality_v0() for now.
  
  This function is already part of libgcc_eh.a. I'd rather use the GNU
  version for now.

Modified:
  user/ed/compiler-rt/lib/libcompiler_rt/Makefile

Modified: user/ed/compiler-rt/lib/libcompiler_rt/Makefile
==============================================================================
--- user/ed/compiler-rt/lib/libcompiler_rt/Makefile	Tue Oct 26 09:25:29 2010	(r214371)
+++ user/ed/compiler-rt/lib/libcompiler_rt/Makefile	Tue Oct 26 10:23:49 2010	(r214372)
@@ -79,7 +79,6 @@ SRCF=	absvdi2 \
 	floatuntidf \
 	floatuntisf \
 	floatuntixf \
-	gcc_personality_v0 \
 	lshrdi3 \
 	lshrti3 \
 	moddi3 \

From owner-svn-src-user@FreeBSD.ORG  Thu Oct 28 14:21:18 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7AF4B106566B;
	Thu, 28 Oct 2010 14:21:18 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6B1E38FC0A;
	Thu, 28 Oct 2010 14:21:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9SELIdS005576;
	Thu, 28 Oct 2010 14:21:18 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9SELIVH005574;
	Thu, 28 Oct 2010 14:21:18 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201010281421.o9SELIVH005574@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Thu, 28 Oct 2010 14:21:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214450 - user/ae/usr.sbin/sade
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Oct 2010 14:21:18 -0000

Author: ae
Date: Thu Oct 28 14:21:18 2010
New Revision: 214450
URL: http://svn.freebsd.org/changeset/base/214450

Log:
  Add ability to navigate between dialog's controls with Up/Down keys.

Modified:
  user/ae/usr.sbin/sade/parted.c

Modified: user/ae/usr.sbin/sade/parted.c
==============================================================================
--- user/ae/usr.sbin/sade/parted.c	Thu Oct 28 14:17:06 2010	(r214449)
+++ user/ae/usr.sbin/sade/parted.c	Thu Oct 28 14:21:18 2010	(r214450)
@@ -340,11 +340,10 @@ again:
 			} else
 				dlg_focus_next(&dlg);
 		case KEY_UP:
+			dlg_focus_prev(&dlg);
+			break;
 		case KEY_DOWN:
-			if (item == btnCancel)
-				dlg_focus_prev(&dlg);
-			if (item == btnOk)
-				dlg_focus_next(&dlg);
+			dlg_focus_next(&dlg);
 			break;
 		}
 	} while (q == 0);

From owner-svn-src-user@FreeBSD.ORG  Fri Oct 29 09:50:28 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF32F106566C;
	Fri, 29 Oct 2010 09:50:28 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DCFF38FC1A;
	Fri, 29 Oct 2010 09:50:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9T9oSVY092992;
	Fri, 29 Oct 2010 09:50:28 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9T9oSMV092985;
	Fri, 29 Oct 2010 09:50:28 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201010290950.o9T9oSMV092985@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Fri, 29 Oct 2010 09:50:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214507 - user/ae/usr.sbin/sade
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Oct 2010 09:50:29 -0000

Author: ae
Date: Fri Oct 29 09:50:28 2010
New Revision: 214507
URL: http://svn.freebsd.org/changeset/base/214507

Log:
  Move and refactor filesystem related code from fs.c, fsed.c and libsade.h
  to ufsed.c. It is not yet finished. Allow navigation with Up/Down keys in
  another dialogs in parted. Connect ufsed.c to the build.

Added:
  user/ae/usr.sbin/sade/ufsed.c   (contents, props changed)
Deleted:
  user/ae/usr.sbin/sade/fs.c
  user/ae/usr.sbin/sade/fsed.c
Modified:
  user/ae/usr.sbin/sade/Makefile
  user/ae/usr.sbin/sade/libsade.h
  user/ae/usr.sbin/sade/menus.c
  user/ae/usr.sbin/sade/parted.c
  user/ae/usr.sbin/sade/sade.h

Modified: user/ae/usr.sbin/sade/Makefile
==============================================================================
--- user/ae/usr.sbin/sade/Makefile	Fri Oct 29 09:35:36 2010	(r214506)
+++ user/ae/usr.sbin/sade/Makefile	Fri Oct 29 09:50:28 2010	(r214507)
@@ -6,9 +6,9 @@ SRCPATH?=	../../../../head
 PROG=	sade
 NO_MAN=
 
-LIBSADE=devices.c parts.c util.c fs.c
+LIBSADE=devices.c parts.c util.c
 
-SRCS=	main.c parted.c menus.c customdlg.c history.c fsed.c \
+SRCS=	main.c parted.c menus.c customdlg.c history.c ufsed.c \
 	getmntopts.c
 SRCS+=	${LIBSADE}
 

Modified: user/ae/usr.sbin/sade/libsade.h
==============================================================================
--- user/ae/usr.sbin/sade/libsade.h	Fri Oct 29 09:35:36 2010	(r214506)
+++ user/ae/usr.sbin/sade/libsade.h	Fri Oct 29 09:50:28 2010	(r214507)
@@ -33,16 +33,10 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/queue.h>
-#include <sys/mount.h>
-#include <ufs/ufs/ufsmount.h>
-#include <ufs/ufs/dinode.h>
-#include <ufs/ffs/fs.h>
-#include <libufs.h>
 #include <libgeom.h>
 
 TAILQ_HEAD(de_devlist, de_device);
 TAILQ_HEAD(de_partlist, de_part);
-TAILQ_HEAD(de_fslist, de_fs);
 
 struct de_device {
 	char			*de_name;	/* device name */
@@ -75,46 +69,6 @@ struct de_part {
 	void			*de_private;	/* partition private data */
 };
 
-enum de_fstype {
-	UNKNOWN, EMPTY, SWAP, UFS, ZFS
-};
-
-struct de_fs {
-	TAILQ_ENTRY(de_fs)	de_fs;		/* file system list entry */
-	enum de_fstype		de_type;	/* file system type */
-	char			*de_parttype;	/* partition type */
-	char			*de_partname;	/* partition name */
-	char			*de_mntfrom;	/* device name */
-	char			*de_mntto;	/* file system mount path */
-	char			*de_mounted;	/* where it is mounted now */
-	char			*de_mntops;	/* mount options */
-	off_t			de_size;	/* file system size */
-	int			de_freq;	/* dump frequency */
-	int			de_pass;	/* pass number on parallel fsck */
-
-	char			*de_devname;	/* parent device name */
-	char			*de_scheme;	/* partition scheme name */
-
-	u_int			de_flags;	/* file system flags */
-	void			*de_private;	/* file system private data */
-};
-
-struct de_ufs_priv {
-	char			de_volname[MAXVOLLEN];	/* Volume label */
-	int32_t			de_id[2];	/* unique filesystem id */
-#define	HAS_UFSID(ppriv) \
-	((ppriv)->de_id[0] != 0 || (ppriv)->de_id[1] != 0)
-
-	int			de_ufs1:1;	/* UFS1 fs type */
-	int			de_su:1;	/* Soft Updates enabled */
-	int			de_suj:1;	/* Journalled Soft Updates enabled */
-	int			de_gj:1;	/* GEOM Journal enabled */
-
-	int			de_acl:1;	/* POSIX.1e ACL enabled */
-	int			de_nfs4acl:1;	/* NFSv4 ACL enabled */
-	int			de_mac:1;	/* MAC multilabel enabled */
-};
-
 /* device related functions */
 int	de_devlist_get(struct de_devlist *pd);
 int	de_devlist_partitioned_get(struct de_devlist *pd);
@@ -148,13 +102,6 @@ int	de_part_mod(struct de_device *pdev, 
     const char *label, int idx);
 int	de_part_bootcode(struct de_part *ppart, const char *path);
 
-/* file system related */
-const char *de_fstypestr(enum de_fstype type);
-int	de_fslist_get(struct de_fslist *fslist);
-void	de_fslist_free(struct de_fslist *fslist);
-int	de_fslist_count(struct de_fslist *fslist);
-
-
 /* geom helpers */
 struct gclass	*find_class(struct gmesh *mesh, const char *name);
 struct ggeom	*find_geom(struct gclass *classp, const char *name);

Modified: user/ae/usr.sbin/sade/menus.c
==============================================================================
--- user/ae/usr.sbin/sade/menus.c	Fri Oct 29 09:35:36 2010	(r214506)
+++ user/ae/usr.sbin/sade/menus.c	Fri Oct 29 09:50:28 2010	(r214507)
@@ -289,7 +289,7 @@ open_parts(dialogMenuItem *pitem)
 static int
 open_fs(dialogMenuItem *pitem)
 {
-	fsed_open();
+	ufsed_open();
 	return (DITEM_SUCCESS);
 }
 

Modified: user/ae/usr.sbin/sade/parted.c
==============================================================================
--- user/ae/usr.sbin/sade/parted.c	Fri Oct 29 09:35:36 2010	(r214506)
+++ user/ae/usr.sbin/sade/parted.c	Fri Oct 29 09:50:28 2010	(r214507)
@@ -333,12 +333,13 @@ again:
 				q = 1;
 			else if (item == btnOk)
 				q = 2;
-			else if (item == ltType) {
-				dlg_edit_set_value(&dlg, eType,
-				    dlg_list_get_choice(&dlg, ltType));
-				dlg_focus_next(&dlg);
-			} else
+			else {
+				if (item == ltType)
+					dlg_edit_set_value(&dlg, eType,
+					    dlg_list_get_choice(&dlg, ltType));
 				dlg_focus_next(&dlg);
+			}
+			break;
 		case KEY_UP:
 			dlg_focus_prev(&dlg);
 			break;
@@ -426,18 +427,18 @@ again:
 				q = 1;
 			else if (item == btnOk)
 				q = 2;
-			else if (item == ltType) {
-				dlg_edit_set_value(&dlg, eType,
-				    dlg_list_get_choice(&dlg, ltType));
-				dlg_focus_next(&dlg);
-			} else
+			else {
+				if (item == ltType)
+					dlg_edit_set_value(&dlg, eType,
+					    dlg_list_get_choice(&dlg, ltType));
 				dlg_focus_next(&dlg);
+			}
+			break;
 		case KEY_UP:
+			dlg_focus_prev(&dlg);
+			break;
 		case KEY_DOWN:
-			if (item == btnCancel)
-				dlg_focus_prev(&dlg);
-			if (item == btnOk)
-				dlg_focus_next(&dlg);
+			dlg_focus_next(&dlg);
 			break;
 		}
 	} while (q == 0);

Modified: user/ae/usr.sbin/sade/sade.h
==============================================================================
--- user/ae/usr.sbin/sade/sade.h	Fri Oct 29 09:35:36 2010	(r214506)
+++ user/ae/usr.sbin/sade/sade.h	Fri Oct 29 09:50:28 2010	(r214507)
@@ -63,7 +63,7 @@ void	dmenu_open_errormsg(char *msg);
 int	dmenu_open_yesno(char *msg);
 int	dmenu_open_noyes(char *msg);
 int	parted_open(struct de_device *pdev, int level);
-int	fsed_open(void);
+int	ufsed_open(void);
 WINDOW *savescr(void);
 void	restorescr(WINDOW *win);
 char	*hscroll_str(char *buf, int w, const char *str, int sc, int flag);

Added: user/ae/usr.sbin/sade/ufsed.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/ae/usr.sbin/sade/ufsed.c	Fri Oct 29 09:50:28 2010	(r214507)
@@ -0,0 +1,443 @@
+/*-
+ * Copyright (c) 2010 Andrey V. Elsukov <bu7cher@yandex.ru>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <sys/mount.h>
+#include <ufs/ufs/ufsmount.h>
+#include <ufs/ufs/dinode.h>
+#include <ufs/ffs/fs.h>
+#include <libufs.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <libutil.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <err.h>
+#include <dialog.h>
+#include <ctype.h>
+#include <sysexits.h>
+#include <assert.h>
+#include <paths.h>
+#include <sade.h>
+#include <time.h>
+#include <libsade.h>
+#include "customdlg.h"
+#include "mntopts.h"
+
+
+static char *ask_recreate_msg =
+	"WARNING: Selected partition already contains a file system!\n\n"
+	"Are you absolutely sure you want to recreate it?";
+static char *custom_newfs_title = "Please enter custom parameters for newfs:";
+static char *undo_msg = "Are you SURE you want to undo everything?";
+static char *write_confirm_msg =
+	"WARNING: You are about to save all your changes to device.\n"
+	"After that you will can not undo your changes.\n\n"
+	"Are you absolutely sure you want to continue?";
+static char *pending_write_msg =
+	"WARNING: There are some changes pending of write to device.\n\n"
+	"Would you like to save these changes?";
+
+TAILQ_HEAD(ufslist, ufsinfo);
+struct ufsinfo {
+	TAILQ_ENTRY(ufsinfo)	entry;
+	char			*devname;	/* parent device name */
+	char			*scheme;	/* partitioning scheme */
+	char			*partname;	/* partition name */
+	off_t			size;		/* partition size */
+
+	/* UFS Info */
+	char			*fsmnt;		/* last mounted path */
+	char			*volname;	/* volume label */
+	int32_t			id[2];		/* UFS ID */
+#define	HAS_UFSID(pfs) \
+	((pfs)->id[0] != 0 || (pfs)->id[1] != 0)
+
+	int32_t			flags;		/* FS_XX flags */
+	int32_t			magic;		/* magic number */
+
+	struct fstab		*fstabent;	/* fstab entry */
+	char			*mntonname;	/* current mountpoint */
+};
+
+static int ufslist_add(struct ufslist *, struct de_device *, struct de_part *);
+static void ufslist_free(struct ufslist *);
+static int ufslist_count(struct ufslist *);
+static int ufslist_get(struct ufslist *);
+
+static int ufsinspect(struct ufsinfo *);
+
+static int
+ufslist_add(struct ufslist *fslist, struct de_device *pdev,
+    struct de_part *ppart)
+{
+	struct ufsinfo *pfs;
+
+	assert(fslist != NULL);
+	assert(pdev != NULL);
+	assert(ppart != NULL);
+	assert(pdev->de_sectorsize > 0);
+
+	pfs = malloc(sizeof(*pfs));
+	if (pfs == NULL)
+		return (ENOMEM);
+	bzero(pfs, sizeof(*pfs));
+	pfs->devname = strdup(pdev->de_name);
+	pfs->scheme = strdup(pdev->de_scheme);
+	pfs->partname = strdup(ppart->de_name);
+	pfs->size = (ppart->de_end - ppart->de_start) * pdev->de_sectorsize;
+	TAILQ_INSERT_TAIL(fslist, pfs, entry);
+	ufsinspect(pfs);
+	return (0);
+}
+
+static void
+ufslist_free(struct ufslist *fslist)
+{
+	struct ufsinfo *pfs;
+
+	while (!TAILQ_EMPTY(fslist)) {
+		pfs = TAILQ_FIRST(fslist);
+		free(pfs->devname);
+		free(pfs->scheme);
+		free(pfs->partname);
+		free(pfs->fsmnt);
+		free(pfs->volname);
+		TAILQ_REMOVE(fslist, pfs, entry);
+		free(pfs);
+	}
+}
+
+static int
+ufslist_count(struct ufslist *fslist)
+{
+	struct ufsinfo *pfs;
+	int count;
+
+	count = 0;
+	TAILQ_FOREACH(pfs, fslist, entry) {
+		count++;
+	}
+	return (count);
+}
+
+static int
+ufslist_get(struct ufslist *fslist)
+{
+	struct de_devlist devices;
+	struct de_device *pdev;
+	struct de_part *ppart;
+	int error;
+
+	assert(fslist != NULL);
+
+	error = de_devlist_partitioned_get(&devices);
+	if (error)
+		return (error);
+
+	TAILQ_INIT(fslist);
+	TAILQ_FOREACH(pdev, &devices, de_device) {
+		error = de_partlist_get(pdev);
+		if (error)
+			break;
+		TAILQ_FOREACH(ppart, &pdev->de_part, de_part) {
+			/* skip empty chunks */
+			if (ppart->de_type == NULL)
+				continue;
+			if (strcmp(ppart->de_type, "freebsd-ufs") != 0)
+				continue;
+			error = ufslist_add(fslist, pdev, ppart);
+			if (error)
+				break;
+		}
+		de_dev_partlist_free(pdev);
+		if (error)
+			break;
+	}
+	de_devlist_free(&devices);
+	return (error);
+}
+
+static int
+ufsinspect(struct ufsinfo *pfs)
+{
+	struct uufsd disk;
+	int error;
+
+	bzero(&disk, sizeof(disk));
+	error = ufs_disk_fillout(&disk, pfs->partname);
+	if (error != -1) {
+		pfs->id[0] = disk.d_fs.fs_id[0];
+		pfs->id[1] = disk.d_fs.fs_id[1];
+		pfs->flags = disk.d_fs.fs_flags;
+		pfs->magic = disk.d_fs.fs_magic;
+		if (disk.d_fs.fs_volname[0] != '\0')
+			pfs->volname = strndup(disk.d_fs.fs_volname,
+			    MAXVOLLEN);
+		if (disk.d_fs.fs_fsmnt[0] != '\0')
+			pfs->fsmnt = strndup(disk.d_fs.fs_fsmnt,
+			    MAXMNTLEN);
+	}
+	ufs_disk_close(&disk);
+	return (error);
+}
+
+static void
+set_statusline(char *msg)
+{
+	if (msg) {
+		attrset(title_attr);
+		mvprintw(LINES - 1, 0, msg);
+		attrset(A_NORMAL);
+		beep();
+	} else {
+		move(LINES - 1, 0);
+		clrtoeol();
+	}
+}
+
+enum hist_cmd_type {
+	NEWFS, TUNEFS
+};
+
+struct hist_cmd_entry {
+	enum hist_cmd_type	type;
+	struct de_fs		*pfs;
+	char			*args;
+};
+
+static int
+ufsed_history_rollback(void *pentry)
+{
+	return (0);
+}
+
+static int
+ufsed_history_play(void *pentry)
+{
+	return (0);
+}
+
+static int
+ufslist_reread(struct ufslist *fslist)
+{
+	int error;
+
+	ufslist_free(fslist);
+	error = ufslist_get(fslist);
+
+	return (error);
+}
+
+#define	FSED_MENU_TOP		4
+#define	FSED_BOTTOM_HEIGHT	7
+#define	LABEL(l)		((l) ? (l): "-")
+
+int
+ufsed_open(void)
+{
+	struct ufslist fslist;
+	struct ufsinfo *pfs, *selected;
+	int count, height, row, i, key, ret;
+	int sc = 0, ch = 0, q = 0;
+	history_t hist;
+	WINDOW *win;
+	char *msg, *tmps;
+	int error;
+
+	error = ufslist_get(&fslist);
+	if (error)
+		return (error);
+	if (TAILQ_EMPTY(&fslist)) {
+		dmenu_open_errormsg("Suitable partitions are not found! "
+		    "Create partitions and try again.");
+		return (0);
+	}
+	msg = NULL;
+	getmnt_silent = 1;	/* make getmntopts() silent */
+	hist = history_init();
+	win = savescr();
+	keypad(stdscr, TRUE);
+	dialog_clear_norefresh(); clear();
+	count = ufslist_count(&fslist);
+resize:
+	if (LINES > VTY_STATUS_LINE)
+		height = LINES - 1;
+	else
+		height = VTY_STATUS_LINE;
+	height -= FSED_MENU_TOP + FSED_BOTTOM_HEIGHT;
+	do {
+		attrset(A_NORMAL);
+		mvprintw(0, 0, "%-12s", "Device:");
+		clrtobot(); attrset(A_REVERSE);
+		mvprintw(0, 61, "File Systems Editor");
+		attrset(A_NORMAL);
+		mvprintw(2, 0, "%-20s%6s%11s", "Device", "Size", "FS Info");
+		row = FSED_MENU_TOP - 1;
+		if (sc > 0)
+			mvprintw(row, 11, "^(-)");
+		else {
+			move(row, 0);
+			clrtoeol();
+		}
+		i = 0;
+		TAILQ_FOREACH(pfs, &fslist, entry) {
+			if (i++ < sc)
+				continue;
+			if (++row - FSED_MENU_TOP > height - 1)
+				break;
+			if (ch == row - FSED_MENU_TOP) {
+				attrset(A_REVERSE);
+				selected = pfs;
+			}
+			mvprintw(row, 0, "%-20s%6s", LABEL(pfs->partname),
+			    fmtsize(pfs->size));
+			if (ch == row - FSED_MENU_TOP)
+				attrset(A_NORMAL);
+		}
+		attrset(A_REVERSE);
+		mvprintw(0, 12, "%s, %s scheme", selected->devname,
+		    selected->scheme);
+		attrset(A_NORMAL);
+		if (sc + height < count)
+			mvprintw(height + FSED_MENU_TOP, 11, "v(+)");
+		else {
+			move(height + FSED_MENU_TOP, 0);
+			clrtoeol();
+		}
+		switch (selected->magic) {
+		case FS_UFS1_MAGIC:
+			tmps = "UFS1";
+			break;
+		case FS_UFS2_MAGIC:
+			tmps = "UFS2";
+			break;
+		default:
+			tmps = "unknown";
+		}
+		mvprintw(FSED_MENU_TOP, 30, "%-20s%s", "File System:", tmps);
+		if (selected->magic == FS_UFS1_MAGIC ||
+		    selected->magic == FS_UFS2_MAGIC) {
+			mvprintw(FSED_MENU_TOP + 1, 30, "%-20s%s",
+			    "last mountpoint:",
+			    LABEL(selected->fsmnt));
+			mvprintw(FSED_MENU_TOP + 2, 30, "%-20s%08x%08x",
+			    "UFS id:", selected->id[0], selected->id[1]);
+			mvprintw(FSED_MENU_TOP + 3, 30, "%-20s%s",
+			    "volume label:", LABEL(selected->volname));
+#define	FS_STATUS(pfs, flag) \
+	((((pfs)->flags & (flag)) != 0) ? "enabled": "disabled")
+			mvprintw(FSED_MENU_TOP + 4, 30, "%-20s%s",
+			    "POSIX.1e ACLs:", FS_STATUS(selected, FS_ACLS));
+			mvprintw(FSED_MENU_TOP + 5, 30, "%-20s%s",
+			    "NFSv4 ACLs:", FS_STATUS(selected, FS_NFS4ACLS));
+			mvprintw(FSED_MENU_TOP + 6, 30, "%-20s%s",
+			    "MAC multilabel:",
+			    FS_STATUS(selected, FS_MULTILABEL));
+			mvprintw(FSED_MENU_TOP + 7, 30, "%-20s%s",
+			    "soft updates:",
+			    FS_STATUS(selected, FS_DOSOFTDEP));
+			mvprintw(FSED_MENU_TOP + 8, 30, "%-20s%s",
+			    "SU journaling:",
+			    FS_STATUS(selected, FS_SUJ));
+			mvprintw(FSED_MENU_TOP + 9, 30, "%-20s%s",
+			    "gjournal:", FS_STATUS(selected, FS_GJOURNAL));
+		}
+		mvprintw(height + FSED_MENU_TOP + 1, 0,
+		    "The following commands are supported:");
+		mvprintw(height + FSED_MENU_TOP + 3, 0,
+		    "C = Create File System    M = Modify File System    Q = Finish");
+		mvprintw(height + FSED_MENU_TOP + 4, 0,
+		    "U = Undo All Changes      W = Write Changes");
+		mvprintw(height + FSED_MENU_TOP + 8, 0,
+		    "Use F1 or ? to get more help, arrow keys to select");
+		set_statusline(msg);
+		if (msg)
+			msg = NULL;
+
+		key = toupper(getch());
+		switch (key) {
+		case '\r':
+		case '\n':
+			break;
+		case KEY_ESC:
+		case 'Q':
+			q = 1;
+			break;
+		case 'W':
+			if (history_isempty(hist)) {
+				msg = "Nothing to save.";
+				break;
+			}
+			if (dmenu_open_noyes(write_confirm_msg))
+				break;
+			error = history_play(hist, ufsed_history_play);
+			if (error != 0) {
+				/* XXX: report about completed commands */
+				history_rollback(hist, ufsed_history_rollback);
+			}
+			error = ufslist_reread(&fslist);
+			break;
+		case 'U':
+			if (history_isempty(hist)) {
+				msg = "Nothing to undo.";
+				break;
+			}
+			if (dmenu_open_noyes(undo_msg))
+				break;
+			history_rollback(hist, ufsed_history_rollback);
+			error = ufslist_reread(&fslist);
+			break;
+		case KEY_UP:
+		case KEY_DOWN:
+		case KEY_PPAGE:
+		case KEY_HOME:
+		case KEY_NPAGE:
+		case KEY_END:
+			dlg_list_handle_move(key, &ch, &sc, count,
+			    height);
+			break;
+		case KEY_RESIZE:
+			sc = ch = 0;
+			goto resize;
+		default:
+			msg = "Type F1 or ? for help";
+		};
+	} while (q == 0);
+	if (!history_isempty(hist))
+		history_rollback(hist, ufsed_history_rollback);
+	history_free(hist);
+	restorescr(win);
+	ufslist_free(&fslist);
+	return (0);
+}
+

From owner-svn-src-user@FreeBSD.ORG  Fri Oct 29 20:51:00 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C7A0106567A;
	Fri, 29 Oct 2010 20:51:00 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B5E68FC0A;
	Fri, 29 Oct 2010 20:51:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9TKoxva056661;
	Fri, 29 Oct 2010 20:50:59 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9TKoxo9056659;
	Fri, 29 Oct 2010 20:50:59 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010292050.o9TKoxo9056659@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Fri, 29 Oct 2010 20:50:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214527 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Oct 2010 20:51:00 -0000

Author: dougb
Date: Fri Oct 29 20:50:59 2010
New Revision: 214527
URL: http://svn.freebsd.org/changeset/base/214527

Log:
  For the determination of LOCALBASE:
  1. Don't try to use INDEX if PM_INDEX is not set
  2. Give a more meaningful error message

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Oct 29 20:42:02 2010	(r214526)
+++ user/dougb/portmaster/portmaster	Fri Oct 29 20:50:59 2010	(r214527)
@@ -2664,10 +2664,12 @@ if [ "$$" -eq "$PM_PARENT_PID" -a -z "$S
 		if [ -n "$PLB" ]; then
 			LOCALBASE_COMPAT="$PLB/lib/compat/pkg"
 		else
-			PLB=`head -1 $PM_INDEX | cut -f 3 -d\| 2>/dev/null`
-			if [ -d "$PLB" ]; then
+			[ -n "$PM_INDEX" ] && PLB=`head -1 $PM_INDEX | cut -f 3 -d\| 2>/dev/null`
+			if [ -n "$PLB" ] && [ -d "$PLB" ]; then
 				LOCALBASE_COMPAT="${PLB}/lib/compat/pkg"
 			else
+				echo "===>>> Unable to determine the value of LOCALBASE"
+				echo "       Try setting it in the environment, or /etc/make.conf"
 				fail 'The value of LOCALBASE cannot be empty'
 			fi
 		fi

From owner-svn-src-user@FreeBSD.ORG  Fri Oct 29 21:12:44 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A95AE1065670;
	Fri, 29 Oct 2010 21:12:44 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 982958FC08;
	Fri, 29 Oct 2010 21:12:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9TLCiGo058009;
	Fri, 29 Oct 2010 21:12:44 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9TLCiZD058007;
	Fri, 29 Oct 2010 21:12:44 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010292112.o9TLCiZD058007@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Fri, 29 Oct 2010 21:12:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214532 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Oct 2010 21:12:44 -0000

Author: dougb
Date: Fri Oct 29 21:12:44 2010
New Revision: 214532
URL: http://svn.freebsd.org/changeset/base/214532

Log:
  s/MD5_FILE/DISTINFO_FILE/, and assert that the value is present to cause
  an actual error if it is not.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Oct 29 21:06:57 2010	(r214531)
+++ user/dougb/portmaster/portmaster	Fri Oct 29 21:12:44 2010	(r214532)
@@ -877,7 +877,8 @@ read_distinfos () {
 			distinfo="${origin}/distinfo"
 		else
 			pm_cd $origin || continue
-			distinfo=`pm_make -V MD5_FILE`
+			distinfo=`pm_make -V DISTINFO_FILE`
+			[ -n "$distinfo" ] || fail "No DISTINFO_FILE in $origin"
 		fi
 
 		if [ -s "$distinfo" ]; then
@@ -912,7 +913,8 @@ read_distinfos_all () {
 			distinfo="${origin}/distinfo"
 		else
 			pm_cd $origin || continue
-			distinfo=`pm_make -V MD5_FILE`
+			distinfo=`pm_make -V DISTINFO_FILE`
+			[ -n "$distinfo" ] || fail "No DISTINFO_FILE in $origin"
 		fi
 
 		if [ -s "$distinfo" ]; then
@@ -3559,7 +3561,8 @@ if [ -n "$distfiles" ]; then
 	if [ -s distinfo ]; then
 		distinfo=distinfo
 	else
-		distinfo=`pm_make -V MD5_FILE`
+		distinfo=`pm_make -V DISTINFO_FILE`
+		[ -n "$distinfo" ] || fail "No DISTINFO_FILE in $portdir"
 	fi
 
 	dist_list_temp=`pm_mktemp dist_list`

From owner-svn-src-user@FreeBSD.ORG  Fri Oct 29 21:29:44 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3BAEB106566B;
	Fri, 29 Oct 2010 21:29:44 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AC3D8FC14;
	Fri, 29 Oct 2010 21:29:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9TLTihK059287;
	Fri, 29 Oct 2010 21:29:44 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9TLTiC8059285;
	Fri, 29 Oct 2010 21:29:44 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010292129.o9TLTiC8059285@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Fri, 29 Oct 2010 21:29:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214537 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Oct 2010 21:29:44 -0000

Author: dougb
Date: Fri Oct 29 21:29:43 2010
New Revision: 214537
URL: http://svn.freebsd.org/changeset/base/214537

Log:
  Get brave and remove the commented out code in -a. We're now totally
  dependent on PM_NEEDS_UPDATE.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Oct 29 21:24:56 2010	(r214536)
+++ user/dougb/portmaster/portmaster	Fri Oct 29 21:29:43 2010	(r214537)
@@ -2805,33 +2805,6 @@ all_first_pass () {
 
 	export PM_BUILDING=pmbuildingall
 
-if ! : ; then
-	for iport in $roots $trunks $branches $leaves; do
-		# Probably got updated as a dependency for something else
-		[ -d "$pdb/$iport" ] || continue
-		case "$CUR_DEPS" in *:${iport}:*) continue ;; esac
-		check_exclude $iport || continue
-
-		case "$iport" in bsdpan-*) continue ;; esac
-
-		PM_DEPTH=
-		if [ -n "$PM_FORCE" ]; then
-			if ! check_restart_and_udf $iport; then
-				echo "===>>> Forcing update for $iport"
-				update_port $iport
-			else
-				CUR_DEPS="${CUR_DEPS}${iport}:"
-			fi
-			continue
-		fi
-
-		check_interactive $iport || continue
-
-		# We got here, so we know we have to build it
-		update_port $iport
-	done
-fi
-
 	unset roots trunks branches leaves
 
 	for origin in $PM_NEEDS_UPDATE; do update_port $origin; done

From owner-svn-src-user@FreeBSD.ORG  Fri Oct 29 23:24:45 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10C14106564A;
	Fri, 29 Oct 2010 23:24:45 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 000BC8FC0A;
	Fri, 29 Oct 2010 23:24:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9TNOiv8065657;
	Fri, 29 Oct 2010 23:24:44 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9TNOi0B065655;
	Fri, 29 Oct 2010 23:24:44 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010292324.o9TNOi0B065655@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Fri, 29 Oct 2010 23:24:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214540 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Oct 2010 23:24:45 -0000

Author: dougb
Date: Fri Oct 29 23:24:44 2010
New Revision: 214540
URL: http://svn.freebsd.org/changeset/base/214540

Log:
  Properly update PM_NEEDS_UPDATE when we complete an installation.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Oct 29 22:57:14 2010	(r214539)
+++ user/dougb/portmaster/portmaster	Fri Oct 29 23:24:44 2010	(r214540)
@@ -227,7 +227,12 @@ safe_exit () {
 			[ -n "$PM_DEL_BUILD_ONLY" ] &&
 				echo "build_deps_il='$build_deps_il'" >> $IPC_SAVE
 
-			PM_NEEDS_UPDATE=${PM_NEEDS_UPDATE#* }
+			for i in $PM_NEEDS_UPDATE; do
+				[ "$i" = "$portdir" ] && continue
+				pnu_temp="${pnu_temp}${i} "
+			done
+
+			PM_NEEDS_UPDATE="$pnu_temp"
 		else
 			# Do these here so +IGNOREME can modify them
 			echo "num_of_deps='$num_of_deps'" >> $IPC_SAVE

From owner-svn-src-user@FreeBSD.ORG  Sat Oct 30 00:00:54 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C5341065670;
	Sat, 30 Oct 2010 00:00:54 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8BE578FC08;
	Sat, 30 Oct 2010 00:00:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9U00sra067630;
	Sat, 30 Oct 2010 00:00:54 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9U00soa067628;
	Sat, 30 Oct 2010 00:00:54 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010300000.o9U00soa067628@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 30 Oct 2010 00:00:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214541 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Oct 2010 00:00:54 -0000

Author: dougb
Date: Sat Oct 30 00:00:54 2010
New Revision: 214541
URL: http://svn.freebsd.org/changeset/base/214541

Log:
  In the parent, use the $PM_NEEDS_UPDATE list to suggest a shortcut to
  resume a failed build
  
  In a child process, if we've failed there is no point in updating
  $IPC_SAVE, so just die instead.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Oct 29 23:24:44 2010	(r214540)
+++ user/dougb/portmaster/portmaster	Sat Oct 30 00:00:54 2010	(r214541)
@@ -210,6 +210,13 @@ parent_exit () {
 		done
 		echo ''
 	fi
+
+	if [ -n "$1" ]; then
+		echo ''
+		echo "===>>> You can restart from the point of failure with this command line:"
+		echo "       ${0##*/} <flags> $PM_NEEDS_UPDATE"
+		echo ''
+	fi
 }
 
 safe_exit () {
@@ -218,6 +225,8 @@ safe_exit () {
 	else
 		[ -n "$grep_deps" ] && pm_unlink $grep_deps
 
+		[ -n "$1" ] && exit $1
+
 		# Save state for the parent process to read back in
 		if [ -z "$PM_FIRST_PASS" ]; then
 			> $IPC_SAVE

From owner-svn-src-user@FreeBSD.ORG  Sat Oct 30 02:51:05 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0CDC4106566C;
	Sat, 30 Oct 2010 02:51:05 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F07028FC15;
	Sat, 30 Oct 2010 02:51:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9U2p4dD075988;
	Sat, 30 Oct 2010 02:51:04 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9U2p47P075986;
	Sat, 30 Oct 2010 02:51:04 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010300251.o9U2p47P075986@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 30 Oct 2010 02:51:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214545 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Oct 2010 02:51:05 -0000

Author: dougb
Date: Sat Oct 30 02:51:04 2010
New Revision: 214545
URL: http://svn.freebsd.org/changeset/base/214545

Log:
  In --clean-packages handle lack of empty directories more cleanly

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Oct 30 01:24:26 2010	(r214544)
+++ user/dougb/portmaster/portmaster	Sat Oct 30 02:51:04 2010	(r214545)
@@ -1163,15 +1163,14 @@ if [ -n "$CLEAN_PACKAGES" ]; then
 	echo '' ; echo ''
 
 	empty_dirs=`find . -type d -empty -print | sort`
-	if [ -n "$empty_dirs" ]; then
-		echo "===>>> Deleting empty directories"
+	case "$empty_dirs" in
+	\.|'')	echo "===>>> No empty directories in $PACKAGES" ;;
+	*)	echo "===>>> Deleting empty directories"
 		for dir in $empty_dirs; do
 			echo "	===>>> ${dir#\.\/}"
 		done
-		pm_find_s . -type d -empty -delete
-	else
-		echo "===>>> No empty directories in $PACKAGES"
-	fi
+		pm_find_s . -type d -empty -delete ;;
+	esac
 	echo ''
 
 	safe_exit

From owner-svn-src-user@FreeBSD.ORG  Sat Oct 30 13:25:42 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F616106566C;
	Sat, 30 Oct 2010 13:25:42 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 794F98FC1C;
	Sat, 30 Oct 2010 13:25:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9UDPgRt099103;
	Sat, 30 Oct 2010 13:25:42 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9UDPgOx099083;
	Sat, 30 Oct 2010 13:25:42 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201010301325.o9UDPgOx099083@svn.freebsd.org>
From: Ed Schouten <ed@FreeBSD.org>
Date: Sat, 30 Oct 2010 13:25:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214555 - in user/ed/compiler-rt: . bin/rm bin/sh
	cddl/lib/drti contrib/bsnmp/snmpd contrib/ipfilter/tools
	contrib/libpcap contrib/libpcap/bpf/net contrib/libpcap/lbl
	contrib/libpcap/mi...
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Oct 2010 13:25:42 -0000

Author: ed
Date: Sat Oct 30 13:25:41 2010
New Revision: 214555
URL: http://svn.freebsd.org/changeset/base/214555

Log:
  Sync with HEAD.

Added:
  user/ed/compiler-rt/contrib/libpcap/opentest.c
     - copied unchanged from r214550, head/contrib/libpcap/opentest.c
  user/ed/compiler-rt/contrib/libpcap/pcap-can-linux.c
     - copied unchanged from r214550, head/contrib/libpcap/pcap-can-linux.c
  user/ed/compiler-rt/contrib/libpcap/pcap-can-linux.h
     - copied unchanged from r214550, head/contrib/libpcap/pcap-can-linux.h
  user/ed/compiler-rt/contrib/libpcap/pcap-common.c
     - copied unchanged from r214550, head/contrib/libpcap/pcap-common.c
  user/ed/compiler-rt/contrib/libpcap/pcap-common.h
     - copied unchanged from r214550, head/contrib/libpcap/pcap-common.h
  user/ed/compiler-rt/contrib/libpcap/pcap-snf.c
     - copied unchanged from r214550, head/contrib/libpcap/pcap-snf.c
  user/ed/compiler-rt/contrib/libpcap/pcap-snf.h
     - copied unchanged from r214550, head/contrib/libpcap/pcap-snf.h
  user/ed/compiler-rt/contrib/libpcap/pcap/ipnet.h
     - copied unchanged from r214550, head/contrib/libpcap/pcap/ipnet.h
  user/ed/compiler-rt/contrib/libpcap/selpolltest.c
     - copied unchanged from r214550, head/contrib/libpcap/selpolltest.c
  user/ed/compiler-rt/contrib/libpcap/sf-pcap-ng.c
     - copied unchanged from r214550, head/contrib/libpcap/sf-pcap-ng.c
  user/ed/compiler-rt/contrib/libpcap/sf-pcap-ng.h
     - copied unchanged from r214550, head/contrib/libpcap/sf-pcap-ng.h
  user/ed/compiler-rt/contrib/libpcap/sf-pcap.c
     - copied unchanged from r214550, head/contrib/libpcap/sf-pcap.c
  user/ed/compiler-rt/contrib/libpcap/sf-pcap.h
     - copied unchanged from r214550, head/contrib/libpcap/sf-pcap.h
  user/ed/compiler-rt/contrib/tcpdump/Makefile-devel-adds
     - copied unchanged from r214550, head/contrib/tcpdump/Makefile-devel-adds
  user/ed/compiler-rt/contrib/tcpdump/forces.h
     - copied unchanged from r214550, head/contrib/tcpdump/forces.h
  user/ed/compiler-rt/contrib/tcpdump/ipnet.h
     - copied unchanged from r214550, head/contrib/tcpdump/ipnet.h
  user/ed/compiler-rt/contrib/tcpdump/print-forces.c
     - copied unchanged from r214550, head/contrib/tcpdump/print-forces.c
  user/ed/compiler-rt/contrib/tcpdump/print-ipnet.c
     - copied unchanged from r214550, head/contrib/tcpdump/print-ipnet.c
  user/ed/compiler-rt/contrib/tcpdump/print-usb.c
     - copied unchanged from r214550, head/contrib/tcpdump/print-usb.c
  user/ed/compiler-rt/contrib/tcpdump/signature.c
     - copied unchanged from r214550, head/contrib/tcpdump/signature.c
  user/ed/compiler-rt/contrib/tcpdump/signature.h
     - copied unchanged from r214550, head/contrib/tcpdump/signature.h
  user/ed/compiler-rt/contrib/tcpdump/tcpdump.1.in
     - copied unchanged from r214550, head/contrib/tcpdump/tcpdump.1.in
  user/ed/compiler-rt/contrib/tcpdump/tests/
     - copied from r214550, head/contrib/tcpdump/tests/
  user/ed/compiler-rt/share/examples/jails/
     - copied from r214550, head/share/examples/jails/
  user/ed/compiler-rt/share/examples/netgraph/virtual.chain
     - copied unchanged from r214550, head/share/examples/netgraph/virtual.chain
  user/ed/compiler-rt/share/examples/netgraph/virtual.lan
     - copied unchanged from r214550, head/share/examples/netgraph/virtual.lan
  user/ed/compiler-rt/sys/net/if_debug.c
     - copied unchanged from r214550, head/sys/net/if_debug.c
  user/ed/compiler-rt/sys/netinet/in_debug.c
     - copied unchanged from r214550, head/sys/netinet/in_debug.c
  user/ed/compiler-rt/sys/x86/x86/dump_machdep.c
     - copied unchanged from r214550, head/sys/x86/x86/dump_machdep.c
  user/ed/compiler-rt/sys/x86/x86/mptable.c
     - copied unchanged from r214550, head/sys/x86/x86/mptable.c
  user/ed/compiler-rt/sys/x86/x86/mptable_pci.c
     - copied unchanged from r214550, head/sys/x86/x86/mptable_pci.c
  user/ed/compiler-rt/sys/x86/x86/nexus.c
     - copied unchanged from r214550, head/sys/x86/x86/nexus.c
  user/ed/compiler-rt/tools/regression/bin/sh/errors/bad-keyword1.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/errors/bad-keyword1.0
  user/ed/compiler-rt/tools/regression/bin/sh/execution/func3.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/execution/func3.0
  user/ed/compiler-rt/tools/regression/bin/sh/execution/redir3.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/execution/redir3.0
  user/ed/compiler-rt/tools/regression/bin/sh/execution/redir4.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/execution/redir4.0
  user/ed/compiler-rt/tools/regression/bin/sh/expansion/plus-minus5.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/expansion/plus-minus5.0
  user/ed/compiler-rt/tools/regression/bin/sh/expansion/plus-minus6.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/expansion/plus-minus6.0
  user/ed/compiler-rt/tools/regression/bin/sh/expansion/trim5.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/expansion/trim5.0
  user/ed/compiler-rt/tools/regression/bin/sh/expansion/trim6.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/expansion/trim6.0
  user/ed/compiler-rt/tools/regression/bin/sh/parser/alias1.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/parser/alias1.0
  user/ed/compiler-rt/tools/regression/bin/sh/parser/alias2.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/parser/alias2.0
  user/ed/compiler-rt/tools/regression/bin/sh/parser/func1.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/parser/func1.0
  user/ed/compiler-rt/tools/regression/bin/sh/parser/pipe-not1.0
     - copied unchanged from r214550, head/tools/regression/bin/sh/parser/pipe-not1.0
  user/ed/compiler-rt/usr.sbin/tcpdump/tcpdump/tcpdump.1
     - copied unchanged from r214550, head/usr.sbin/tcpdump/tcpdump/tcpdump.1
Deleted:
  user/ed/compiler-rt/contrib/libpcap/FREEBSD-Xlist
  user/ed/compiler-rt/contrib/libpcap/FREEBSD-upgrade
  user/ed/compiler-rt/contrib/libpcap/net/bpf_filter.c
  user/ed/compiler-rt/contrib/tcpdump/FREEBSD-Xlist
  user/ed/compiler-rt/contrib/tcpdump/FREEBSD-upgrade
  user/ed/compiler-rt/contrib/tcpdump/missing/getaddrinfo.c
  user/ed/compiler-rt/contrib/tcpdump/tcpdump.1
  user/ed/compiler-rt/sys/amd64/amd64/dump_machdep.c
  user/ed/compiler-rt/sys/amd64/amd64/mptable.c
  user/ed/compiler-rt/sys/amd64/amd64/mptable_pci.c
  user/ed/compiler-rt/sys/amd64/amd64/nexus.c
  user/ed/compiler-rt/sys/i386/i386/dump_machdep.c
  user/ed/compiler-rt/sys/i386/i386/mptable.c
  user/ed/compiler-rt/sys/i386/i386/mptable_pci.c
  user/ed/compiler-rt/sys/i386/i386/nexus.c
Modified:
  user/ed/compiler-rt/UPDATING
  user/ed/compiler-rt/bin/rm/rm.1
  user/ed/compiler-rt/bin/sh/eval.c
  user/ed/compiler-rt/bin/sh/expand.c
  user/ed/compiler-rt/bin/sh/expand.h
  user/ed/compiler-rt/bin/sh/histedit.c
  user/ed/compiler-rt/bin/sh/mksyntax.c
  user/ed/compiler-rt/bin/sh/parser.c
  user/ed/compiler-rt/bin/sh/parser.h
  user/ed/compiler-rt/bin/sh/redir.c
  user/ed/compiler-rt/bin/sh/var.c
  user/ed/compiler-rt/cddl/lib/drti/Makefile
  user/ed/compiler-rt/contrib/bsnmp/snmpd/bsnmpd.1
  user/ed/compiler-rt/contrib/ipfilter/tools/ipf_y.y
  user/ed/compiler-rt/contrib/libpcap/CHANGES
  user/ed/compiler-rt/contrib/libpcap/CREDITS
  user/ed/compiler-rt/contrib/libpcap/INSTALL.txt
  user/ed/compiler-rt/contrib/libpcap/Makefile.in
  user/ed/compiler-rt/contrib/libpcap/README
  user/ed/compiler-rt/contrib/libpcap/TODO
  user/ed/compiler-rt/contrib/libpcap/VERSION
  user/ed/compiler-rt/contrib/libpcap/arcnet.h
  user/ed/compiler-rt/contrib/libpcap/atmuni31.h
  user/ed/compiler-rt/contrib/libpcap/bpf/net/bpf_filter.c
  user/ed/compiler-rt/contrib/libpcap/bpf_dump.c
  user/ed/compiler-rt/contrib/libpcap/bpf_image.c
  user/ed/compiler-rt/contrib/libpcap/config.guess
  user/ed/compiler-rt/contrib/libpcap/config.h.in
  user/ed/compiler-rt/contrib/libpcap/config.sub
  user/ed/compiler-rt/contrib/libpcap/configure
  user/ed/compiler-rt/contrib/libpcap/configure.in
  user/ed/compiler-rt/contrib/libpcap/dlpisubs.c
  user/ed/compiler-rt/contrib/libpcap/dlpisubs.h
  user/ed/compiler-rt/contrib/libpcap/etherent.c
  user/ed/compiler-rt/contrib/libpcap/ethertype.h
  user/ed/compiler-rt/contrib/libpcap/fad-getad.c
  user/ed/compiler-rt/contrib/libpcap/fad-gifc.c
  user/ed/compiler-rt/contrib/libpcap/fad-glifc.c
  user/ed/compiler-rt/contrib/libpcap/fad-null.c
  user/ed/compiler-rt/contrib/libpcap/fad-win32.c
  user/ed/compiler-rt/contrib/libpcap/filtertest.c
  user/ed/compiler-rt/contrib/libpcap/gencode.c
  user/ed/compiler-rt/contrib/libpcap/gencode.h
  user/ed/compiler-rt/contrib/libpcap/grammar.y
  user/ed/compiler-rt/contrib/libpcap/inet.c
  user/ed/compiler-rt/contrib/libpcap/lbl/os-aix4.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-hpux11.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-osf4.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-osf5.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-solaris2.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-sunos4.h
  user/ed/compiler-rt/contrib/libpcap/lbl/os-ultrix4.h
  user/ed/compiler-rt/contrib/libpcap/llc.h
  user/ed/compiler-rt/contrib/libpcap/missing/snprintf.c
  user/ed/compiler-rt/contrib/libpcap/nametoaddr.c
  user/ed/compiler-rt/contrib/libpcap/nlpid.h
  user/ed/compiler-rt/contrib/libpcap/optimize.c
  user/ed/compiler-rt/contrib/libpcap/pcap-bpf.c
  user/ed/compiler-rt/contrib/libpcap/pcap-bpf.h
  user/ed/compiler-rt/contrib/libpcap/pcap-bt-linux.c
  user/ed/compiler-rt/contrib/libpcap/pcap-bt-linux.h
  user/ed/compiler-rt/contrib/libpcap/pcap-config.1
  user/ed/compiler-rt/contrib/libpcap/pcap-config.in
  user/ed/compiler-rt/contrib/libpcap/pcap-dag.c
  user/ed/compiler-rt/contrib/libpcap/pcap-dag.h
  user/ed/compiler-rt/contrib/libpcap/pcap-dlpi.c
  user/ed/compiler-rt/contrib/libpcap/pcap-dos.c
  user/ed/compiler-rt/contrib/libpcap/pcap-dos.h
  user/ed/compiler-rt/contrib/libpcap/pcap-enet.c
  user/ed/compiler-rt/contrib/libpcap/pcap-filter.manmisc.in
  user/ed/compiler-rt/contrib/libpcap/pcap-int.h
  user/ed/compiler-rt/contrib/libpcap/pcap-libdlpi.c
  user/ed/compiler-rt/contrib/libpcap/pcap-linktype.manmisc.in
  user/ed/compiler-rt/contrib/libpcap/pcap-linux.c
  user/ed/compiler-rt/contrib/libpcap/pcap-namedb.h
  user/ed/compiler-rt/contrib/libpcap/pcap-nit.c
  user/ed/compiler-rt/contrib/libpcap/pcap-null.c
  user/ed/compiler-rt/contrib/libpcap/pcap-pf.c
  user/ed/compiler-rt/contrib/libpcap/pcap-savefile.manfile.in
  user/ed/compiler-rt/contrib/libpcap/pcap-septel.c
  user/ed/compiler-rt/contrib/libpcap/pcap-septel.h
  user/ed/compiler-rt/contrib/libpcap/pcap-sita.html
  user/ed/compiler-rt/contrib/libpcap/pcap-snit.c
  user/ed/compiler-rt/contrib/libpcap/pcap-snoop.c
  user/ed/compiler-rt/contrib/libpcap/pcap-stdinc.h
  user/ed/compiler-rt/contrib/libpcap/pcap-usb-linux.c
  user/ed/compiler-rt/contrib/libpcap/pcap-usb-linux.h
  user/ed/compiler-rt/contrib/libpcap/pcap-win32.c
  user/ed/compiler-rt/contrib/libpcap/pcap.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap.c
  user/ed/compiler-rt/contrib/libpcap/pcap.h
  user/ed/compiler-rt/contrib/libpcap/pcap/bluetooth.h
  user/ed/compiler-rt/contrib/libpcap/pcap/bpf.h
  user/ed/compiler-rt/contrib/libpcap/pcap/namedb.h
  user/ed/compiler-rt/contrib/libpcap/pcap/pcap.h
  user/ed/compiler-rt/contrib/libpcap/pcap/sll.h
  user/ed/compiler-rt/contrib/libpcap/pcap/usb.h
  user/ed/compiler-rt/contrib/libpcap/pcap/vlan.h
  user/ed/compiler-rt/contrib/libpcap/pcap_activate.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_breakloop.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_can_set_rfmon.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_close.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_compile.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_create.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_datalink.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_datalink_name_to_val.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_datalink_val_to_name.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump_close.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump_file.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump_flush.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump_ftell.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_dump_open.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_file.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_fileno.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_findalldevs.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_free_datalinks.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_freealldevs.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_freecode.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_get_selectable_fd.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_geterr.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_inject.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_is_swapped.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_lib_version.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_list_datalinks.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_lookupdev.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_lookupnet.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_loop.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_major_version.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_next_ex.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_offline_filter.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_open_dead.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_open_live.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_open_offline.3pcap.in
  user/ed/compiler-rt/contrib/libpcap/pcap_set_buffer_size.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_set_datalink.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_set_promisc.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_set_rfmon.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_set_snaplen.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_set_timeout.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_setdirection.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_setfilter.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_setnonblock.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_snapshot.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_stats.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_statustostr.3pcap
  user/ed/compiler-rt/contrib/libpcap/pcap_strerror.3pcap
  user/ed/compiler-rt/contrib/libpcap/ppp.h
  user/ed/compiler-rt/contrib/libpcap/runlex.sh
  user/ed/compiler-rt/contrib/libpcap/savefile.c
  user/ed/compiler-rt/contrib/libpcap/scanner.l
  user/ed/compiler-rt/contrib/libpcap/sunatmpos.h
  user/ed/compiler-rt/contrib/tcpdump/CHANGES
  user/ed/compiler-rt/contrib/tcpdump/CREDITS
  user/ed/compiler-rt/contrib/tcpdump/INSTALL.txt
  user/ed/compiler-rt/contrib/tcpdump/Makefile.in
  user/ed/compiler-rt/contrib/tcpdump/README
  user/ed/compiler-rt/contrib/tcpdump/VERSION
  user/ed/compiler-rt/contrib/tcpdump/acconfig.h
  user/ed/compiler-rt/contrib/tcpdump/addrtoname.c
  user/ed/compiler-rt/contrib/tcpdump/af.c
  user/ed/compiler-rt/contrib/tcpdump/af.h
  user/ed/compiler-rt/contrib/tcpdump/atmuni31.h
  user/ed/compiler-rt/contrib/tcpdump/bootp.h
  user/ed/compiler-rt/contrib/tcpdump/bpf_dump.c
  user/ed/compiler-rt/contrib/tcpdump/checksum.c
  user/ed/compiler-rt/contrib/tcpdump/config.guess
  user/ed/compiler-rt/contrib/tcpdump/config.h.in
  user/ed/compiler-rt/contrib/tcpdump/config.sub
  user/ed/compiler-rt/contrib/tcpdump/configure
  user/ed/compiler-rt/contrib/tcpdump/configure.in
  user/ed/compiler-rt/contrib/tcpdump/ethertype.h
  user/ed/compiler-rt/contrib/tcpdump/gmpls.c
  user/ed/compiler-rt/contrib/tcpdump/gmpls.h
  user/ed/compiler-rt/contrib/tcpdump/gmt2local.h
  user/ed/compiler-rt/contrib/tcpdump/icmp6.h
  user/ed/compiler-rt/contrib/tcpdump/ieee802_11.h
  user/ed/compiler-rt/contrib/tcpdump/ieee802_11_radio.h
  user/ed/compiler-rt/contrib/tcpdump/interface.h
  user/ed/compiler-rt/contrib/tcpdump/ip6.h
  user/ed/compiler-rt/contrib/tcpdump/ipproto.c
  user/ed/compiler-rt/contrib/tcpdump/ipproto.h
  user/ed/compiler-rt/contrib/tcpdump/isakmp.h
  user/ed/compiler-rt/contrib/tcpdump/l2vpn.c
  user/ed/compiler-rt/contrib/tcpdump/l2vpn.h
  user/ed/compiler-rt/contrib/tcpdump/lbl/os-sunos4.h
  user/ed/compiler-rt/contrib/tcpdump/lbl/os-ultrix4.h
  user/ed/compiler-rt/contrib/tcpdump/missing/addrinfo.h
  user/ed/compiler-rt/contrib/tcpdump/netdissect.h
  user/ed/compiler-rt/contrib/tcpdump/nfs.h
  user/ed/compiler-rt/contrib/tcpdump/nlpid.c
  user/ed/compiler-rt/contrib/tcpdump/nlpid.h
  user/ed/compiler-rt/contrib/tcpdump/oui.c
  user/ed/compiler-rt/contrib/tcpdump/oui.h
  user/ed/compiler-rt/contrib/tcpdump/print-802_11.c
  user/ed/compiler-rt/contrib/tcpdump/print-ap1394.c
  user/ed/compiler-rt/contrib/tcpdump/print-arcnet.c
  user/ed/compiler-rt/contrib/tcpdump/print-atm.c
  user/ed/compiler-rt/contrib/tcpdump/print-bfd.c
  user/ed/compiler-rt/contrib/tcpdump/print-bgp.c
  user/ed/compiler-rt/contrib/tcpdump/print-bootp.c
  user/ed/compiler-rt/contrib/tcpdump/print-bt.c
  user/ed/compiler-rt/contrib/tcpdump/print-cdp.c
  user/ed/compiler-rt/contrib/tcpdump/print-cfm.c
  user/ed/compiler-rt/contrib/tcpdump/print-dccp.c
  user/ed/compiler-rt/contrib/tcpdump/print-dhcp6.c
  user/ed/compiler-rt/contrib/tcpdump/print-domain.c
  user/ed/compiler-rt/contrib/tcpdump/print-enc.c
  user/ed/compiler-rt/contrib/tcpdump/print-esp.c
  user/ed/compiler-rt/contrib/tcpdump/print-ether.c
  user/ed/compiler-rt/contrib/tcpdump/print-fr.c
  user/ed/compiler-rt/contrib/tcpdump/print-gre.c
  user/ed/compiler-rt/contrib/tcpdump/print-icmp6.c
  user/ed/compiler-rt/contrib/tcpdump/print-ip.c
  user/ed/compiler-rt/contrib/tcpdump/print-ip6.c
  user/ed/compiler-rt/contrib/tcpdump/print-isakmp.c
  user/ed/compiler-rt/contrib/tcpdump/print-isoclns.c
  user/ed/compiler-rt/contrib/tcpdump/print-juniper.c
  user/ed/compiler-rt/contrib/tcpdump/print-l2tp.c
  user/ed/compiler-rt/contrib/tcpdump/print-lane.c
  user/ed/compiler-rt/contrib/tcpdump/print-llc.c
  user/ed/compiler-rt/contrib/tcpdump/print-lldp.c
  user/ed/compiler-rt/contrib/tcpdump/print-lspping.c
  user/ed/compiler-rt/contrib/tcpdump/print-nfs.c
  user/ed/compiler-rt/contrib/tcpdump/print-ntp.c
  user/ed/compiler-rt/contrib/tcpdump/print-olsr.c
  user/ed/compiler-rt/contrib/tcpdump/print-ospf.c
  user/ed/compiler-rt/contrib/tcpdump/print-pflog.c
  user/ed/compiler-rt/contrib/tcpdump/print-pim.c
  user/ed/compiler-rt/contrib/tcpdump/print-ppp.c
  user/ed/compiler-rt/contrib/tcpdump/print-rrcp.c
  user/ed/compiler-rt/contrib/tcpdump/print-rsvp.c
  user/ed/compiler-rt/contrib/tcpdump/print-rx.c
  user/ed/compiler-rt/contrib/tcpdump/print-sctp.c
  user/ed/compiler-rt/contrib/tcpdump/print-sip.c
  user/ed/compiler-rt/contrib/tcpdump/print-sll.c
  user/ed/compiler-rt/contrib/tcpdump/print-smb.c
  user/ed/compiler-rt/contrib/tcpdump/print-sunrpc.c
  user/ed/compiler-rt/contrib/tcpdump/print-symantec.c
  user/ed/compiler-rt/contrib/tcpdump/print-tcp.c
  user/ed/compiler-rt/contrib/tcpdump/print-tftp.c
  user/ed/compiler-rt/contrib/tcpdump/print-token.c
  user/ed/compiler-rt/contrib/tcpdump/print-udp.c
  user/ed/compiler-rt/contrib/tcpdump/setsignal.h
  user/ed/compiler-rt/contrib/tcpdump/sll.h
  user/ed/compiler-rt/contrib/tcpdump/smbutil.c
  user/ed/compiler-rt/contrib/tcpdump/strcasecmp.c
  user/ed/compiler-rt/contrib/tcpdump/tcp.h
  user/ed/compiler-rt/contrib/tcpdump/tcpdump-stdinc.h
  user/ed/compiler-rt/contrib/tcpdump/tcpdump.c
  user/ed/compiler-rt/contrib/tcpdump/tftp.h
  user/ed/compiler-rt/contrib/tcpdump/timed.h
  user/ed/compiler-rt/contrib/tcpdump/token.h
  user/ed/compiler-rt/contrib/tcpdump/util.c
  user/ed/compiler-rt/contrib/tzcode/stdtime/asctime.c
  user/ed/compiler-rt/contrib/tzcode/stdtime/localtime.c
  user/ed/compiler-rt/contrib/tzcode/zic/zic.8
  user/ed/compiler-rt/contrib/tzcode/zic/zic.c
  user/ed/compiler-rt/etc/mtree/BSD.usr.dist
  user/ed/compiler-rt/include/unistd.h
  user/ed/compiler-rt/lib/libc/gen/sysconf.c
  user/ed/compiler-rt/lib/libc/mips/SYS.h
  user/ed/compiler-rt/lib/libc/stdlib/strtonum.3
  user/ed/compiler-rt/lib/libc/sys/chflags.2
  user/ed/compiler-rt/lib/libfetch/common.c
  user/ed/compiler-rt/lib/libjail/jail.c
  user/ed/compiler-rt/lib/libpcap/Makefile
  user/ed/compiler-rt/lib/libpcap/config.h
  user/ed/compiler-rt/lib/libthr/thread/thr_attr.c
  user/ed/compiler-rt/lib/libthr/thread/thr_mutex.c
  user/ed/compiler-rt/lib/libthr/thread/thr_private.h
  user/ed/compiler-rt/lib/libthr/thread/thr_sig.c
  user/ed/compiler-rt/libexec/rtld-elf/Makefile
  user/ed/compiler-rt/libexec/rtld-elf/ia64/reloc.c
  user/ed/compiler-rt/release/fixit.profile
  user/ed/compiler-rt/sbin/camcontrol/camcontrol.c
  user/ed/compiler-rt/sbin/geom/class/eli/geom_eli.c
  user/ed/compiler-rt/sbin/geom/class/part/geom_part.c
  user/ed/compiler-rt/sbin/geom/class/part/gpart.8
  user/ed/compiler-rt/sbin/hastd/hastd.c
  user/ed/compiler-rt/sbin/hastd/nv.c
  user/ed/compiler-rt/sbin/hastd/nv.h
  user/ed/compiler-rt/sbin/hastd/parse.y
  user/ed/compiler-rt/sbin/hastd/primary.c
  user/ed/compiler-rt/sbin/hastd/secondary.c
  user/ed/compiler-rt/sbin/hastd/synch.h
  user/ed/compiler-rt/sbin/mount_nfs/mount_nfs.c
  user/ed/compiler-rt/sbin/pflogd/Makefile
  user/ed/compiler-rt/share/examples/Makefile
  user/ed/compiler-rt/share/man/man3/pthread_attr_affinity_np.3
  user/ed/compiler-rt/share/man/man4/acpi.4
  user/ed/compiler-rt/share/man/man4/ada.4
  user/ed/compiler-rt/share/man/man4/re.4
  user/ed/compiler-rt/share/man/man5/nsmb.conf.5
  user/ed/compiler-rt/share/man/man7/build.7
  user/ed/compiler-rt/share/man/man9/Makefile
  user/ed/compiler-rt/share/man/man9/make_dev.9
  user/ed/compiler-rt/share/misc/committers-ports.dot
  user/ed/compiler-rt/sys/amd64/amd64/amd64_mem.c
  user/ed/compiler-rt/sys/amd64/amd64/fpu.c
  user/ed/compiler-rt/sys/amd64/amd64/intr_machdep.c
  user/ed/compiler-rt/sys/amd64/amd64/pmap.c
  user/ed/compiler-rt/sys/amd64/include/pmap.h
  user/ed/compiler-rt/sys/amd64/include/profile.h
  user/ed/compiler-rt/sys/boot/i386/boot2/boot2.c
  user/ed/compiler-rt/sys/boot/ofw/common/main.c
  user/ed/compiler-rt/sys/boot/ofw/libofw/ofw_memory.c
  user/ed/compiler-rt/sys/boot/ofw/libofw/ofw_net.c
  user/ed/compiler-rt/sys/boot/ofw/libofw/openfirm.c
  user/ed/compiler-rt/sys/boot/pc98/boot2/boot2.c
  user/ed/compiler-rt/sys/boot/sparc64/loader/main.c
  user/ed/compiler-rt/sys/cam/ata/ata_da.c
  user/ed/compiler-rt/sys/cam/cam_xpt.c
  user/ed/compiler-rt/sys/cam/scsi/scsi_da.c
  user/ed/compiler-rt/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  user/ed/compiler-rt/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/ed/compiler-rt/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  user/ed/compiler-rt/sys/conf/files
  user/ed/compiler-rt/sys/conf/files.amd64
  user/ed/compiler-rt/sys/conf/files.i386
  user/ed/compiler-rt/sys/conf/files.pc98
  user/ed/compiler-rt/sys/conf/options.amd64
  user/ed/compiler-rt/sys/dev/acpica/acpi.c
  user/ed/compiler-rt/sys/dev/ahci/ahci.c
  user/ed/compiler-rt/sys/dev/alc/if_alc.c
  user/ed/compiler-rt/sys/dev/bge/if_bge.c
  user/ed/compiler-rt/sys/dev/bge/if_bgereg.h
  user/ed/compiler-rt/sys/dev/e1000/if_em.c
  user/ed/compiler-rt/sys/dev/e1000/if_em.h
  user/ed/compiler-rt/sys/dev/fxp/if_fxp.c
  user/ed/compiler-rt/sys/dev/iwi/if_iwi.c
  user/ed/compiler-rt/sys/dev/mii/brgphy.c
  user/ed/compiler-rt/sys/dev/mii/mii_physubr.c
  user/ed/compiler-rt/sys/dev/mii/miidevs
  user/ed/compiler-rt/sys/dev/mii/miivar.h
  user/ed/compiler-rt/sys/dev/mii/mlphy.c
  user/ed/compiler-rt/sys/dev/mii/pnaphy.c
  user/ed/compiler-rt/sys/dev/mii/smcphy.c
  user/ed/compiler-rt/sys/dev/mii/tlphy.c
  user/ed/compiler-rt/sys/dev/pci/pci.c
  user/ed/compiler-rt/sys/dev/siis/siis.c
  user/ed/compiler-rt/sys/dev/sound/pcm/channel.c
  user/ed/compiler-rt/sys/dev/tl/if_tl.c
  user/ed/compiler-rt/sys/dev/tl/if_tlreg.h
  user/ed/compiler-rt/sys/dev/usb/controller/ehci.c
  user/ed/compiler-rt/sys/dev/usb/controller/ehcireg.h
  user/ed/compiler-rt/sys/dev/usb/usb_device.c
  user/ed/compiler-rt/sys/dev/usb/usb_freebsd.h
  user/ed/compiler-rt/sys/dev/usb/usb_hub.c
  user/ed/compiler-rt/sys/dev/usb/usbdi.h
  user/ed/compiler-rt/sys/dev/xen/blkback/blkback.c
  user/ed/compiler-rt/sys/fs/nfs/nfs_var.h
  user/ed/compiler-rt/sys/fs/nfs/nfsclstate.h
  user/ed/compiler-rt/sys/fs/nfs/nfsdport.h
  user/ed/compiler-rt/sys/fs/nfsclient/nfs_clnode.c
  user/ed/compiler-rt/sys/fs/nfsclient/nfs_clstate.c
  user/ed/compiler-rt/sys/fs/nfsclient/nfs_clvnops.c
  user/ed/compiler-rt/sys/fs/nfsserver/nfs_nfsdport.c
  user/ed/compiler-rt/sys/geom/eli/g_eli.c
  user/ed/compiler-rt/sys/geom/eli/g_eli.h
  user/ed/compiler-rt/sys/geom/eli/g_eli_ctl.c
  user/ed/compiler-rt/sys/geom/eli/g_eli_key.c
  user/ed/compiler-rt/sys/geom/part/g_part.c
  user/ed/compiler-rt/sys/geom/part/g_part.h
  user/ed/compiler-rt/sys/geom/part/g_part_gpt.c
  user/ed/compiler-rt/sys/geom/part/g_part_if.m
  user/ed/compiler-rt/sys/i386/i386/elan-mmcr.c
  user/ed/compiler-rt/sys/i386/i386/identcpu.c
  user/ed/compiler-rt/sys/i386/i386/initcpu.c
  user/ed/compiler-rt/sys/i386/i386/intr_machdep.c
  user/ed/compiler-rt/sys/i386/i386/longrun.c
  user/ed/compiler-rt/sys/i386/i386/perfmon.c
  user/ed/compiler-rt/sys/i386/include/profile.h
  user/ed/compiler-rt/sys/i386/isa/npx.c
  user/ed/compiler-rt/sys/kern/init_main.c
  user/ed/compiler-rt/sys/kern/kern_cpuset.c
  user/ed/compiler-rt/sys/kern/kern_exec.c
  user/ed/compiler-rt/sys/kern/kern_exit.c
  user/ed/compiler-rt/sys/kern/kern_fork.c
  user/ed/compiler-rt/sys/kern/kern_kthread.c
  user/ed/compiler-rt/sys/kern/kern_ktrace.c
  user/ed/compiler-rt/sys/kern/kern_shutdown.c
  user/ed/compiler-rt/sys/kern/kern_syscalls.c
  user/ed/compiler-rt/sys/kern/kern_thr.c
  user/ed/compiler-rt/sys/kern/sched_ule.c
  user/ed/compiler-rt/sys/kern/subr_acl_nfs4.c
  user/ed/compiler-rt/sys/kern/vfs_bio.c
  user/ed/compiler-rt/sys/net/bpf.h
  user/ed/compiler-rt/sys/net/if.c
  user/ed/compiler-rt/sys/netinet/if_ether.c
  user/ed/compiler-rt/sys/netinet/ip_ipsec.c
  user/ed/compiler-rt/sys/netinet6/ip6_ipsec.c
  user/ed/compiler-rt/sys/netipsec/ipsec_input.c
  user/ed/compiler-rt/sys/netipsec/ipsec_output.c
  user/ed/compiler-rt/sys/netipsec/key.c
  user/ed/compiler-rt/sys/netipsec/keydb.h
  user/ed/compiler-rt/sys/nfsclient/nfs_vfsops.c
  user/ed/compiler-rt/sys/pc98/pc98/machdep.c
  user/ed/compiler-rt/sys/powerpc/mambo/mambo_console.c
  user/ed/compiler-rt/sys/security/mac/mac_vfs.c
  user/ed/compiler-rt/sys/sparc64/sparc64/pmap.c
  user/ed/compiler-rt/sys/sparc64/sparc64/tick.c
  user/ed/compiler-rt/sys/sys/ktrace.h
  user/ed/compiler-rt/sys/ufs/ufs/ufs_dirhash.c
  user/ed/compiler-rt/sys/x86/x86/local_apic.c
  user/ed/compiler-rt/tools/tools/syscall_timing/syscall_timing.c
  user/ed/compiler-rt/usr.bin/lex/flex.skl
  user/ed/compiler-rt/usr.bin/unzip/unzip.1
  user/ed/compiler-rt/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c
  user/ed/compiler-rt/usr.sbin/config/main.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_config.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_drive.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_evt.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_flash.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_patrol.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_show.c
  user/ed/compiler-rt/usr.sbin/mfiutil/mfi_volume.c
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend-query/disk-info.sh
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend-query/query-langs.sh
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend-query/test-live.sh
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
  user/ed/compiler-rt/usr.sbin/pc-sysinstall/backend/functions.sh
  user/ed/compiler-rt/usr.sbin/rtadvd/rtadvd.conf.5
  user/ed/compiler-rt/usr.sbin/tcpdump/tcpdump/Makefile
  user/ed/compiler-rt/usr.sbin/usbconfig/usbconfig.c
Directory Properties:
  user/ed/compiler-rt/   (props changed)
  user/ed/compiler-rt/cddl/contrib/opensolaris/   (props changed)
  user/ed/compiler-rt/contrib/bind9/   (props changed)
  user/ed/compiler-rt/contrib/binutils/   (props changed)
  user/ed/compiler-rt/contrib/bzip2/   (props changed)
  user/ed/compiler-rt/contrib/ee/   (props changed)
  user/ed/compiler-rt/contrib/expat/   (props changed)
  user/ed/compiler-rt/contrib/file/   (props changed)
  user/ed/compiler-rt/contrib/gdb/   (props changed)
  user/ed/compiler-rt/contrib/gdtoa/   (props changed)
  user/ed/compiler-rt/contrib/gnu-sort/   (props changed)
  user/ed/compiler-rt/contrib/groff/   (props changed)
  user/ed/compiler-rt/contrib/less/   (props changed)
  user/ed/compiler-rt/contrib/libpcap/   (props changed)
  user/ed/compiler-rt/contrib/llvm/   (props changed)
  user/ed/compiler-rt/contrib/llvm/tools/clang/   (props changed)
  user/ed/compiler-rt/contrib/ncurses/   (props changed)
  user/ed/compiler-rt/contrib/netcat/   (props changed)
  user/ed/compiler-rt/contrib/ntp/   (props changed)
  user/ed/compiler-rt/contrib/one-true-awk/   (props changed)
  user/ed/compiler-rt/contrib/openbsm/   (props changed)
  user/ed/compiler-rt/contrib/openpam/   (props changed)
  user/ed/compiler-rt/contrib/pf/   (props changed)
  user/ed/compiler-rt/contrib/sendmail/   (props changed)
  user/ed/compiler-rt/contrib/tcpdump/   (props changed)
  user/ed/compiler-rt/contrib/tcsh/   (props changed)
  user/ed/compiler-rt/contrib/top/   (props changed)
  user/ed/compiler-rt/contrib/top/install-sh   (props changed)
  user/ed/compiler-rt/contrib/tzcode/stdtime/   (props changed)
  user/ed/compiler-rt/contrib/tzcode/zic/   (props changed)
  user/ed/compiler-rt/contrib/tzdata/   (props changed)
  user/ed/compiler-rt/contrib/wpa/   (props changed)
  user/ed/compiler-rt/contrib/xz/   (props changed)
  user/ed/compiler-rt/crypto/openssh/   (props changed)
  user/ed/compiler-rt/crypto/openssl/   (props changed)
  user/ed/compiler-rt/lib/libc/   (props changed)
  user/ed/compiler-rt/lib/libc/stdtime/   (props changed)
  user/ed/compiler-rt/lib/libutil/   (props changed)
  user/ed/compiler-rt/lib/libz/   (props changed)
  user/ed/compiler-rt/sbin/   (props changed)
  user/ed/compiler-rt/sbin/ipfw/   (props changed)
  user/ed/compiler-rt/share/mk/bsd.arch.inc.mk   (props changed)
  user/ed/compiler-rt/share/zoneinfo/   (props changed)
  user/ed/compiler-rt/sys/   (props changed)
  user/ed/compiler-rt/sys/amd64/include/xen/   (props changed)
  user/ed/compiler-rt/sys/cddl/contrib/opensolaris/   (props changed)
  user/ed/compiler-rt/sys/contrib/dev/acpica/   (props changed)
  user/ed/compiler-rt/sys/contrib/pf/   (props changed)
  user/ed/compiler-rt/sys/contrib/x86emu/   (props changed)
  user/ed/compiler-rt/sys/dev/xen/xenpci/   (props changed)
  user/ed/compiler-rt/usr.bin/calendar/   (props changed)
  user/ed/compiler-rt/usr.bin/csup/   (props changed)
  user/ed/compiler-rt/usr.bin/procstat/   (props changed)
  user/ed/compiler-rt/usr.sbin/zic/   (props changed)

Modified: user/ed/compiler-rt/UPDATING
==============================================================================
--- user/ed/compiler-rt/UPDATING	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/UPDATING	Sat Oct 30 13:25:41 2010	(r214555)
@@ -35,10 +35,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 20100915:
 	A workaround for a fixed ld bug has been removed in kernel code,
 	so make sure that your system ld is built from sources after
-	revision 210245 (r211583 if building head kernel on stable/8,
-	r211584 for stable/7).  A symptom of incorrect ld version is
-	different addresses for set_pcpu section and __start_set_pcpu
-	symbol in kernel and/or modules.
+	revision 210245 from 2010-07-19 (r211583 if building head kernel
+	on stable/8, r211584 for stable/7; both from 2010-08-21).
+	A symptom of incorrect ld version is different addresses for
+	set_pcpu section and __start_set_pcpu symbol in kernel and/or modules.
 
 20100913:
 	The $ipv6_prefer variable in rc.conf(5) has been split into

Modified: user/ed/compiler-rt/bin/rm/rm.1
==============================================================================
--- user/ed/compiler-rt/bin/rm/rm.1	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/rm/rm.1	Sat Oct 30 13:25:41 2010	(r214555)
@@ -231,6 +231,6 @@ The
 .Fl P
 option assumes that the underlying file system updates existing blocks
 in-place and does not store new data in a new location.
-This is true for UFS but not for ZFS, which is using a Copy-On-Write strategy.
-In addition, only regular files are overwritten, other types of files
-are not.
+This is true for UFS, but not for ZFS or other file systems which use
+copy-on-write semantics.
+In addition, only regular files are overwritten.

Modified: user/ed/compiler-rt/bin/sh/eval.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/eval.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/eval.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -1130,7 +1130,7 @@ commandcmd(int argc, char **argv)
 		return typecmd_impl(2, argv - 1, cmd, path);
 	}
 	if (argc != 0)
-		error("commandcmd() called while it should not be");
+		error("commandcmd bad call");
 
 	/*
 	 * Do nothing successfully if no command was specified;

Modified: user/ed/compiler-rt/bin/sh/expand.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/expand.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/expand.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -98,7 +98,7 @@ static struct arglist exparg;		/* holds 
 static void argstr(char *, int);
 static char *exptilde(char *, int);
 static void expbackq(union node *, int, int);
-static int subevalvar(char *, char *, int, int, int, int);
+static int subevalvar(char *, char *, int, int, int, int, int);
 static char *evalvar(char *, int);
 static int varisset(char *, int);
 static void varvalue(char *, int, int, int);
@@ -216,7 +216,12 @@ argstr(char *p, int flag)
 	char c;
 	int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);	/* do CTLESC */
 	int firsteq = 1;
+	int split_lit;
+	int lit_quoted;
 
+	split_lit = flag & EXP_SPLIT_LIT;
+	lit_quoted = flag & EXP_LIT_QUOTED;
+	flag &= ~(EXP_SPLIT_LIT | EXP_LIT_QUOTED);
 	if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE)))
 		p = exptilde(p, flag);
 	for (;;) {
@@ -225,17 +230,25 @@ argstr(char *p, int flag)
 		case CTLENDVAR:
 			goto breakloop;
 		case CTLQUOTEMARK:
+			lit_quoted = 1;
 			/* "$@" syntax adherence hack */
 			if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=')
 				break;
 			if ((flag & EXP_FULL) != 0)
 				STPUTC(c, expdest);
 			break;
+		case CTLQUOTEEND:
+			lit_quoted = 0;
+			break;
 		case CTLESC:
 			if (quotes)
 				STPUTC(c, expdest);
 			c = *p++;
 			STPUTC(c, expdest);
+			if (split_lit && !lit_quoted)
+				recordregion(expdest - stackblock() -
+				    (quotes ? 2 : 1),
+				    expdest - stackblock(), 0);
 			break;
 		case CTLVAR:
 			p = evalvar(p, flag);
@@ -255,18 +268,21 @@ argstr(char *p, int flag)
 			 * assignments (after the first '=' and after ':'s).
 			 */
 			STPUTC(c, expdest);
-			if (flag & EXP_VARTILDE && *p == '~') {
-				if (c == '=') {
-					if (firsteq)
-						firsteq = 0;
-					else
-						break;
-				}
+			if (split_lit && !lit_quoted)
+				recordregion(expdest - stackblock() - 1,
+				    expdest - stackblock(), 0);
+			if (flag & EXP_VARTILDE && *p == '~' &&
+			    (c != '=' || firsteq)) {
+				if (c == '=')
+					firsteq = 0;
 				p = exptilde(p, flag);
 			}
 			break;
 		default:
 			STPUTC(c, expdest);
+			if (split_lit && !lit_quoted)
+				recordregion(expdest - stackblock() - 1,
+				    expdest - stackblock(), 0);
 		}
 	}
 breakloop:;
@@ -510,7 +526,7 @@ expbackq(union node *cmd, int quoted, in
 
 static int
 subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
-  int varflags)
+  int varflags, int quotes)
 {
 	char *startp;
 	char *loc = NULL;
@@ -555,12 +571,12 @@ subevalvar(char *p, char *str, int strlo
 		for (loc = startp; loc < str; loc++) {
 			c = *loc;
 			*loc = '\0';
-			if (patmatch(str, startp, varflags & VSQUOTE)) {
+			if (patmatch(str, startp, quotes)) {
 				*loc = c;
 				goto recordleft;
 			}
 			*loc = c;
-			if ((varflags & VSQUOTE) && *loc == CTLESC)
+			if (quotes && *loc == CTLESC)
 				loc++;
 		}
 		return 0;
@@ -569,14 +585,13 @@ subevalvar(char *p, char *str, int strlo
 		for (loc = str - 1; loc >= startp;) {
 			c = *loc;
 			*loc = '\0';
-			if (patmatch(str, startp, varflags & VSQUOTE)) {
+			if (patmatch(str, startp, quotes)) {
 				*loc = c;
 				goto recordleft;
 			}
 			*loc = c;
 			loc--;
-			if ((varflags & VSQUOTE) && loc > startp &&
-			    *(loc - 1) == CTLESC) {
+			if (quotes && loc > startp && *(loc - 1) == CTLESC) {
 				for (q = startp; q < loc; q++)
 					if (*q == CTLESC)
 						q++;
@@ -588,14 +603,13 @@ subevalvar(char *p, char *str, int strlo
 
 	case VSTRIMRIGHT:
 		for (loc = str - 1; loc >= startp;) {
-			if (patmatch(str, loc, varflags & VSQUOTE)) {
+			if (patmatch(str, loc, quotes)) {
 				amount = loc - expdest;
 				STADJUST(amount, expdest);
 				return 1;
 			}
 			loc--;
-			if ((varflags & VSQUOTE) && loc > startp &&
-			    *(loc - 1) == CTLESC) {
+			if (quotes && loc > startp && *(loc - 1) == CTLESC) {
 				for (q = startp; q < loc; q++)
 					if (*q == CTLESC)
 						q++;
@@ -607,12 +621,12 @@ subevalvar(char *p, char *str, int strlo
 
 	case VSTRIMRIGHTMAX:
 		for (loc = startp; loc < str - 1; loc++) {
-			if (patmatch(str, loc, varflags & VSQUOTE)) {
+			if (patmatch(str, loc, quotes)) {
 				amount = loc - expdest;
 				STADJUST(amount, expdest);
 				return 1;
 			}
-			if ((varflags & VSQUOTE) && *loc == CTLESC)
+			if (quotes && *loc == CTLESC)
 				loc++;
 		}
 		return 0;
@@ -742,7 +756,8 @@ record:
 	case VSPLUS:
 	case VSMINUS:
 		if (!set) {
-			argstr(p, flag);
+			argstr(p, flag | (flag & EXP_FULL ? EXP_SPLIT_LIT : 0) |
+			    (varflags & VSQUOTE ? EXP_LIT_QUOTED : 0));
 			break;
 		}
 		if (easy)
@@ -762,7 +777,7 @@ record:
 		STPUTC('\0', expdest);
 		patloc = expdest - stackblock();
 		if (subevalvar(p, NULL, patloc, subtype,
-			       startloc, varflags) == 0) {
+		    startloc, varflags, quotes) == 0) {
 			int amount = (expdest - stackblock() - patloc) + 1;
 			STADJUST(-amount, expdest);
 		}
@@ -773,7 +788,8 @@ record:
 	case VSASSIGN:
 	case VSQUESTION:
 		if (!set) {
-			if (subevalvar(p, var, 0, subtype, startloc, varflags)) {
+			if (subevalvar(p, var, 0, subtype, startloc, varflags,
+			    quotes)) {
 				varflags &= ~VSNUL;
 				/*
 				 * Remove any recorded regions beyond
@@ -1495,13 +1511,13 @@ rmescapes(char *str)
 	char *p, *q;
 
 	p = str;
-	while (*p != CTLESC && *p != CTLQUOTEMARK) {
+	while (*p != CTLESC && *p != CTLQUOTEMARK && *p != CTLQUOTEEND) {
 		if (*p++ == '\0')
 			return;
 	}
 	q = p;
 	while (*p) {
-		if (*p == CTLQUOTEMARK) {
+		if (*p == CTLQUOTEMARK || *p == CTLQUOTEEND) {
 			p++;
 			continue;
 		}

Modified: user/ed/compiler-rt/bin/sh/expand.h
==============================================================================
--- user/ed/compiler-rt/bin/sh/expand.h	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/expand.h	Sat Oct 30 13:25:41 2010	(r214555)
@@ -52,6 +52,8 @@ struct arglist {
 #define	EXP_VARTILDE	0x4	/* expand tildes in an assignment */
 #define	EXP_REDIR	0x8	/* file glob for a redirection (1 match only) */
 #define EXP_CASE	0x10	/* keeps quotes around for CASE pattern */
+#define EXP_SPLIT_LIT	0x20	/* IFS split literal text ${v+-a b c} */
+#define EXP_LIT_QUOTED	0x40	/* for EXP_SPLIT_LIT, start off quoted */
 
 
 union node;

Modified: user/ed/compiler-rt/bin/sh/histedit.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/histedit.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/histedit.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -297,7 +297,7 @@ histcmd(int argc, char **argv)
 		laststr = argv[1];
 		break;
 	default:
-		error("too many args");
+		error("too many arguments");
 	}
 	/*
 	 * Turn into event numbers.
@@ -329,7 +329,7 @@ histcmd(int argc, char **argv)
 		editfile = editfilestr;
 		if ((efp = fdopen(fd, "w")) == NULL) {
 			close(fd);
-			error("can't allocate stdio buffer for temp");
+			error("Out of space");
 		}
 	}
 

Modified: user/ed/compiler-rt/bin/sh/mksyntax.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/mksyntax.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/mksyntax.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -75,6 +75,7 @@ struct synclass synclass[] = {
 	{ "CEOF",	"end of file" },
 	{ "CCTL",	"like CWORD, except it must be escaped" },
 	{ "CSPCL",	"these terminate a word" },
+	{ "CIGN",       "character should be ignored" },
 	{ NULL,		NULL }
 };
 
@@ -232,7 +233,7 @@ main(int argc __unused, char **argv __un
 	add("\n", "CNL");
 	add("\\", "CBACK");
 	add("`", "CBQUOTE");
-	add("\"", "CDQUOTE");
+	add("\"", "CIGN");
 	add("$", "CVAR");
 	add("}", "CENDVAR");
 	add("(", "CLP");
@@ -284,6 +285,7 @@ init(void)
 	syntax[base + CTLARI] = "CCTL";
 	syntax[base + CTLENDARI] = "CCTL";
 	syntax[base + CTLQUOTEMARK] = "CCTL";
+	syntax[base + CTLQUOTEEND] = "CCTL";
 }
 
 

Modified: user/ed/compiler-rt/bin/sh/parser.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/parser.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/parser.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
 #include "alias.h"
 #include "show.h"
 #include "eval.h"
+#include "exec.h"	/* to check for special builtins */
 #ifndef NO_HISTORY
 #include "myhistedit.h"
 #endif
@@ -105,7 +106,7 @@ static struct parser_temp *parser_temp;
 static int noaliases = 0;
 
 
-static union node *list(int);
+static union node *list(int, int);
 static union node *andor(void);
 static union node *pipeline(void);
 static union node *command(void);
@@ -219,18 +220,18 @@ parsecmd(int interact)
 	if (t == TNL)
 		return NULL;
 	tokpushback++;
-	return list(1);
+	return list(1, 1);
 }
 
 
 static union node *
-list(int nlflag)
+list(int nlflag, int erflag)
 {
 	union node *n1, *n2, *n3;
 	int tok;
 
 	checkkwd = 2;
-	if (nlflag == 0 && tokendlist[peektoken()])
+	if (!nlflag && !erflag && tokendlist[peektoken()])
 		return NULL;
 	n1 = NULL;
 	for (;;) {
@@ -276,7 +277,7 @@ list(int nlflag)
 				tokpushback++;
 			}
 			checkkwd = 2;
-			if (tokendlist[peektoken()])
+			if (!nlflag && !erflag && tokendlist[peektoken()])
 				return n1;
 			break;
 		case TEOF:
@@ -286,7 +287,7 @@ list(int nlflag)
 				pungetc();		/* push back EOF on input */
 			return n1;
 		default:
-			if (nlflag)
+			if (nlflag || erflag)
 				synexpect(-1);
 			tokpushback++;
 			return n1;
@@ -328,7 +329,7 @@ pipeline(void)
 {
 	union node *n1, *n2, *pipenode;
 	struct nodelist *lp, *prev;
-	int negate;
+	int negate, t;
 
 	negate = 0;
 	checkkwd = 2;
@@ -347,7 +348,13 @@ pipeline(void)
 		do {
 			prev = lp;
 			lp = (struct nodelist *)stalloc(sizeof (struct nodelist));
-			lp->n = command();
+			checkkwd = 2;
+			t = readtoken();
+			tokpushback++;
+			if (t == TNOT)
+				lp->n = pipeline();
+			else
+				lp->n = command();
 			prev->next = lp;
 		} while (readtoken() == TPIPE);
 		lp->next = NULL;
@@ -372,7 +379,7 @@ command(void)
 	union node *ap, **app;
 	union node *cp, **cpp;
 	union node *redir, **rpp;
-	int t, negate = 0;
+	int t;
 
 	checkkwd = 2;
 	redir = NULL;
@@ -387,34 +394,28 @@ command(void)
 	}
 	tokpushback++;
 
-	while (readtoken() == TNOT) {
-		TRACE(("command: TNOT recognized\n"));
-		negate = !negate;
-	}
-	tokpushback++;
-
 	switch (readtoken()) {
 	case TIF:
 		n1 = (union node *)stalloc(sizeof (struct nif));
 		n1->type = NIF;
-		if ((n1->nif.test = list(0)) == NULL)
+		if ((n1->nif.test = list(0, 0)) == NULL)
 			synexpect(-1);
 		if (readtoken() != TTHEN)
 			synexpect(TTHEN);
-		n1->nif.ifpart = list(0);
+		n1->nif.ifpart = list(0, 0);
 		n2 = n1;
 		while (readtoken() == TELIF) {
 			n2->nif.elsepart = (union node *)stalloc(sizeof (struct nif));
 			n2 = n2->nif.elsepart;
 			n2->type = NIF;
-			if ((n2->nif.test = list(0)) == NULL)
+			if ((n2->nif.test = list(0, 0)) == NULL)
 				synexpect(-1);
 			if (readtoken() != TTHEN)
 				synexpect(TTHEN);
-			n2->nif.ifpart = list(0);
+			n2->nif.ifpart = list(0, 0);
 		}
 		if (lasttoken == TELSE)
-			n2->nif.elsepart = list(0);
+			n2->nif.elsepart = list(0, 0);
 		else {
 			n2->nif.elsepart = NULL;
 			tokpushback++;
@@ -428,13 +429,13 @@ command(void)
 		int got;
 		n1 = (union node *)stalloc(sizeof (struct nbinary));
 		n1->type = (lasttoken == TWHILE)? NWHILE : NUNTIL;
-		if ((n1->nbinary.ch1 = list(0)) == NULL)
+		if ((n1->nbinary.ch1 = list(0, 0)) == NULL)
 			synexpect(-1);
 		if ((got=readtoken()) != TDO) {
 TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
 			synexpect(TDO);
 		}
-		n1->nbinary.ch2 = list(0);
+		n1->nbinary.ch2 = list(0, 0);
 		if (readtoken() != TDONE)
 			synexpect(TDONE);
 		checkkwd = 1;
@@ -486,7 +487,7 @@ TRACE(("expecting DO got %s %s\n", tokna
 			t = TEND;
 		else
 			synexpect(-1);
-		n1->nfor.body = list(0);
+		n1->nfor.body = list(0, 0);
 		if (readtoken() != t)
 			synexpect(t);
 		checkkwd = 1;
@@ -526,7 +527,7 @@ TRACE(("expecting DO got %s %s\n", tokna
 			ap->narg.next = NULL;
 			if (lasttoken != TRP)
 				noaliases = 0, synexpect(TRP);
-			cp->nclist.body = list(0);
+			cp->nclist.body = list(0, 0);
 
 			checkkwd = 2;
 			if ((t = readtoken()) != TESAC) {
@@ -544,14 +545,14 @@ TRACE(("expecting DO got %s %s\n", tokna
 	case TLP:
 		n1 = (union node *)stalloc(sizeof (struct nredir));
 		n1->type = NSUBSHELL;
-		n1->nredir.n = list(0);
+		n1->nredir.n = list(0, 0);
 		n1->nredir.redirect = NULL;
 		if (readtoken() != TRP)
 			synexpect(TRP);
 		checkkwd = 1;
 		break;
 	case TBEGIN:
-		n1 = list(0);
+		n1 = list(0, 0);
 		if (readtoken() != TEND)
 			synexpect(TEND);
 		checkkwd = 1;
@@ -573,7 +574,7 @@ TRACE(("expecting DO got %s %s\n", tokna
 	case TRP:
 		tokpushback++;
 		n1 = simplecmd(rpp, redir);
-		goto checkneg;
+		return n1;
 	default:
 		synexpect(-1);
 	}
@@ -596,15 +597,7 @@ TRACE(("expecting DO got %s %s\n", tokna
 		n1->nredir.redirect = redir;
 	}
 
-checkneg:
-	if (negate) {
-		n2 = (union node *)stalloc(sizeof (struct nnot));
-		n2->type = NNOT;
-		n2->nnot.com = n1;
-		return n2;
-	}
-	else
-		return n1;
+	return n1;
 }
 
 
@@ -614,6 +607,7 @@ simplecmd(union node **rpp, union node *
 	union node *args, **app;
 	union node **orig_rpp = rpp;
 	union node *n = NULL;
+	int special;
 
 	/* If we don't have any redirections already, then we must reset */
 	/* rpp to be the address of the local redir variable.  */
@@ -647,10 +641,21 @@ simplecmd(union node **rpp, union node *
 			if (readtoken() != TRP)
 				synexpect(TRP);
 			funclinno = plinno;
-#ifdef notdef
-			if (! goodname(n->narg.text))
+			/*
+			 * - Require plain text.
+			 * - Functions with '/' cannot be called.
+			 * - Reject name=().
+			 * - Reject ksh extended glob patterns.
+			 */
+			if (!noexpand(n->narg.text) || quoteflag ||
+			    strchr(n->narg.text, '/') ||
+			    strchr("!%*+-=?@}~",
+				n->narg.text[strlen(n->narg.text) - 1]))
 				synerror("Bad function name");
-#endif
+			rmescapes(n->narg.text);
+			if (find_builtin(n->narg.text, &special) >= 0 &&
+			    special)
+				synerror("Cannot override a special builtin with a function");
 			n->type = NDEFUN;
 			n->narg.next = command();
 			funclinno = 0;
@@ -1065,7 +1070,7 @@ done:
 		doprompt = 0;
 	}
 
-	n = list(0);
+	n = list(0, oldstyle);
 
 	if (oldstyle)
 		doprompt = saveprompt;
@@ -1160,7 +1165,7 @@ readtoken1(int firstc, char const *initi
 	loop: {	/* for each line, until end of word */
 		CHECKEND();	/* set c to PEOF if at end of here document */
 		for (;;) {	/* until end of line or end of word */
-			CHECKSTRSPACE(3, out);	/* permit 3 calls to USTPUTC */
+			CHECKSTRSPACE(4, out);	/* permit 4 calls to USTPUTC */
 
 			synentry = state[level].syntax[c];
 
@@ -1202,12 +1207,18 @@ readtoken1(int firstc, char const *initi
 						newvarnest == 0)) &&
 					    (c != '}' || state[level].category != TSTATE_VAR_OLD))
 						USTPUTC('\\', out);
+					if ((eofmark == NULL ||
+					    newvarnest > 0) &&
+					    state[level].syntax == BASESYNTAX)
+						USTPUTC(CTLQUOTEMARK, out);
 					if (SQSYNTAX[c] == CCTL)
 						USTPUTC(CTLESC, out);
-					else if (eofmark == NULL ||
-					    newvarnest > 0)
-						USTPUTC(CTLQUOTEMARK, out);
 					USTPUTC(c, out);
+					if ((eofmark == NULL ||
+					    newvarnest > 0) &&
+					    state[level].syntax == BASESYNTAX &&
+					    state[level].category == TSTATE_VAR_OLD)
+						USTPUTC(CTLQUOTEEND, out);
 					quotef++;
 				}
 				break;
@@ -1223,10 +1234,9 @@ readtoken1(int firstc, char const *initi
 				if (eofmark != NULL && newvarnest == 0)
 					USTPUTC(c, out);
 				else {
-					if (state[level].category == TSTATE_ARITH)
-						state[level].syntax = ARISYNTAX;
-					else
-						state[level].syntax = BASESYNTAX;
+					if (state[level].category == TSTATE_VAR_OLD)
+						USTPUTC(CTLQUOTEEND, out);
+					state[level].syntax = BASESYNTAX;
 					quotef++;
 				}
 				break;
@@ -1235,11 +1245,12 @@ readtoken1(int firstc, char const *initi
 				break;
 			case CENDVAR:	/* '}' */
 				if (level > 0 &&
-				    (state[level].category == TSTATE_VAR_OLD ||
-				    state[level].category == TSTATE_VAR_NEW)) {
-					if (state[level].category == TSTATE_VAR_OLD)
-						state[level - 1].syntax = state[level].syntax;
-					else
+				    ((state[level].category == TSTATE_VAR_OLD &&
+				      state[level].syntax ==
+				      state[level - 1].syntax) ||
+				    (state[level].category == TSTATE_VAR_NEW &&
+				     state[level].syntax == BASESYNTAX))) {
+					if (state[level].category == TSTATE_VAR_NEW)
 						newvarnest--;
 					level--;
 					USTPUTC(CTLENDVAR, out);
@@ -1281,6 +1292,8 @@ readtoken1(int firstc, char const *initi
 				break;
 			case CEOF:
 				goto endword;		/* exit outer loop */
+			case CIGN:
+				break;
 			default:
 				if (level == 0)
 					goto endword;	/* exit outer loop */
@@ -1725,7 +1738,7 @@ getprompt(void *unused __unused)
 	char *fmt;
 	const char *pwd;
 	int i, trim;
-	static char internal_error[] = "<internal prompt error>";
+	static char internal_error[] = "??";
 
 	/*
 	 * Select prompt format.

Modified: user/ed/compiler-rt/bin/sh/parser.h
==============================================================================
--- user/ed/compiler-rt/bin/sh/parser.h	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/parser.h	Sat Oct 30 13:25:41 2010	(r214555)
@@ -43,6 +43,7 @@
 #define	CTLARI	'\206'
 #define	CTLENDARI '\207'
 #define	CTLQUOTEMARK '\210'
+#define	CTLQUOTEEND '\211' /* only for ${v+-...} */
 
 /* variable substitution byte (follows CTLVAR) */
 #define VSTYPE		0x0f	/* type of variable substitution */

Modified: user/ed/compiler-rt/bin/sh/redir.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/redir.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/redir.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -217,8 +217,11 @@ movefd:
 		if (redir->ndup.dupfd >= 0) {	/* if not ">&-" */
 			if (memory[redir->ndup.dupfd])
 				memory[fd] = 1;
-			else
-				dup2(redir->ndup.dupfd, fd);
+			else {
+				if (dup2(redir->ndup.dupfd, fd) < 0)
+					error("%d: %s", redir->ndup.dupfd,
+							strerror(errno));
+			}
 		} else {
 			close(fd);
 		}

Modified: user/ed/compiler-rt/bin/sh/var.c
==============================================================================
--- user/ed/compiler-rt/bin/sh/var.c	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/bin/sh/var.c	Sat Oct 30 13:25:41 2010	(r214555)
@@ -826,7 +826,7 @@ setvarcmd(int argc, char **argv)
 	else if (argc == 3)
 		setvar(argv[1], argv[2], 0);
 	else
-		error("List assignment not implemented");
+		error("too many arguments");
 	return 0;
 }
 

Modified: user/ed/compiler-rt/cddl/lib/drti/Makefile
==============================================================================
--- user/ed/compiler-rt/cddl/lib/drti/Makefile	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/cddl/lib/drti/Makefile	Sat Oct 30 13:25:41 2010	(r214555)
@@ -16,6 +16,6 @@ CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/
 		-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
 		-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
 		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
-		-DPIC -fpic
+		-DPIC ${PICFLAG}
 
 .include <bsd.prog.mk>

Modified: user/ed/compiler-rt/contrib/bsnmp/snmpd/bsnmpd.1
==============================================================================
--- user/ed/compiler-rt/contrib/bsnmp/snmpd/bsnmpd.1	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/bsnmp/snmpd/bsnmpd.1	Sat Oct 30 13:25:41 2010	(r214555)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $
 .\"
-.Dd August 16, 2010
+.Dd October 23, 2010
 .Dt BSNMPD 1
 .Os
 .Sh NAME
@@ -68,11 +68,9 @@ Use
 .Ar file
 as configuration file instead of the standard one.
 .It Fl D Ar options
-Debugging options are specified with a
-.Fl o
-flag followed by a comma separated string of options.
+Debugging options are specified as a comma separated string.
 The following options are available.
-.Bl -tag -width ".It Cm trace Ns Cm = Ns Cm level"
+.Bl -tag -width "trace=level"
 .It Cm dump
 Dump all sent and received PDUs to the terminal.
 .It Cm events

Modified: user/ed/compiler-rt/contrib/ipfilter/tools/ipf_y.y
==============================================================================
--- user/ed/compiler-rt/contrib/ipfilter/tools/ipf_y.y	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/ipfilter/tools/ipf_y.y	Sat Oct 30 13:25:41 2010	(r214555)
@@ -10,8 +10,6 @@
 #include <sys/ioctl.h>
 #include <syslog.h>
 #ifdef IPFILTER_BPF
-# include "pcap-bpf.h"
-# define _NET_BPF_H_
 # include <pcap.h>
 #endif
 #include "netinet/ip_pool.h"

Modified: user/ed/compiler-rt/contrib/libpcap/CHANGES
==============================================================================
--- user/ed/compiler-rt/contrib/libpcap/CHANGES	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/libpcap/CHANGES	Sat Oct 30 13:25:41 2010	(r214555)
@@ -1,4 +1,77 @@
-@(#) $Header: /tcpdump/master/libpcap/CHANGES,v 1.67.2.4 2008-10-28 00:27:42 ken Exp $ (LBL)
+Thu.    April 1, 2010.  guy@alum.mit.edu.
+Summary for 1.1.1 libpcap release
+	Update CHANGES to reflect more of the changes in 1.1.0.
+	Fix build on RHEL5.
+	Fix shared library build on AIX.
+
+Thu.	March 11, 2010.  ken@netfunctional.ca/guy@alum.mit.edu.
+Summary for 1.1.0 libpcap release
+	Add SocketCAN capture support
+	Add Myricom SNF API support
+	Update Endace DAG and ERF support
+	Add support for shared libraries on Solaris, HP-UX, and AIX
+	Build, install, and un-install shared libraries by default;
+	  don't build/install shared libraries on platforms we don't support
+	Fix building from a directory other than the source directory
+	Fix compiler warnings and builds on some platforms
+	Update config.guess and config.sub
+	Support monitor mode on mac80211 devices on Linux
+	Fix USB memory-mapped capturing on Linux; it requires a new DLT_
+	  value
+	On Linux, scan /sys/class/net for devices if we have it; scan
+	  it, or /proc/net/dev if we don't have /sys/class/net, even if
+	  we have getifaddrs(), as it'll find interfaces with no
+	  addresses
+	Add limited support for reading pcap-ng files
+	Fix BPF driver-loading error handling on AIX
+	Support getting the full-length interface description on FreeBSD
+	In the lexical analyzer, free up any addrinfo structure we got back
+	  from getaddrinfo().
+	Add support for BPF and libdlpi in OpenSolaris (and SXCE)
+	Hyphenate "link-layer" everywhere
+	Add /sys/kernel/debug/usb/usbmon to the list of usbmon locations
+	In pcap_read_linux_mmap(), if there are no frames available, call
+	  poll() even if we're in non-blocking mode, so we pick up
+	  errors, and check for the errors in question.
+	Note that poll() works on BPF devices is Snow Leopard
+	If an ENXIO or ENETDOWN is received, it may mean the device has
+	  gone away.  Deal with it.
+	For BPF, raise the default capture buffer size to from 32k to 512k
+	Support ps_ifdrop on Linux
+	Added a bunch of #ifdef directives to make wpcap.dll (WinPcap) compile
+	 under cygwin.
+	Changes to Linux mmapped captures.
+	Fix bug where create_ring would fail for particular snaplen and
+	  buffer size combinations
+	Update pcap-config so that it handles libpcap requiring
+	  additional libraries
+	Add workaround for threadsafeness on Windows
+	Add missing mapping for DLT_ENC <-> LINKTYPE_ENC
+	DLT: Add DLT_CAN_SOCKETCAN
+	DLT: Add Solaris ipnet
+	Don't check for DLT_IPNET if it's not defined
+	Add link-layer types for Fibre Channel FC-2
+	Add link-layer types for Wireless HART
+	Add link-layer types for AOS
+	Add link-layer types for DECT
+	Autoconf fixes (AIX, HP-UX, OSF/1, Tru64 cleanups)
+	Install headers unconditionally, and include vlan.h/bluetooth.h if
+	  enabled
+	Autoconf fixes+cleanup
+	Support enabling/disabling bluetooth (--{en,dis}able-bluetooth)
+	Support disabling SITA support (--without-sita)
+	Return -1 on failure to create packet ring (if supported but
+	  creation failed)
+	Fix handling of 'any' device, so that it can be opened, and no longer
+	  attempt to open it in Monitor mode
+	Add support for snapshot length for USB Memory-Mapped Interface
+	Fix configure and build on recent Linux kernels
+	Fix memory-mapped Linux capture to support pcap_next() and
+	  pcap_next_ex()
+	Fixes for Linux USB capture
+	DLT: Add DLT_LINUX_EVDEV
+	DLT: Add DLT_GSMTAP_UM
+	DLT: Add DLT_GSMTAP_ABIS
 
 Mon.    October 27, 2008.  ken@netfunctional.ca.  Summary for 1.0.0 libpcap release
 	Compile with IPv6 support by default
@@ -12,7 +85,10 @@ Mon.    October 27, 2008.  ken@netfuncti
 	Variable length 802.11 header support
 	X2E data type support 
 	SITA ACN Interface support - see README.sita
+	Support for memory-mapped capture on Linux
 	Support for zerocopy BPF on platforms that support it
+	Support for setting buffer size when opening devices
+	Support for setting monitor mode when opening 802.11 devices
 	Better support for dealing with VLAN tagging/stripping on Linux
 	Fix dynamic library support on OSX
 	Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so applications
@@ -22,7 +98,7 @@ Mon.    October 27, 2008.  ken@netfuncti
 	On Linux, ignore ENETDOWN so we can continue to capture packets if the 
 	 interface goes down and comes back up again.
 	On Linux, support new tpacket frame headers (2.6.27+)
-	On Mac OS X, add scripts for changing permissions on /dev/pbf* and launchd plist
+	On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist
 	On Solaris, support 'passive mode' on systems that support it
 	Fixes to autoconf and general build environment
 	Man page reorganization + cleanup

Modified: user/ed/compiler-rt/contrib/libpcap/CREDITS
==============================================================================
--- user/ed/compiler-rt/contrib/libpcap/CREDITS	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/libpcap/CREDITS	Sat Oct 30 13:25:41 2010	(r214555)
@@ -10,9 +10,10 @@ The current maintainers:
 Additional people who have contributed patches:
 
 	Alan Bawden			<Alan at LCS dot MIT dot EDU>
+	Albert Chin			<china at thewrittenword dot com>
 	Alexander 'Leo' Bergolth	<Leo dot Bergolth at wu-wien dot ac dot at>
 	Alexey Kuznetsov		<kuznet at ms2 dot inr dot ac dot ru>
-	Albert Chin			<china at thewrittenword dot com>
+	Alon Bar-Lev			<alonbl at sourceforge dot net>
 	Andrew Brown			<atatat at atatdot dot net>
 	Antti Kantee			<pooka at netbsd dot org>
 	Arien Vijn			<arienvijn at sourceforge dot net>
@@ -23,24 +24,28 @@ Additional people who have contributed p
 	Charles M. Hannum		<mycroft at netbsd dot org>
 	Chris G. Demetriou		<cgd at netbsd dot org>
 	Chris Lightfoot			<cwrl at users dot sourceforge dot net>
+	Chris Maynard			<Chris dot Maynard at gtech dot com>
 	Chris Pepper			<pepper at mail dot reppep dot com>
+	Christian Bell			<csbell at myri dot com>
 	Christian Peron			<csjp at freebsd dot org>
 	Daniele Orlandi			<daniele at orlandi dot com>
-	Darren Reed			<darrenr at reed dot wattle dot id dot au>
+	Darren Reed			<darrenr at sun dot com>
 	David Kaelbling			<drk at sgi dot com>
 	David Young			<dyoung at ojctech dot com>
 	Dean Gaudet			<dean at arctic dot org>
 	Don Ebright			<Don dot Ebright at compuware dot com> 
 	Dug Song			<dugsong at monkey dot org>
+	Dustin Spicuzza			<dustin at virtualroadside dot com>
 	Eric Anderson			<anderse at hpl dot hp dot com>
 	Erik de Castro Lopo		<erik dot de dot castro dot lopo at sensorynetworks dot com>
+	Felix Obenhuber			<felix at obenhuber dot de>
 	Florent Drouin			<Florent dot Drouin at alcatel-lucent dot fr>
 	Franz Schaefer			<schaefer at mond dot at>
 	Fulko Hew			<fulko dot hew at gmail dot com>
+	Fumiyuki Shimizu		<fumifumi at abacustech dot jp>
 	Gianluca Varenni		<varenni at netgroup-serv dot polito dot it>
 	Gilbert Hoyek			<gil_hoyek at hotmail dot com>
 	Gisle Vanem			<gvanem at broadpark dot no>
-	Gisle Vanem			<giva at bgnett dot no>
 	Graeme Hewson			<ghewson at cix dot compulink dot co dot uk>
 	Greg Stark			<gsstark at mit dot edu>
 	Greg Troxel			<gdt at ir dot bbn dot com>
@@ -53,11 +58,13 @@ Additional people who have contributed p
 	Jason R. Thorpe			<thorpej at netbsd dot org>
 	Javier Achirica			<achirica at ttd dot net>
 	Jean Tourrilhes			<jt at hpl dot hp dot com>
+	Jean-Louis Charton		<Jean-Louis.CHARTON at oikialog dot com>
 	Jefferson Ogata			<jogata at nodc dot noaa dot gov>
 	Jesper Peterson			<jesper at endace dot com>
 	Joerg Mayer			<jmayer at loplof dot de>
 	John Bankier			<jbankier at rainfinity dot com>
 	Jon Lindgren			<jonl at yubyub dot net>
+	Jon Smirl			<jonsmirl at gmail dot com>
 	Juergen Schoenwaelder		<schoenw at ibr dot cs dot tu-bs dot de>
 	Jung-uk Kim			<jkim at FreeBSD dot org>
 	Kazushi Sugyo			<sugyo at pb dot jp dot nec dot com>
@@ -67,19 +74,22 @@ Additional people who have contributed p
 	Krzysztof Halasa		<khc at pm dot waw dot pl>
 	Lorenzo Cavallaro		<sullivan at sikurezza dot org>
 	Loris Degioanni			<loris at netgroup-serv dot polito dot it>
-	Love Hörnquist-Åstrand		<lha at stacken dot kth dot se>
+	Love Hörnquist-Åstrand		<lha at stacken dot kth dot se>
 	Luis Martin Garcia		<luis dot mgarc at gmail dot com>
 	Maciej W. Rozycki		<macro at ds2 dot pg dot gda dot pl>
 	Marcus Felipe Pereira		<marcus at task dot com dot br>
 	Mark C. Brown			<mbrown at hp dot com>
 	Mark Pizzolato			<List-tcpdump-workers at subscriptions dot pizzolato dot net>
+	Markus Mayer			<markus_mayer at sourceforge dot net>
 	Martin Husemann			<martin at netbsd dot org>
+	Márton Németh			<nm127 at freemail dot hu>
 	Matthew Luckie			<mjl at luckie dot org dot nz>
 	Max Laier			<max at love2party dot net>
 	Mike Frysinger			<vapier at gmail dot com>
 	Mike Kershaw			<dragorn at kismetwireless dot net>
 	Mike Wiacek			<mike at iroot dot net>
 	Monroe Williams			<monroe at pobox dot com>
+	N. Leiten			<nleiten at sourceforge dot net>
 	Nicolas Dade			<ndade at nsd dot dyndns dot org>
 	Octavian Cerna			<tavy at ylabs dot com>
 	Olaf Kirch			<okir at caldera dot de>
@@ -93,15 +103,20 @@ Additional people who have contributed p
 	Pawel Pokrywka			<publicpp at gmail dot com>
 	Peter Fales			<peter at fales-lorenz dot net>
 	Peter Jeremy			<peter dot jeremy at alcatel dot com dot au>
+	Peter Volkov			<pva at gentoo dot org>
 	Phil Wood			<cpw at lanl dot gov>
 	Rafal Maszkowski		<rzm at icm dot edu dot pl>
 					<rcb-isis at users dot sourceforge dot net>
 	Richard Stearn			<richard at rns-stearn dot demon dot co dot uk>
 	Rick Jones			<raj at cup dot hp dot com>
+	Robert Edmonds			<stu-42 at sourceforge dot net>
+	Roberto Mariani			<jelot-tcpdump at jelot dot it>
+	Romain Francoise		<rfrancoise at debian dot org>
 	Sagun Shakya			<sagun dot shakya at sun dot com>
 	Scott Barron			<sb125499 at ohiou dot edu>
 	Scott Gifford			<sgifford at tir dot com>
 	Sebastian Krahmer		<krahmer at cs dot uni-potsdam dot de>
+	Sebastien Roy			<Sebastien dot Roy at Sun dot COM>
 	Sepherosa Ziehau		<sepherosa at gmail dot com>
 	Shaun Clowes			<delius at progsoc dot uts dot edu dot au>
 	Solomon Peachy			<pizza at shaftnet dot org>
@@ -109,12 +124,16 @@ Additional people who have contributed p
 	Stephen Donnelly		<stephen at endace dot com>
 	Takashi Yamamoto		<yamt at mwd dot biglobe dot ne dot jp>
 	Tanaka Shin-ya			<zstanaka at archer dot livedoor dot com>
+	Tobias Poschwatta		<posch at sourceforge dot net>
 	Tony Li				<tli at procket dot com>
 	Torsten Landschoff	 	<torsten at debian dot org>
 	Uns Lider			<unslider at miranda dot org>
 	Uwe Girlich			<Uwe dot Girlich at philosys dot de>
+	Wesley Shields			<wxs at FreeBSD dot org>
 	Xianjie Zhang			<xzhang at cup dot hp dot com>
+	Xin Li				<delphij at FreeBSD dot org>
 	Yen Yen Lim
+	Yvan Vanhullebus		<vanhu at sourceforge dot net>
 	Yoann Vandoorselaere		<yoann at prelude-ids dot org>
 
 The original LBL crew:

Modified: user/ed/compiler-rt/contrib/libpcap/INSTALL.txt
==============================================================================
--- user/ed/compiler-rt/contrib/libpcap/INSTALL.txt	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/libpcap/INSTALL.txt	Sat Oct 30 13:25:41 2010	(r214555)
@@ -1,4 +1,4 @@
-@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.21.2.8 2008-06-12 20:25:38 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.29 2008-06-12 20:21:51 guy Exp $ (LBL)
 
 To build libpcap, run "./configure" (a shell script). The configure
 script will determine your system attributes and generate an

Modified: user/ed/compiler-rt/contrib/libpcap/Makefile.in
==============================================================================
--- user/ed/compiler-rt/contrib/libpcap/Makefile.in	Sat Oct 30 12:39:51 2010	(r214554)
+++ user/ed/compiler-rt/contrib/libpcap/Makefile.in	Sat Oct 30 13:25:41 2010	(r214555)
@@ -17,7 +17,7 @@
 #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.108.2.28 2008-10-23 22:13:21 guy Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL)
 
 #
 # Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -44,14 +44,17 @@ VPATH = @srcdir@
 # You shouldn't need to edit anything below.
 #
 
+LD = /usr/bin/ld
 CC = @CC@
 CCOPT = @V_CCOPT@
 INCLS = -I. @V_INCLS@
 DEFS = @DEFS@ @V_DEFS@
-LIBS = @V_LIBS@
-DAGLIBS = @DAGLIBS@
-DEPLIBS = @DEPLIBS@
+ADDLOBJS = @ADDLOBJS@
+ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
+LIBS = @LIBS@
+LDFLAGS = @LDFLAGS@
 DYEXT = @DYEXT@
+V_RPATH_OPT = @V_RPATH_OPT@
 PROG=libpcap
 
 # Standard CFLAGS
@@ -77,12 +80,13 @@ YACC = @V_YACC@
 	@rm -f $@
 	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
 
-PSRC =	pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
+PSRC =	pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@
 FSRC =  fad-@V_FINDALLDEVS@.c
 SSRC =  @SSRC@
-CSRC =	pcap.c inet.c gencode.c optimize.c nametoaddr.c \
-	etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
-GENSRC = scanner.c grammar.c version.c
+CSRC =	pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
+	savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
+	bpf_image.c bpf_dump.c
+GENSRC = scanner.c grammar.c bpf_filter.c version.c
 LIBOBJS = @LIBOBJS@
 
 SRC =	$(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
@@ -90,8 +94,20 @@ SRC =	$(PSRC) $(FSRC) $(CSRC) $(SSRC) $(
 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
 # hack the extra indirection
 OBJ =	$(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
-HDR = \
-	acconfig.h \
+PUBHDR = \
+	pcap.h \
+	pcap-bpf.h \
+	pcap-namedb.h \

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Sat Oct 30 22:50:15 2010
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2BB541065673;
	Sat, 30 Oct 2010 22:50:15 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0885C8FC13;
	Sat, 30 Oct 2010 22:50:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9UMoEcm028656;
	Sat, 30 Oct 2010 22:50:14 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9UMoE9i028654;
	Sat, 30 Oct 2010 22:50:14 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201010302250.o9UMoE9i028654@svn.freebsd.org>
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 30 Oct 2010 22:50:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r214569 - user/dougb/portmaster
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Oct 2010 22:50:15 -0000

Author: dougb
Date: Sat Oct 30 22:50:14 2010
New Revision: 214569
URL: http://svn.freebsd.org/changeset/base/214569

Log:
  dep_of_deps can be null, so provide a default value in the +IGNOREME test

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Oct 30 21:01:54 2010	(r214568)
+++ user/dougb/portmaster/portmaster	Sat Oct 30 22:50:14 2010	(r214569)
@@ -2928,7 +2928,7 @@ if [ -e "$pdb/$upg_port/+IGNOREME" ]; th
 				case "$answer" in
 				[yY]) ;;	# Let it build
 				*)	CUR_DEPS="${CUR_DEPS}${upg_port}:${portdir}:"
-					if [ $dep_of_deps -gt 0 ]; then
+					if [ ${dep_of_deps:-0} -gt 0 ]; then
 						dep_of_deps=$(( $dep_of_deps - 1 ))
 						if [ -n "$PM_FIRST_PASS" ]; then
 							num_of_deps=$(( $num_of_deps - 1 ))