svn commit: r229410 - in user/mjacob/sys: . amd64/amd64 amd64/conf amd64/linux32 arm/xscale/ixp425 boot/common boot/forth boot/ofw/common boot/ofw/libofw boot/userboot/libstand cam/ata cam/scsi com...

Matt Jacob mjacob at FreeBSD.org
Tue Jan 3 19:24:34 UTC 2012


Author: mjacob
Date: Tue Jan  3 19:24:33 2012
New Revision: 229410
URL: http://svn.freebsd.org/changeset/base/229410

Log:
  IFC at 229408

Added:
  user/mjacob/sys/contrib/xz-embedded/
     - copied from r229408, head/sys/contrib/xz-embedded/
  user/mjacob/sys/dev/hpt27xx/
     - copied from r229408, head/sys/dev/hpt27xx/
  user/mjacob/sys/libkern/memcchr.c
     - copied unchanged from r229408, head/sys/libkern/memcchr.c
  user/mjacob/sys/libkern/strchr.c
     - copied unchanged from r229408, head/sys/libkern/strchr.c
  user/mjacob/sys/libkern/strrchr.c
     - copied unchanged from r229408, head/sys/libkern/strrchr.c
  user/mjacob/sys/mips/cavium/octeon_gpio.c
     - copied unchanged from r229408, head/sys/mips/cavium/octeon_gpio.c
  user/mjacob/sys/mips/cavium/octeon_gpiovar.h
     - copied unchanged from r229408, head/sys/mips/cavium/octeon_gpiovar.h
  user/mjacob/sys/mips/conf/AR71XX_BASE
     - copied unchanged from r229408, head/sys/mips/conf/AR71XX_BASE
  user/mjacob/sys/mips/conf/AR71XX_BASE.hints
     - copied unchanged from r229408, head/sys/mips/conf/AR71XX_BASE.hints
  user/mjacob/sys/mips/conf/PB47
     - copied unchanged from r229408, head/sys/mips/conf/PB47
  user/mjacob/sys/mips/conf/PB47.hints
     - copied unchanged from r229408, head/sys/mips/conf/PB47.hints
  user/mjacob/sys/mips/conf/ROUTERSTATION
     - copied unchanged from r229408, head/sys/mips/conf/ROUTERSTATION
  user/mjacob/sys/mips/conf/ROUTERSTATION.hints
     - copied unchanged from r229408, head/sys/mips/conf/ROUTERSTATION.hints
  user/mjacob/sys/mips/conf/ROUTERSTATION_MFS
     - copied unchanged from r229408, head/sys/mips/conf/ROUTERSTATION_MFS
  user/mjacob/sys/mips/conf/RSPRO
     - copied unchanged from r229408, head/sys/mips/conf/RSPRO
  user/mjacob/sys/mips/conf/RSPRO.hints
     - copied unchanged from r229408, head/sys/mips/conf/RSPRO.hints
  user/mjacob/sys/mips/conf/RSPRO_MFS
     - copied unchanged from r229408, head/sys/mips/conf/RSPRO_MFS
  user/mjacob/sys/mips/conf/RSPRO_STANDALONE
     - copied unchanged from r229408, head/sys/mips/conf/RSPRO_STANDALONE
  user/mjacob/sys/modules/cfi/
     - copied from r229408, head/sys/modules/cfi/
  user/mjacob/sys/modules/hpt27xx/
     - copied from r229408, head/sys/modules/hpt27xx/
Deleted:
  user/mjacob/sys/libkern/index.c
  user/mjacob/sys/libkern/rindex.c
  user/mjacob/sys/libkern/skpc.c
  user/mjacob/sys/mips/conf/AR71XX
  user/mjacob/sys/mips/conf/AR71XX.hints
