Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 21:43:05 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 1187258 for review
Message-ID:  <201310222143.r9MLh5T6069145@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1187258?ac=10

Change 1187258 by brooks@brooks_zenith on 2013/10/22 21:42:13

	IFC@1185296
	
	Nearly done merging BERI changes.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/Makefile.inc1#16 integrate
.. //depot/projects/ctsrd/beribsd/src/contrib/gcclibs/libssp/ssp.c#2 integrate
.. //depot/projects/ctsrd/beribsd/src/etc/netstart#3 integrate
.. //depot/projects/ctsrd/beribsd/src/etc/rc.d/rtadvd#4 integrate
.. //depot/projects/ctsrd/beribsd/src/share/man/man4/Makefile#21 integrate
.. //depot/projects/ctsrd/beribsd/src/share/man/man4/ahci.4#5 integrate
.. //depot/projects/ctsrd/beribsd/src/share/man/man4/isf.4#4 delete
.. //depot/projects/ctsrd/beribsd/src/share/man/man9/disk.9#4 integrate
.. //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#14 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/a10_wdog.c#2 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/arm/broadcom/bcm2835/bcm2835_wdog.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beri-sim.dts#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#28 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cam/ata/ata_da.c#11 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cam/cam_periph.c#9 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cam/cam_xpt.c#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_da.c#12 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c#9 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c#8 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/conf/files#24 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/conf/files.powerpc#12 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/aha/aha.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/buslogic/bt.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_nexus.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_common.c#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_mips.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_pci.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_powerpc.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdtbus.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.c#15 delete
.. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf.h#11 delete
.. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_fdt.c#6 delete
.. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_nexus.c#9 delete
.. //depot/projects/ctsrd/beribsd/src/sys/dev/md/md.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ofw/ofw_fdt.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/xen/netback/netback.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/concat/g_concat.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/concat/g_concat.h#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/gate/g_gate.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom.h#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_dev.c#9 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_disk.c#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_disk.h#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_int.h#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_io.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_kern.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_slice.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/geom_vfs.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/mirror/g_mirror.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/mirror/g_mirror.h#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/multipath/g_multipath.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/nop/g_nop.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/nop/g_nop.h#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/part/g_part.c#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/g_raid.c#9 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_ddf.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_intel.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_jmicron.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_nvidia.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_promise.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/raid/md_sii.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/stripe/g_stripe.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/stripe/g_stripe.h#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/geom/zero/g_zero.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/kern/kern_conf.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/kern/subr_devstat.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/beri_pic.c#10 edit
.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#34 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#26 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_BASE#8 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_MDROOT#14 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4_SDROOT#13 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SIM_BASE#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SIM_MDROOT#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SIM_SDROOT#2 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_TEMPLATE#10 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/booke/pmap.c#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/mambo/mambo_openpic.c#3 delete
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/ofw/openpic_ofw.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/powermac/openpic_macio.c#3 delete
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/powerpc/nexus.c#2 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/powerpc/powerpc/openpic_fdt.c#3 delete
.. //depot/projects/ctsrd/beribsd/src/sys/sys/proc.h#9 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/Makefile#11 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/isfctl/Makefile#5 delete
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/isfctl/isfctl.8#4 delete
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/isfctl/isfctl.c#5 delete

Differences ...

