PERFORCE change 121604 for review

Ulf Lilleengen lulf at FreeBSD.org
Wed Jun 13 22:23:02 UTC 2007


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

Change 121604 by lulf at lulf_carrot on 2007/06/13 22:21:59

	- Integrate.

Affected files ...

.. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/Makefile#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#6 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#8 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.amd64#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.i386#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.pc98#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.sparc64#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.sun4v#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options.arm#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/DEFAULTS#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/GENERIC#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/PAE#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/busdma_machdep.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/trap.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/kdb.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/init_main.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_acct.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_clock.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_exec.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_exit.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_fork.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_kse.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_ktrace.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_mutex.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_priv.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_proc.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_prot.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_resource.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_sig.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_switch.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_sysctl.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_thread.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_time.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_4bsd.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_ule.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_acl_posix1e.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/subr_witness.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sysv_ipc.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sysv_msg.c#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/tty.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_mqueue.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_aio.c#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_bio.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_mount.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_subr.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/vfs_syscalls.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/modules/Makefile#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mbuf.h#2 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/param.h#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/priv.h#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/proc.h#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/resourcevar.h#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/sched.h#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/socket.h#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/systm.h#3 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/vmmeter.h#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_contig.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_object.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_page.c#5 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_pageout.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_pageq.c#4 integrate
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_phys.c#1 branch
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_phys.h#1 branch

Differences ...

==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.5 (Berkeley) 3/31/94
-# $FreeBSD: src/sbin/Makefile,v 1.165 2007/01/23 09:18:25 rodrigc Exp $
+# $FreeBSD: src/sbin/Makefile,v 1.166 2007/06/12 21:31:39 phk Exp $
 
 .include <bsd.own.mk>
 
@@ -73,6 +73,7 @@
 	quotacheck \
 	rcorder \
 	reboot \
+	recoverdisk \
 	restore \
 	route \
 	routed \

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1428 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1430 2007/06/11 03:36:48 sam Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -226,11 +226,6 @@
 # and WITNESS options.
 options 	MUTEX_NOINLINE
 
-# MUTEX_WAKE_ALL changes the mutex unlock algorithm to wake all waiters
-# when a contested mutex is released rather than just awaking the highest
-# priority waiter.
-options 	MUTEX_WAKE_ALL
-
 # RWLOCK_NOINLINE forces rwlock operations to call functions to perform each
 # operation rather than inlining the simple cases.  This can be used to
 # shrink the size of the kernel text segment.  Note that this behavior is
@@ -791,6 +786,8 @@
 device		wlan_xauth		#802.11 external authenticator support
 device		wlan_acl		#802.11 MAC ACL support
 device		wlan_amrr		#AMRR transmit rate control algorithm
+device		wlan_scan_ap		#802.11 AP mode scanning
+device		wlan_scan_sta		#802.11 STA mode scanning
 device		token			#Generic TokenRing
 device		fddi			#Generic FDDI
 device		arcnet			#Generic Arcnet

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1214 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1217 2007/06/12 16:24:54 bms Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -768,6 +768,7 @@
 # XXX only xl cards?
 dev/mii/exphy.c			optional miibus | exphy
 dev/mii/gentbi.c		optional miibus | gentbi
+dev/mii/icsphy.c		optional miibus | icsphy
 # XXX only fxp cards?
 dev/mii/inphy.c			optional miibus | inphy
 dev/mii/ip1000phy.c		optional miibus | ip1000phy
@@ -1612,11 +1613,17 @@
 net80211/ieee80211_crypto_tkip.c optional wlan_tkip
 net80211/ieee80211_crypto_wep.c	optional wlan_wep
 net80211/ieee80211_freebsd.c	optional wlan
+net80211/ieee80211_ht.c		optional wlan
 net80211/ieee80211_input.c	optional wlan
 net80211/ieee80211_ioctl.c	optional wlan
 net80211/ieee80211_node.c	optional wlan
 net80211/ieee80211_output.c	optional wlan
+net80211/ieee80211_power.c	optional wlan
 net80211/ieee80211_proto.c	optional wlan