Modified:
  user/mjacob/sys/Makefile
  user/mjacob/sys/amd64/amd64/machdep.c
  user/mjacob/sys/amd64/amd64/pmap.c
  user/mjacob/sys/amd64/conf/GENERIC
  user/mjacob/sys/amd64/conf/NOTES
  user/mjacob/sys/amd64/linux32/linux.h
  user/mjacob/sys/amd64/linux32/linux32_dummy.c
  user/mjacob/sys/amd64/linux32/linux32_proto.h
  user/mjacob/sys/amd64/linux32/linux32_syscall.h
  user/mjacob/sys/amd64/linux32/linux32_syscalls.c
  user/mjacob/sys/amd64/linux32/linux32_sysent.c
  user/mjacob/sys/amd64/linux32/linux32_systrace_args.c
  user/mjacob/sys/amd64/linux32/syscalls.master
  user/mjacob/sys/arm/xscale/ixp425/ixdp425_pci.c
  user/mjacob/sys/arm/xscale/ixp425/ixp425_pci.c
  user/mjacob/sys/arm/xscale/ixp425/ixp425var.h
  user/mjacob/sys/boot/common/interp_parse.c
  user/mjacob/sys/boot/common/loader.8
  user/mjacob/sys/boot/forth/loader.4th
  user/mjacob/sys/boot/forth/menu.4th
  user/mjacob/sys/boot/forth/menu.4th.8
  user/mjacob/sys/boot/ofw/common/main.c
  user/mjacob/sys/boot/ofw/libofw/ofw_net.c
  user/mjacob/sys/boot/userboot/libstand/Makefile
  user/mjacob/sys/cam/ata/ata_da.c
  user/mjacob/sys/cam/scsi/scsi_cd.c
  user/mjacob/sys/cam/scsi/scsi_da.c
  user/mjacob/sys/cam/scsi/scsi_sa.c
  user/mjacob/sys/cam/scsi/scsi_ses.c
  user/mjacob/sys/compat/linux/linux_file.c
  user/mjacob/sys/compat/linux/linux_ioctl.c
  user/mjacob/sys/compat/ndis/subr_ntoskrnl.c
  user/mjacob/sys/conf/files
  user/mjacob/sys/conf/files.amd64
  user/mjacob/sys/conf/files.i386
  user/mjacob/sys/conf/kern.mk
  user/mjacob/sys/conf/kern.pre.mk
  user/mjacob/sys/contrib/octeon-sdk/cvmx-helper-board.c
  user/mjacob/sys/contrib/octeon-sdk/cvmx-usb.c
  user/mjacob/sys/ddb/db_input.c
  user/mjacob/sys/dev/acpica/acpi_pcib_acpi.c
  user/mjacob/sys/dev/ata/ata-disk.c
  user/mjacob/sys/dev/ath/ath_hal/ar5210/ar5210reg.h
  user/mjacob/sys/dev/ath/ath_hal/ar5211/ar5211reg.h
  user/mjacob/sys/dev/ath/if_ath_tx.c
  user/mjacob/sys/dev/ce/if_ce.c
  user/mjacob/sys/dev/cp/if_cp.c
  user/mjacob/sys/dev/drm/radeon_state.c
  user/mjacob/sys/dev/fdt/fdt_pci.c
  user/mjacob/sys/dev/fdt/fdtbus.c
  user/mjacob/sys/dev/fdt/simplebus.c
  user/mjacob/sys/dev/hwpmc/hwpmc_amd.c
  user/mjacob/sys/dev/if_ndis/if_ndis_pccard.c
  user/mjacob/sys/dev/iwn/if_iwn.c
  user/mjacob/sys/dev/mps/mps_sas.c
  user/mjacob/sys/dev/mxge/if_mxge.c
  user/mjacob/sys/dev/uart/uart_bus_fdt.c
  user/mjacob/sys/dev/uart/uart_bus_pci.c
  user/mjacob/sys/dev/uart/uart_cpu_sparc64.c
  user/mjacob/sys/dev/usb/controller/usb_controller.c
  user/mjacob/sys/dev/usb/controller/xhci.c
  user/mjacob/sys/dev/usb/controller/xhci.h
  user/mjacob/sys/fs/ext2fs/ext2_alloc.c
  user/mjacob/sys/fs/nfs/nfsport.h
  user/mjacob/sys/fs/ntfs/ntfs_compr.c
  user/mjacob/sys/fs/ntfs/ntfs_subr.c
  user/mjacob/sys/fs/nwfs/nwfs_vfsops.c
  user/mjacob/sys/fs/smbfs/smbfs_vfsops.c
  user/mjacob/sys/fs/smbfs/smbfs_vnops.c
  user/mjacob/sys/fs/tmpfs/tmpfs_vnops.c
  user/mjacob/sys/gnu/fs/xfs/xfs_vfsops.c
  user/mjacob/sys/i386/conf/GENERIC
  user/mjacob/sys/i386/conf/NOTES
  user/mjacob/sys/i386/i386/machdep.c
  user/mjacob/sys/i386/i386/pmap.c
  user/mjacob/sys/i386/i386/sys_machdep.c
  user/mjacob/sys/i386/ibcs2/ibcs2_socksys.c
  user/mjacob/sys/i386/ibcs2/ibcs2_stat.c
  user/mjacob/sys/i386/include/asm.h
  user/mjacob/sys/i386/include/ucontext.h
  user/mjacob/sys/i386/linux/linux.h
  user/mjacob/sys/i386/linux/linux_dummy.c
  user/mjacob/sys/i386/linux/linux_proto.h
  user/mjacob/sys/i386/linux/linux_syscall.h
  user/mjacob/sys/i386/linux/linux_syscalls.c
  user/mjacob/sys/i386/linux/linux_sysent.c
  user/mjacob/sys/i386/linux/linux_systrace_args.c
  user/mjacob/sys/i386/linux/syscalls.master
  user/mjacob/sys/i386/xen/pmap.c
  user/mjacob/sys/ia64/conf/GENERIC
  user/mjacob/sys/kern/kern_intr.c
  user/mjacob/sys/kern/kern_ktr.c
  user/mjacob/sys/kern/kern_linker.c
  user/mjacob/sys/kern/sched_ule.c
  user/mjacob/sys/kern/subr_hints.c
  user/mjacob/sys/kern/tty_inq.c
  user/mjacob/sys/kern/uipc_mqueue.c
  user/mjacob/sys/kern/vfs_lookup.c
  user/mjacob/sys/libkern/fnmatch.c
  user/mjacob/sys/mips/cavium/files.octeon1
  user/mjacob/sys/mips/cavium/octeon_ds1337.c
  user/mjacob/sys/mips/cavium/usb/octusb.c
  user/mjacob/sys/mips/cavium/usb/octusb.h
  user/mjacob/sys/mips/cavium/usb/octusb_octeon.c
  user/mjacob/sys/mips/conf/AR91XX_BASE
  user/mjacob/sys/mips/include/intr_machdep.h
  user/mjacob/sys/mips/mips/gdb_machdep.c
  user/mjacob/sys/modules/Makefile
  user/mjacob/sys/modules/ce/Makefile
  user/mjacob/sys/modules/drm/r128/Makefile
  user/mjacob/sys/modules/drm/radeon/Makefile
  user/mjacob/sys/modules/drm/via/Makefile
  user/mjacob/sys/modules/ipfilter/Makefile
  user/mjacob/sys/modules/nxge/Makefile
  user/mjacob/sys/modules/xfs/Makefile
  user/mjacob/sys/net/if_vlan.c
  user/mjacob/sys/net80211/ieee80211_ht.c
  user/mjacob/sys/netgraph/ng_base.c
  user/mjacob/sys/netgraph/ng_ksocket.c
  user/mjacob/sys/netinet/if_ether.c
  user/mjacob/sys/netinet/igmp.c
  user/mjacob/sys/netinet/in_mcast.c
  user/mjacob/sys/netinet/ip_var.h
  user/mjacob/sys/netinet/raw_ip.c
  user/mjacob/sys/netinet/sctp_output.c
  user/mjacob/sys/netinet6/icmp6.c
  user/mjacob/sys/netinet6/in6.c
  user/mjacob/sys/netinet6/in6_ifattach.c
  user/mjacob/sys/netinet6/in6_var.h
  user/mjacob/sys/netinet6/mld6.c
  user/mjacob/sys/netinet6/nd6.c
  user/mjacob/sys/netinet6/nd6.h
  user/mjacob/sys/netinet6/nd6_rtr.c
  user/mjacob/sys/netinet6/scope6_var.h
  user/mjacob/sys/pc98/conf/GENERIC
  user/mjacob/sys/powerpc/conf/GENERIC
  user/mjacob/sys/security/mac_lomac/mac_lomac.c
  user/mjacob/sys/sparc64/conf/GENERIC
  user/mjacob/sys/sys/_null.h
  user/mjacob/sys/sys/copyright.h
  user/mjacob/sys/sys/libkern.h
  user/mjacob/sys/sys/namei.h
  user/mjacob/sys/sys/param.h
  user/mjacob/sys/ufs/ffs/ffs_alloc.c
  user/mjacob/sys/vm/vm_object.c
