PERFORCE change 1200284 for review

John Baldwin jhb at FreeBSD.org
Mon Sep 15 17:57:17 UTC 2014


http://p4web.freebsd.org/@@1200284?ac=10

Change 1200284 by jhb at jhb_ralph on 2014/09/15 17:56:52

	IFC @1200281

Affected files ...

.. //depot/projects/smpng/share/man/man9/sysctl.9#10 integrate
.. //depot/projects/smpng/sys/amd64/amd64/machdep.c#133 integrate
.. //depot/projects/smpng/sys/arm/arm/gic.c#10 integrate
.. //depot/projects/smpng/sys/arm/arm/nexus.c#27 integrate
.. //depot/projects/smpng/sys/arm/at91/at91_pinctrl.c#3 integrate
.. //depot/projects/smpng/sys/arm/at91/files.at91#18 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/files.imx51#8 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/files.imx53#8 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/files.imx6#7 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/imx51_iomux.c#6 delete
.. //depot/projects/smpng/sys/arm/freescale/imx/imx51_iomuxreg.h#3 delete
.. //depot/projects/smpng/sys/arm/freescale/imx/imx6_iomux.c#2 delete
.. //depot/projects/smpng/sys/arm/freescale/imx/imx6_iomuxreg.h#2 delete
.. //depot/projects/smpng/sys/arm/freescale/imx/imx6_machdep.c#5 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/imx_iomux.c#1 branch
.. //depot/projects/smpng/sys/arm/freescale/imx/std.imx51#3 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/std.imx53#3 integrate
.. //depot/projects/smpng/sys/arm/freescale/imx/std.imx6#4 integrate
.. //depot/projects/smpng/sys/arm/include/intr.h#22 integrate
.. //depot/projects/smpng/sys/boot/common/Makefile.inc#22 integrate
.. //depot/projects/smpng/sys/boot/common/zfsloader.8#1 branch
.. //depot/projects/smpng/sys/boot/i386/gptzfsboot/Makefile#13 integrate
.. //depot/projects/smpng/sys/boot/i386/gptzfsboot/gptzfsboot.8#1 branch
.. //depot/projects/smpng/sys/boot/i386/zfsboot/Makefile#15 integrate
.. //depot/projects/smpng/sys/boot/i386/zfsboot/zfsboot.8#1 branch
.. //depot/projects/smpng/sys/cam/cam_ccb.h#33 integrate
.. //depot/projects/smpng/sys/cam/cam_queue.c#13 integrate
.. //depot/projects/smpng/sys/cam/cam_queue.h#9 integrate
.. //depot/projects/smpng/sys/cam/cam_xpt.c#96 integrate
.. //depot/projects/smpng/sys/cam/ctl/ctl.c#14 integrate
.. //depot/projects/smpng/sys/cam/ctl/ctl_private.h#8 integrate
.. //depot/projects/smpng/sys/cam/ctl/ctl_ser_table.c#5 integrate
.. //depot/projects/smpng/sys/cddl/boot/zfs/zfsimpl.h#16 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c#21 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c#17 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c#13 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h#13 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c#12 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#46 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c#17 integrate
.. //depot/projects/smpng/sys/conf/files#305 integrate
.. //depot/projects/smpng/sys/conf/files.amd64#107 integrate
.. //depot/projects/smpng/sys/conf/files.i386#165 integrate
.. //depot/projects/smpng/sys/dev/cxgbe/t4_main.c#26 integrate
.. //depot/projects/smpng/sys/dev/fdt/fdt_pinctrl.c#1 branch
.. //depot/projects/smpng/sys/dev/fdt/fdt_pinctrl.h#1 branch
.. //depot/projects/smpng/sys/dev/fdt/fdt_pinctrl_if.m#1 branch
.. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_powerpc.c#13 integrate
.. //depot/projects/smpng/sys/dev/hyperv/include/hyperv.h#3 integrate
.. //depot/projects/smpng/sys/dev/hyperv/utilities/hv_kvp.c#1 branch
.. //depot/projects/smpng/sys/dev/hyperv/utilities/hv_kvp.h#2 integrate
.. //depot/projects/smpng/sys/dev/hyperv/utilities/hv_util.c#2 integrate
.. //depot/projects/smpng/sys/dev/hyperv/utilities/unicode.h#1 branch
.. //depot/projects/smpng/sys/dev/oce/oce_if.c#11 integrate
.. //depot/projects/smpng/sys/dev/oce/oce_if.h#8 integrate
.. //depot/projects/smpng/sys/dev/usb/serial/u3g.c#40 integrate
.. //depot/projects/smpng/sys/dev/vmware/vmxnet3/if_vmx.c#6 integrate
.. //depot/projects/smpng/sys/dev/vmware/vmxnet3/if_vmxvar.h#6 integrate
.. //depot/projects/smpng/sys/dev/vt/vt_core.c#9 integrate
.. //depot/projects/smpng/sys/dev/xen/netfront/netfront.c#27 integrate
.. //depot/projects/smpng/sys/fs/ext2fs/ext2_vnops.c#15 integrate
.. //depot/projects/smpng/sys/fs/nfsclient/nfs_clbio.c#23 integrate
.. //depot/projects/smpng/sys/kern/kern_cpuset.c#20 integrate
.. //depot/projects/smpng/sys/kern/sched_ule.c#134 integrate
.. //depot/projects/smpng/sys/mips/cavium/octe/ethernet-mdio.c#6 integrate
.. //depot/projects/smpng/sys/mips/cavium/octeon_ds1337.c#4 integrate
.. //depot/projects/smpng/sys/modules/hyperv/utilities/Makefile#2 integrate
.. //depot/projects/smpng/sys/net/if.c#161 integrate
.. //depot/projects/smpng/sys/net/if_lagg.c#37 integrate
.. //depot/projects/smpng/sys/net/if_var.h#94 integrate
.. //depot/projects/smpng/sys/net/if_vlan.c#89 integrate
.. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#49 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.c#27 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.h#6 integrate
.. //depot/projects/smpng/sys/netinet/tcp_output.c#87 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_bio.c#76 integrate
.. //depot/projects/smpng/sys/ofed/drivers/net/mlx4/en_netdev.c#12 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#80 integrate
.. //depot/projects/smpng/sys/vm/vm_mmap.c#111 integrate
.. //depot/projects/smpng/sys/vm/vm_pager.c#36 integrate
.. //depot/projects/smpng/sys/vm/vm_pager.h#26 integrate
.. //depot/projects/smpng/sys/vm/vnode_pager.c#94 integrate
.. //depot/projects/smpng/sys/vm/vnode_pager.h#11 integrate
.. //depot/projects/smpng/sys/x86/xen/xen_intr.c#6 integrate