+net80211/ieee80211_regdomain.c	optional wlan
+net80211/ieee80211_scan.c	optional wlan
+net80211/ieee80211_scan_ap.c	optional wlan_scan_ap
+net80211/ieee80211_scan_sta.c	optional wlan_scan_sta
 net80211/ieee80211_xauth.c	optional wlan_xauth
 netatalk/aarp.c			optional netatalk
 netatalk/at_control.c		optional netatalk
@@ -1794,6 +1801,7 @@
 netinet/in_gif.c		optional gif inet
 netinet/ip_gre.c		optional gre inet
 netinet/ip_id.c			optional inet
+netinet/in_mcast.c		optional inet
 netinet/in_pcb.c		optional inet
 netinet/in_proto.c		optional inet \
 	compile-with "${NORMAL_C} -I$S/contrib/pf"

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.amd64#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.103 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.104 2007/06/11 00:38:05 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -199,10 +199,6 @@
 dev/syscons/scvgarndr.c		optional	sc vga
 dev/syscons/scvtb.c		optional	sc
 dev/uart/uart_cpu_amd64.c	optional	uart
-geom/geom_bsd.c			standard
-geom/geom_bsd_enc.c		standard
-geom/geom_mbr.c			standard
-geom/geom_mbr_enc.c		standard
 isa/syscons_isa.c		optional	sc
 isa/vga_isa.c			optional	vga
 kern/link_elf_obj.c		standard

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.i386#3 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.i386,v 1.576 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.577 2007/06/11 00:38:05 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -231,10 +231,6 @@
 dev/syscons/scvgarndr.c		optional sc vga
 dev/syscons/scvtb.c		optional sc
 dev/uart/uart_cpu_i386.c	optional uart
-geom/geom_bsd.c			standard
-geom/geom_bsd_enc.c		standard
-geom/geom_mbr.c			standard
-geom/geom_mbr_enc.c		standard
 dev/acpica/acpi_if.m		standard
 i386/acpica/OsdEnvironment.c	optional acpi
 i386/acpica/acpi_machdep.c	optional acpi

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.pc98#3 (text+ko) ====

@@ -3,7 +3,7 @@
 #
 # modified for PC-9801/PC-9821
 #
-# $FreeBSD: src/sys/conf/files.pc98,v 1.354 2007/05/23 15:45:51 kib Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.355 2007/06/11 00:38:06 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -137,10 +137,6 @@
 dev/speaker/spkr.c		optional speaker
 dev/syscons/apm/apm_saver.c	optional apm_saver apm
 dev/uart/uart_cpu_pc98.c	optional uart
-geom/geom_bsd.c			standard
-geom/geom_bsd_enc.c		standard
-geom/geom_pc98.c		standard
-geom/geom_pc98_enc.c		standard
 i386/bios/apm.c			optional apm
 #i386/i386/apic_vector.s		optional apic
 i386/i386/atomic.c		standard				\

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.sparc64#2 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.sparc64,v 1.88 2007/03/07 21:13:49 marius Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.89 2007/06/11 00:38:06 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -67,10 +67,6 @@
 dev/syscons/scvtb.c		optional	sc
 dev/uart/uart_cpu_sparc64.c	optional	uart
 dev/uart/uart_kbd_sun.c		optional	uart sc
-geom/geom_bsd.c			standard
-geom/geom_bsd_enc.c		standard
-geom/geom_sunlabel.c		standard
-geom/geom_sunlabel_enc.c	standard
 kern/syscalls.c			optional	ktr
 libkern/ffs.c			standard
 libkern/ffsl.c			standard

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files.sun4v#2 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.sun4v,v 1.8 2006/12/18 07:26:35 kmacy Exp $
+# $FreeBSD: src/sys/conf/files.sun4v,v 1.9 2007/06/11 00:38:06 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -28,10 +28,6 @@
 dev/ofw/openfirmio.c		standard
 dev/ofw/openpromio.c		standard
 dev/uart/uart_cpu_sparc64.c	optional	uart
