PERFORCE change 150209 for review

Marius Strobl marius at FreeBSD.org
Sun Sep 21 14:30:10 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=150209

Change 150209 by marius at flak on 2008/09/21 14:29:40

	IFC @150205

Affected files ...

.. //depot/projects/usiii/amd64/amd64/identcpu.c#6 integrate
.. //depot/projects/usiii/amd64/amd64/vm_machdep.c#4 integrate
.. //depot/projects/usiii/amd64/include/pmc_mdep.h#4 integrate
.. //depot/projects/usiii/amd64/pci/pci_cfgreg.c#5 integrate
.. //depot/projects/usiii/arm/arm/intr.c#5 integrate
.. //depot/projects/usiii/arm/arm/nexus.c#3 integrate
.. //depot/projects/usiii/arm/include/intr.h#4 integrate
.. //depot/projects/usiii/arm/include/pcpu.h#3 integrate
.. //depot/projects/usiii/arm/xscale/ixp425/ixp425.c#3 integrate
.. //depot/projects/usiii/arm/xscale/ixp425/ixp425_qmgr.c#3 integrate
.. //depot/projects/usiii/boot/Makefile#4 integrate
.. //depot/projects/usiii/boot/ofw/libofw/Makefile#2 integrate
.. //depot/projects/usiii/boot/ofw/libofw/ofw_console.c#3 integrate
.. //depot/projects/usiii/cam/cam.h#2 integrate
.. //depot/projects/usiii/cddl/compat/opensolaris/kern/opensolaris_atomic.c#2 integrate
.. //depot/projects/usiii/cddl/compat/opensolaris/sys/atomic.h#3 integrate
.. //depot/projects/usiii/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#3 integrate
.. //depot/projects/usiii/compat/freebsd32/freebsd32_misc.c#6 integrate
.. //depot/projects/usiii/compat/freebsd32/freebsd32_proto.h#10 integrate
.. //depot/projects/usiii/compat/freebsd32/freebsd32_syscall.h#10 integrate
.. //depot/projects/usiii/compat/freebsd32/freebsd32_syscalls.c#10 integrate
.. //depot/projects/usiii/compat/freebsd32/freebsd32_sysent.c#10 integrate
.. //depot/projects/usiii/compat/freebsd32/syscalls.master#10 integrate
.. //depot/projects/usiii/compat/linux/linux_misc.c#10 integrate
.. //depot/projects/usiii/compat/ndis/ntoskrnl_var.h#3 integrate
.. //depot/projects/usiii/compat/svr4/svr4_stream.c#3 integrate
.. //depot/projects/usiii/compat/svr4/svr4_sysvec.c#4 integrate
.. //depot/projects/usiii/conf/NOTES#15 integrate
.. //depot/projects/usiii/conf/files.mips#3 integrate
.. //depot/projects/usiii/conf/files.sparc64#10 integrate
.. //depot/projects/usiii/conf/ldscript.mips#3 integrate
.. //depot/projects/usiii/conf/options.mips#2 integrate
.. //depot/projects/usiii/conf/options.sparc64#5 integrate
.. //depot/projects/usiii/ddb/db_command.c#5 integrate
.. //depot/projects/usiii/ddb/ddb.h#4 integrate
.. //depot/projects/usiii/dev/aac/aac_pci.c#5 integrate
.. //depot/projects/usiii/dev/acpica/acpi_quirk.c#2 integrate
.. //depot/projects/usiii/dev/aic7xxx/aic79xx_osm.c#3 integrate
.. //depot/projects/usiii/dev/ata/ata-chipset.c#11 integrate
.. //depot/projects/usiii/dev/ata/ata-pci.c#6 integrate
.. //depot/projects/usiii/dev/ata/ata-pci.h#9 integrate
.. //depot/projects/usiii/dev/ath/if_ath.c#10 integrate
.. //depot/projects/usiii/dev/ath/if_athvar.h#6 integrate
.. //depot/projects/usiii/dev/cxgb/common/cxgb_t3_hw.c#5 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_adapter.h#8 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_config.h#4 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_include.h#4 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_main.c#10 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_offload.h#6 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_osdep.h#7 integrate
.. //depot/projects/usiii/dev/cxgb/cxgb_sge.c#8 integrate
.. //depot/projects/usiii/dev/cxgb/sys/cxgb_support.c#4 integrate
.. //depot/projects/usiii/dev/cxgb/sys/mbufq.h#4 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/toecore/cxgb_toedev.h#3 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_cpl_io.c#8 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#7 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_ddp.c#6 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_defs.h#5 integrate
.. //depot/projects/usiii/dev/cxgb/ulp/tom/cxgb_tom.c#5 integrate
.. //depot/projects/usiii/dev/hwpmc/hwpmc_x86.c#3 integrate
.. //depot/projects/usiii/dev/mlx/mlx.c#2 integrate
.. //depot/projects/usiii/dev/pci/vga_pci.c#2 integrate
.. //depot/projects/usiii/dev/ppbus/if_plip.c#3 integrate
.. //depot/projects/usiii/dev/ppbus/lpt.c#2 integrate
.. //depot/projects/usiii/dev/ppbus/ppbconf.c#4 integrate
.. //depot/projects/usiii/dev/ppbus/ppbconf.h#3 integrate
.. //depot/projects/usiii/dev/ppbus/ppi.c#2 integrate
.. //depot/projects/usiii/dev/ppbus/pps.c#2 integrate
.. //depot/projects/usiii/dev/ppc/ppc.c#3 integrate
.. //depot/projects/usiii/dev/ppc/ppc_acpi.c#3 integrate
.. //depot/projects/usiii/dev/ppc/ppc_isa.c#4 integrate
.. //depot/projects/usiii/dev/ppc/ppc_pci.c#2 integrate
.. //depot/projects/usiii/dev/ppc/ppc_puc.c#2 integrate
.. //depot/projects/usiii/dev/ppc/ppcreg.h#3 integrate
.. //depot/projects/usiii/dev/ppc/ppcvar.h#2 integrate
.. //depot/projects/usiii/dev/snp/snp.c#6 integrate
.. //depot/projects/usiii/dev/sound/pci/hda/hda_reg.h#2 integrate
.. //depot/projects/usiii/dev/sound/pci/hda/hdac.c#9 integrate
.. //depot/projects/usiii/dev/sound/pci/hda/hdac_private.h#2 integrate
.. //depot/projects/usiii/dev/tx/if_tx.c#3 integrate
.. //depot/projects/usiii/dev/usb/if_zyd.c#12 integrate
.. //depot/projects/usiii/dev/usb/ubsa.c#6 integrate
.. //depot/projects/usiii/dev/usb/ufoma.c#4 integrate
.. //depot/projects/usiii/dev/usb/usbdevs#15 integrate
.. //depot/projects/usiii/fs/devfs/devfs_devs.c#5 integrate
.. //depot/projects/usiii/fs/devfs/devfs_vnops.c#10 integrate
.. //depot/projects/usiii/fs/fdescfs/fdesc_vnops.c#7 integrate
.. //depot/projects/usiii/fs/hpfs/hpfs_vnops.c#4 integrate
.. //depot/projects/usiii/fs/msdosfs/msdosfs_vnops.c#8 integrate
.. //depot/projects/usiii/fs/ntfs/ntfs_vnops.c#3 integrate
.. //depot/projects/usiii/fs/nullfs/null_vnops.c#5 integrate
.. //depot/projects/usiii/fs/portalfs/portal_vnops.c#4 integrate
.. //depot/projects/usiii/fs/pseudofs/pseudofs_vnops.c#5 integrate
.. //depot/projects/usiii/fs/smbfs/smbfs_node.c#7 integrate
.. //depot/projects/usiii/fs/tmpfs/tmpfs_vnops.c#7 integrate
.. //depot/projects/usiii/fs/udf/udf_vnops.c#4 integrate
.. //depot/projects/usiii/geom/geom_io.c#4 integrate
.. //depot/projects/usiii/gnu/fs/ext2fs/ext2_inode.c#2 integrate
.. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/support/kdb.c#2 integrate
.. //depot/projects/usiii/gnu/fs/xfs/FreeBSD/xfs_vnops.c#5 integrate
.. //depot/projects/usiii/i386/conf/GENERIC#13 integrate
.. //depot/projects/usiii/i386/i386/identcpu.c#5 integrate
.. //depot/projects/usiii/i386/i386/intr_machdep.c#4 integrate
.. //depot/projects/usiii/i386/i386/pmap.c#8 integrate
.. //depot/projects/usiii/i386/i386/sys_machdep.c#4 integrate
.. //depot/projects/usiii/i386/i386/vm_machdep.c#6 integrate
.. //depot/projects/usiii/i386/include/pmc_mdep.h#4 integrate
.. //depot/projects/usiii/i386/include/proc.h#3 integrate
.. //depot/projects/usiii/i386/include/specialreg.h#4 integrate
.. //depot/projects/usiii/i386/pci/pci_cfgreg.c#5 integrate
.. //depot/projects/usiii/i386/xen/mp_machdep.c#2 integrate
.. //depot/projects/usiii/i386/xen/xen_machdep.c#4 integrate
.. //depot/projects/usiii/kern/kern_intr.c#7 integrate
.. //depot/projects/usiii/kern/kern_priv.c#3 integrate
.. //depot/projects/usiii/kern/kern_proc.c#11 integrate
.. //depot/projects/usiii/kern/kern_syscalls.c#2 integrate
.. //depot/projects/usiii/kern/subr_pcpu.c#3 integrate
.. //depot/projects/usiii/kern/subr_rman.c#3 integrate
.. //depot/projects/usiii/kern/subr_sleepqueue.c#10 integrate
.. //depot/projects/usiii/kern/subr_turnstile.c#6 integrate
.. //depot/projects/usiii/kern/subr_witness.c#13 integrate
.. //depot/projects/usiii/kern/tty.c#9 integrate
.. //depot/projects/usiii/kern/uipc_mqueue.c#5 integrate
.. //depot/projects/usiii/kern/vfs_bio.c#10 integrate
.. //depot/projects/usiii/kern/vfs_cache.c#10 integrate
.. //depot/projects/usiii/kern/vfs_mount.c#13 integrate
.. //depot/projects/usiii/kern/vfs_vnops.c#7 integrate
.. //depot/projects/usiii/mips/adm5120/obio.c#3 integrate
.. //depot/projects/usiii/mips/conf/IDT#4 integrate
.. //depot/projects/usiii/mips/idt/obio.c#3 integrate
.. //depot/projects/usiii/mips/malta/gt_pci.c#3 integrate
.. //depot/projects/usiii/mips/mips/intr_machdep.c#3 integrate
.. //depot/projects/usiii/modules/Makefile#15 integrate
.. //depot/projects/usiii/modules/svr4/Makefile#3 integrate
.. //depot/projects/usiii/modules/wlan/Makefile#5 integrate
.. //depot/projects/usiii/net/if_atmsubr.c#4 integrate
.. //depot/projects/usiii/net/if_clone.c#2 integrate
.. //depot/projects/usiii/net/if_clone.h#2 integrate
.. //depot/projects/usiii/net/if_fwsubr.c#4 integrate
.. //depot/projects/usiii/net/if_iso88025subr.c#5 integrate
.. //depot/projects/usiii/net/if_lagg.c#7 integrate
.. //depot/projects/usiii/net/route.c#10 integrate
.. //depot/projects/usiii/net/route.h#6 integrate
.. //depot/projects/usiii/net80211/ieee80211_freebsd.c#6 integrate
.. //depot/projects/usiii/netgraph/ng_base.c#11 integrate
.. //depot/projects/usiii/netgraph/ng_source.c#3 integrate
.. //depot/projects/usiii/netinet/if_ether.c#8 integrate
.. //depot/projects/usiii/netinet/in_rmx.c#6 integrate
.. //depot/projects/usiii/netinet/in_var.h#4 integrate
.. //depot/projects/usiii/netinet/ip_fw.h#7 integrate
.. //depot/projects/usiii/netinet/ip_fw2.c#13 integrate
.. //depot/projects/usiii/netinet/tcp_output.c#9 integrate
.. //depot/projects/usiii/netinet/tcp_subr.c#11 integrate
.. //depot/projects/usiii/netinet/tcp_syncache.c#10 integrate
.. //depot/projects/usiii/netipx/ipx.c#2 integrate
.. //depot/projects/usiii/nfsclient/nfs_vfsops.c#12 integrate
.. //depot/projects/usiii/nfsclient/nfs_vnops.c#9 integrate
.. //depot/projects/usiii/nfsserver/nfs.h#3 integrate
.. //depot/projects/usiii/nfsserver/nfs_serv.c#8 integrate
.. //depot/projects/usiii/nfsserver/nfs_srvsock.c#4 integrate
.. //depot/projects/usiii/nfsserver/nfs_srvsubs.c#6 integrate
.. //depot/projects/usiii/nfsserver/nfs_syscalls.c#5 integrate
.. //depot/projects/usiii/powerpc/aim/clock.c#6 integrate
.. //depot/projects/usiii/powerpc/aim/mmu_oea.c#6 integrate
.. //depot/projects/usiii/powerpc/aim/mp_cpudep.c#2 integrate
.. //depot/projects/usiii/powerpc/aim/swtch.S#4 integrate
.. //depot/projects/usiii/powerpc/aim/trap_subr.S#4 integrate
.. //depot/projects/usiii/powerpc/include/cpufunc.h#4 integrate
.. //depot/projects/usiii/powerpc/include/smp.h#3 integrate
.. //depot/projects/usiii/powerpc/include/spr.h#5 integrate
.. //depot/projects/usiii/powerpc/ofw/ofw_syscons.c#2 integrate
.. //depot/projects/usiii/powerpc/powerpc/autoconf.c#3 integrate
.. //depot/projects/usiii/powerpc/powerpc/cpu.c#4 integrate
.. //depot/projects/usiii/powerpc/powerpc/mp_machdep.c#4 integrate
.. //depot/projects/usiii/powerpc/powerpc/openpic.c#5 integrate
.. //depot/projects/usiii/security/mac_bsdextended/mac_bsdextended.c#7 integrate
.. //depot/projects/usiii/sparc64/include/smp.h#5 integrate
.. //depot/projects/usiii/sparc64/include/tick.h#4 integrate
.. //depot/projects/usiii/sparc64/pci/psycho.c#14 integrate
.. //depot/projects/usiii/sparc64/pci/psychoreg.h#4 integrate
.. //depot/projects/usiii/sparc64/sparc64/genassym.c#5 integrate
.. //depot/projects/usiii/sparc64/sparc64/intr_machdep.c#7 integrate
.. //depot/projects/usiii/sparc64/sparc64/mp_machdep.c#9 integrate
.. //depot/projects/usiii/sparc64/sparc64/tick.c#7 integrate
.. //depot/projects/usiii/sys/interrupt.h#4 integrate
.. //depot/projects/usiii/sys/mount.h#7 integrate
.. //depot/projects/usiii/sys/param.h#14 integrate
.. //depot/projects/usiii/sys/priv.h#6 integrate
.. //depot/projects/usiii/sys/proc.h#13 integrate
.. //depot/projects/usiii/sys/procfs.h#3 integrate
.. //depot/projects/usiii/sys/sysent.h#2 integrate
.. //depot/projects/usiii/sys/ttydisc.h#3 integrate
.. //depot/projects/usiii/sys/vnode.h#9 integrate
.. //depot/projects/usiii/ufs/ffs/ffs_extern.h#3 integrate
.. //depot/projects/usiii/ufs/ffs/ffs_inode.c#4 integrate
.. //depot/projects/usiii/ufs/ffs/ffs_snapshot.c#6 integrate
.. //depot/projects/usiii/ufs/ffs/ffs_softdep.c#8 integrate
.. //depot/projects/usiii/ufs/ffs/ffs_vfsops.c#10 integrate
.. //depot/projects/usiii/ufs/ufs/dirhash.h#3 integrate
.. //depot/projects/usiii/ufs/ufs/inode.h#4 integrate
.. //depot/projects/usiii/ufs/ufs/ufs_dirhash.c#3 integrate
.. //depot/projects/usiii/ufs/ufs/ufs_inode.c#2 integrate
.. //depot/projects/usiii/ufs/ufs/ufs_lookup.c#8 integrate
.. //depot/projects/usiii/ufs/ufs/ufs_vnops.c#7 integrate
.. //depot/projects/usiii/ufs/ufs/ufsmount.h#3 integrate
.. //depot/projects/usiii/vm/vm_mmap.c#9 integrate

