Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2009 06:08:31 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 165800 for review
Message-ID:  <200907080608.n6868VJM087524@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165800

Change 165800 by mav@mav_mavbook on 2009/07/08 06:07:59

	IFC

Affected files ...

.. //depot/projects/scottl-camlock/src/MAINTAINERS#5 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/sys/execve.2#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libthr/thread/thr_rtld.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libthr/thread/thr_rwlock.c#3 integrate
.. //depot/projects/scottl-camlock/src/share/man/man4/pcm.4#6 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/io_apic.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/machdep.c#23 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/msi.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/pmap.c#27 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/include/param.h#12 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/include/param.h#7 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files#38 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/newvers.sh#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ahci.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-nvidia.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ath/ah_osdep.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ath/ah_osdep.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/e1000/e1000_82542.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwl.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwlvar.h#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/pcm/feeder_rate.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/fifofs/fifo_vnops.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/geom_dev.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/part/g_part.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/part/g_part_if.m#4 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/io_apic.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/msi.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/pmap.c#28 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/include/param.h#10 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/xen/pmap.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/ia64/include/param.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/subr_param.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/sys_pipe.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/uipc_socket.c#24 integrate
.. //depot/projects/scottl-camlock/src/sys/mips/include/param.h#3 integrate
.. //depot/projects/scottl-camlock/src/sys/modules/Makefile#30 integrate
.. //depot/projects/scottl-camlock/src/sys/modules/geom/geom_label/Makefile#4 integrate
.. //depot/projects/scottl-camlock/src/sys/modules/wlan/Makefile#11 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_action.c#1 branch
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_action.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_adhoc.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ageq.c#1 branch
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ageq.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_freebsd.h#11 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_hostap.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ht.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_ht.h#6 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_node.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_node.h#13 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_sta.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_var.h#17 integrate
.. //depot/projects/scottl-camlock/src/sys/net80211/ieee80211_wds.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/powerpc/include/param.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/sparc64/include/param.h#7 integrate
.. //depot/projects/scottl-camlock/src/sys/sun4v/include/param.h#4 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/disk.h#6 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/socketvar.h#19 integrate
.. //depot/projects/scottl-camlock/src/sys/tools/sound/feeder_rate_mkfilter.awk#4 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/cpio/cmdline.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/cpio/test/test_owner_parse.c#2 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/pkg_install/add/perform.c#4 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/ppp/ppp.8.m4#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/tzsetup/tzsetup.8#2 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/tzsetup/tzsetup.c#3 integrate

Differences ...

==== //depot/projects/scottl-camlock/src/MAINTAINERS#5 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.153 2009/06/24 17:23:10 imp Exp $
+$FreeBSD: src/MAINTAINERS,v 1.154 2009/07/06 11:46:18 flz Exp $
 
 Please note that the content of this file is strictly advisory.
 No locks listed here are valid.  The only strict review requirements
@@ -111,7 +111,7 @@
 rpc		alfred	Pre-commit review requested.
 xfs		kan@FreeBSD.org,rodrigc@FreeBSD.org,cattelan@xfs.org
 			Pre-commit review preferred.
-pkg_install	krion	Pre-commit review or approval from portmgr@ requested.
+pkg_install	portmgr	Pre-commit review or approval from portmgr@ requested.
 linux emul	emulation	Please discuss changes here.
 bs{diff,patch}	cperciva	Pre-commit review requested.
 portsnap	cperciva	Pre-commit review requested.
@@ -123,7 +123,6 @@
 usr.bin/bluetooth	emax	Pre-commit review preferred.
 usr.sbin/bluetooth	emax	Pre-commit review preferred.
 gnu/usr.bin/send-pr	bugmaster	Pre-commit review requested.
-BSD.{local,x11*}.dist	portmgr	Pre-commit review requested, since these files interface with ports.
 ncurses		rafan	Heads-up appreciated, try not to break it.
 
 Following are the entries from the Makefiles, and a few other sources.

==== //depot/projects/scottl-camlock/src/lib/libc/sys/execve.2#3 (text+ko) ====

@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)execve.2	8.5 (Berkeley) 6/1/94
-.\" $FreeBSD: src/lib/libc/sys/execve.2,v 1.42 2008/08/26 10:53:32 kib Exp $
+.\" $FreeBSD: src/lib/libc/sys/execve.2,v 1.43 2009/07/05 20:20:09 pjd Exp $
 .\"
 .Dd April 10, 2008
 .Dt EXECVE 2