Differences ...

==== //depot/projects/smpng/share/man/man9/sysctl.9#10 (text) ====

@@ -23,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/share/man/man9/sysctl.9 271314 2014-09-09 14:31:56Z joel $
+.\" $FreeBSD: head/share/man/man9/sysctl.9 271615 2014-09-15 11:14:23Z glebius $
 .\"
-.Dd July 31, 2014
+.Dd September 15, 2014
 .Dt SYSCTL 9
 .Os
 .Sh NAME
@@ -504,6 +504,8 @@
 enviroment early during module load or system boot.
 .It Dv CTLFLAG_DYN
 Dynamically created OIDs automatically get this flag set.
+.It Dv CTLFLAG_VNET
+OID references a VIMAGE-enabled variable.
 .El
 .Sh EXAMPLES
 Sample use of

==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#133 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 271149 2014-09-05 01:06:45Z pfg $");
+__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 271495 2014-09-13 03:10:02Z jhb $");
 
 #include "opt_atpic.h"
 #include "opt_compat.h"

==== //depot/projects/smpng/sys/arm/arm/gic.c#10 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/gic.c 271181 2014-09-05 19:00:30Z andrew $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/gic.c 271630 2014-09-15 15:36:00Z ian $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -83,7 +83,11 @@
 #define GICC_ABPR		0x001C			/* v1 ICCABPR */
 #define GICC_IIDR		0x00FC			/* v1 ICCIIDR*/
 
-#define	GIC_LAST_IPI		15	/* Irqs 0-15 are IPIs. */
+#define	GIC_FIRST_IPI		 0	/* Irqs 0-15 are SGIs/IPIs. */
+#define	GIC_LAST_IPI		15
+#define	GIC_FIRST_PPI		16	/* Irqs 16-31 are private (per */
+#define	GIC_LAST_PPI		31	/* core) peripheral interrupts. */
+#define	GIC_FIRST_SPI		32	/* Irqs 32+ are shared peripherals. */
 
 /* First bit is a polarity bit (0 - low, 1 - high) */
 #define GICD_ICFGR_POL_LOW	(0 << 0)
@@ -127,6 +131,17 @@
     enum intr_polarity pol);
 static void gic_post_filter(void *);
 
+static struct ofw_compat_data compat_data[] = {
+	{"arm,gic",		true},	/* Non-standard, used in FreeBSD dts. */
+	{"arm,gic-400",		true},
+	{"arm,cortex-a15-gic",	true},
+	{"arm,cortex-a9-gic",	true},
+	{"arm,cortex-a7-gic",	true},
+	{"arm,arm11mp-gic",	true},
+	{"brcm,brahma-b15-gic",	true},
+	{NULL,			false}
+};
+
 static int
 arm_gic_probe(device_t dev)
 {
@@ -134,7 +149,7 @@
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(dev, "arm,gic"))
+	if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
 		return (ENXIO);
 	device_set_desc(dev, "ARM Generic Interrupt Controller");
 	return (BUS_PROBE_DEFAULT);
@@ -174,6 +189,51 @@
 	gic_d_write_4(GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F)));
 }
 