Differences ...

==== //depot/projects/usiii/amd64/amd64/identcpu.c#6 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.159 2008/05/23 04:03:52 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.160 2008/09/18 18:51:32 stas Exp $");
 
 #include "opt_cpu.h"
 
@@ -249,8 +249,8 @@
 				"\030POPCNT"
 				"\031<b24>"
 				"\032<b25>"
-				"\033<b26>"
-				"\034<b27>"
+				"\033XSAVE"
+				"\034OSXSAVE"
 				"\035<b28>"
 				"\036<b29>"
 				"\037<b30>"

==== //depot/projects/usiii/amd64/amd64/vm_machdep.c#4 (text+ko) ====

@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.257 2008/03/12 10:11:54 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.258 2008/09/11 18:33:57 jhb Exp $");
 
 #include "opt_isa.h"
 #include "opt_cpu.h"
@@ -466,10 +466,13 @@
 
 	/*
 	 * Attempt to force a reset via the Reset Control register at
-	 * I/O port 0xcf9.  Bit 2 forces a system reset when it is
-	 * written as 1.  Bit 1 selects the type of reset to attempt:
-	 * 0 selects a "soft" reset, and 1 selects a "hard" reset.  We
-	 * try to do a "soft" reset first, and then a "hard" reset.
+	 * I/O port 0xcf9.  Bit 2 forces a system reset when it
+	 * transitions from 0 to 1.  Bit 1 selects the type of reset
+	 * to attempt: 0 selects a "soft" reset, and 1 selects a
+	 * "hard" reset.  We try a "hard" reset.  The first write sets
+	 * bit 1 to select a "hard" reset and clears bit 2.  The
+	 * second write forces a 0 -> 1 transition in bit 2 to trigger
+	 * a reset.
 	 */
 	outb(0xcf9, 0x2);
 	outb(0xcf9, 0x6);