Directory Properties:
  user/mjacob/sys/   (props changed)
  user/mjacob/sys/boot/   (props changed)
  user/mjacob/sys/conf/   (props changed)
  user/mjacob/sys/contrib/octeon-sdk/   (props changed)

Modified: user/mjacob/sys/Makefile
==============================================================================
--- user/mjacob/sys/Makefile	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/Makefile	Tue Jan  3 19:24:33 2012	(r229410)
@@ -13,10 +13,18 @@ CSCOPEDIRS=	boot bsm cam cddl compat con
 		netgraph netinet netinet6 netipsec netipx netnatm netncp \
 		netsmb nfs nfsclient nfsserver nlm opencrypto \
 		pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
+.if !defined(CSCOPE_ARCHDIR)
 .if defined(ALL_ARCH)
-CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
+CSCOPE_ARCHDIR = amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
 .else
-CSCOPE_ARCHDIR ?= ${MACHINE}
+CSCOPE_ARCHDIR = ${MACHINE} 
+.if ${MACHINE} != ${MACHINE_CPUARCH}
+CSCOPE_ARCHDIR += ${MACHINE_CPUARCH}
+.endif
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CSCOPE_ARCHDIR += x86
+.endif
+.endif
 .endif
 
 # Loadable kernel modules

Modified: user/mjacob/sys/amd64/amd64/machdep.c
==============================================================================
--- user/mjacob/sys/amd64/amd64/machdep.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/amd64/machdep.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -1401,10 +1401,13 @@ getmemsize(caddr_t kmdp, u_int64_t first
 		Maxmem = atop(physmem_tunable);
 
 	/*
-	 * By default keep the memtest enabled.  Use a general name so that
+	 * By default enable the memory test on real hardware, and disable
+	 * it if we appear to be running in a VM.  This avoids touching all
+	 * pages unnecessarily, which doesn't matter on real hardware but is
+	 * bad for shared VM hosts.  Use a general name so that
 	 * one could eventually do more with the code than just disable it.
 	 */
-	memtest = 1;
+	memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1;
 	TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest);
 
 	/*

Modified: user/mjacob/sys/amd64/amd64/pmap.c
==============================================================================
--- user/mjacob/sys/amd64/amd64/pmap.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/amd64/pmap.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -1255,8 +1255,8 @@ retry:
 	if (pdep != NULL && (pde = *pdep)) {
 		if (pde & PG_PS) {
 			if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) {
-				if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) |
-				       (va & PDRMASK), &pa))
+				if (vm_page_pa_tryrelock(pmap, (pde &
+				    PG_PS_FRAME) | (va & PDRMASK), &pa))
 					goto retry;
 				m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) |
 				    (va & PDRMASK));
@@ -1266,7 +1266,8 @@ retry:
 			pte = *pmap_pde_to_pte(pdep, va);
 			if ((pte & PG_V) &&
 			    ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) {
-				if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa))
+				if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME,
+				    &pa))
 					goto retry;
 				m = PHYS_TO_VM_PAGE(pte & PG_FRAME);
 				vm_page_hold(m);

Modified: user/mjacob/sys/amd64/conf/GENERIC
==============================================================================
--- user/mjacob/sys/amd64/conf/GENERIC	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/conf/GENERIC	Tue Jan  3 19:24:33 2012	(r229410)
@@ -60,6 +60,8 @@ options 	PRINTF_BUFR_SIZE=128	# Prevent 
 options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
 options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
 options 	AUDIT			# Security event auditing
+options 	CAPABILITY_MODE		# Capsicum capability mode
+options 	CAPABILITIES		# Capsicum capabilities
 options 	MAC			# TrustedBSD MAC Framework
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks

Modified: user/mjacob/sys/amd64/conf/NOTES
==============================================================================
--- user/mjacob/sys/amd64/conf/NOTES	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/conf/NOTES	Tue Jan  3 19:24:33 2012	(r229410)
@@ -388,6 +388,10 @@ device		aac
 device		aacp	# SCSI Passthrough interface (optional, CAM required)
 
 #
+# Highpoint RocketRAID 27xx.
+device		hpt27xx
+
+#
 # Highpoint RocketRAID 182x.
 device		hptmv
 

Modified: user/mjacob/sys/amd64/linux32/linux.h
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux.h	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux.h	Tue Jan  3 19:24:33 2012	(r229410)
@@ -597,6 +597,16 @@ int	linux_ioctl_unregister_handler(struc
 #define	LINUX_F_UNLCK		2
 
 /*
+ * posix_fadvise advice
+ */
+#define	LINUX_POSIX_FADV_NORMAL		0
+#define	LINUX_POSIX_FADV_RANDOM		1
+#define	LINUX_POSIX_FADV_SEQUENTIAL    	2
+#define	LINUX_POSIX_FADV_WILLNEED      	3
+#define	LINUX_POSIX_FADV_DONTNEED      	4
+#define	LINUX_POSIX_FADV_NOREUSE       	5
+
+/*
  * mount flags
  */
 #define	LINUX_MS_RDONLY		0x0001

Modified: user/mjacob/sys/amd64/linux32/linux32_dummy.c
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_dummy.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_dummy.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -59,7 +59,6 @@ DUMMY(setfsuid);
 DUMMY(setfsgid);
 DUMMY(pivot_root);
 DUMMY(mincore);