+int
+gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt,
+    int *trig, int *pol)
+{
+	static u_int num_intr_cells;
+
+	if (num_intr_cells == 0) {
+		if (OF_searchencprop(OF_node_from_xref(iparent), 
+		    "#interrupt-cells", &num_intr_cells, 
+		    sizeof(num_intr_cells)) == -1) {
+			num_intr_cells = 1;
+		}
+	}
+
+	if (num_intr_cells == 1) {
+		*interrupt = fdt32_to_cpu(intr[0]);
+		*trig = INTR_TRIGGER_CONFORM;
+		*pol = INTR_POLARITY_CONFORM;
+	} else {
+		if (intr[0] == 0)
+			*interrupt = fdt32_to_cpu(intr[1]) + GIC_FIRST_SPI;
+		else
+			*interrupt = fdt32_to_cpu(intr[1]) + GIC_FIRST_PPI;
+		/*
+		 * In intr[2], bits[3:0] are trigger type and level flags.
+		 *   1 = low-to-high edge triggered
+		 *   2 = high-to-low edge triggered
+		 *   4 = active high level-sensitive
+		 *   8 = active low level-sensitive
+		 * The hardware only supports active-high-level or rising-edge.
+		 */
+		if (intr[2] & 0x0a) {
+			printf("unsupported trigger/polarity configuration "
+			    "0x%2x\n", intr[2] & 0x0f);
+			return (ENOTSUP);
+		}
+		*pol  = INTR_POLARITY_CONFORM;
+		if (intr[2] & 0x01)
+			*trig = INTR_TRIGGER_EDGE;
+		else
+			*trig = INTR_TRIGGER_LEVEL;
+	}
+	return (0);
+}
+
 static int
 arm_gic_attach(device_t dev)
 {
@@ -269,6 +329,8 @@
 
 EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0,
     BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
+EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0,
+    BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
 
 static void
 gic_post_filter(void *arg)

==== //depot/projects/smpng/sys/arm/arm/nexus.c#27 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/nexus.c 271484 2014-09-12 20:34:19Z jhb $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/nexus.c 271594 2014-09-14 17:36:57Z ian $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -356,16 +356,16 @@
     pcell_t *intr)
 {
 	fdt_pic_decode_t intr_decode;
-	phandle_t intr_offset;
+	phandle_t intr_parent;
 	int i, rv, interrupt, trig, pol;
 
-	intr_offset = OF_node_from_xref(iparent);
+	intr_parent = OF_node_from_xref(iparent);
 	for (i = 0; i < icells; i++)
 		intr[i] = cpu_to_fdt32(intr[i]);
 
 	for (i = 0; fdt_pic_table[i] != NULL; i++) {
 		intr_decode = fdt_pic_table[i];
-		rv = intr_decode(intr_offset, intr, &interrupt, &trig, &pol);
+		rv = intr_decode(intr_parent, intr, &interrupt, &trig, &pol);
 
 		if (rv == 0) {
 			/* This was recognized as our PIC and decoded. */

==== //depot/projects/smpng/sys/arm/at91/at91_pinctrl.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pinctrl.c 271104 2014-09-04 16:40:54Z imp $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pinctrl.c 271548 2014-09-13 19:59:16Z ian $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -40,6 +40,7 @@
 #include <arm/at91/at91_piovar.h>
 
 #include <dev/fdt/fdt_common.h>
+#include <dev/fdt/fdt_pinctrl.h>
 #include <dev/ofw/openfirm.h>
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
@@ -250,6 +251,8 @@
 		device_set_ivars(cdev, di);
 	}
 
+	fdt_pinctrl_register(dev, "atmel,pins");
+
 	return (bus_generic_attach(dev));
 }
 
@@ -370,93 +373,70 @@
 
 const char *periphs[] = {"gpio", "periph A", "periph B", "periph C", "periph D", "periph E" };
 
-static void
-pinctrl_walk_tree(device_t bus, phandle_t node)
+struct pincfg {
+	uint32_t unit;
+	uint32_t pin;
+	uint32_t periph;
+	uint32_t flags;
+};
+
+static int
+pinctrl_configure_pins(device_t bus, phandle_t cfgxref)
 {
 	struct pinctrl_softc *sc;
-	char status[10];
+	struct pincfg *cfg, *cfgdata;
 	char name[32];
-	phandle_t pinctrl[32], pins[32 * 4], scratch;
-	ssize_t len, npins;
-	int i, j;
+	phandle_t node;
+	ssize_t npins;
+	int i;
 
 	sc = device_get_softc(bus);
-	for (node = OF_child(node); node > 0; node = OF_peer(node)) {
-		pinctrl_walk_tree(bus, node);
-		memset(status, 0, sizeof(status));
-		memset(name, 0, sizeof(name));
-		OF_getprop(node, "status", status, sizeof(status));
-		OF_getprop(node, "name", name, sizeof(name));
-		if (strcmp(status, "okay") != 0) {
-//			printf("pinctrl: skipping node %s status %s\n", name,
-//			    status);
-			continue;
-		}
-		len = OF_getencprop(node, "pinctrl-0", pinctrl, sizeof(pinctrl));
-		if (len <= 0) {
-//			printf("pinctrl: skipping node %s no pinctrl-0\n",
-//			    name, status);
-			continue;
-		}
-		len /= sizeof(phandle_t);
-		printf("pinctrl: Found active node %s\n", name);
-		for (i = 0; i < len; i++) {
-			scratch = OF_node_from_xref(pinctrl[i]);
-			npins = OF_getencprop(scratch, "atmel,pins", pins,
-			    sizeof(pins));
-			if (npins <= 0) {
-				printf("We're doing it wrong %s\n", name);
-				continue;
-			}
-			memset(name, 0, sizeof(name));
-			OF_getprop(scratch, "name", name, sizeof(name));
-			npins /= (4 * 4);
-			printf("----> need to cope with %d more pins for %s\n",
-			    npins, name);
-			for (j = 0; j < npins; j++) {
-				uint32_t unit = pins[j * 4];
-				uint32_t pin = pins[j * 4 + 1];
-				uint32_t periph = pins[j * 4 + 2];
-				uint32_t flags = pins[j * 4 + 3];
-				uint32_t pio;
-
-				pio = (0xfffffff & sc->ranges[0].bus) +
-				    0x200 * unit;
-				printf("P%c%d %s %#x\n", unit + 'A', pin,
-				    periphs[periph], flags);
-				switch (periph) {
-				case 0:
-					at91_pio_use_gpio(pio, 1u << pin);
-					at91_pio_gpio_pullup(pio, 1u << pin,
-					    !!(flags & 1));
-					at91_pio_gpio_high_z(pio, 1u << pin,
-					    !!(flags & 2));
-					at91_pio_gpio_set_deglitch(pio,
-					    1u << pin, !!(flags & 4));
-//					at91_pio_gpio_pulldown(pio, 1u << pin,
-//					    !!(flags & 8));
-//					at91_pio_gpio_dis_schmidt(pio,
-//					    1u << pin, !!(flags & 16));
-					break;
-				case 1:
-					at91_pio_use_periph_a(pio, 1u << pin,
-					    flags);
-					break;
-				case 2:
-					at91_pio_use_periph_b(pio, 1u << pin,
-					    flags);
-					break;
-				}
-			}
+	node = OF_node_from_xref(cfgxref);
+	memset(name, 0, sizeof(name));
+	OF_getprop(node, "name", name, sizeof(name));
+	npins = OF_getencprop_alloc(node, "atmel,pins", sizeof(*cfgdata),
+	    (void **)&cfgdata);
+	if (npins < 0) {
+		printf("We're doing it wrong %s\n", name);
+		return (ENXIO);
+	}
+	if (npins == 0)
+		return (0);
+	for (i = 0, cfg = cfgdata; i < npins; i++, cfg++) {
+		uint32_t pio;
+		pio = (0xfffffff & sc->ranges[0].bus) + 0x200 * cfg->unit;
+		printf("P%c%d %s %#x\n", cfg->unit + 'A', cfg->pin,
+		    periphs[cfg->periph], cfg->flags);
+		switch (cfg->periph) {
+		case 0:
+			at91_pio_use_gpio(pio, 1u << cfg->pin);
+			at91_pio_gpio_pullup(pio, 1u << cfg->pin,
+			    !!(cfg->flags & 1));
+			at91_pio_gpio_high_z(pio, 1u << cfg->pin,
+			    !!(cfg->flags & 2));
+			at91_pio_gpio_set_deglitch(pio,
+			    1u << cfg->pin, !!(cfg->flags & 4));
+//			at91_pio_gpio_pulldown(pio, 1u << cfg->pin,
+//			    !!(cfg->flags & 8));
+//			at91_pio_gpio_dis_schmidt(pio,
+//			    1u << cfg->pin, !!(cfg->flags & 16));
+			break;
+		case 1:
+			at91_pio_use_periph_a(pio, 1u << cfg->pin, cfg->flags);
+			break;
+		case 2:
+			at91_pio_use_periph_b(pio, 1u << cfg->pin, cfg->flags);
+			break;
 		}
 	}
+	free(cfgdata, M_OFWPROP);
+	return (0);
 }
 
 static void
 pinctrl_new_pass(device_t bus)
 {
 	struct pinctrl_softc *sc;
-	phandle_t node;
 
 	sc = device_get_softc(bus);
 
@@ -466,10 +446,7 @@
 		return;
 	sc->done_pinmux++;
 
-	node = OF_peer(0);
-	if (node == -1)
-		return;
-	pinctrl_walk_tree(bus, node);
+	fdt_pinctrl_configure_tree(bus);
 }
 
 static device_method_t at91_pinctrl_methods[] = {
@@ -496,6 +473,8 @@
 	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),
 	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),
 
+        /* fdt_pintrl interface */
+	DEVMETHOD(fdt_pinctrl_configure,pinctrl_configure_pins),
 	DEVMETHOD_END
 };
 

==== //depot/projects/smpng/sys/arm/at91/files.at91#18 (text) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/at91/files.at91 269957 2014-08-14 04:21:14Z imp $
+# $FreeBSD: head/sys/arm/at91/files.at91 271548 2014-09-13 19:59:16Z ian $
 arm/arm/cpufunc_asm_arm9.S	standard
 arm/at91/at91_machdep.c		standard
 arm/at91/at91_aic.c		standard
@@ -10,7 +10,7 @@
 arm/at91/at91_cfata.c		optional	at91_cfata
 arm/at91/at91_common.c		optional	fdt
 arm/at91/at91_mci.c		optional	at91_mci
-arm/at91/at91_pinctrl.c		optional	fdt
+arm/at91/at91_pinctrl.c		optional	fdt fdt_pinctrl
 arm/at91/at91_pit.c		optional	at91sam9
 arm/at91/at91_reset.S		optional	at91sam9
 arm/at91/at91_rst.c		optional	at91sam9

==== //depot/projects/smpng/sys/arm/freescale/imx/files.imx51#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/files.imx51 271198 2014-09-06 17:33:41Z andrew $
+# $FreeBSD: head/sys/arm/freescale/imx/files.imx51 271550 2014-09-13 20:09:34Z ian $
 arm/arm/bus_space_asm_generic.S		standard
 arm/arm/bus_space_generic.c		standard
 arm/arm/cpufunc_asm_armv5.S		standard
@@ -19,7 +19,7 @@
 arm/freescale/imx/tzic.c		standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.c		standard
+arm/freescale/imx/imx_iomux.c		standard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c		optional gpio

==== //depot/projects/smpng/sys/arm/freescale/imx/files.imx53#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/files.imx53 271100 2014-09-04 14:57:04Z ian $
+# $FreeBSD: head/sys/arm/freescale/imx/files.imx53 271550 2014-09-13 20:09:34Z ian $
 arm/arm/bus_space_asm_generic.S		standard
 arm/arm/bus_space_generic.c		standard
 arm/arm/cpufunc_asm_armv5.S		standard
@@ -22,7 +22,7 @@
 arm/freescale/imx/tzic.c		standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.c		standard
+arm/freescale/imx/imx_iomux.c		standard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c		optional gpio

==== //depot/projects/smpng/sys/arm/freescale/imx/files.imx6#7 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/files.imx6 271100 2014-09-04 14:57:04Z ian $
+# $FreeBSD: head/sys/arm/freescale/imx/files.imx6 271607 2014-09-14 23:48:18Z ian $
 
 #
 # Standard ARM support.
@@ -20,11 +20,10 @@
 arm/freescale/fsl_ocotp.c		standard
 arm/freescale/imx/imx6_anatop.c		standard
 arm/freescale/imx/imx6_ccm.c		standard
-arm/freescale/imx/imx6_iomux.c		standard
 arm/freescale/imx/imx6_machdep.c	standard
 arm/freescale/imx/imx6_mp.c		optional smp
 arm/freescale/imx/imx6_pl310.c		standard
-arm/freescale/imx/imx_common.c		standard
+arm/freescale/imx/imx_iomux.c		standard
 arm/freescale/imx/imx_machdep.c		standard
 arm/freescale/imx/imx_gpt.c		standard
 arm/freescale/imx/imx_gpio.c		optional gpio

==== //depot/projects/smpng/sys/arm/freescale/imx/imx6_machdep.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
 #include "opt_platform.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx6_machdep.c 269607 2014-08-05 19:10:53Z ian $");
+__FBSDID("$FreeBSD: head/sys/arm/freescale/imx/imx6_machdep.c 271607 2014-09-14 23:48:18Z ian $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,6 +38,7 @@
 
 #include <machine/bus.h>
 #include <machine/devmap.h>
+#include <machine/intr.h>
 #include <machine/machdep.h>
 #include <machine/platform.h> 
 
@@ -46,6 +47,18 @@
 #include <arm/freescale/imx/imx6_anatopvar.h>
 #include <arm/freescale/imx/imx_machdep.h>
 
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+	{ NULL, NULL }
+};
+
+fdt_pic_decode_t fdt_pic_table[] = {
+	&gic_decode_fdt,
+	NULL
+};
+
 vm_offset_t
 platform_lastaddr(void)
 {

==== //depot/projects/smpng/sys/arm/freescale/imx/std.imx51#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/std.imx51 261227 2014-01-28 09:12:04Z andrew $
+# $FreeBSD: head/sys/arm/freescale/imx/std.imx51 271550 2014-09-13 20:09:34Z ian $
 machine		arm	armv6
 cpu 		CPU_CORTEXA
 makeoptions	ARM_LITTLE_ENDIAN
@@ -10,5 +10,7 @@
 makeoptions	KERNPHYSADDR=0x90100000
 options		PHYSADDR=0x90000000
 
+device  	fdt_pinctrl
+
 files "../freescale/imx/files.imx51"
 

==== //depot/projects/smpng/sys/arm/freescale/imx/std.imx53#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/std.imx53 261227 2014-01-28 09:12:04Z andrew $
+# $FreeBSD: head/sys/arm/freescale/imx/std.imx53 271550 2014-09-13 20:09:34Z ian $
 machine		arm	armv6
 cpu 		CPU_CORTEXA
 makeoptions	ARM_LITTLE_ENDIAN
@@ -10,5 +10,7 @@
 makeoptions	KERNPHYSADDR=0x70100000
 options		PHYSADDR=0x70000000
 
+device  	fdt_pinctrl
+
 files "../freescale/imx/files.imx53"
 

==== //depot/projects/smpng/sys/arm/freescale/imx/std.imx6#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/freescale/imx/std.imx6 262427 2014-02-24 03:51:31Z ian $
+# $FreeBSD: head/sys/arm/freescale/imx/std.imx6 271550 2014-09-13 20:09:34Z ian $
 machine		arm	armv6
 cpu 		CPU_CORTEXA
 makeoptions	ARM_LITTLE_ENDIAN
@@ -13,5 +13,7 @@
 options		IPI_IRQ_START=0
 options		IPI_IRQ_END=15
 
+device  	fdt_pinctrl
+
 files "../freescale/imx/files.imx6"
 

==== //depot/projects/smpng/sys/arm/include/intr.h#22 (text+ko) ====

@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/arm/include/intr.h 270884 2014-08-31 17:40:19Z br $
+ * $FreeBSD: head/sys/arm/include/intr.h 271601 2014-09-14 21:21:03Z ian $
  *
  */
 
@@ -82,5 +82,7 @@
 void arm_irq_memory_barrier(uintptr_t);
 
 void gic_init_secondary(void);
+int  gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt,
+    int *trig, int *pol);
 
 #endif	/* _MACHINE_INTR_H */

==== //depot/projects/smpng/sys/boot/common/Makefile.inc#22 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/boot/common/Makefile.inc 269621 2014-08-06 00:36:04Z marcel $
+# $FreeBSD: head/sys/boot/common/Makefile.inc 271609 2014-09-15 06:21:28Z avg $
 
 SRCS+=	boot.c commands.c console.c devopen.c interp.c 
 SRCS+=	interp_backslash.c interp_parse.c ls.c misc.c 
@@ -78,3 +78,6 @@
 .endif
 
 MAN+=	loader.8
+.if ${MK_ZFS} != "no"
+MAN+=	zfsloader.8
+.endif

==== //depot/projects/smpng/sys/boot/i386/gptzfsboot/Makefile#13 (text+ko) ====

@@ -1,10 +1,11 @@
-# $FreeBSD: head/sys/boot/i386/gptzfsboot/Makefile 261567 2014-02-06 21:54:21Z emaste $
+# $FreeBSD: head/sys/boot/i386/gptzfsboot/Makefile 271609 2014-09-15 06:21:28Z avg $
 
 .PATH:		${.CURDIR}/../boot2 ${.CURDIR}/../gptboot \
 		${.CURDIR}/../zfsboot ${.CURDIR}/../common \
 		${.CURDIR}/../../common
 
 FILES=		gptzfsboot
+MAN=		gptzfsboot.8
 
 NM?=		nm
 

==== //depot/projects/smpng/sys/boot/i386/zfsboot/Makefile#15 (text+ko) ====

@@ -1,8 +1,9 @@
-# $FreeBSD: head/sys/boot/i386/zfsboot/Makefile 261567 2014-02-06 21:54:21Z emaste $
+# $FreeBSD: head/sys/boot/i386/zfsboot/Makefile 271609 2014-09-15 06:21:28Z avg $
 
 .PATH:		${.CURDIR}/../boot2 ${.CURDIR}/../common ${.CURDIR}/../../common
 
 FILES=		zfsboot
+MAN=		zfsboot.8
 
 NM?=		nm
 

==== //depot/projects/smpng/sys/cam/cam_ccb.h#33 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/cam/cam_ccb.h 259397 2013-12-14 22:07:40Z nwhitehorn $
+ * $FreeBSD: head/sys/cam/cam_ccb.h 271588 2014-09-14 11:59:49Z mav $
  */
 
 #ifndef _CAM_CAM_CCB_H
@@ -347,8 +347,8 @@
 	struct	ccb_hdr	ccb_h;
 	int	dev_openings;	/* Space left for more work on device*/	
 	int	dev_active;	/* Transactions running on the device */
-	int	devq_openings;	/* Space left for more queued work */
-	int	devq_queued;	/* Transactions queued to be sent */
+	int	allocated;	/* CCBs allocated for the device */
+	int	queued;		/* CCBs queued to be sent to the device */
 	int	held;		/*
 				 * CCBs held by peripheral drivers
 				 * for this device

==== //depot/projects/smpng/sys/cam/cam_queue.c#13 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/cam_queue.c 256843 2013-10-21 12:00:26Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/cam_queue.c 271588 2014-09-14 11:59:49Z mav $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -290,7 +290,6 @@
 
 	delta = new_size - (ccbq->dev_active + ccbq->dev_openings);
 	ccbq->total_openings += delta;
-	ccbq->devq_openings += delta;
 	ccbq->dev_openings += delta;
 
 	new_size = imax(64, 1 << fls(new_size + new_size / 2));
@@ -308,7 +307,6 @@
 	    imax(64, 1 << fls(openings + openings / 2))) != 0)
 		return (1);
 	ccbq->total_openings = openings;
-	ccbq->devq_openings = openings;
 	ccbq->dev_openings = openings;
 	return (0);
 }

==== //depot/projects/smpng/sys/cam/cam_queue.h#9 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/cam/cam_queue.h 256843 2013-10-21 12:00:26Z mav $
+ * $FreeBSD: head/sys/cam/cam_queue.h 271588 2014-09-14 11:59:49Z mav $
  */
 
 #ifndef _CAM_CAM_QUEUE_H
@@ -62,10 +62,9 @@
 	struct ccb_hdr_tailq	queue_extra_head;
 	int	queue_extra_entries;
 	int	total_openings;
-	int	devq_openings;
+	int	allocated;
 	int	dev_openings;
 	int	dev_active;
-	int	held;
 };
 
 struct cam_ed;