@@ -220,13 +220,11 @@
 .Fn fexecve ,
 the file descriptor
 .Fa fd
-need not have been
-opened with the
+need not have been opened with the
 .Dv O_EXEC
 flag.
-However, if the file to be executed denies read and write
-permission for the process preparing to do the exec, the only way to
-provide the
+However, if the file to be executed denies read permission for the process
+preparing to do the exec, the only way to provide the
 .Fa fd
 to
 .Fn fexecve
@@ -234,6 +232,7 @@
 .Dv O_EXEC
 flag when opening
 .Fa fd .
+Note that the file to be executed can not be open for writing.
 .Sh RETURN VALUES
 As the
 .Fn execve
@@ -277,7 +276,7 @@
 permission, but has an invalid magic number in its header.
 .It Bq Er ETXTBSY
 The new process file is a pure procedure (shared text)
-file that is currently open for writing or reading by some process.
+file that is currently open for writing by some process.
 .It Bq Er ENOMEM
 The new process requires more virtual memory than
 is allowed by the imposed maximum

==== //depot/projects/scottl-camlock/src/lib/libthr/thread/thr_rtld.c#3 (text) ====

@@ -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/lib/libthr/thread/thr_rtld.c,v 1.11 2009/04/19 23:02:50 rwatson Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_rtld.c,v 1.12 2009/07/06 09:31:04 attilio Exp $
  *
  */
 
@@ -114,6 +114,7 @@
 	THR_CRITICAL_ENTER(curthread);
 	while (_thr_rwlock_rdlock(&l->lock, 0, NULL) != 0)
 		;
+	curthread->rdlock_count++;
 	RESTORE_ERRNO();
 }
 
@@ -148,6 +149,7 @@
 	
 	state = l->lock.rw_state;
 	if (_thr_rwlock_unlock(&l->lock) == 0) {
+		curthread->rdlock_count--;
 		if ((state & URWLOCK_WRITE_OWNER) == 0) {
 			THR_CRITICAL_LEAVE(curthread);
 		} else {

==== //depot/projects/scottl-camlock/src/lib/libthr/thread/thr_rwlock.c#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/lib/libthr/thread/thr_rwlock.c,v 1.15 2008/04/14 08:08:40 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_rwlock.c,v 1.16 2009/07/06 09:31:04 attilio Exp $
  */
 
 #include <errno.h>
@@ -177,10 +177,11 @@
 		/* if interrupted, try to lock it in userland again. */
 		if (_thr_rwlock_tryrdlock(&prwlock->lock, flags) == 0) {
 			ret = 0;
-			curthread->rdlock_count++;
 			break;
 		}
 	}
+	if (ret == 0)
+		curthread->rdlock_count++;
 	return (ret);
 }
 

==== //depot/projects/scottl-camlock/src/share/man/man4/pcm.4#6 (text+ko) ====

@@ -23,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/pcm.4,v 1.56 2009/06/23 21:37:12 joel Exp $
+.\" $FreeBSD: src/share/man/man4/pcm.4,v 1.58 2009/07/07 13:58:47 joel Exp $
 .\"
-.Dd June 23, 2009
+.Dd July 7, 2009
 .Dt SOUND 4
 .Os
 .Sh NAME
@@ -141,6 +141,15 @@
 set the channel to the preferred value using hints, e.g.:
 .Va hint.pcm.0.line Ns = Ns Qq Li 0 .
 This will mute the input channel per default.
+.Ss EQ
+The Parametric Software Equlizer (EQ) enables the use of
+.Dq tone
+controls (bass and treble).
+Commonly used for ear-candy or frequency compensation due to the vast
+difference in hardware quality.
+EQ is disabled by default, but can be enabled with the
+.Va hint.pcm. Ns Ao Ar X Ac Ns Va .eq
+tunable.
 .Ss VCHANs
 Each device can optionally support more playback and recording channels
 than physical hardware provides by using
@@ -151,15 +160,55 @@
 options can be configured via the
 .Xr sysctl 8
 interface but can only be manipulated while the device is inactive.