==== //depot/projects/ctsrd/beribsd/src/Makefile.inc1#16 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: head/Makefile.inc1 256842 2013-10-21 10:09:48Z bdrewery $
+# $FreeBSD: head/Makefile.inc1 256915 2013-10-22 15:53:29Z brooks $
 #
 # Make command line options:
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -1377,12 +1377,10 @@
 # If an full path to an external cross compiler is given, don't build
 # a cross compiler.
 .if ${XCC:M/*} == "" && ${MK_CROSS_COMPILER} != "no"
-.if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang")
+.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && ${TARGET} != "pc98"
 _clang=		usr.bin/clang
 _clang_libs=	lib/clang
-.endif
-
-.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98")
+.else
 _cc=		gnu/usr.bin/cc
 .endif
 .endif

==== //depot/projects/ctsrd/beribsd/src/contrib/gcclibs/libssp/ssp.c#2 (text+ko) ====

@@ -128,7 +128,7 @@
 #ifdef HAVE_SYSLOG_H
   /* Only send the error to syslog if there was no tty available.  */
   else
-    syslog (LOG_CRIT, msg3);
+    syslog (LOG_CRIT, "%s", msg3);
 #endif /* HAVE_SYSLOG_H */
 
   /* Try very hard to exit.  Note that signals may be blocked preventing

==== //depot/projects/ctsrd/beribsd/src/etc/netstart#3 (text+ko) ====

@@ -24,7 +24,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: head/etc/netstart 230389 2012-01-20 17:25:15Z rea $
+# $FreeBSD: head/etc/netstart 256875 2013-10-22 06:53:01Z des $
 #	From: @(#)netstart	5.9 (Berkeley) 3/30/91
 #
 
@@ -59,6 +59,7 @@
 /etc/rc.d/route6d ${_start}
 /etc/rc.d/mrouted ${_start}
 /etc/rc.d/routed ${_start}
+/etc/rc.d/rtsold ${_start}
 /etc/rc.d/nisdomain ${_start}
 
 exit 0

==== //depot/projects/ctsrd/beribsd/src/etc/rc.d/rtadvd#4 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: head/etc/rc.d/rtadvd 247271 2013-02-25 17:07:42Z des $
+# $FreeBSD: head/etc/rc.d/rtadvd 256878 2013-10-22 07:44:26Z des $
 #
 
 # PROVIDE: rtadvd
@@ -14,6 +14,8 @@
 name="rtadvd"
 rcvar="rtadvd_enable"
 command="/usr/sbin/${name}"
+extra_commands="reload"
+reload_cmd="rtadvd_reload"
 start_precmd="rtadvd_precmd"
 
 rtadvd_precmd()
@@ -62,5 +64,9 @@
 	return 0
 }
 
+rtadvd_reload() {
+	/usr/sbin/rtadvctl reload
+}
+
 load_rc_config $name
 run_rc_command "$1"

==== //depot/projects/ctsrd/beribsd/src/share/man/man4/Makefile#21 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
-# $FreeBSD: head/share/man/man4/Makefile 256752 2013-10-18 20:44:19Z brooks $
+# $FreeBSD: head/share/man/man4/Makefile 256865 2013-10-21 22:43:38Z brooks $
 
 .include <bsd.own.mk>
 
@@ -196,7 +196,6 @@
 	ipwfw.4 \
 	isci.4 \
 	iscsi_initiator.4 \
-	isf.4 \
 	isp.4 \
 	ispfw.4 \
 	iwi.4 \

==== //depot/projects/ctsrd/beribsd/src/share/man/man4/ahci.4#5 (text+ko) ====

@@ -1,4 +1,4 @@
-.\" Copyright (c) 2009-2012 Alexander Motin <mav@FreeBSD.org>
+.\" Copyright (c) 2009-2013 Alexander Motin <mav@FreeBSD.org>
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/share/man/man4/ahci.4 238805 2012-07-26 13:44:48Z mav $
+.\" $FreeBSD: head/share/man/man4/ahci.4 256886 2013-10-22 11:56:46Z mav $
 .\"
-.Dd July 25, 2012
+.Dd October 22, 2013
 .Dt AHCI 4
 .Os
 .Sh NAME
@@ -57,9 +57,9 @@
 .It 0
 MSI disabled;
 .It 1
-single MSI vector used, if supported (default);
+single MSI vector used, if supported;
 .It 2
-multiple MSI vectors used, if supported;
+multiple MSI vectors used, if supported (default);
 .El
 .It Va hint.ahci. Ns Ar X Ns Va .ccc
 controls Command Completion Coalescing (CCC) usage by the specified controller.
@@ -68,6 +68,11 @@
 CCC reduces number of context switches on systems with many parallel requests,
 but it can decrease disk performance on some workloads due to additional
 command latency.
+.It Va hint.ahci. Ns Ar X Ns Va .direct
+controls whether the driver should use direct command completion from
+interrupt thread(s), or queue them to CAM completion threads.
+Default value depends on number of MSI interrupts supported and number of
+implemented SATA ports.
 .It Va hint.ahcich. Ns Ar X Ns Va .pm_level
 controls SATA interface Power Management for the specified channel,
 allowing some power to be saved at the cost of additional command

==== //depot/projects/ctsrd/beribsd/src/share/man/man9/disk.9#4 (text+ko) ====

@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.\" $FreeBSD: head/share/man/man9/disk.9 242359 2012-10-30 13:05:50Z trasz $
+.\" $FreeBSD: head/share/man/man9/disk.9 256884 2013-10-22 10:21:20Z mav $
 .\"
 .Dd October 30, 2012
 .Dt DISK 9
@@ -106,8 +106,6 @@
 Optional flags indicating to the storage framework what optional features
 or descriptions the storage device driver supports.
 Currently supported flags are
-.Dv DISKFLAG_NEEDSGIANT
-(maintained by device driver),
 .Dv DISKFLAG_OPEN
 (maintained by storage framework),
 .Dv DISKFLAG_CANDELETE

==== //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#14 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/share/mk/bsd.own.mk 256198 2013-10-09 17:07:20Z gjb $
+# $FreeBSD: head/share/mk/bsd.own.mk 256915 2013-10-22 15:53:29Z brooks $
 #
 # The include file <bsd.own.mk> set common variables for owner,
 # group, mode, and directories. Defaults are in brackets.
@@ -554,7 +554,6 @@
 .if ${MK_CLANG} == "no"
 MK_CLANG_EXTRAS:= no
 MK_CLANG_FULL:= no
-MK_CLANG_IS_CC:= no
 .endif
 
 .if ${MK_CLANG_IS_CC} == "no"

==== //depot/projects/ctsrd/beribsd/src/sys/arm/allwinner/a10_wdog.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/allwinner/a10_wdog.c 246707 2013-02-12 07:27:40Z gonzo $");
+__FBSDID("$FreeBSD: head/sys/arm/allwinner/a10_wdog.c 256873 2013-10-22 05:22:46Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -150,6 +150,18 @@
 			    (wd_intervals[i].value << WDOG_MODE_INTVL_SHIFT) |
 			    WDOG_MODE_EN | WDOG_MODE_RST_EN);
 			WRITE(sc, WDOG_CTRL, WDOG_CTRL_RESTART);
+			*error = 0;
+		}
+		else {
+			/* 
+			 * Can't arm
+			 * disable watchdog as watchdog(9) requires
+			 */
+			device_printf(sc->dev,
+			    "Can't arm, timeout is more than 16 sec\n");
+			mtx_unlock(&sc->mtx);
+			WRITE(sc, WDOG_MODE, 0);
+			return;
 		}
 	}
 	else