==== //depot/projects/usiii/amd64/include/pmc_mdep.h#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2003-2007 Joseph Koshy
+ * Copyright (c) 2003-2008 Joseph Koshy
  * Copyright (c) 2007 The FreeBSD Foundation
  * All rights reserved.
  *
@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/pmc_mdep.h,v 1.5 2008/06/20 05:22:09 alc Exp $
+ * $FreeBSD: src/sys/amd64/include/pmc_mdep.h,v 1.6 2008/09/15 06:47:52 jkoshy Exp $
  */
 
 /* Machine dependent interfaces */
@@ -59,7 +59,8 @@
 
 #define	PMC_TRAPFRAME_TO_PC(TF)	((TF)->tf_rip)
 #define	PMC_TRAPFRAME_TO_FP(TF)	((TF)->tf_rbp)
-#define	PMC_TRAPFRAME_TO_SP(TF)	((TF)->tf_rsp)
+#define	PMC_TRAPFRAME_TO_USER_SP(TF)	((TF)->tf_rsp)
+#define	PMC_TRAPFRAME_TO_KERNEL_SP(TF)	((TF)->tf_rsp)
 
 #define	PMC_AT_FUNCTION_PROLOGUE_PUSH_BP(I)		\
 	(((I) & 0xffffffff) == 0xe5894855) /* pushq %rbp; movq %rsp,%rbp */