+.Ss VPC
+FreeBSD supports independent and individual volume controls for each active
+application, without touching the master
+.Nm
+volume.
+This is sometimes referred to as Volume Per Channel (VPC).
+The
+.Tn VPC
+feature is enabled by default.
+.Ss Loader Tunables
+The following loader tunables are used to set driver configuration at the
+.Xr loader 8
+prompt before booting the kernel, or they can be stored in
+.Pa /boot/loader.conf
+in order to automatically set them before booting the kernel.
+It is also possible to use
+.Xr kenv 1
+to change these tunables before loading the
+.Nm
+driver.
+The following tunables can not be changed during runtime using
+.Xr sysctl 8 .
+.Bl -tag -width indent
+.It Va hint.pcm. Ns Ao Ar X Ac Ns Va .eq
+Set to 1 or 0 to explicitly enable (1) or disable (0) the equalizer.
+Requires a driver reload if changed.
+Enabling this will make bass and treble controls appear in mixer applications.
+This tunable is undefined by default.
+Equalizing is disabled by default.
+.It Va hint.pcm. Ns Ao Ar X Ac Ns Va .vpc
+Set to 1 or 0 to explicitly enable (1) or disable (0) the
+.Tn VPC
+feature.
+This tunable is undefined by default.
+.Tn VPC
+is however enabled by default.
+.El
 .Ss Runtime Configuration
 There are a number of
 .Xr sysctl 8
-variables available.
+variables available which can be modified during runtime.
+These values can also be stored in
+.Pa /etc/sysctl.conf
+in order to automatically set them during the boot process.
 .Va hw.snd.*
-tunables are global settings and
+are global settings and
 .Va dev.pcm.*
 are device specific.
-.Bl -tag -width ".Va hw.snd.report_soft_formats" -offset indent
+.Bl -tag -width indent
 .It Va hw.snd.compat_linux_mmap
 Enable to allow PROT_EXEC page mappings.
 All Linux applications using sound and
@@ -188,19 +237,13 @@
 Maximum allowable sample rate.
 .It Va hw.snd.feeder_rate_min
 Minimum allowable sample rate.
-.It Va hw.snd.feeder_rate_round
-Sample rate rounding threshold, to avoid large prime division at the
-cost of accuracy.
-All requested sample rates will be rounded to the nearest threshold value.
-Possible values range between 0 (disabled) and 500.
-Default is 25.
-.It Va hw.snd.feeder_polyphase_max
+.It Va hw.snd.feeder_rate_polyphase_max
 Adjust to set the maximum number of allowed polyphase entries during the
 process of building resampling filters.
 Only applicable when the SINC interpolator is used.
 Default value is 183040.
 Set to 0 to disable polyphase resampling.
-.It Va hw.snd.feeder_quality
+.It Va hw.snd.feeder_rate_quality
 Sample rate converter quality.
 Default value is 1, linear interpolation.
 Available options include:
@@ -228,6 +271,12 @@
 Continuation of the bandlimited SINC inteprolator, with 100dB stopband, 164
 taps and 97% bandwidth as quality values.
 .El
+.It Va hw.snd.feeder_rate_round
+Sample rate rounding threshold, to avoid large prime division at the
+cost of accuracy.
+All requested sample rates will be rounded to the nearest threshold value.
+Possible values range between 0 (disabled) and 500.
+Default is 25.
 .It Va hw.snd.latency
 Configure the buffering latency.
 Only affects applications that do not explicitly request
@@ -299,7 +348,9 @@
 Enabling this will preserve the volume, at the cost of possible confusion
 when applications tries to re-open the same device.
 .It Va hw.snd.vpc_mixer_bypass
-The recommended way to use the vpc feature is to teach applications to use
+The recommended way to use the
+.Tn VPC
+feature is to teach applications to use
 the correct
 .Fn ioctl :
 .Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL,

==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/io_apic.c#16 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.34 2009/07/01 17:20:07 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.35 2009/07/06 18:23:00 jhb Exp $");
 
 #include "opt_isa.h"
 