==== //depot/projects/ctsrd/beribsd/src/sys/arm/broadcom/bcm2835/bcm2835_wdog.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c 239922 2012-08-30 20:59:37Z gonzo $");
+__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c 256871 2013-10-22 05:19:42Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -76,11 +76,10 @@
 	int			wdog_armed;
 	int			wdog_period;
 	char			wdog_passwd;
+	struct mtx		mtx;
 };
 
-#ifdef notyet
 static void bcmwd_watchdog_fn(void *private, u_int cmd, int *error);
-#endif
 
 static int
 bcmwd_probe(device_t dev)
@@ -120,19 +119,59 @@
 	sc->bsh = rman_get_bushandle(sc->res);
 
 	bcmwd_lsc = sc;
-#ifdef notyet
+	mtx_init(&sc->mtx, "BCM2835 Watchdog", "bcmwd", MTX_DEF);
 	EVENTHANDLER_REGISTER(watchdog_list, bcmwd_watchdog_fn, sc, 0);
-#endif
+
 	return (0);
 }
 
-#ifdef notyet
 static void
 bcmwd_watchdog_fn(void *private, u_int cmd, int *error)
 {
-	/* XXX: not yet */
+	struct bcmwd_softc *sc;
+	uint64_t sec;
+	uint32_t ticks, reg;
+
+	sc = private;
+	mtx_lock(&sc->mtx);
+
+	cmd &= WD_INTERVAL;
+
+	if (cmd > 0) {
+		sec = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000000;
+		ticks = (sec << 16) & BCM2835_WDOG_TIME_MASK;
+		if (ticks == 0) {
+			/* 
+			 * Can't arm
+			 * disable watchdog as watchdog(9) requires
+			 */
+			device_printf(sc->dev,
+			    "Can't arm, timeout is less than 1 second\n");
+			WRITE(sc, BCM2835_RSTC_REG, 
+			    (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) |
+			    BCM2835_RSTC_RESET);
+			mtx_unlock(&sc->mtx);
+			return;
+		}
+
+		reg = (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | ticks;
+		WRITE(sc, BCM2835_WDOG_REG, reg);
+
+		reg = READ(sc, BCM2835_RSTC_REG);
+		reg &= BCM2835_RSTC_WRCFG_CLR;
+		reg |= BCM2835_RSTC_WRCFG_FULL_RESET;
+		reg |= (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT);
+		WRITE(sc, BCM2835_RSTC_REG, reg);
+
+		*error = 0;
+	}
+	else
+		WRITE(sc, BCM2835_RSTC_REG, 
+		    (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) |
+		    BCM2835_RSTC_RESET);
+
+	mtx_unlock(&sc->mtx);
 }
-#endif
 
 void
 bcmwd_watchdog_reset()

==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beri-sim.dts#7 (text+ko) ====

@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/boot/fdt/dts/beri-sim.dts 256912 2013-10-22 15:45:31Z brooks $
  */
 
 /dts-v1/;

==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#28 (text+ko) ====

@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/boot/fdt/dts/beripad-de4.dts 256912 2013-10-22 15:45:31Z brooks $
  */
 
 /dts-v1/;

==== //depot/projects/ctsrd/beribsd/src/sys/cam/ata/ata_da.c#11 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/ata/ata_da.c 256843 2013-10-21 12:00:26Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/ata/ata_da.c 256880 2013-10-22 08:22:19Z mav $");
 
 #include "opt_ada.h"
 
@@ -1253,7 +1253,7 @@
 		maxio = min(maxio, 256 * softc->params.secsize);
 	softc->disk->d_maxsize = maxio;
 	softc->disk->d_unit = periph->unit_number;
-	softc->disk->d_flags = 0;
+	softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION;
 	if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE)
 		softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
 	if (softc->flags & ADA_FLAG_CAN_TRIM) {

==== //depot/projects/ctsrd/beribsd/src/sys/cam/cam_periph.c#9 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/cam_periph.c 256843 2013-10-21 12:00:26Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/cam_periph.c 256895 2013-10-22 13:56:30Z mav $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1768,9 +1768,11 @@
 				scan_ccb->ccb_h.func_code = XPT_SCAN_TGT;
 				scan_ccb->crcn.flags = 0;
 				xpt_rescan(scan_ccb);
-			} else
+			} else {
 				xpt_print(newpath,
 				    "Can't allocate CCB to rescan target\n");
+				xpt_free_path(newpath);
+			}
 		}
 	}
 