@@ -188,8 +187,8 @@
 static __inline void
 cam_ccbq_take_opening(struct cam_ccbq *ccbq)
 {
-	ccbq->devq_openings--;
-	ccbq->held++;
+
+	ccbq->allocated++;
 }
 
 static __inline void
@@ -198,8 +197,6 @@
 	struct ccb_hdr *old_ccb;
 	struct camq *queue = &ccbq->queue;
 
-	ccbq->held--;
-
 	/*
 	 * If queue is already full, try to resize.
 	 * If resize fail, push CCB with lowest priority out to the TAILQ.
@@ -264,7 +261,7 @@
 
 	send_ccb->ccb_h.pinfo.index = CAM_ACTIVE_INDEX;
 	ccbq->dev_active++;
-	ccbq->dev_openings--;		
+	ccbq->dev_openings--;
 }
 
 static __inline void
@@ -272,15 +269,14 @@
 {
 
 	ccbq->dev_active--;
-	ccbq->dev_openings++;	
-	ccbq->held++;
+	ccbq->dev_openings++;
 }
 
 static __inline void
 cam_ccbq_release_opening(struct cam_ccbq *ccbq)
 {
-	ccbq->held--;
-	ccbq->devq_openings++;
+
+	ccbq->allocated--;
 }
 
 #endif /* _KERNEL */