==== //depot/projects/usiii/amd64/pci/pci_cfgreg.c#5 (text+ko) ====

@@ -27,12 +27,13 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_cfgreg.c,v 1.112 2008/09/10 18:06:08 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_cfgreg.c,v 1.113 2008/09/11 21:42:11 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/lock.h>
+#include <sys/kernel.h>
 #include <sys/mutex.h>
 #include <dev/pci/pcivar.h>
 #include <dev/pci/pcireg.h>
@@ -60,6 +61,8 @@
 static int pcie_minbus, pcie_maxbus;
 static uint32_t pcie_badslots;
 static struct mtx pcicfg_mtx;
+static int mcfg_enable = 1;
+TUNABLE_INT("hw.pci.mcfg", &mcfg_enable);
 
 /* 
  * Initialise access to PCI configuration space 
@@ -248,6 +251,9 @@
 	uint32_t val1, val2;
 	int slot;
 
+	if (!mcfg_enable)
+		return (0);
+
 	if (minbus != 0)
 		return (0);
 

==== //depot/projects/usiii/arm/arm/intr.c#5 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.23 2008/08/04 20:29:39 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.24 2008/09/11 12:36:13 raj Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/syslog.h> 
@@ -92,9 +92,19 @@
 }
 
 int
-arm_remove_irqhandler(void *cookie)
+arm_remove_irqhandler(int irq, void *cookie)
 {
-	return (intr_event_remove_handler(cookie));
+	struct intr_event *event;
+	int error;
+
+	event = intr_events[irq];
+	arm_mask_irq(irq);
+	
+	error = intr_event_remove_handler(cookie);
+
+	if (!TAILQ_EMPTY(&event->ie_handlers))
+		arm_unmask_irq(irq);
+	return (error);
 }
 
 void dosoftints(void);

==== //depot/projects/usiii/arm/arm/nexus.c#3 (text+ko) ====

@@ -12,7 +12,7 @@
  * no representations about the suitability of this software for any
  * purpose.  It is provided "as is" without express or implied
  * warranty.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
  * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.12 2008/03/12 15:46:25 raj Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.14 2008/09/11 12:39:54 raj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -76,14 +76,12 @@
 static	int nexus_print_child(device_t, device_t);
 static	device_t nexus_add_child(device_t, int, const char *, int);
 static	struct resource *nexus_alloc_resource(device_t, device_t, int, int *,
-	u_long, u_long, u_long, u_int);
+    u_long, u_long, u_long, u_int);
 static	int nexus_activate_resource(device_t, device_t, int, int,
-	struct resource *);
-static int
-nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
-        driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep);
-static int
-nexus_teardown_intr(device_t, device_t, struct resource *, void *);
+    struct resource *);
+static int nexus_setup_intr(device_t dev, device_t child, struct resource *res,
+    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep);
+static int nexus_teardown_intr(device_t, device_t, struct resource *, void *);
 
 static device_method_t nexus_methods[] = {
 	/* Device interface */