==== //depot/projects/ctsrd/beribsd/src/sys/cam/cam_xpt.c#10 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 256843 2013-10-21 12:00:26Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 256888 2013-10-22 12:58:22Z mav $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -3163,10 +3163,11 @@
 				ccb = xpt_get_ccb(periph);
 				goto restart;
 			}
-			if (periph->flags & CAM_PERIPH_RUN_TASK) {
+			if (periph->flags & CAM_PERIPH_RUN_TASK)
 				break;
-			}
-			cam_periph_acquire(periph);
+			xpt_lock_buses();
+			periph->refcount++;	/* Unconditionally acquire */
+			xpt_unlock_buses();
 			periph->flags |= CAM_PERIPH_RUN_TASK;
 			taskqueue_enqueue(xsoftc.xpt_taskq,
 			    &periph->periph_run_task);

==== //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_da.c#12 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 256843 2013-10-21 12:00:26Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 256880 2013-10-22 08:22:19Z mav $");
 
 #include <sys/param.h>
 
@@ -2125,7 +2125,7 @@
 	else
 		softc->disk->d_maxsize = cpi.maxio;
 	softc->disk->d_unit = periph->unit_number;
-	softc->disk->d_flags = 0;
+	softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION;
 	if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0)
 		softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
 	if ((cpi.hba_misc & PIM_UNMAPPED) != 0)

==== //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c#9 (text+ko) ====