@@ -327,7 +327,7 @@
 {
 	struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc;
 	struct ioapic *io = (struct ioapic *)isrc->is_pic;
-	u_int old_vector;
+	u_int old_vector, new_vector;
 	u_int old_id;
 
 	/*
@@ -348,11 +348,14 @@
 	 * Allocate an APIC vector for this interrupt pin.  Once
 	 * we have a vector we program the interrupt pin.
 	 */
-	intpin->io_cpu = apic_id;
-	intpin->io_vector = apic_alloc_vector(apic_id, intpin->io_irq);
-	if (intpin->io_vector == 0)
+	new_vector = apic_alloc_vector(apic_id, intpin->io_irq);
+	if (new_vector == 0)
 		return (ENOSPC);
 
+	intpin->io_cpu = apic_id;
+	intpin->io_vector = new_vector;
+	if (isrc->is_handlers > 0)
+		apic_enable_vector(intpin->io_cpu, intpin->io_vector);
 	if (bootverbose) {
 		printf("ioapic%u: routing intpin %u (", io->io_id,
 		    intpin->io_intpin);
@@ -365,8 +368,11 @@
 	 * Free the old vector after the new one is established.  This is done
 	 * to prevent races where we could miss an interrupt.
 	 */
-	if (old_vector)
+	if (old_vector) {
+		if (isrc->is_handlers > 0)
+			apic_disable_vector(old_id, old_vector);
 		apic_free_vector(old_id, old_vector, intpin->io_irq);
+	}
 	return (0);
 }
 

==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/machdep.c#23 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.703 2009/06/23 22:42:39 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.704 2009/07/06 18:10:27 jhb Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -100,8 +100,9 @@
 #ifndef KDB
 #error KDB must be enabled in order for DDB to work!
 #endif
+#include <ddb/ddb.h>
+#include <ddb/db_sym.h>
 #endif
-#include <ddb/ddb.h>
 
 #include <net/netisr.h>
 
@@ -1083,6 +1084,30 @@
 	IDTVEC(xmm), IDTVEC(dblfault),
 	IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
 
+#ifdef DDB
+/*
+ * Display the index and function name of any IDT entries that don't use
+ * the default 'rsvd' entry point.
+ */
+DB_SHOW_COMMAND(idt, db_show_idt)
+{
+	struct gate_descriptor *ip;
+	int idx;
+	uintptr_t func;
+
+	ip = idt;
+	for (idx = 0; idx < NIDT && !db_pager_quit; idx++) {
+		func = ((long)ip->gd_hioffset << 16 | ip->gd_looffset);
+		if (func != (uintptr_t)&IDTVEC(rsvd)) {
+			db_printf("%3d\t", idx);
+			db_printsym(func, DB_STGY_PROC);
+			db_printf("\n");
+		}
+		ip++;
+	}
+}
+#endif
+
 void
 sdtossd(sd, ssd)
 	struct user_segment_descriptor *sd;

==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/msi.c#11 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.13 2009/07/01 17:20:07 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.14 2009/07/06 18:23:00 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -230,6 +230,8 @@
 
 	msi->msi_cpu = apic_id;
 	msi->msi_vector = vector;
+	if (msi->msi_intsrc.is_handlers > 0)
+		apic_enable_vector(msi->msi_cpu, msi->msi_vector);
 	if (bootverbose)
 		printf("msi: Assigning %s IRQ %d to local APIC %u vector %u\n",
 		    msi->msi_msix ? "MSI-X" : "MSI", msi->msi_irq,
@@ -238,6 +240,8 @@
 		sib = (struct msi_intsrc *)intr_lookup_source(msi->msi_irqs[i]);
 		sib->msi_cpu = apic_id;
 		sib->msi_vector = vector + i;
+		if (sib->msi_intsrc.is_handlers > 0)
+			apic_enable_vector(sib->msi_cpu, sib->msi_vector);
 		if (bootverbose)
 			printf(
 		    "msi: Assigning MSI IRQ %d to local APIC %u vector %u\n",
@@ -249,9 +253,15 @@
 	 * Free the old vector after the new one is established.  This is done
 	 * to prevent races where we could miss an interrupt.
 	 */
+	if (msi->msi_intsrc.is_handlers > 0)
+		apic_disable_vector(old_id, old_vector);
 	apic_free_vector(old_id, old_vector, msi->msi_irq);
-	for (i = 1; i < msi->msi_count; i++)
+	for (i = 1; i < msi->msi_count; i++) {
+		sib = (struct msi_intsrc *)intr_lookup_source(msi->msi_irqs[i]);
+		if (sib->msi_intsrc.is_handlers > 0)
+			apic_disable_vector(old_id, old_vector + i);
 		apic_free_vector(old_id, old_vector + i, msi->msi_irqs[i]);
+	}
 	return (0);
 }
 

==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/pmap.c#27 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.661 2009/06/14 19:51:43 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.662 2009/07/06 18:43:42 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2218,11 +2218,19 @@
 		/*
 		 * Invalidate the 2MB page mapping and return "failure" if the
 		 * mapping was never accessed or the allocation of the new
-		 * page table page fails.
+		 * page table page fails.  If the 2MB page mapping belongs to
+		 * the direct map region of the kernel's address space, then
+		 * the page allocation request specifies the highest possible
+		 * priority (VM_ALLOC_INTERRUPT).  Otherwise, the priority is
+		 * normal.  Page table pages are preallocated for every other
+		 * part of the kernel address space, so the direct map region
+		 * is the only part of the kernel address space that must be
+		 * handled here.
 		 */
 		if ((oldpde & PG_A) == 0 || (mpte = vm_page_alloc(NULL,
-		    pmap_pde_pindex(va), VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL |
-		    VM_ALLOC_WIRED)) == NULL) {
+		    pmap_pde_pindex(va), (va >= DMAP_MIN_ADDRESS && va <
+		    DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) |
+		    VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) {
 			free = NULL;
 			pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free);
 			pmap_invalidate_page(pmap, trunc_2mpage(va));

==== //depot/projects/scottl-camlock/src/sys/amd64/include/param.h#12 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)param.h	8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/amd64/include/param.h,v 1.29 2009/06/08 16:43:40 alc Exp $
+ * $FreeBSD: src/sys/amd64/include/param.h,v 1.30 2009/07/05 17:45:48 sam Exp $
  */
 
 /*
@@ -47,12 +47,6 @@
  * Round p (pointer or byte index) up to a correctly-aligned value
  * for all data types (int, long, ...).   The result is u_long and
  * must be cast to any desired pointer type.
- *
- * ALIGNED_POINTER is a boolean macro that checks whether an address
- * is valid to fetch data elements of type t from on this architecture.
- * This does not reflect the optimal alignment, just the possibility
- * (within reasonable limits). 
- *
  */
 #ifndef _ALIGNBYTES
 #define	_ALIGNBYTES	(sizeof(long) - 1)
@@ -60,9 +54,6 @@
 #ifndef _ALIGN
 #define	_ALIGN(p)	(((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
 #endif
-#ifndef _ALIGNED_POINTER
-#define	_ALIGNED_POINTER(p,t)	((((u_long)(p)) & (sizeof(t)-1)) == 0)
-#endif
 
 #ifndef _NO_NAMESPACE_POLLUTION
 
@@ -87,7 +78,13 @@
 
 #define	ALIGNBYTES		_ALIGNBYTES
 #define	ALIGN(p)		_ALIGN(p)
-#define	ALIGNED_POINTER(p,t)	_ALIGNED_POINTER(p,t)
+/*
+ * ALIGNED_POINTER is a boolean macro that checks whether an address
+ * is valid to fetch data elements of type t from on this architecture.
+ * This does not reflect the optimal alignment, just the possibility
+ * (within reasonable limits). 
+ */
+#define	ALIGNED_POINTER(p, t)	1
 
 /*
  * CACHE_LINE_SIZE is the compile-time maximum cache line size for an

==== //depot/projects/scottl-camlock/src/sys/arm/include/param.h#7 (text+ko) ====

@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)param.h	5.8 (Berkeley) 6/28/91
- * $FreeBSD: src/sys/arm/include/param.h,v 1.15 2009/04/20 12:59:23 rwatson Exp $
+ * $FreeBSD: src/sys/arm/include/param.h,v 1.16 2009/07/05 17:45:48 sam Exp $
  */
 
 /*
@@ -80,6 +80,13 @@
 
 #define	ALIGNBYTES	_ALIGNBYTES
 #define	ALIGN(p)	_ALIGN(p)
+/*
+ * ALIGNED_POINTER is a boolean macro that checks whether an address
+ * is valid to fetch data elements of type t from on this architecture.
+ * This does not reflect the optimal alignment, just the possibility
+ * (within reasonable limits). 
+ */
+#define	ALIGNED_POINTER(p, t)	((((unsigned)(p)) & (sizeof(t)-1)) == 0)
 
 /*
  * CACHE_LINE_SIZE is the compile-time maximum cache line size for an

==== //depot/projects/scottl-camlock/src/sys/conf/files#38 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1447 2009/06/30 19:03:27 dfr Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1450 2009/07/05 20:44:50 sam Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -503,7 +503,8 @@
 dev/ata/ata-isa.c		optional ata isa | ataisa
 dev/ata/ata-pci.c		optional ata pci | atapci
 dev/ata/chipsets/ata-ahci.c	optional ata pci | ataahci | ataacerlabs | \
-					 ataati | ataintel | atajmicron | atavia
+					 ataati | ataintel | atajmicron | \
+					 atavia | atanvidia
 dev/ata/chipsets/ata-acard.c	optional ata pci | ataacard
 dev/ata/chipsets/ata-acerlabs.c	optional ata pci | ataacerlabs
 dev/ata/chipsets/ata-adaptec.c	optional ata pci | ataadaptec
@@ -2235,6 +2236,8 @@
 					 ddb_ctf
 net80211/ieee80211.c		optional wlan
 net80211/ieee80211_acl.c	optional wlan wlan_acl
+net80211/ieee80211_action.c	optional wlan
+net80211/ieee80211_ageq.c	optional wlan
 net80211/ieee80211_adhoc.c	optional wlan
 net80211/ieee80211_amrr.c	optional wlan wlan_amrr
 net80211/ieee80211_crypto.c	optional wlan

==== //depot/projects/scottl-camlock/src/sys/conf/newvers.sh#8 (text+ko) ====

@@ -28,11 +28,11 @@
 # SUCH DAMAGE.
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.81 2009/03/28 23:17:18 bz Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.82 2009/07/07 00:02:26 kensmith Exp $
 
 TYPE="FreeBSD"
 REVISION="8.0"
-BRANCH="CURRENT"
+BRANCH="BETA1"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
 	BRANCH=${BRANCH_OVERRIDE}
 fi

==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#12 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.205 2009/02/28 22:07:15 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.206 2009/07/08 05:56:14 marcel Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -219,10 +219,7 @@
 	case CDIOCRESET:
 	    acd_test_ready(dev);
 	    break;
-
-	case DIOCGPROVIDERALIAS:
-	    break;
-
+	   
 	default:
 	    acd_read_toc(dev);
 	    acd_prevent_allow(dev, 1);

==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ahci.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-ahci.c,v 1.25 2009/06/01 21:42:26 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-ahci.c,v 1.26 2009/07/08 06:00:21 mav Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -914,7 +914,7 @@
     ata_dmainit(dev);
     /* note start and stop are not used here */
     ch->dma.setprd = ata_ahci_dmasetprd;
-    ch->dma.max_iosize = 8192 * DEV_BSIZE;
+    ch->dma.max_iosize = (ATA_AHCI_DMA_ENTRIES - 1) * PAGE_SIZE;
     if (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_64BIT)
 	ch->dma.max_address = BUS_SPACE_MAXADDR;
 }

==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-nvidia.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-nvidia.c,v 1.8 2009/06/24 19:49:18 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-nvidia.c,v 1.9 2009/07/05 14:50:45 mav Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -287,3 +287,4 @@
 }
 
 ATA_DECLARE_DRIVER(ata_nvidia);