@@ -110,56 +108,48 @@
 nexus_probe(device_t dev)
 {
 	device_quiet(dev);	/* suppress attach message for neatness */
-		
+
 	mem_rman.rm_start = 0;
 	mem_rman.rm_end = ~0u;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory addresses";
-	if (rman_init(&mem_rman)
-		|| rman_manage_region(&mem_rman, 0, ~0u))
+	if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0u))
 		panic("nexus_probe mem_rman");
-		
+
 	return (0);
-	return bus_generic_probe(dev);
 }
 
 static int
 nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
     driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
 {
-	int i;
 
 	if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
 		flags |= INTR_EXCL;
 
-	for (i = rman_get_start(res); i <= rman_get_end(res); i++)
-		arm_setup_irqhandler(device_get_nameunit(child), 
-		    filt, intr, arg, i, flags, cookiep);
+	arm_setup_irqhandler(device_get_nameunit(child), 
+	    filt, intr, arg, rman_get_start(res), flags, cookiep);
 	return (0);
 }
 
 static int
 nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
 {
-	int error;
-	int i;
 
-	for (i = rman_get_start(r); i <= rman_get_end(r); i++)
-		arm_mask_irq(i);
-	error = arm_remove_irqhandler(ih);
-	return (error);
+	return (arm_remove_irqhandler(rman_get_start(r), ih));
 }
 
 static int
 nexus_attach(device_t dev)
 {
+
 	/*
 	 * First, deal with the children we know about already
 	 */
 	bus_generic_probe(dev);
 	bus_generic_attach(dev);
-	
-	return 0;
+
+	return (0);
 }
 
 
@@ -167,31 +157,30 @@
 nexus_print_child(device_t bus, device_t child)
 {
 	int retval = 0;
-	
+
 	retval += bus_print_child_header(bus, child);
 	retval += printf(" on motherboard\n");	/* XXX "motherboard", ick */
-	
+
 	return (retval);
 }
 
-
 static device_t
 nexus_add_child(device_t bus, int order, const char *name, int unit)
 {
-	device_t	child;
+	device_t child;
 	struct nexus_device *ndev;
-	
+
 	ndev = malloc(sizeof(struct nexus_device), M_NEXUSDEV, M_NOWAIT|M_ZERO);
 	if (!ndev)
-		return(0);
+		return (0);
 	resource_list_init(&ndev->nx_resources);
 
 	child = device_add_child_ordered(bus, order, name, unit);
-	
+
 	/* should we free this in nexus_child_detached? */
 	device_set_ivars(child, ndev);
-	
-	return(child);
+
+	return (child);
 }
 
 
@@ -203,7 +192,7 @@
 #define ARM_BUS_SPACE_MEM 1
 static struct resource *
 nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