-geom/geom_bsd.c			standard
-geom/geom_bsd_enc.c		standard
-geom/geom_sunlabel.c		standard
-geom/geom_sunlabel_enc.c	standard
 kern/syscalls.c			optional	ktr
 libkern/ffs.c			standard
 libkern/ffsl.c			standard

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.590 2007/06/05 00:12:36 jeff Exp $
+# $FreeBSD: src/sys/conf/options,v 1.591 2007/06/08 21:36:52 attilio Exp $
 #
 #        On the handling of kernel options
 #
@@ -123,7 +123,6 @@
 MFI_DECODE_LOG	opt_mfi.h
 MPROF_BUFFERS	opt_mprof.h
 MPROF_HASH_SIZE	opt_mprof.h
-MUTEX_WAKE_ALL
 NO_ADAPTIVE_MUTEXES	opt_adaptive_mutexes.h
 NO_ADAPTIVE_RWLOCKS
 NSWBUF_MIN	opt_swap.h

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options.arm#2 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/conf/options.arm,v 1.16 2007/02/19 01:03:07 cognet Exp $
+#$FreeBSD: src/sys/conf/options.arm,v 1.17 2007/06/11 21:31:13 cognet Exp $
 ARM9_CACHE_WRITE_THROUGH	opt_global.h
 ARM_CACHE_LOCK_ENABLE	opt_global.h
 ARMFPE			opt_global.h
@@ -8,8 +8,9 @@
 CPU_SA1100		opt_global.h
 CPU_SA1110		opt_global.h
 CPU_ARM9		opt_global.h
+CPU_XSCALE_80219	opt_global.h
 CPU_XSCALE_80321	opt_global.h
-CPU_XSCALE_80219	opt_global.h
+CPU_XSCALE_81342	opt_global.h
 CPU_XSCALE_IXP425	opt_global.h
 FLASHADDR		opt_global.h
 KERNPHYSADDR		opt_global.h

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/DEFAULTS#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # DEFAULTS -- Default kernel configuration file for FreeBSD/i386
 #
-# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.9 2006/11/04 23:50:12 jb Exp $
+# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.10 2007/06/11 00:38:06 marcel Exp $
 
 machine		i386
 
@@ -19,5 +19,9 @@
 # UART chips on this platform
 device		uart_ns8250
 
+# Default partitioning schemes
+options 	GEOM_BSD
+options 	GEOM_MBR
+
 # KSE support went from being default to a kernel option
 options 	KSE

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/GENERIC#4 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.468 2007/05/28 14:38:42 simokawa Exp $
+# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.471 2007/06/12 02:24:30 yongari Exp $
 
 cpu		I486_CPU
 cpu		I586_CPU
@@ -60,6 +60,7 @@
 options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
 options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
 options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
+options 	AUDIT			# Security event auditing
 
 # Debugging for use in -current
 options 	KDB			# Enable kernel debugger support.
@@ -210,8 +211,9 @@
 device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
 device		lge		# Level 1 LXT1001 gigabit Ethernet
 device		msk		# Marvell/SysKonnect Yukon II Gigabit Ethernet
+device		nfe		# nVidia nForce MCP on-board Ethernet
 device		nge		# NatSemi DP83820 gigabit Ethernet
-device		nve		# nVidia nForce MCP on-board Ethernet Networking
+#device		nve		# nVidia nForce MCP on-board Ethernet Networking
 device		pcn		# AMD Am79C97x PCI 10/100 (precedence over 'le')
 device		re		# RealTek 8139C+/8169/8169S/8110S
 device		rl		# RealTek 8129/8139
@@ -245,6 +247,8 @@
 device		wlan_ccmp	# 802.11 CCMP support
 device		wlan_tkip	# 802.11 TKIP support
 device		wlan_amrr	# AMRR transmit rate control algorithm
+device		wlan_scan_ap	# 802.11 AP mode scanning
+device		wlan_scan_sta	# 802.11 STA mode scanning
 device		an		# Aironet 4500/4800 802.11 wireless NICs.
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/conf/PAE#3 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # PAE -- Generic kernel configuration file for FreeBSD/i386 PAE
 #