+MODULE_DEPEND(ata_nvidia, ata_ahci, 1, 1, 1);

==== //depot/projects/scottl-camlock/src/sys/dev/ath/ah_osdep.c#6 (text+ko) ====

@@ -26,7 +26,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/ah_osdep.c,v 1.9 2009/05/08 00:23:00 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ah_osdep.c,v 1.10 2009/07/06 20:51:54 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -254,7 +254,7 @@
 		}
 	}
 #if _BYTE_ORDER == _BIG_ENDIAN
-	if (reg >= 0x4000 && reg < 0x5000)
+	if (OS_REG_UNSWAPPED(reg))
 		bus_space_write_4(tag, h, reg, val);
 	else
 #endif
@@ -269,7 +269,7 @@
 	u_int32_t val;
 
 #if _BYTE_ORDER == _BIG_ENDIAN
-	if (reg >= 0x4000 && reg < 0x5000)
+	if (OS_REG_UNSWAPPED(reg))
 		val = bus_space_read_4(tag, h, reg);
 	else
 #endif
@@ -320,7 +320,7 @@
 	bus_space_handle_t h = ah->ah_sh;
 
 #if _BYTE_ORDER == _BIG_ENDIAN
-	if (reg >= 0x4000 && reg < 0x5000)
+	if (OS_REG_UNSWAPPED(reg))
 		bus_space_write_4(tag, h, reg, val);
 	else
 #endif