@@ -5147,7 +5147,7 @@
 	len = l2hdr->b_asize;
 	cdata = zio_data_buf_alloc(len);
 	csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata,
-	    cdata, l2hdr->b_asize, (size_t)SPA_MINBLOCKSIZE);
+	    cdata, l2hdr->b_asize, (size_t)(1ULL << l2hdr->b_dev->l2ad_vdev->vdev_ashift));
 
 	if (csize == 0) {
 		/* zero block, indicate that there's nothing to write */

==== //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#6 (text+ko) ====

@@ -147,6 +147,7 @@
 			ZFS_LOG(1, "Used existing consumer for %s.", pp->name);
 		}
 	}
+	cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
 	return (cp);
 }
 

==== //depot/projects/ctsrd/beribsd/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c#8 (text+ko) ====

@@ -2153,6 +2153,7 @@
 	gp->start = zvol_geom_start;
 	gp->access = zvol_geom_access;
 	pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, name);
+	pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND;
 	pp->sectorsize = DEV_BSIZE;
 
 	zv = kmem_zalloc(sizeof(*zv), KM_SLEEP);
@@ -2256,18 +2257,20 @@
 	zvol_state_t *zv;
 	boolean_t first;
 
+	zv = bp->bio_to->private;
+	ASSERT(zv != NULL);
 	switch (bp->bio_cmd) {
+	case BIO_FLUSH:
+		if (!THREAD_CAN_SLEEP())
+			goto enqueue;
+		zil_commit(zv->zv_zilog, ZVOL_OBJ);
+		g_io_deliver(bp, 0);
+		break;
 	case BIO_READ:
 	case BIO_WRITE:
-	case BIO_FLUSH:
-		zv = bp->bio_to->private;
-		ASSERT(zv != NULL);
-		mtx_lock(&zv->zv_queue_mtx);
-		first = (bioq_first(&zv->zv_queue) == NULL);
-		bioq_insert_tail(&zv->zv_queue, bp);
-		mtx_unlock(&zv->zv_queue_mtx);
-		if (first)
-			wakeup_one(&zv->zv_queue);
+		if (!THREAD_CAN_SLEEP())
+			goto enqueue;
+		zvol_strategy(bp);
 		break;
 	case BIO_GETATTR:
 	case BIO_DELETE:
@@ -2275,6 +2278,15 @@
 		g_io_deliver(bp, EOPNOTSUPP);
 		break;
 	}
+	return;
+
+enqueue:
+	mtx_lock(&zv->zv_queue_mtx);
+	first = (bioq_first(&zv->zv_queue) == NULL);
+	bioq_insert_tail(&zv->zv_queue, bp);
+	mtx_unlock(&zv->zv_queue_mtx);
+	if (first)
+		wakeup_one(&zv->zv_queue);
 }
 
 static void
@@ -2449,6 +2461,7 @@
 	g_wither_provider(pp, ENXIO);
 
 	pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, newname);
+	pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND;
 	pp->sectorsize = DEV_BSIZE;
 	pp->mediasize = zv->zv_volsize;
 	pp->private = zv;

==== //depot/projects/ctsrd/beribsd/src/sys/conf/files#24 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/conf/files 256861 2013-10-21 21:13:01Z brooks $
+# $FreeBSD: head/sys/conf/files 256865 2013-10-21 22:43:38Z brooks $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1541,9 +1541,6 @@
 dev/iscsi_initiator/isc_soc.c	optional iscsi_initiator scbus
 dev/iscsi_initiator/isc_sm.c	optional iscsi_initiator scbus
 dev/iscsi_initiator/isc_subr.c	optional iscsi_initiator scbus
-dev/isf/isf.c			optional isf
-dev/isf/isf_fdt.c		optional isf fdt
-dev/isf/isf_nexus.c		optional isf
 dev/isp/isp.c			optional isp
 dev/isp/isp_freebsd.c		optional isp
 dev/isp/isp_library.c		optional isp

==== //depot/projects/ctsrd/beribsd/src/sys/conf/files.powerpc#12 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: head/sys/conf/files.powerpc 256799 2013-10-20 18:40:55Z nwhitehorn $
+# $FreeBSD: head/sys/conf/files.powerpc 256898 2013-10-22 14:07:57Z nwhitehorn $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -124,7 +124,6 @@
 powerpc/mambo/mambo.c		optional	mambo
 powerpc/mambo/mambo_console.c	optional	mambo
 powerpc/mambo/mambo_disk.c	optional	mambo