==== //depot/projects/smpng/sys/cam/cam_xpt.c#96 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 267992 2014-06-28 03:56:17Z hselasky $");
+__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 271588 2014-09-14 11:59:49Z mav $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -2648,20 +2648,25 @@
 			struct ccb_getdevstats *cgds;
 			struct cam_eb *bus;
 			struct cam_et *tar;
+			struct cam_devq *devq;
 
 			cgds = &start_ccb->cgds;
 			bus = path->bus;
 			tar = path->target;
+			devq = bus->sim->devq;
+			mtx_lock(&devq->send_mtx);
 			cgds->dev_openings = dev->ccbq.dev_openings;
 			cgds->dev_active = dev->ccbq.dev_active;
-			cgds->devq_openings = dev->ccbq.devq_openings;
-			cgds->devq_queued = cam_ccbq_pending_ccb_count(&dev->ccbq);
-			cgds->held = dev->ccbq.held;
+			cgds->allocated = dev->ccbq.allocated;
+			cgds->queued = cam_ccbq_pending_ccb_count(&dev->ccbq);
+			cgds->held = cgds->allocated - cgds->dev_active -
+			    cgds->queued;
 			cgds->last_reset = tar->last_reset;
 			cgds->maxtags = dev->maxtags;
 			cgds->mintags = dev->mintags;
 			if (timevalcmp(&tar->last_reset, &bus->last_reset, <))
 				cgds->last_reset = bus->last_reset;