@@ -335,7 +335,7 @@
 	u_int32_t val;
 
 #if _BYTE_ORDER == _BIG_ENDIAN
-	if (reg >= 0x4000 && reg < 0x5000)
+	if (OS_REG_UNSWAPPED(reg))
 		val = bus_space_read_4(tag, h, reg);
 	else
 #endif

==== //depot/projects/scottl-camlock/src/sys/dev/ath/ah_osdep.h#5 (text+ko) ====

@@ -26,7 +26,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/ah_osdep.h,v 1.7 2009/05/08 00:23:00 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ah_osdep.h,v 1.8 2009/07/06 20:51:54 sam Exp $
  */
 #ifndef _ATH_AH_OSDEP_H_
 #define _ATH_AH_OSDEP_H_
@@ -69,14 +69,26 @@
 struct ath_hal;
 
 /*
+ * The hardware registers are native little-endian byte order.
+ * Big-endian hosts are handled by enabling hardware byte-swap
+ * of register reads and writes at reset.  But the PCI clock
+ * domain registers are not byte swapped!  Thus, on big-endian
+ * platforms we have to explicitly byte-swap those registers.
+ * OS_REG_UNSWAPPED identifies the registers that need special handling.
+ */
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define	OS_REG_UNSWAPPED(_reg) \
+	(((_reg) >= 0x4000 && (_reg) < 0x5000) || \
+	 ((_reg) >= 0x7000 && (_reg) < 0x8000))
+#else /* _BYTE_ORDER == _LITTLE_ENDIAN */
+#define	OS_REG_UNSWAPPED(_reg)	(0)
+#endif /* _BYTE_ORDER */
+
+/*
  * Register read/write operations are either handled through
  * platform-dependent routines (or when debugging is enabled
  * with AH_DEBUG); or they are inline expanded using the macros
- * defined below.  For public builds we inline expand only for
- * platforms where it is certain what the requirements are to
- * read/write registers--typically they are memory-mapped and
- * no explicit synchronization or memory invalidation operations
- * are required (e.g. i386).
+ * defined below.
  */
 #if defined(AH_DEBUG) || defined(AH_REGOPS_FUNC) || defined(AH_DEBUG_ALQ)
 #define	OS_REG_WRITE(_ah, _reg, _val)	ath_hal_reg_write(_ah, _reg, _val)