-	u_long start, u_long end, u_long count, u_int flags)
+    u_long start, u_long end, u_long count, u_int flags)
 {
 	struct resource *rv;
 	struct rman *rm;
@@ -213,33 +202,33 @@
 	case SYS_RES_MEMORY:
 		rm = &mem_rman;
 		break;
-		
+
 	default:
-		return 0;
+		return (0);
 	}
 
 	rv = rman_reserve_resource(rm, start, end, count, flags, child);
 	if (rv == 0)
-		return 0;
+		return (0);
 
 	rman_set_rid(rv, *rid);
 	rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM);
-	rman_set_bushandle(rv, rman_get_start(rv));		
-	
+	rman_set_bushandle(rv, rman_get_start(rv));
+
 	if (needactivate) {
 		if (bus_activate_resource(child, type, *rid, rv)) {
 			rman_release_resource(rv);
-			return 0;
+			return (0);
 		}
 	}
-	
-	return rv;
+
+	return (rv);
 }
 
 
 static int
 nexus_activate_resource(device_t bus, device_t child, int type, int rid,
-	struct resource *r)
+    struct resource *r)
 {
 	/*
 	 * If this is a memory resource, map it into the kernel.
@@ -249,7 +238,7 @@
 		u_int32_t paddr;
 		u_int32_t psize;
 		u_int32_t poffs;
-		
+
 		paddr = rman_get_start(r);
 		psize = rman_get_size(r);
 		poffs = paddr - trunc_page(paddr);

==== //depot/projects/usiii/arm/include/intr.h#4 (text+ko) ====

@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/arm/include/intr.h,v 1.9 2008/06/06 05:08:09 benno Exp $
+ * $FreeBSD: src/sys/arm/include/intr.h,v 1.10 2008/09/11 12:36:13 raj Exp $
  *
  */
 
@@ -57,6 +57,6 @@
 void arm_unmask_irq(uintptr_t);
 void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*), 
     void *, int, int, void **);    
-int arm_remove_irqhandler(void *);
+int arm_remove_irqhandler(int, void *);
 extern void (*arm_post_filter)(void *);
 #endif	/* _MACHINE_INTR_H */

==== //depot/projects/usiii/arm/include/pcpu.h#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *	from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.7 2008/08/19 19:53:52 jhb Exp $
+ * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.8 2008/09/11 20:39:46 cognet Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
@@ -40,12 +40,7 @@
 
 #endif	/* _KERNEL */
 
-/*
- * Inside the kernel, the globally reserved register g7 is used to
- * point at the globaldata structure.
- */
-#define	PCPU_MD_FIELDS							\
-	struct pcup *pc_prvspace;
+#define	PCPU_MD_FIELDS
 
 #ifdef _KERNEL
 

==== //depot/projects/usiii/arm/xscale/ixp425/ixp425.c#3 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425.c,v 1.9 2008/02/26 11:44:41 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425.c,v 1.10 2008/09/11 20:43:38 cognet Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -143,22 +143,27 @@
 void
 arm_mask_irq(uintptr_t nb)
 {
+	int i;
+	
+	i = disable_interrupts(I32_bit);
 	intr_enabled &= ~(1 << nb);
 	ixp425_set_intrmask();
+	restore_interrupts(i);
 	/*XXX; If it's a GPIO interrupt, ACK it know. Can it be a problem ?*/
 	if ((1 << nb) & IXP425_INT_GPIOMASK)
 		IXPREG(IXP425_GPIO_VBASE + IXP425_GPIO_GPISR) =
 		    ixp425_irq2gpio_bit(nb);
-
-		
 }
 
 void
 arm_unmask_irq(uintptr_t nb)
 {
-
+	int i;
+	
+	i = disable_interrupts(I32_bit);
 	intr_enabled |= (1 << nb);
 	ixp425_set_intrmask();
+	restore_interrupts(i);
 }
 
 static __inline uint32_t

==== //depot/projects/usiii/arm/xscale/ixp425/ixp425_qmgr.c#3 (text+ko) ====

@@ -57,7 +57,7 @@
  * SUCH DAMAGE.
 */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.3 2007/10/12 06:03:42 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.4 2008/09/11 12:17:21 raj Exp $");
 
 /*
  * Intel XScale Queue Manager support.
@@ -133,9 +133,14 @@
 	device_t		sc_dev;
 	bus_space_tag_t		sc_iot;
 	bus_space_handle_t	sc_ioh;
-	struct resource		*sc_irq;	/* IRQ resource */
-	void			*sc_ih;		/* interrupt handler */
-	int			sc_rid;		/* resource id for irq */
+
+	struct resource		*sc_irq1;	/* IRQ resource */
+	void			*sc_ih1;	/* interrupt handler */
+	int			sc_rid1;	/* resource id for irq */
+
+	struct resource		*sc_irq2;
+	void			*sc_ih2;
+	int			sc_rid2;
 
 	struct qmgrInfo		qinfo[IX_QMGR_MAX_NUM_QUEUES];
 	/*
@@ -203,12 +208,12 @@
 	return 0;
 }
 
-static void
+static int
 ixpqmgr_attach(device_t dev)
 {
 	struct ixpqmgr_softc *sc = device_get_softc(dev);
 	struct ixp425_softc *sa = device_get_softc(device_get_parent(dev));
-	int i;
+	int i, err;
 
 	ixpqmgr_sc = sc;
 
@@ -219,13 +224,32 @@
 		panic("%s: Cannot map registers", device_get_name(dev));
 
 	/* NB: we only use the lower 32 q's */