+			mtx_unlock(&devq->send_mtx);
 			cgds->ccb_h.status = CAM_REQ_CMP;
 		}
 		break;
@@ -3004,7 +3009,6 @@
 	 * can get it before us while we simulate interrupts.
 	 */
 	mtx_lock(&devq->send_mtx);
-	dev->ccbq.devq_openings--;
 	dev->ccbq.dev_openings--;
 	while((devq->send_openings <= 0 || dev->ccbq.dev_openings < 0) &&
 	    (--timeout > 0)) {
@@ -3016,7 +3020,6 @@
 		camisr_runqueue();
 		mtx_lock(&devq->send_mtx);
 	}
-	dev->ccbq.devq_openings++;
 	dev->ccbq.dev_openings++;
 	mtx_unlock(&devq->send_mtx);
 

==== //depot/projects/smpng/sys/cam/ctl/ctl.c#14 (text+ko) ====

@@ -42,7 +42,7 @@
 #define _CTL_C
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 271443 2014-09-11 22:40:11Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 271606 2014-09-14 23:39:13Z mav $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -280,7 +280,7 @@
 	/*page_code*/SMS_CONTROL_MODE_PAGE,
 	/*page_length*/sizeof(struct scsi_control_page) - 2,
 	/*rlec*/0,
-	/*queue_flags*/0,
+	/*queue_flags*/SCP_QUEUE_ALG_RESTRICTED,
 	/*eca_and_aen*/0,
 	/*flags4*/SCP_TAS,
 	/*aen_holdoff_period*/{0, 0},