@@ -94,13 +106,7 @@
  * Most of this code is collapsed at compile time because the
  * register values are constants.
  */
-#define	AH_LITTLE_ENDIAN	1234
-#define	AH_BIG_ENDIAN		4321
-
 #if _BYTE_ORDER == _BIG_ENDIAN
-#define	OS_REG_UNSWAPPED(_reg) \
-	(((_reg) >= 0x4000 && (_reg) < 0x5000) || \
-	 ((_reg) >= 0x7000 && (_reg) < 0x8000))
 #define OS_REG_WRITE(_ah, _reg, _val) do {				\
 	if (OS_REG_UNSWAPPED(_reg))					\
 		bus_space_write_4((bus_space_tag_t)(_ah)->ah_st,	\
@@ -116,7 +122,6 @@
 		bus_space_read_stream_4((bus_space_tag_t)(_ah)->ah_st,	\
 		    (bus_space_handle_t)(_ah)->ah_sh, (_reg)))
 #else /* _BYTE_ORDER == _LITTLE_ENDIAN */
-#define	OS_REG_UNSWAPPED(_reg)	(0)
 #define	OS_REG_WRITE(_ah, _reg, _val)					\
 	bus_space_write_4((bus_space_tag_t)(_ah)->ah_st,		\
 	    (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val))