-	sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_rid,
-	    IXP425_INT_QUE1_32, IXP425_INT_QUE33_64, 2, RF_ACTIVE);
-	if (!sc->sc_irq)
+
+	/* Set up QMGR interrupts */
+	sc->sc_rid1 = 0;
+	sc->sc_irq1 = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_rid1,
+	    IXP425_INT_QUE1_32, IXP425_INT_QUE1_32, 1, RF_ACTIVE);
+	sc->sc_rid2 = 1;
+	sc->sc_irq2 = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_rid2,
+	    IXP425_INT_QUE33_64, IXP425_INT_QUE33_64, 1, RF_ACTIVE);
+
+	if (sc->sc_irq1 == NULL || sc->sc_irq2 == NULL)
 		panic("Unable to allocate the qmgr irqs.\n");
-	/* XXX could be a source of entropy */
-	bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
-		NULL, ixpqmgr_intr, NULL, &sc->sc_ih);
+
+	err = bus_setup_intr(dev, sc->sc_irq1, INTR_TYPE_NET | INTR_MPSAFE,
+	    NULL, ixpqmgr_intr, NULL, &sc->sc_ih1);
+	if (err) {
+		device_printf(dev, "failed to set up qmgr irq=%d\n",
+		   IXP425_INT_QUE1_32);
+		return (ENXIO);
+	}
+	err = bus_setup_intr(dev, sc->sc_irq2, INTR_TYPE_NET | INTR_MPSAFE,
+	    NULL, ixpqmgr_intr, NULL, &sc->sc_ih2);
+	if (err) {
+		device_printf(dev, "failed to set up qmgr irq=%d\n",
+		   IXP425_INT_QUE33_64);
+		return (ENXIO);
+	}
 
 	/* NB: softc is pre-zero'd */
 	for (i = 0; i < IX_QMGR_MAX_NUM_QUEUES; i++) {
@@ -295,17 +319,21 @@
 
 	ixpqmgr_rebuild(sc);		/* build inital priority table */
 	aqm_reset(sc);			/* reset h/w */
+	return (0);
 }
 
-static void
+static int
 ixpqmgr_detach(device_t dev)
 {
 	struct ixpqmgr_softc *sc = device_get_softc(dev);
 
 	aqm_reset(sc);		/* disable interrupts */
-	bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih);
-	bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid, sc->sc_irq);
+	bus_teardown_intr(dev, sc->sc_irq1, sc->sc_ih1);
+	bus_teardown_intr(dev, sc->sc_irq2, sc->sc_ih2);
+	bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid1, sc->sc_irq1);
+	bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid2, sc->sc_irq2);
 	bus_space_unmap(sc->sc_iot, sc->sc_ioh, IXP425_QMGR_SIZE);
+	return (0);
 }
 
 int

==== //depot/projects/usiii/boot/Makefile#4 (text+ko) ====

@@ -1,7 +1,11 @@
-# $FreeBSD: src/sys/boot/Makefile,v 1.34 2008/07/23 07:23:33 imp Exp $
+# $FreeBSD: src/sys/boot/Makefile,v 1.35 2008/09/18 15:25:35 obrien Exp $
 
 .include <bsd.own.mk>
 
+.if ${MACHINE_ARCH} == "mips"
+MK_FORTH=no	# not yet
+.endif
+
 .if ${MK_FORTH} != "no"
 # Build the add-in FORTH interpreter.
 SUBDIR+=		ficl

==== //depot/projects/usiii/boot/ofw/libofw/Makefile#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/ofw/libofw/Makefile,v 1.11 2007/06/17 00:17:15 marius Exp $
+# $FreeBSD: src/sys/boot/ofw/libofw/Makefile,v 1.13 2008/09/19 19:49:58 sobomax Exp $
 
 LIB=		ofw
 INTERNALLIB=

==== //depot/projects/usiii/boot/ofw/libofw/ofw_console.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.13 2008/02/06 22:04:28 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.15 2008/09/19 19:49:58 sobomax Exp $");
 
 #include <sys/types.h>
 

==== //depot/projects/usiii/cam/cam.h#2 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam.h,v 1.11 2005/01/05 22:34:34 imp Exp $
+ * $FreeBSD: src/sys/cam/cam.h,v 1.12 2008/09/18 14:48:46 sbruno Exp $
  */
 
 #ifndef _CAM_CAM_H
@@ -129,6 +129,7 @@
 				 * requests for the target at the sim level
 				 * back into the XPT queue.
 				 */
+	CAM_SCSI_IT_NEXUS_LOST,	/* Initiator/Target Nexus lost. */
 	CAM_IDE = 0x33,		/* Initiator Detected Error */
 	CAM_RESRC_UNAVAIL,	/* Resource Unavailable */
 	CAM_UNACKED_EVENT,	/* Unacknowledged Event by Host */