@@ -292,7 +292,7 @@
 	/*page_code*/SMS_CONTROL_MODE_PAGE,
 	/*page_length*/sizeof(struct scsi_control_page) - 2,
 	/*rlec*/SCP_DSENSE,
-	/*queue_flags*/0,
+	/*queue_flags*/SCP_QUEUE_ALG_MASK,
 	/*eca_and_aen*/0,
 	/*flags4*/0,
 	/*aen_holdoff_period*/{0, 0},
@@ -390,10 +390,10 @@
 static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len);
 static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio);
 static int ctl_inquiry_std(struct ctl_scsiio *ctsio);
-static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len);
+static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len);
 static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2);
-static ctl_action ctl_check_for_blockage(union ctl_io *pending_io,
-					 union ctl_io *ooa_io);
+static ctl_action ctl_check_for_blockage(struct ctl_lun *lun,
+    union ctl_io *pending_io, union ctl_io *ooa_io);
 static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
 				union ctl_io *starting_io);
 static int ctl_check_blocked(struct ctl_lun *lun);
@@ -4095,6 +4095,7 @@
 	int i;
 	struct ctl_page_index *page_index;
 	struct ctl_softc *softc;
+	const char *value;
 
 	memcpy(&lun->mode_pages.index, page_index_template,
 	       sizeof(page_index_template));