-powerpc/mambo/mambo_openpic.c	optional	mambo
 powerpc/mpc85xx/atpic.c		optional	mpc85xx isa
 powerpc/mpc85xx/ds1553_bus_fdt.c	optional	ds1553 fdt
 powerpc/mpc85xx/ds1553_core.c	optional	ds1553
@@ -143,6 +142,7 @@
 powerpc/ofw/ofwcall32.S		optional	aim powerpc
 powerpc/ofw/ofwcall64.S		optional	aim powerpc64
 powerpc/ofw/ofwmagic.S		optional	aim
+powerpc/ofw/openpic_ofw.c	optional	aim | fdt
 powerpc/ofw/rtas.c		optional	aim
 powerpc/powermac/ata_kauai.c	optional	powermac ata | powermac atamacio
 powerpc/powermac/ata_macio.c	optional	powermac ata | powermac atamacio
@@ -158,7 +158,6 @@
 powerpc/powermac/macgpio.c	optional	powermac pci 
 powerpc/powermac/macio.c	optional	powermac pci
 powerpc/powermac/nvbl.c		optional	powermac nvbl
-powerpc/powermac/openpic_macio.c optional	powermac pci
 powerpc/powermac/platform_powermac.c optional	powermac
 powerpc/powermac/powermac_thermal.c optional	powermac
 powerpc/powermac/pswitch.c	optional	powermac pswitch
@@ -196,7 +195,6 @@
 powerpc/powerpc/mp_machdep.c	optional	smp
 powerpc/powerpc/nexus.c		standard
 powerpc/powerpc/openpic.c	standard
-powerpc/powerpc/openpic_fdt.c	optional	fdt
 powerpc/powerpc/pic_if.m	standard
 powerpc/powerpc/pmap_dispatch.c	standard
 powerpc/powerpc/platform.c	standard

==== //depot/projects/ctsrd/beribsd/src/sys/dev/aha/aha.c#4 (text+ko) ====

@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/aha/aha.c 246713 2013-02-12 16:57:20Z kib $");
+__FBSDID("$FreeBSD: head/sys/dev/aha/aha.c 256887 2013-10-22 12:42:49Z mav $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -1168,8 +1168,10 @@
 		    cam_sim_path(aha->sim), accb->hccb.target,
 		    CAM_LUN_WILDCARD);
 