==== //depot/projects/scottl-camlock/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#4 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.10 2009/06/28 11:32:52 phk Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.11 2009/07/07 18:11:05 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -1045,7 +1045,7 @@
 static HAL_BOOL
 ar5416SetReset(struct ath_hal *ah, int type)
 {
-    uint32_t tmpReg;
+    uint32_t tmpReg, mask;
 
     /*
      * Force wake
@@ -1091,23 +1091,22 @@
     /* Clear AHB reset */
     OS_REG_WRITE(ah, AR_RC, 0);
 
-   /* Set register and descriptor swapping on 
-    * Bigendian platforms on cold reset 
-    */
-#ifdef __BIG_ENDIAN__
-    if (type == HAL_RESET_COLD) {
-    		uint32_t	mask;
-		
-		HALDEBUG(ah, HAL_DEBUG_RESET,
-		    "%s Applying descriptor swap\n", __func__);
-
-		mask = INIT_CONFIG_STATUS | AR_CFG_SWRD | AR_CFG_SWRG;
+	if (type == HAL_RESET_COLD) {
+		if (isBigEndian()) {
+			/*
+			 * Set CFG, little-endian for register
+			 * and descriptor accesses.
+			 */
+			mask = INIT_CONFIG_STATUS | AR_CFG_SWRD | AR_CFG_SWRG;
 #ifndef AH_NEED_DESC_SWAP
-		mask |= AR_CFG_SWTD;
+			mask |= AR_CFG_SWTD;
 #endif
-		OS_REG_WRITE(ah, AR_CFG, LE_READ_4(&mask));
+			HALDEBUG(ah, HAL_DEBUG_RESET,
+			    "%s Applying descriptor swap\n", __func__);
+			OS_REG_WRITE(ah, AR_CFG, LE_READ_4(&mask));
+		} else
+			OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS);
 	}
-#endif
 
     ar5416InitPLL(ah, AH_NULL);
 

==== //depot/projects/scottl-camlock/src/sys/dev/e1000/e1000_82542.c#2 (text+ko) ====

@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2008, Intel Corporation 
+  Copyright (c) 2001-2009, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -30,7 +30,7 @@
   POSSIBILITY OF SUCH DAMAGE.
 
 ******************************************************************************/
-/*$FreeBSD: src/sys/dev/e1000/e1000_82542.c,v 1.2 2008/11/26 23:57:23 jfv Exp $*/
+/*$FreeBSD: src/sys/dev/e1000/e1000_82542.c,v 1.3 2009/07/06 17:23:48 jfv Exp $*/
 
 /*
  * 82542 Gigabit Ethernet Controller
@@ -49,7 +49,9 @@
 static s32  e1000_led_off_82542(struct e1000_hw *hw);
 static void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
 static void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
+static s32  e1000_read_mac_addr_82542(struct e1000_hw *hw);
 
+
 /**
  *  e1000_init_phy_params_82542 - Init PHY func ptrs.
  *  @hw: pointer to the HW structure
@@ -134,6 +136,8 @@
 	mac->ops.clear_vfta = e1000_clear_vfta_generic;
 	/* setting MTA */
 	mac->ops.mta_set = e1000_mta_set_generic;
+	/* read mac address */
+	mac->ops.read_mac_addr = e1000_read_mac_addr_82542;
 	/* set RAR */
 	mac->ops.rar_set = e1000_rar_set_82542;
 	/* turn on/off LED */
@@ -554,3 +558,34 @@
 	E1000_READ_REG(hw, E1000_PTC1023);
 	E1000_READ_REG(hw, E1000_PTC1522);
 }
+
+/**
+ *  e1000_read_mac_addr_82542 - Read device MAC address
+ *  @hw: pointer to the HW structure
+ *
+ *  Reads the device MAC address from the EEPROM and stores the value.
+ **/
+static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw)
+{
+	s32  ret_val = E1000_SUCCESS;
+	u16 offset, nvm_data, i;
+
+	DEBUGFUNC("e1000_read_mac_addr");
+
+	for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+		offset = i >> 1;
+		ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
+		if (ret_val) {
+			DEBUGOUT("NVM Read Error\n");
+			goto out;
+		}
+		hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF);
+		hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
+	}
+
+	for (i = 0; i < ETH_ADDR_LEN; i++)
+		hw->mac.addr[i] = hw->mac.perm_addr[i];
+
+out:
+	return ret_val;
+}

==== //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwl.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mwl/if_mwl.c,v 1.3 2009/06/29 18:42:54 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mwl/if_mwl.c,v 1.4 2009/07/05 17:59:19 sam Exp $");
 
 /*
  * Driver for the Marvell 88W8363 Wireless LAN controller.
@@ -144,7 +144,8 @@
 static int	mwl_chan_set(struct mwl_softc *, struct ieee80211_channel *);
 static void	mwl_draintxq(struct mwl_softc *);
 static void	mwl_cleartxq(struct mwl_softc *, struct ieee80211vap *);
-static void	mwl_recv_action(struct ieee80211_node *,
+static int	mwl_recv_action(struct ieee80211_node *,
+			const struct ieee80211_frame *,
 			const uint8_t *, const uint8_t *);
 static int	mwl_addba_request(struct ieee80211_node *,
 			struct ieee80211_tx_ampdu *, int dialogtoken,
@@ -3656,8 +3657,9 @@
 	}
 }
 
-static void
-mwl_recv_action(struct ieee80211_node *ni, const uint8_t *frm, const uint8_t *efrm)
+static int
+mwl_recv_action(struct ieee80211_node *ni, const struct ieee80211_frame *wh,
+	const uint8_t *frm, const uint8_t *efrm)
 {
 	struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc;
 	const struct ieee80211_action *ia;
@@ -3671,8 +3673,9 @@
 		mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr,
 		    mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA,
 		    MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE));
+		return 0;
 	} else
-		sc->sc_recv_action(ni, frm, efrm);
+		return sc->sc_recv_action(ni, wh, frm, efrm);
 }
 
 static int

==== //depot/projects/scottl-camlock/src/sys/dev/mwl/if_mwlvar.h#3 (text+ko) ====

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



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