-DUMMY(fadvise64);
 DUMMY(ptrace);
 DUMMY(lookup_dcookie);
 DUMMY(epoll_create);
@@ -72,7 +71,6 @@ DUMMY(timer_gettime);
 DUMMY(timer_getoverrun);
 DUMMY(timer_delete);
 DUMMY(fstatfs64);
-DUMMY(fadvise64_64);
 DUMMY(mbind);
 DUMMY(get_mempolicy);
 DUMMY(set_mempolicy);

Modified: user/mjacob/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_proto.h	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_proto.h	Tue Jan  3 19:24:33 2012	(r229410)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -756,7 +756,10 @@ struct linux_set_thread_area_args {
 	char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)];
 };
 struct linux_fadvise64_args {
-	register_t dummy;
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+	char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
+	char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_exit_group_args {
 	char error_code_l_[PADL_(int)]; int error_code; char error_code_r_[PADR_(int)];
@@ -830,7 +833,10 @@ struct linux_utimes_args {
 	char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)];
 };
 struct linux_fadvise64_64_args {
-	register_t dummy;
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
+	char len_l_[PADL_(l_loff_t)]; l_loff_t len; char len_r_[PADR_(l_loff_t)];
+	char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_mbind_args {
 	register_t dummy;

Modified: user/mjacob/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_syscall.h	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_syscall.h	Tue Jan  3 19:24:33 2012	(r229410)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb 
  */
 
 #define	LINUX_SYS_exit	1

Modified: user/mjacob/sys/amd64/linux32/linux32_syscalls.c
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_syscalls.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_syscalls.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb 
  */
 
 const char *linux_syscallnames[] = {

Modified: user/mjacob/sys/amd64/linux32/linux32_sysent.c
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_sysent.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_sysent.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb 
  */
 
 #include "opt_compat.h"
@@ -269,7 +269,7 @@ struct sysent linux_sysent[] = {
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 247 = linux_io_getevents */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 248 = linux_io_submit */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 249 = linux_io_cancel */
-	{ 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 250 = linux_fadvise64 */
+	{ AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 250 = linux_fadvise64 */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 251 =  */
 	{ AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC },	/* 252 = linux_exit_group */
 	{ 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 253 = linux_lookup_dcookie */
@@ -291,7 +291,7 @@ struct sysent linux_sysent[] = {
 	{ 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC },	/* 269 = linux_fstatfs64 */
 	{ AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 270 = linux_tgkill */
 	{ AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC },	/* 271 = linux_utimes */
-	{ 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 272 = linux_fadvise64_64 */
+	{ AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 272 = linux_fadvise64_64 */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 273 =  */
 	{ 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 274 = linux_mbind */
 	{ 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 275 = linux_get_mempolicy */

Modified: user/mjacob/sys/amd64/linux32/linux32_systrace_args.c
==============================================================================
--- user/mjacob/sys/amd64/linux32/linux32_systrace_args.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/linux32_systrace_args.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -1674,7 +1674,12 @@ systrace_args(int sysnum, void *params, 
 	}
 	/* linux_fadvise64 */
 	case 250: {
-		*n_args = 0;
+		struct linux_fadvise64_args *p = params;
+		iarg[0] = p->fd; /* int */
+		iarg[1] = p->offset; /* l_loff_t */
+		iarg[2] = p->len; /* l_size_t */
+		iarg[3] = p->advice; /* int */
+		*n_args = 4;
 		break;
 	}
 	/* linux_exit_group */
@@ -1808,7 +1813,12 @@ systrace_args(int sysnum, void *params, 
 	}
 	/* linux_fadvise64_64 */
 	case 272: {
-		*n_args = 0;
+		struct linux_fadvise64_64_args *p = params;
+		iarg[0] = p->fd; /* int */
+		iarg[1] = p->offset; /* l_loff_t */
+		iarg[2] = p->len; /* l_loff_t */
+		iarg[3] = p->advice; /* int */
+		*n_args = 4;
 		break;
 	}
 	/* linux_mbind */
@@ -4614,6 +4624,22 @@ systrace_entry_setargdesc(int sysnum, in
 		break;
 	/* linux_fadvise64 */
 	case 250:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "l_loff_t";
+			break;
+		case 2:
+			p = "l_size_t";
+			break;
+		case 3:
+			p = "int";
+			break;
+		default:
+			break;
+		};
 		break;
 	/* linux_exit_group */
 	case 252:
@@ -4773,6 +4799,22 @@ systrace_entry_setargdesc(int sysnum, in
 		break;
 	/* linux_fadvise64_64 */
 	case 272:
+		switch(ndx) {
+		case 0:
+			p = "int";
+			break;
+		case 1:
+			p = "l_loff_t";
+			break;
+		case 2:
+			p = "l_loff_t";
+			break;
+		case 3:
+			p = "int";
+			break;
+		default:
+			break;
+		};
 		break;
 	/* linux_mbind */
 	case 274:
@@ -6089,6 +6131,9 @@ systrace_return_setargdesc(int sysnum, i
 		break;
 	/* linux_fadvise64 */
 	case 250:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux_exit_group */
 	case 252:
 		if (ndx == 0 || ndx == 1)
@@ -6158,6 +6203,9 @@ systrace_return_setargdesc(int sysnum, i
 		break;
 	/* linux_fadvise64_64 */
 	case 272:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
 	/* linux_mbind */
 	case 274:
 	/* linux_get_mempolicy */

Modified: user/mjacob/sys/amd64/linux32/syscalls.master
==============================================================================
--- user/mjacob/sys/amd64/linux32/syscalls.master	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/amd64/linux32/syscalls.master	Tue Jan  3 19:24:33 2012	(r229410)
@@ -419,7 +419,8 @@
 247	AUE_NULL	UNIMPL	linux_io_getevents
 248	AUE_NULL	UNIMPL	linux_io_submit
 249	AUE_NULL	UNIMPL	linux_io_cancel
-250	AUE_NULL	STD	{ int linux_fadvise64(void); }
+250	AUE_NULL	STD	{ int linux_fadvise64(int fd, l_loff_t offset, \
+					l_size_t len, int advice); }
 251	AUE_NULL	UNIMPL
 252	AUE_EXIT	STD	{ int linux_exit_group(int error_code); }
 253	AUE_NULL	STD	{ int linux_lookup_dcookie(void); }
@@ -443,7 +444,9 @@
 270	AUE_NULL	STD	{ int linux_tgkill(int tgid, int pid, int sig); }
 271	AUE_UTIMES	STD	{ int linux_utimes(char *fname, \
 					struct l_timeval *tptr); }
-272	AUE_NULL	STD	{ int linux_fadvise64_64(void); }
+272	AUE_NULL	STD	{ int linux_fadvise64_64(int fd, \
+					l_loff_t offset, l_loff_t len, \
+					int advice); }
 273	AUE_NULL	UNIMPL
 274	AUE_NULL	STD	{ int linux_mbind(void); }
 275	AUE_NULL	STD	{ int linux_get_mempolicy(void); }

Modified: user/mjacob/sys/arm/xscale/ixp425/ixdp425_pci.c
==============================================================================
--- user/mjacob/sys/arm/xscale/ixp425/ixdp425_pci.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/arm/xscale/ixp425/ixdp425_pci.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$");
 #include <sys/module.h>
 #include <sys/malloc.h>
 #include <sys/rman.h>
+
+#include <dev/pci/pcivar.h>
+
 #include <machine/bus.h>
 #include <machine/intr.h>
 

Modified: user/mjacob/sys/arm/xscale/ixp425/ixp425_pci.c
==============================================================================
--- user/mjacob/sys/arm/xscale/ixp425/ixp425_pci.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/arm/xscale/ixp425/ixp425_pci.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -45,9 +45,12 @@ __FBSDID("$FreeBSD$");
 #include <sys/module.h>
 #include <sys/rman.h>
 
+#include <dev/pci/pcivar.h>
+
 #include <machine/bus.h>
 #include <machine/cpu.h>
 #include <machine/pcb.h>
+
 #include <vm/vm.h>
 #include <vm/pmap.h>
 #include <vm/vm_extern.h>

Modified: user/mjacob/sys/arm/xscale/ixp425/ixp425var.h
==============================================================================
--- user/mjacob/sys/arm/xscale/ixp425/ixp425var.h	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/arm/xscale/ixp425/ixp425var.h	Tue Jan  3 19:24:33 2012	(r229410)
@@ -44,7 +44,6 @@
 
 #include <machine/bus.h>
 
-#include <dev/pci/pcivar.h>
 #include <sys/rman.h>
 
 /* NB: cputype is setup by set_cpufuncs */

Modified: user/mjacob/sys/boot/common/interp_parse.c
==============================================================================
--- user/mjacob/sys/boot/common/interp_parse.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/common/interp_parse.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -137,7 +137,7 @@ parse(int *argc, char ***argv, char *str
 
 	case VAR:
 	    if (token) {
-		PARSE_FAIL((q = index(p, token)) == NULL);
+		PARSE_FAIL((q = strchr(p, token)) == NULL);
 	    } else {
 		q = p;
 		while (*q && !isspace(*q))

Modified: user/mjacob/sys/boot/common/loader.8
==============================================================================
--- user/mjacob/sys/boot/common/loader.8	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/common/loader.8	Tue Jan  3 19:24:33 2012	(r229410)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 15, 2009
+.Dd December 27, 2011
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -926,10 +926,10 @@ autoboot 5
 .Pp
 Set the disk unit of the root device to 2, and then boot.
 This would be needed in a system with two IDE disks,
-with the second IDE disk hardwired to wd2 instead of wd1.
+with the second IDE disk hardwired to ad2 instead of ad1.
 .Bd -literal -offset indent
 set root_disk_unit=2
-boot /kernel
+boot /boot/kernel/kernel
 .Ed
 .Pp
 See also:

Modified: user/mjacob/sys/boot/forth/loader.4th
==============================================================================
--- user/mjacob/sys/boot/forth/loader.4th	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/forth/loader.4th	Tue Jan  3 19:24:33 2012	(r229410)
@@ -41,12 +41,15 @@ s" arch-i386" environment? [if] [if]
 
 include /boot/support.4th
 
-\ ***** boot-conf
-\
-\	Prepares to boot as specified by loaded configuration files.
-
 only forth also support-functions also builtins definitions
 
+: try-menu-unset
+  s" menu-unset"
+  ['] evaluate catch if
+    2drop
+  then
+;
+
 : boot
   0= if ( interpreted ) get_arguments then
 
@@ -57,24 +60,32 @@ only forth also support-functions also b
       0 1 unload drop
     else
       s" kernelname" getenv? if ( a kernel has been loaded )
+        try-menu-unset
         1 boot exit
       then
       load_kernel_and_modules
       ?dup if exit then
+      try-menu-unset
       0 1 boot exit
     then
   else
     s" kernelname" getenv? if ( a kernel has been loaded )
+      try-menu-unset
       1 boot exit
     then
     load_kernel_and_modules
     ?dup if exit then
+    try-menu-unset
     0 1 boot exit
   then
   load_kernel_and_modules
   ?dup 0= if 0 1 boot then
 ;
 
+\ ***** boot-conf
+\
+\	Prepares to boot as specified by loaded configuration files.
+
 : boot-conf
   0= if ( interpreted ) get_arguments then
   0 1 unload drop

Modified: user/mjacob/sys/boot/forth/menu.4th
==============================================================================
--- user/mjacob/sys/boot/forth/menu.4th	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/forth/menu.4th	Tue Jan  3 19:24:33 2012	(r229410)
@@ -131,11 +131,11 @@ create init_text8 255 allot
 
 	\ Print the value of menuidx
 	loader_color? if
-		." "
+		." " (  )
 	then
 	menuidx @ .
 	loader_color? if
-		." "
+		." " (  )
 	then
 
 	\ Move the cursor forward 1 column
@@ -897,22 +897,60 @@ create init_text8 255 allot
 ;
 
 \ This function unsets all the possible environment variables associated with
-\ creating the interactive menu. Call this when you want to clear the menu
-\ area in preparation for another menu.
+\ creating the interactive menu.
 \ 
-: menu-clear ( -- )
+: menu-unset ( -- )
 
 	49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8')
 	begin
-		\ basename for caption variable
-		loader_color? if
-			s" ansi_caption[x]"
-		else
-			s" menu_caption[x]"
-		then
+		\ Unset variables in-order of appearance in menu.4th(8)
+
+		s" menu_caption[x]"	\ basename for caption variable
 		-rot 2dup 13 + c! rot	\ replace 'x' with current iteration
 		unsetenv		\ not erroneous to unset unknown var
 
+		s" menu_command[x]"	\ command basename
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		unsetenv
+
+		s" menu_keycode[x]"	\ keycode basename
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		unsetenv
+
+		s" ansi_caption[x]"	\ ANSI caption basename
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		unsetenv
+
+		s" toggled_text[x]"	\ toggle_menuitem caption basename
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		unsetenv
+
+		s" toggled_ansi[x]"	\ toggle_menuitem ANSI caption basename
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		unsetenv
+
+		s" menu_caption[x][y]"	\ cycle_menuitem caption
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		49 -rot
+		begin
+			16 2over rot + c! \ replace 'y'
+			2dup unsetenv
+
+			rot 1+ dup 56 > 2swap rot
+		until
+		2drop drop
+
+		s" ansi_caption[x][y]"	\ cycle_menuitem ANSI caption
+		-rot 2dup 13 + c! rot	\ replace 'x'
+		49 -rot
+		begin
+			16 2over rot + c! \ replace 'y'
+			2dup unsetenv
+
+			rot 1+ dup 56 > 2swap rot
+		until
+		2drop drop
+
 		s" 0 menukeyN !"	\ basename for key association var
 		-rot 2dup 9 + c! rot	\ replace 'N' with current iteration
 		evaluate		\ assign zero (0) to key assoc. var
@@ -921,6 +959,9 @@ create init_text8 255 allot
 	until
 	drop \ iterator
 
+	\ unset the timeout command
+	s" menu_timeout_command" unsetenv
+
 	\ clear the "Reboot" menu option flag
 	s" menu_reboot" unsetenv
 	0 menureboot !
@@ -933,6 +974,13 @@ create init_text8 255 allot
 	s" menu_options" unsetenv
 	0 menuoptions !
 
+;
+
+\ This function both unsets menu variables and visually erases the menu area
+\ in-preparation for another menu.
+\ 
+: menu-clear ( -- )
+	menu-unset
 	menu-erase
 ;
 

Modified: user/mjacob/sys/boot/forth/menu.4th.8
==============================================================================
--- user/mjacob/sys/boot/forth/menu.4th.8	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/forth/menu.4th.8	Tue Jan  3 19:24:33 2012	(r229410)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Aug 29, 2011
+.Dd Dec 27, 2011
 .Dt MENU.4TH 8
 .Os
 .Sh NAME
@@ -69,9 +69,13 @@ Clears the screen area within the menu b
 Calls
 .Ic menu-erase
 and then redraws the menu.
+.It Ic menu-unset
+Unsets the environment variables associated with individual menu items,
+clearing the way for a new menu.
 .It Ic menu-clear
-Unsets all possible environment variables used
-to configure the menu and then calls
+Calls
+.Ic menu-unset
+and then
 .Ic menu-erase .
 .El
 .Pp

Modified: user/mjacob/sys/boot/ofw/common/main.c
==============================================================================
--- user/mjacob/sys/boot/ofw/common/main.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/ofw/common/main.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -133,7 +133,7 @@ main(int (*openfirm)(void *))
 	printf("Memory: %lldKB\n", memsize() / 1024);
 
 	OF_getprop(chosen, "bootpath", bootpath, 64);
-	ch = index(bootpath, ':');
+	ch = strchr(bootpath, ':');
 	*ch = '\0';
 	printf("Booted from: %s\n", bootpath);
 

Modified: user/mjacob/sys/boot/ofw/libofw/ofw_net.c
==============================================================================
--- user/mjacob/sys/boot/ofw/libofw/ofw_net.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/ofw/libofw/ofw_net.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -185,7 +185,7 @@ ofwn_init(struct iodesc *desc, void *mac
 	int		pathlen;
 
 	pathlen = OF_getprop(chosen, "bootpath", path, 64);
-	if ((ch = index(path, ':')) != NULL)
+	if ((ch = strchr(path, ':')) != NULL)
 		*ch = '\0';
 	netdev = OF_finddevice(path);
 #ifdef __sparc64__

Modified: user/mjacob/sys/boot/userboot/libstand/Makefile
==============================================================================
--- user/mjacob/sys/boot/userboot/libstand/Makefile	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/boot/userboot/libstand/Makefile	Tue Jan  3 19:24:33 2012	(r229410)
@@ -60,10 +60,10 @@ SRCS+= ntoh.c
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \
 	${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \
 	${MACHINE_CPUARCH} == "arm"
-SRCS+=	bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
-        memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
-        strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
-	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
+SRCS+=	bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
+	memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
+	strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
+	strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 .endif
 .if ${MACHINE_CPUARCH} == "arm"
 .PATH: ${LIBC}/arm/gen

Modified: user/mjacob/sys/cam/ata/ata_da.c
==============================================================================
--- user/mjacob/sys/cam/ata/ata_da.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/cam/ata/ata_da.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -493,13 +493,6 @@ adaclose(struct disk *dp)
 
 		if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
 			xpt_print(periph->path, "Synchronize cache failed\n");
-
-		if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-			cam_release_devq(ccb->ccb_h.path,
-					 /*relsim_flags*/0,
-					 /*reduction*/0,
-					 /*timeout*/0,
-					 /*getcount_only*/0);
 		xpt_release_ccb(ccb);
 	}
 

Modified: user/mjacob/sys/cam/scsi/scsi_cd.c
==============================================================================
--- user/mjacob/sys/cam/scsi/scsi_cd.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/cam/scsi/scsi_cd.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -2685,6 +2685,16 @@ cdioctl(struct disk *dp, u_long cmd, voi
 		error = cdsetspeed(periph, CDR_MAX_SPEED, *(u_int32_t *)addr);
 		cam_periph_unlock(periph);
 		break;
+	case CDRIOCGETBLOCKSIZE:
+		*(int *)addr = softc->params.blksize;
+		break;
+	case CDRIOCSETBLOCKSIZE:
+		if (*(int *)addr <= 0) {
+			error = EINVAL;
+			break;
+		}
+		softc->disk->d_sectorsize = softc->params.blksize = *(int *)addr;
+		break;
 	case DVDIOCSENDKEY:
 	case DVDIOCREPORTKEY: {
 		struct dvd_authinfo *authinfo;

Modified: user/mjacob/sys/cam/scsi/scsi_da.c
==============================================================================
--- user/mjacob/sys/cam/scsi/scsi_da.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/cam/scsi/scsi_da.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -990,13 +990,6 @@ daclose(struct disk *dp)
 			}
 		}
 
-		if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-			cam_release_devq(ccb->ccb_h.path,
-					 /*relsim_flags*/0,
-					 /*reduction*/0,
-					 /*timeout*/0,
-					 /*getcount_only*/0);
-
 		xpt_release_ccb(ccb);
 
 	}
@@ -2281,14 +2274,6 @@ dagetcapacity(struct cam_periph *periph)
 				  /*cam_flags*/CAM_RETRY_SELTO,
 				  sense_flags,
 				  softc->disk->d_devstat);
-
-		if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-			cam_release_devq(ccb->ccb_h.path,
-				 /*relsim_flags*/0,
-				 /*reduction*/0,
-				 /*timeout*/0,
-				 /*getcount_only*/0);
-
 		if (error == 0)
 			goto rc16ok;
 
@@ -2326,14 +2311,6 @@ dagetcapacity(struct cam_periph *periph)
 				  /*cam_flags*/CAM_RETRY_SELTO,
 				  sense_flags,
 				  softc->disk->d_devstat);
-
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path,
-				 /*relsim_flags*/0,
-				 /*reduction*/0,
-				 /*timeout*/0,
-				 /*getcount_only*/0);
-
 	if (error == 0) {
 		block_len = scsi_4btoul(rcap->length);
 		maxsector = scsi_4btoul(rcap->addr);
@@ -2360,14 +2337,6 @@ dagetcapacity(struct cam_periph *periph)
 				  /*cam_flags*/CAM_RETRY_SELTO,
 				  sense_flags,
 				  softc->disk->d_devstat);
-
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path,
-				 /*relsim_flags*/0,
-				 /*reduction*/0,
-				 /*timeout*/0,
-				 /*getcount_only*/0);
-
 	if (error == 0) {
 rc16ok:
 		block_len = scsi_4btoul(rcaplong->length);

Modified: user/mjacob/sys/cam/scsi/scsi_sa.c
==============================================================================
--- user/mjacob/sys/cam/scsi/scsi_sa.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/cam/scsi/scsi_sa.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -1853,14 +1853,12 @@ samount(struct cam_periph *periph, int o
 		    MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
 		error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 		    softc->device_stats);
-		QFRLS(ccb);
 		if (error == ENXIO) {
 			softc->flags &= ~SA_FLAG_TAPE_MOUNTED;
 			scsi_test_unit_ready(&ccb->csio, 0, sadone,
 			    MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
 			error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 			    softc->device_stats);
-			QFRLS(ccb);
 		} else if (error) {
 			/*
 			 * We don't need to freeze the tape because we
@@ -1882,7 +1880,6 @@ samount(struct cam_periph *periph, int o
 		    MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
 		error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 		    softc->device_stats);
-		QFRLS(ccb);
 	}
 
 	if ((softc->flags & SA_FLAG_TAPE_MOUNTED) == 0) {
@@ -1905,7 +1902,6 @@ samount(struct cam_periph *periph, int o
 		    FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT);
 		error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 		    softc->device_stats);
-		QFRLS(ccb);
 
 		/*
 		 * In case this doesn't work, do a REWIND instead
@@ -1915,7 +1911,6 @@ samount(struct cam_periph *periph, int o
 			    FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
 			error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 				softc->device_stats);
-			QFRLS(ccb);
 		}
 		if (error) {
 			xpt_release_ccb(ccb);
@@ -1945,13 +1940,11 @@ samount(struct cam_periph *periph, int o
 			    IO_TIMEOUT);
 			(void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 			    softc->device_stats);
-			QFRLS(ccb);
 			scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG,
 			    FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
 			error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
 			    SF_NO_PRINT | SF_RETRY_UA,
 			    softc->device_stats);
-			QFRLS(ccb);
 			if (error) {
 				xpt_print(periph->path,
 				    "unable to rewind after test read\n");
@@ -1969,7 +1962,6 @@ samount(struct cam_periph *periph, int o
 		error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
 		    SF_NO_PRINT | SF_RETRY_UA, softc->device_stats);
 
-		QFRLS(ccb);
 		xpt_release_ccb(ccb);
 
 		if (error != 0) {
@@ -2580,7 +2572,6 @@ retry:
 
 	error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 	    softc->device_stats);
-	QFRLS(ccb);
 
 	status = ccb->ccb_h.status & CAM_STATUS_MASK;
 
@@ -2644,7 +2635,6 @@ retry:
 
 		error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
 		    softc->device_stats);
-		QFRLS(ccb);
 
 		if (error != 0)
 			goto sagetparamsexit;
@@ -2956,7 +2946,6 @@ retry:
 
 	error = cam_periph_runccb(ccb, saerror, 0,
 	    sense_flags, softc->device_stats);
-	QFRLS(ccb);
 
 	if (CAM_DEBUGGED(periph->path, CAM_DEBUG_INFO)) {
 		int idx;
@@ -3014,7 +3003,6 @@ retry:
 		ccb->ccb_h.retry_count = 1;
 		cam_periph_runccb(ccb, saerror, 0, sense_flags,
 		    softc->device_stats);
-		QFRLS(ccb);
 	}
 
 	xpt_release_ccb(ccb);
@@ -3072,7 +3060,6 @@ saprevent(struct cam_periph *periph, int
 	    SSD_FULL_SIZE, SCSIOP_TIMEOUT);
 
 	error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats);
-	QFRLS(ccb);
 	if (error == 0) {
 		if (action == PR_ALLOW)
 			softc->flags &= ~SA_FLAG_TAPE_LOCKED;
@@ -3102,9 +3089,6 @@ sarewind(struct cam_periph *periph)
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
 
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
 	xpt_release_ccb(ccb);
 	if (error == 0)
 		softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3138,9 +3122,6 @@ saspace(struct cam_periph *periph, int c
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
 
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
 	xpt_release_ccb(ccb);
 
 	/*
@@ -3212,9 +3193,6 @@ sawritefilemarks(struct cam_periph *peri
 
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
 	if (error == 0 && nmarks) {
 		struct sa_softc *softc = (struct sa_softc *)periph->softc;
 		nwm = nmarks - softc->last_ctl_resid;
@@ -3265,8 +3243,6 @@ sardpos(struct cam_periph *periph, int h
 	softc->dsreg = MTIO_DSREG_RBSY;
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
 
 	if (error == 0) {
 		if (loc.flags & SA_RPOS_UNCERTAIN) {
@@ -3306,8 +3282,6 @@ sasetpos(struct cam_periph *periph, int 
 	softc->dsreg = MTIO_DSREG_POS;
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
 	xpt_release_ccb(ccb);
 	/*
 	 * Note relative file && block number position as now unknown.
@@ -3335,8 +3309,6 @@ saretension(struct cam_periph *periph)
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
 
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
 	xpt_release_ccb(ccb);
 	if (error == 0)
 		softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3362,7 +3334,6 @@ sareservereleaseunit(struct cam_periph *
 	error = cam_periph_runccb(ccb, saerror, 0,
 	    SF_RETRY_UA | SF_NO_PRINT, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
-	QFRLS(ccb);
 	xpt_release_ccb(ccb);
 
 	/*
@@ -3394,7 +3365,6 @@ saloadunload(struct cam_periph *periph, 
 	softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL;
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
-	QFRLS(ccb);
 	xpt_release_ccb(ccb);
 
 	if (error || load == 0)
@@ -3425,8 +3395,6 @@ saerase(struct cam_periph *periph, int l
 	error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
 	softc->dsreg = MTIO_DSREG_REST;
 
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
 	xpt_release_ccb(ccb);
 	return (error);
 }

Modified: user/mjacob/sys/cam/scsi/scsi_ses.c
==============================================================================
--- user/mjacob/sys/cam/scsi/scsi_ses.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/cam/scsi/scsi_ses.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -679,8 +679,6 @@ ses_runcmd(struct ses_softc *ssc, char *
 	bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl);
 
 	error = cam_periph_runccb(ccb, seserror, SES_CFLAGS, SES_FLAGS, NULL);
-	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
 	if (error) {
 		if (dptr) {
 			*dlenp = dlen;

Modified: user/mjacob/sys/compat/linux/linux_file.c
==============================================================================
--- user/mjacob/sys/compat/linux/linux_file.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/compat/linux/linux_file.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -1530,3 +1530,48 @@ linux_lchown(struct thread *td, struct l
 	LFREEPATH(path);
 	return (error);
 }
+
+static int
+convert_fadvice(int advice)
+{
+	switch (advice) {
+	case LINUX_POSIX_FADV_NORMAL:
+		return (POSIX_FADV_NORMAL);
+	case LINUX_POSIX_FADV_RANDOM:
+		return (POSIX_FADV_RANDOM);
+	case LINUX_POSIX_FADV_SEQUENTIAL:
+		return (POSIX_FADV_SEQUENTIAL);
+	case LINUX_POSIX_FADV_WILLNEED:
+		return (POSIX_FADV_WILLNEED);
+	case LINUX_POSIX_FADV_DONTNEED:
+		return (POSIX_FADV_DONTNEED);
+	case LINUX_POSIX_FADV_NOREUSE:
+		return (POSIX_FADV_NOREUSE);
+	default:
+		return (-1);
+	}
+}
+
+int
+linux_fadvise64(struct thread *td, struct linux_fadvise64_args *args)
+{
+	int advice;
+
+	advice = convert_fadvice(args->advice);
+	if (advice == -1)
+		return (EINVAL);
+	return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
+	    advice));
+}
+
+int
+linux_fadvise64_64(struct thread *td, struct linux_fadvise64_64_args *args)
+{
+	int advice;
+
+	advice = convert_fadvice(args->advice);
+	if (advice == -1)
+		return (EINVAL);
+	return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
+	    advice));
+}

Modified: user/mjacob/sys/compat/linux/linux_ioctl.c
==============================================================================
--- user/mjacob/sys/compat/linux/linux_ioctl.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/compat/linux/linux_ioctl.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -2182,7 +2182,7 @@ linux_ifconf(struct thread *td, struct i
 
 	CURVNET_SET(TD_TO_VNET(td));
 	/* handle the 'request buffer size' case */
-	if (ifc.ifc_buf == PTROUT(NULL)) {
+	if ((l_uintptr_t)ifc.ifc_buf == PTROUT(NULL)) {
 		ifc.ifc_len = 0;
 		IFNET_RLOCK();
 		TAILQ_FOREACH(ifp, &V_ifnet, if_link) {

Modified: user/mjacob/sys/compat/ndis/subr_ntoskrnl.c
==============================================================================
--- user/mjacob/sys/compat/ndis/subr_ntoskrnl.c	Tue Jan  3 19:22:28 2012	(r229409)
+++ user/mjacob/sys/compat/ndis/subr_ntoskrnl.c	Tue Jan  3 19:24:33 2012	(r229410)
@@ -3016,10 +3016,7 @@ RtlSecureZeroMemory(dst, len)
 }
 
 static void
-RtlFillMemory(dst, len, c)
-	void			*dst;
-	size_t			len;
-	uint8_t			c;
+RtlFillMemory(void *dst, size_t len, uint8_t c)
 {
 	memset(dst, c, len);

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


More information about the svn-src-user mailing list