-# $FreeBSD: src/sys/i386/conf/PAE,v 1.24 2007/05/07 02:06:03 kevlo Exp $
+# $FreeBSD: src/sys/i386/conf/PAE,v 1.25 2007/06/11 19:29:42 thompsa Exp $
 
 include GENERIC
 
@@ -80,6 +80,8 @@
 nodevice	wlan_ccmp	# 802.11 CCMP support
 nodevice	wlan_tkip	# 802.11 TKIP support
 nodevice	wlan_amrr	# AMRR transmit rate control algorithm
+nodevice	wlan_scan_ap	# 802.11 AP mode scanning
+nodevice	wlan_scan_sta	# 802.11 STA mode scanning
 nodevice	an
 nodevice	ath		# Atheros pci/cardbus NIC's
 nodevice	ath_hal		# Atheros HAL (Hardware Access Layer)

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/busdma_machdep.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.88 2007/05/29 06:30:25 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.89 2007/06/11 17:57:24 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/kdb.h>
@@ -225,6 +225,10 @@
 	if (boundary != 0 && boundary < maxsegsz)
 		maxsegsz = boundary;
 
+	if (maxsegsz == 0) {
+		return (EINVAL);
+	}
+
 	/* Return a NULL tag on failure */
 	*dmat = NULL;
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/trap.c#3 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/trap.c,v 1.304 2007/06/04 21:38:46 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/trap.c,v 1.305 2007/06/10 21:59:13 attilio Exp $");
 
 /*
  * 386 Trap and System call handling
@@ -921,10 +921,6 @@
 	u_int code;
 	ksiginfo_t ksi;
 
-	/*
-	 * note: PCPU_INC() can only be used if we can afford
-	 * occassional inaccuracy in the count.
-	 */
 	PCPU_INC(cnt.v_syscall);
 
 #ifdef DIAGNOSTIC

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/kdb.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/kdb.h,v 1.3 2006/04/03 22:51:47 marcel Exp $
+ * $FreeBSD: src/sys/i386/include/kdb.h,v 1.4 2007/06/09 21:55:17 marcel Exp $
  */
 
 #ifndef _MACHINE_KDB_H_
@@ -47,6 +47,11 @@
 }
 
 static __inline void
+kdb_cpu_sync_icache(unsigned char *addr, size_t size)
+{
+}
+
+static __inline void
 kdb_cpu_trap(int type, int code)
 {
 }

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/init_main.c#4 (text+ko) ====

@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.280 2007/06/08 11:47:36 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.282 2007/06/10 00:28:41 attilio Exp $");
 
 #include "opt_ddb.h"
 #include "opt_init_path.h"
@@ -500,6 +500,7 @@
 {
 	struct timespec ts;
 	struct proc *p;
+	struct rusage ru;
 
 	/*
 	 * Now we can look at the time, having had a chance to verify the
@@ -508,7 +509,13 @@
 	sx_slock(&allproc_lock);
 	FOREACH_PROC_IN_SYSTEM(p) {
 		microuptime(&p->p_stats->p_start);
+		PROC_SLOCK(p);
+		rufetch(p, &ru);	/* Clears thread stats */
+		PROC_SUNLOCK(p);
 		p->p_rux.rux_runtime = 0;
+		p->p_rux.rux_uticks = 0;
+		p->p_rux.rux_sticks = 0;
+		p->p_rux.rux_iticks = 0;
 	}
 	sx_sunlock(&allproc_lock);
 	PCPU_SET(switchtime, cpu_ticks());

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_acct.c#4 (text+ko) ====

@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_acct.c,v 1.92 2007/06/05 00:00:53 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_acct.c,v 1.93 2007/06/09 21:48:44 attilio Exp $");
 
 #include "opt_mac.h"
 
@@ -370,8 +370,7 @@
 	bcopy(p->p_comm, acct.ac_comm, sizeof acct.ac_comm);
 
 	/* (2) The amount of user and system time that was used */