-		if (error == CAM_REQ_CMP)
+		if (error == CAM_REQ_CMP) {
 			xpt_async(AC_SENT_BDR, path, NULL);
+			xpt_free_path(path);
+		}
 
 		ccb_h = LIST_FIRST(&aha->pending_ccbs);
 		while (ccb_h != NULL) {

==== //depot/projects/ctsrd/beribsd/src/sys/dev/buslogic/bt.c#5 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/buslogic/bt.c 246713 2013-02-12 16:57:20Z kib $");
+__FBSDID("$FreeBSD: head/sys/dev/buslogic/bt.c 256893 2013-10-22 13:52:20Z mav $");
 
  /*
   * Special thanks to Leonard N. Zubkoff for writing such a complete and
@@ -1586,8 +1586,10 @@
 					bccb->hccb.target_id,
 					CAM_LUN_WILDCARD);
 		
-		if (error == CAM_REQ_CMP)
+		if (error == CAM_REQ_CMP) {
 			xpt_async(AC_SENT_BDR, path, NULL);
+			xpt_free_path(path);
+		}
 
 		ccb_h = LIST_FIRST(&bt->pending_ccbs);
 		while (ccb_h != NULL) {

==== //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_nexus.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/cfi/cfi_bus_nexus.c 255207 2013-09-04 17:19:21Z brooks $");
+__FBSDID("$FreeBSD: head/sys/dev/cfi/cfi_bus_nexus.c 256900 2013-10-22 14:10:00Z nwhitehorn $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,14 +50,25 @@
 static int
 cfi_nexus_probe(device_t dev)
 {
+	return (BUS_PROBE_NOWILDCARD);
+}
+
+static int
+cfi_nexus_attach(device_t dev)
+{
+	int error;
 
-	return cfi_probe(dev);
+	error = cfi_probe(dev);
+	if (error != 0)
+		return (error);
+
+	return cfi_attach(dev);
 }
 
 static device_method_t cfi_nexus_methods[] = {
 	/* device interface */
 	DEVMETHOD(device_probe,		cfi_nexus_probe),
-	DEVMETHOD(device_attach,	cfi_attach),
+	DEVMETHOD(device_attach,	cfi_nexus_attach),
 	DEVMETHOD(device_detach,	cfi_detach),
 
 	{0, 0}

==== //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_common.c#10 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_common.c 256861 2013-10-21 21:13:01Z brooks $");
+__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_common.c 256898 2013-10-22 14:07:57Z nwhitehorn $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -478,21 +478,31 @@
     int *trig, int *pol)
 {
 	fdt_pic_decode_t intr_decode;
+	phandle_t intr_offset;
 	int i, rv;
 
+	intr_offset = OF_xref_phandle(intr_parent);
+
 	for (i = 0; fdt_pic_table[i] != NULL; i++) {
 
 		/* XXX check if pic_handle has interrupt-controller prop? */
 
 		intr_decode = fdt_pic_table[i];
-		rv = intr_decode(intr_parent, intr, interrupt, trig, pol);
+		rv = intr_decode(intr_offset, intr, interrupt, trig, pol);
 
-		if (rv == 0)
+		if (rv == 0) {
 			/* This was recognized as our PIC and decoded. */
+			*interrupt = FDT_MAP_IRQ(intr_parent, *interrupt);
 			return (0);
+		}
 	}
 
-	return (ENXIO);
+	/* Not in table, so guess */
+	*interrupt = FDT_MAP_IRQ(intr_parent, fdt32_to_cpu(*intr));
+	*trig = INTR_TRIGGER_CONFORM;
+	*pol = INTR_POLARITY_CONFORM;
+
+	return (0);
 }
 
 int