==== //depot/projects/usiii/cddl/compat/opensolaris/kern/opensolaris_atomic.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c,v 1.2 2008/03/28 22:16:05 jb Exp $");
+__FBSDID("$FreeBSD: src/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c,v 1.3 2008/09/18 19:57:06 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/lock.h>
@@ -74,7 +74,8 @@
 	return (newval);
 }
 
-#if defined(__sparc64__) || defined(__powerpc__) || defined(__arm__)
+#if defined(__sparc64__) || defined(__powerpc__) || defined(__arm__) || \
+    defined(__mips__)
 void
 atomic_or_8(volatile uint8_t *target, uint8_t value)
 {

==== //depot/projects/usiii/cddl/compat/opensolaris/sys/atomic.h#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/atomic.h,v 1.4 2008/05/22 08:33:24 jb Exp $
+ * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/atomic.h,v 1.5 2008/09/18 19:57:06 imp Exp $
  */
 
 #ifndef _OPENSOLARIS_SYS_ATOMIC_H_
@@ -48,7 +48,8 @@
 extern uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value);
 extern void membar_producer(void);
 
-#if defined(__sparc64__) || defined(__powerpc__) || defined(__arm__)
+#if defined(__sparc64__) || defined(__powerpc__) || defined(__arm__) || \
+    defined(__mips__)
 extern void atomic_or_8(volatile uint8_t *target, uint8_t value);
 #else
 static __inline void

==== //depot/projects/usiii/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#3 (text+ko) ====

@@ -744,6 +744,7 @@
 		VN_RELE(*vpp);
 		*vpp = NULL;
 	}
+	ZFS_EXIT(zfsvfs);
 	return (err);
 }
 

==== //depot/projects/usiii/compat/freebsd32/freebsd32_misc.c#6 (text+ko) ====

@@ -25,18 +25,16 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.77 2008/07/10 19:54:34 brooks Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.79 2008/09/19 15:17:32 obrien Exp $");
 
 #include "opt_compat.h"
 
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/clock.h>
 #include <sys/exec.h>
 #include <sys/fcntl.h>
 #include <sys/filedesc.h>
-#include <sys/namei.h>
 #include <sys/imgact.h>
 #include <sys/kernel.h>
 #include <sys/limits.h>
@@ -48,6 +46,7 @@
 #include <sys/module.h>
 #include <sys/mount.h>
 #include <sys/mutex.h>
+#include <sys/namei.h>
 #include <sys/proc.h>
 #include <sys/reboot.h>
 #include <sys/resource.h>
@@ -65,6 +64,7 @@
 #include <sys/sysctl.h>
 #include <sys/sysent.h>
 #include <sys/sysproto.h>
+#include <sys/systm.h>
 #include <sys/thr.h>
 #include <sys/unistd.h>
 #include <sys/ucontext.h>
@@ -85,6 +85,8 @@
 
 #include <machine/cpu.h>
 
+#include <security/audit/audit.h>
+
 #include <compat/freebsd32/freebsd32_util.h>
 #include <compat/freebsd32/freebsd32.h>
 #include <compat/freebsd32/freebsd32_ipc.h>
@@ -2552,14 +2554,58 @@
 	return (cpuset_setaffinity(td, &ap));
 }
 
+int
+freebsd32_nmount(struct thread *td,
+    struct freebsd32_nmount_args /* {
+    	struct iovec *iovp;
+    	unsigned int iovcnt;
+    	int flags;
+    } */ *uap)
+{
+	struct uio *auio;
+	struct iovec *iov;
+	int error, k;
+
+	AUDIT_ARG(fflags, uap->flags);
+
+	/*
+	 * Filter out MNT_ROOTFS.  We do not want clients of nmount() in
+	 * userspace to set this flag, but we must filter it out if we want
+	 * MNT_UPDATE on the root file system to work.
+	 * MNT_ROOTFS should only be set in the kernel in vfs_mountroot_try().
+	 */
+	uap->flags &= ~MNT_ROOTFS;
+
+	/*
+	 * check that we have an even number of iovec's
+	 * and that we have at least two options.
+	 */
+	if ((uap->iovcnt & 1) || (uap->iovcnt < 4))
+		return (EINVAL);
+
+	error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
+	if (error)
+		return (error);
+	for (iov = auio->uio_iov, k = 0; k < uap->iovcnt; ++k, ++iov) {
+		if (iov->iov_len > MMAXOPTIONLEN) {
+			free(auio, M_IOV);
+			return (EINVAL);
+		}
+	}
+
+	error = vfs_donmount(td, uap->flags, auio);
+	free(auio, M_IOV);
+	return error;
+}
+
 #if 0
-
 int
 freebsd32_xxx(struct thread *td, struct freebsd32_xxx_args *uap)
 {
-	int error;
 	struct yyy32 *p32, s32;
 	struct yyy *p = NULL, s;
+	struct xxx_arg ap;
+	int error;
 
 	if (uap->zzz) {
 		error = copyin(uap->zzz, &s32, sizeof(s32));
@@ -2577,5 +2623,4 @@
 	}
 	return (error);
 }
-
 #endif

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


More information about the p4-projects mailing list