-	rufetch(p, &ru);
-	calcru(p, &ut, &st);
+	rufetchcalc(p, &ru, &ut, &st);
 	acct.ac_utime = encode_timeval(ut);
 	acct.ac_stime = encode_timeval(st);
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_clock.c#5 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.200 2007/06/04 23:53:06 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.201 2007/06/09 19:41:13 attilio Exp $");
 
 #include "opt_kdb.h"
 #include "opt_device_polling.h"
@@ -85,7 +85,7 @@
 long cp_time[CPUSTATES];
 
 /* Spin-lock protecting profiling statistics. */
-struct mtx time_lock;
+static struct mtx time_lock;
 
 static int
 sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS)

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_exec.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.304 2007/05/31 11:51:51 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.305 2007/06/12 00:11:59 rwatson Exp $");
 
 #include "opt_hwpmc_hooks.h"
 #include "opt_ktrace.h"
@@ -567,8 +567,7 @@
 
 #ifdef KTRACE
 		if (p->p_tracevp != NULL &&
-		    priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED,
-		    SUSER_ALLOWJAIL)) {
+		    priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) {
 			mtx_lock(&ktrace_mtx);
 			p->p_traceflag = 0;
 			tracevp = p->p_tracevp;

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_exit.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.301 2007/06/07 22:27:14 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.303 2007/06/09 21:48:44 attilio Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -116,7 +116,6 @@
 	struct ucred *tracecred;
 #endif
 	struct plimit *plim;
-	struct rusage *ru;
 	int locked;
 
 	/*
@@ -233,8 +232,6 @@
 	 */
 	EVENTHANDLER_INVOKE(process_exit, p);
 
-	MALLOC(ru, struct rusage *, sizeof(struct rusage),
-		M_ZOMBIE, M_WAITOK);
 	/*
 	 * If parent is waiting for us to exit or exec,
 	 * P_PPWAIT is set; we will wakeup the parent below.
@@ -447,16 +444,6 @@
 	p->p_xstat = rv;
 	p->p_xthread = td;
 	/*
-	 * All statistics have been aggregated into the final td_ru by
-	 * thread_exit().  Copy these into the proc here where wait*()
-	 * can find them.
-	 * XXX We will miss any statistics gathered between here and
-	 * thread_exit() except for those related to clock ticks.
-	 */
-	*ru = td->td_ru;
-	ru->ru_nvcsw++;
-	p->p_ru = ru;
-	/*
 	 * Notify interested parties of our demise.
 	 */
 	KNOTE_LOCKED(&p->p_klist, NOTE_EXIT);
@@ -537,6 +524,11 @@
 	knlist_destroy(&p->p_klist);
 
 	/*
+	 * Save our children's rusage information in our exit rusage.
+	 */
+	ruadd(&p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux);
+
+	/*
 	 * Make sure the scheduler takes this thread out of its tables etc.
 	 * This will also release this thread's reference to the ucred.
 	 * Other thread parts to release include pcb bits and such.
@@ -711,30 +703,16 @@
 		}
 
 		nfound++;
+		PROC_SLOCK(p);
 		if (p->p_state == PRS_ZOMBIE) {
-
-			/*
-			 * It is possible that the last thread of this
-			 * process is still running on another CPU
-			 * in thread_exit() after having dropped the process
-			 * lock via PROC_UNLOCK() but before it has completed
-			 * cpu_throw().  In that case, the other thread must
-			 * still hold the proc slock, so simply by acquiring
-			 * proc slock once we will wait long enough for the
-			 * thread to exit in that case.
-			 * XXX This is questionable.
-			 */
-			PROC_SLOCK(p);
+			if (rusage) {
+				*rusage = p->p_ru;
+				calcru(p, &rusage->ru_utime, &rusage->ru_stime);
+			}
 			PROC_SUNLOCK(p);
-			
 			td->td_retval[0] = p->p_pid;
 			if (status)
 				*status = p->p_xstat;	/* convert to int */
-			if (rusage) {
-				*rusage = *p->p_ru;
-				calcru(p, &rusage->ru_utime, &rusage->ru_stime);
-			}
-
 			PROC_LOCK(q);
 			sigqueue_take(p->p_ksi);
 			PROC_UNLOCK(q);
@@ -776,11 +754,9 @@
 			p->p_xstat = 0;		/* XXX: why? */
 			PROC_UNLOCK(p);
 			PROC_LOCK(q);
-			ruadd(&q->p_stats->p_cru, &q->p_crux, p->p_ru,
+			ruadd(&q->p_stats->p_cru, &q->p_crux, &p->p_ru,
 			    &p->p_rux);
 			PROC_UNLOCK(q);
-			FREE(p->p_ru, M_ZOMBIE);
-			p->p_ru = NULL;
 
 			/*
 			 * Decrement the count of procs running with this uid.
@@ -819,7 +795,6 @@
 			sx_xunlock(&allproc_lock);
 			return (0);
 		}
-		PROC_SLOCK(p);
 		if ((p->p_flag & P_STOPPED_SIG) &&
 		    (p->p_suspcount == p->p_numthreads) &&
 		    (p->p_flag & P_WAITED) == 0 &&

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_fork.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.276 2007/06/07 22:27:14 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.279 2007/06/12 07:47:09 jeff Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_mac.h"
@@ -306,8 +306,7 @@
 	 *
 	 * XXXRW: Can we avoid privilege here if it's not needed?
 	 */
-	error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT, SUSER_RUID |
-	    SUSER_ALLOWJAIL);
+	error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT, SUSER_RUID);
 	if (error == 0)
 		ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, 0);
 	else {
@@ -658,20 +657,20 @@
 	vm_forkproc(td, p2, td2, flags);
 
 	if (flags == (RFFDG | RFPROC)) {
-		atomic_add_int(&cnt.v_forks, 1);
-		atomic_add_int(&cnt.v_forkpages, p2->p_vmspace->vm_dsize +
+		PCPU_INC(cnt.v_forks);
+		PCPU_ADD(cnt.v_forkpages, p2->p_vmspace->vm_dsize +
 		    p2->p_vmspace->vm_ssize);
 	} else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) {
-		atomic_add_int(&cnt.v_vforks, 1);
-		atomic_add_int(&cnt.v_vforkpages, p2->p_vmspace->vm_dsize +
+		PCPU_INC(cnt.v_vforks);
+		PCPU_ADD(cnt.v_vforkpages, p2->p_vmspace->vm_dsize +
 		    p2->p_vmspace->vm_ssize);
 	} else if (p1 == &proc0) {
-		atomic_add_int(&cnt.v_kthreads, 1);
-		atomic_add_int(&cnt.v_kthreadpages, p2->p_vmspace->vm_dsize +
+		PCPU_INC(cnt.v_kthreads);
+		PCPU_ADD(cnt.v_kthreadpages, p2->p_vmspace->vm_dsize +
 		    p2->p_vmspace->vm_ssize);
 	} else {
-		atomic_add_int(&cnt.v_rforks, 1);
-		atomic_add_int(&cnt.v_rforkpages, p2->p_vmspace->vm_dsize +
+		PCPU_INC(cnt.v_rforks);
+		PCPU_ADD(cnt.v_rforkpages, p2->p_vmspace->vm_dsize +
 		    p2->p_vmspace->vm_ssize);
 	}
 
@@ -769,6 +768,7 @@
 {
 	struct proc *p;
 	struct thread *td;
+	struct thread *dtd;
 
 	td = curthread;
 	p = td->td_proc;
@@ -779,6 +779,17 @@
 
 	sched_fork_exit(td);
 	/*
+	* Processes normally resume in mi_switch() after being
+	* cpu_switch()'ed to, but when children start up they arrive here
+	* instead, so we must do much the same things as mi_switch() would.
+	*/
+	if ((dtd = PCPU_GET(deadthread))) {
+		PCPU_SET(deadthread, NULL);
+		thread_stash(dtd);
+	}
+	thread_unlock(td);
+
+	/*
 	 * cpu_set_fork_handler intercepts this function call to
 	 * have this call a non-return function to stay in kernel mode.
 	 * initproc has its own fork handler, but it does return.

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_kse.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.230 2007/06/04 23:54:27 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_kse.c,v 1.231 2007/06/12 19:49:39 jeff Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -65,6 +65,13 @@
 
 static int thread_update_usr_ticks(struct thread *td);
 static void thread_alloc_spare(struct thread *td);
+static struct thread *thread_schedule_upcall(struct thread *td, struct kse_upcall *ku);
+static struct kse_upcall *upcall_alloc(void);
+static void upcall_free(struct kse_upcall *ku);
+static void upcall_link(struct kse_upcall *ku, struct proc *p);
+static void upcall_unlink(struct kse_upcall *ku);
+static void upcall_stash(struct kse_upcall *ke);
+
 
 struct mtx kse_lock;
 MTX_SYSINIT(kse_lock, &kse_lock, "kse lock", MTX_SPIN);
@@ -138,6 +145,7 @@
 	mtx_lock_spin(&kse_lock);
 	thread_unlink(td);
 	mtx_unlock_spin(&kse_lock);
+	upcall_remove(td);
 }
 #endif
 
@@ -1293,7 +1301,6 @@
 		max_threads_hits++;
 		PROC_LOCK(p);
 		PROC_SLOCK(p);
-		p->p_maxthrwaits++;
 		while (p->p_numthreads > max_threads_per_proc) {
 			if (p->p_numupcalls >= max_threads_per_proc)
 				break;
@@ -1306,7 +1313,6 @@
 				PROC_SLOCK(p);
 			}
 		}
-		p->p_maxthrwaits--;
 		PROC_SUNLOCK(p);
 		PROC_UNLOCK(p);
 	}

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_ktrace.c#3 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_ktrace.c,v 1.118 2007/05/31 11:51:51 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_ktrace.c,v 1.119 2007/06/12 00:11:59 rwatson Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_mac.h"
@@ -793,8 +793,7 @@
 			p->p_tracecred = crhold(td->td_ucred);
 		}
 		p->p_traceflag |= facs;
-		if (priv_check_cred(td->td_ucred, PRIV_KTRACE,
-		    SUSER_ALLOWJAIL) == 0)
+		if (priv_check(td, PRIV_KTRACE) == 0)
 			p->p_traceflag |= KTRFAC_ROOT;
 	} else {
 		/* KTROP_CLEAR */
@@ -1000,7 +999,7 @@
 
 	PROC_LOCK_ASSERT(targetp, MA_OWNED);
 	if (targetp->p_traceflag & KTRFAC_ROOT &&
-	    priv_check_cred(td->td_ucred, PRIV_KTRACE, SUSER_ALLOWJAIL))
+	    priv_check(td, PRIV_KTRACE))
 		return (0);
 
 	if (p_candebug(td, targetp) != 0)

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_mutex.c#5 (text+ko) ====

@@ -34,12 +34,11 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_mutex.c,v 1.194 2007/06/06 03:40:46 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_mutex.c,v 1.196 2007/06/09 18:09:37 mjacob Exp $");
 
 #include "opt_adaptive_mutexes.h"
 #include "opt_ddb.h"
 #include "opt_global.h"
-#include "opt_mutex_wake_all.h"
 #include "opt_sched.h"
 
 #include <sys/param.h>
@@ -72,15 +71,6 @@
 #include <vm/vm.h>
 #include <vm/vm_extern.h>
 
-/* 
- * Force MUTEX_WAKE_ALL for now.
- * single thread wakeup needs fixes to avoid race conditions with 
- * priority inheritance.
- */
-#ifndef MUTEX_WAKE_ALL
-#define MUTEX_WAKE_ALL
-#endif
-
 #if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES)
 #define	ADAPTIVE_MUTEXES
 #endif
@@ -349,21 +339,7 @@
 			continue;
 		}
 
-#ifdef MUTEX_WAKE_ALL
 		MPASS(v != MTX_CONTESTED);
-#else
-		/*
-		 * The mutex was marked contested on release. This means that
-		 * there are other threads blocked on it.  Grab ownership of
-		 * it and propagate its priority to the current thread if
-		 * necessary.
-		 */
-		if (v == MTX_CONTESTED) {
-			m->mtx_lock = tid | MTX_CONTESTED;
-			turnstile_claim(ts);
-			break;
-		}
-#endif
 
 		/*
 		 * If the mutex isn't already contested and a failure occurs
@@ -554,7 +530,7 @@
 {
 	mtx_assert(new, MA_OWNED);
 	MPASS(td->td_lock == &blocked_lock);
-	atomic_store_rel_ptr((void *)&td->td_lock, (uintptr_t)new);
+	atomic_store_rel_ptr((volatile void *)&td->td_lock, (uintptr_t)new);
 	spinlock_exit();
 }
 
@@ -609,21 +585,8 @@
 #else
 	MPASS(ts != NULL);
 #endif
-#ifdef MUTEX_WAKE_ALL
 	turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE);
 	_release_lock_quick(m);
-#else
-	if (turnstile_signal(ts, TS_EXCLUSIVE_QUEUE)) {
-		_release_lock_quick(m);
-		if (LOCK_LOG_TEST(&m->lock_object, opts))
-			CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p not held", m);
-	} else {
-		m->mtx_lock = MTX_CONTESTED;
-		if (LOCK_LOG_TEST(&m->lock_object, opts))
-			CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p still contested",
-			    m);
-	}
-#endif
 	/*
 	 * This turnstile is now no longer associated with the mutex.  We can
 	 * unlock the chain lock so a new turnstile may take it's place.

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_priv.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_priv.c,v 1.1 2006/11/06 13:37:17 rwatson Exp $
+ * $FreeBSD: src/sys/kern/kern_priv.c,v 1.2 2007/06/12 00:11:59 rwatson Exp $
  */
 
 #include "opt_mac.h"
@@ -77,18 +77,8 @@
 	/*
 	 * Jail policy will restrict certain privileges that may otherwise be
 	 * be granted.
-	 *
-	 * While debugging the transition from SUSER_ALLOWJAIL to Jail being
-	 * aware of specific privileges, perform run-time checking that the
-	 * two versions of the policy align.  This assertion will go away
-	 * once the SUSER_ALLOWJAIL flag has gone away.
 	 */
 	error = prison_priv_check(cred, priv);
-#ifdef NOTYET
-	KASSERT(!jailed(cred) || error == ((flags & SUSER_ALLOWJAIL) ? 0 :
-	    EPERM), ("priv_check_cred: prison_priv_check %d but flags %s",
-	    error, flags & SUSER_ALLOWJAIL ? "allowjail" : "!allowjail"));
-#endif
 	if (error)
 		return (error);
 

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_proc.c#3 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.249 2007/06/05 00:00:54 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.250 2007/06/09 21:48:44 attilio Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_kstack_pages.h"
@@ -700,7 +700,9 @@
 	if ((p->p_sflag & PS_INMEM) && p->p_stats != NULL) {
 		kp->ki_start = p->p_stats->p_start;
 		timevaladd(&kp->ki_start, &boottime);
+		PROC_SLOCK(p);
 		calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime);
+		PROC_SUNLOCK(p);
 		calccru(p, &kp->ki_childutime, &kp->ki_childstime);
 
 		/* Some callers want child-times in a single value */

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_prot.c#3 (text+ko) ====

@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_prot.c,v 1.210 2007/06/07 22:27:14 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_prot.c,v 1.211 2007/06/12 00:11:59 rwatson Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -511,8 +511,7 @@
 #ifdef POSIX_APPENDIX_B_4_2_2	/* Use BSD-compat clause from B.4.2.2 */
 	    uid != oldcred->cr_uid &&		/* allow setuid(geteuid()) */
 #endif
-	    (error = priv_check_cred(oldcred, PRIV_CRED_SETUID,
-	    SUSER_ALLOWJAIL)) != 0)
+	    (error = priv_check_cred(oldcred, PRIV_CRED_SETUID, 0)) != 0)
 		goto fail;
 

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


More information about the p4-projects mailing list