@@ -4244,51 +4245,60 @@
 			break;
 		}
 		case SMS_CACHING_PAGE: {
+			struct scsi_caching_page *caching_page;
 
 			if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
 				panic("invalid subpage value %d",
 				      page_index->subpage);
-			/*
-			 * Defaults should be okay here, no calculations
-			 * needed.
-			 */
-			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT],
+			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT],
 			       &caching_page_default,
 			       sizeof(caching_page_default));
 			memcpy(&lun->mode_pages.caching_page[
 			       CTL_PAGE_CHANGEABLE], &caching_page_changeable,
 			       sizeof(caching_page_changeable));
-			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT],
+			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED],
 			       &caching_page_default,
 			       sizeof(caching_page_default));
-			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED],
-			       &caching_page_default,
+			caching_page = &lun->mode_pages.caching_page[
+			    CTL_PAGE_SAVED];
+			value = ctl_get_opt(&lun->be_lun->options, "writecache");
+			if (value != NULL && strcmp(value, "off") == 0)
+				caching_page->flags1 &= ~SCP_WCE;
+			value = ctl_get_opt(&lun->be_lun->options, "readcache");
+			if (value != NULL && strcmp(value, "off") == 0)
+				caching_page->flags1 |= SCP_RCD;
+			memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT],
+			       &lun->mode_pages.caching_page[CTL_PAGE_SAVED],
 			       sizeof(caching_page_default));
 			page_index->page_data =
 				(uint8_t *)lun->mode_pages.caching_page;
 			break;
 		}
 		case SMS_CONTROL_MODE_PAGE: {
+			struct scsi_control_page *control_page;
 
 			if (page_index->subpage != SMS_SUBPAGE_PAGE_0)
 				panic("invalid subpage value %d",
 				      page_index->subpage);
 
-			/*
-			 * Defaults should be okay here, no calculations
-			 * needed.
-			 */
-			memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT],
+			memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT],
 			       &control_page_default,
 			       sizeof(control_page_default));
 			memcpy(&lun->mode_pages.control_page[
 			       CTL_PAGE_CHANGEABLE], &control_page_changeable,
 			       sizeof(control_page_changeable));
-			memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT],
+			memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED],
 			       &control_page_default,
 			       sizeof(control_page_default));
-			memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED],
-			       &control_page_default,
+			control_page = &lun->mode_pages.control_page[
+			    CTL_PAGE_SAVED];
+			value = ctl_get_opt(&lun->be_lun->options, "reordering");

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


More information about the p4-projects mailing list