@@ -500,7 +510,7 @@
     struct fdt_sense_level *intr_sl)
 {
 	phandle_t intr_par;
-	ihandle_t iph;
+	phandle_t iph;
 	pcell_t *intr;
 	pcell_t intr_cells;
 	int interrupt, trig, pol;
@@ -517,8 +527,7 @@
 		debugf("no intr-parent phandle\n");
 		intr_par = OF_parent(node);
 	} else {
-		iph = fdt32_to_cpu(iph);
-		intr_par = OF_instance_to_package(iph);
+		intr_par = OF_xref_phandle(iph);
 	}
 
 	if (OF_getprop(intr_par, "#interrupt-cells", &intr_cells,
@@ -540,7 +549,7 @@
 		interrupt = -1;
 		trig = pol = 0;
 
-		if (fdt_intr_decode(intr_par, &intr[i * intr_cells],
+		if (fdt_intr_decode(iph, &intr[i * intr_cells],
 		    &interrupt, &trig, &pol) != 0) {
 			rv = ENXIO;
 			goto out;
@@ -557,7 +566,7 @@
 		intr_sl[i].trig = trig;
 		intr_sl[i].pol = pol;
 
-		irq = FDT_MAP_IRQ(intr_par, interrupt);
+		irq = FDT_MAP_IRQ(iph, interrupt);
 		resource_list_add(rl, SYS_RES_IRQ, i, irq, irq, 1);
 	}
 
@@ -570,7 +579,6 @@
 fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc)
 {
 	phandle_t phy_node;
-	ihandle_t phy_ihandle;
 	pcell_t phy_handle, phy_reg;
 	uint32_t i;
 	device_t parent, child;
@@ -579,9 +587,7 @@
 	    sizeof(phy_handle)) <= 0)
 		return (ENXIO);
 
-	phy_ihandle = (ihandle_t)phy_handle;
-	phy_ihandle = fdt32_to_cpu(phy_ihandle);
-	phy_node = OF_instance_to_package(phy_ihandle);
+	phy_node = OF_xref_phandle(phy_handle);
 
 	if (OF_getprop(phy_node, "reg", (void *)&phy_reg,
 	    sizeof(phy_reg)) <= 0)

==== //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_mips.c#6 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_mips.c 245335 2013-01-12 16:09:33Z rwatson $");
+__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_mips.c 256911 2013-10-22 15:29:59Z brooks $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_pci.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_pci.c 240487 2012-09-14 09:45:13Z gber $");
+__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_pci.c 256898 2013-10-22 14:07:57Z nwhitehorn $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -317,7 +317,7 @@
 		    trig, pol);
 
 #if defined(__powerpc__)
-		powerpc_config_intr(FDT_MAP_IRQ(intr_par, *interrupt), trig,
+		powerpc_config_intr(FDT_MAP_IRQ(iph, *interrupt), trig,
 		    pol);
 #endif
 		return (0);

==== //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdt_powerpc.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_powerpc.c 228201 2011-12-02 15:24:39Z jchandra $");
+__FBSDID("$FreeBSD: head/sys/dev/fdt/fdt_powerpc.c 256898 2013-10-22 14:07:57Z nwhitehorn $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -123,7 +123,8 @@
     int *trig, int *pol)
 {
 
-	if (!fdt_is_compatible(node, "chrp,open-pic"))
+	if (!fdt_is_compatible(node, "chrp,open-pic") &&
+	    !fdt_is_type(node, "open-pic"))
 		return (ENXIO);
 
 	/*

==== //depot/projects/ctsrd/beribsd/src/sys/dev/fdt/fdtbus.c#7 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/fdt/fdtbus.c 256798 2013-10-20 18:38:19Z nwhitehorn $");
+__FBSDID("$FreeBSD: head/sys/dev/fdt/fdtbus.c 256899 2013-10-22 14:08:57Z nwhitehorn $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,9 +158,7 @@
 
 	debugf("%s(dev=%p); pass=%u\n", __func__, dev, bus_current_pass);
 
-	device_set_desc(dev, "FDT main bus");
-	if (!bootverbose)
-		device_quiet(dev);
+	device_set_desc(dev, "Flattened Device Tree");
 	return (BUS_PROBE_NOWILDCARD);
 }
 
@@ -182,7 +180,7 @@
 	 * IRQ rman.
 	 */
 	start = 0;
-	end = FDT_INTR_MAX - 1;
+	end = ~0;
 	sc->sc_irq.rm_start = start;
 	sc->sc_irq.rm_end = end;
 	sc->sc_irq.rm_type = RMAN_ARRAY;

==== //depot/projects/ctsrd/beribsd/src/sys/dev/md/md.c#7 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: head/sys/dev/md/md.c 255080 2013-08-30 20:12:23Z kib $
+ * $FreeBSD: head/sys/dev/md/md.c 256880 2013-10-22 08:22:19Z mav $
  *
  */
 
@@ -189,6 +189,7 @@
 	LIST_ENTRY(md_s) list;
 	struct bio_queue_head bio_queue;
 	struct mtx queue_mtx;
+	struct mtx stat_mtx;
 	struct cdev *dev;
 	enum md_types type;
 	off_t mediasize;
@@ -415,8 +416,11 @@
 	struct md_s *sc;
 
 	sc = bp->bio_to->geom->softc;
-	if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE))
+	if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE)) {
+		mtx_lock(&sc->stat_mtx);
 		devstat_start_transaction_bio(sc->devstat, bp);
+		mtx_unlock(&sc->stat_mtx);
+	}
 	mtx_lock(&sc->queue_mtx);
 	bioq_disksort(&sc->bio_queue, bp);
 	mtx_unlock(&sc->queue_mtx);
@@ -987,6 +991,7 @@
 	sc->type = type;
 	bioq_init(&sc->bio_queue);
 	mtx_init(&sc->queue_mtx, "md bio queue", NULL, MTX_DEF);
+	mtx_init(&sc->stat_mtx, "md stat", NULL, MTX_DEF);
 	sc->unit = unit;
 	sprintf(sc->name, "md%d", unit);
 	LIST_INSERT_HEAD(&md_softc_list, sc, list);
@@ -994,6 +999,7 @@
 	if (error == 0)
 		return (sc);
 	LIST_REMOVE(sc, list);
+	mtx_destroy(&sc->stat_mtx);

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



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