Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Apr 2003 01:51:04 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29295 for review
Message-ID:  <200304200851.h3K8p47b085270@repoman.freebsd.org>

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

Change 29295 by marcel@marcel_pluto1 on 2003/04/20 01:50:53

	IFia64

Affected files ...

.. //depot/projects/ia64_epc/etc/mac.conf#2 integrate
.. //depot/projects/ia64_epc/include/pthread.h#2 integrate
.. //depot/projects/ia64_epc/lib/libc/gen/getgrent.c#4 integrate
.. //depot/projects/ia64_epc/lib/libc/posix1e/Makefile.inc#2 integrate
.. //depot/projects/ia64_epc/lib/libc/posix1e/mac.3#4 integrate
.. //depot/projects/ia64_epc/lib/libc/posix1e/mac.conf.5#1 branch
.. //depot/projects/ia64_epc/lib/libc/posix1e/mac_prepare.3#3 integrate
.. //depot/projects/ia64_epc/lib/libc/stdio/vfprintf.c#5 integrate
.. //depot/projects/ia64_epc/lib/libc/stdio/vfwprintf.c#6 integrate
.. //depot/projects/ia64_epc/lib/libc_r/man/Makefile.inc#4 integrate
.. //depot/projects/ia64_epc/lib/libc_r/man/pthread_getconcurrency.3#1 branch
.. //depot/projects/ia64_epc/lib/libc_r/uthread/Makefile.inc#2 integrate
.. //depot/projects/ia64_epc/lib/libc_r/uthread/uthread_concurrency.c#1 branch
.. //depot/projects/ia64_epc/lib/libthr/thread/Makefile.inc#2 integrate
.. //depot/projects/ia64_epc/lib/libthr/thread/thr_concurrency.c#1 branch
.. //depot/projects/ia64_epc/lib/libthr/thread/thr_create.c#3 integrate
.. //depot/projects/ia64_epc/lib/libthr/thread/thr_gc.c#3 integrate
.. //depot/projects/ia64_epc/lib/libthr/thread/thr_kern.c#3 integrate
.. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/errata/article.sgml#6 integrate
.. //depot/projects/ia64_epc/sys/dev/sound/pci/emu10k1.c#4 integrate
.. //depot/projects/ia64_epc/sys/dev/tx/if_txreg.h#2 integrate
.. //depot/projects/ia64_epc/sys/i386/include/cpufunc.h#3 integrate
.. //depot/projects/ia64_epc/sys/kern/vfs_bio.c#9 integrate
.. //depot/projects/ia64_epc/sys/kern/vfs_cluster.c#6 integrate
.. //depot/projects/ia64_epc/sys/vm/swap_pager.c#4 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_fault.c#5 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_map.c#7 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_object.c#8 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_pageout.c#4 integrate
.. //depot/projects/ia64_epc/tools/regression/lib/libc/stdio/test-printfloat.c#3 integrate
.. //depot/projects/ia64_epc/usr.sbin/raycontrol/raycontrol.c#2 integrate

Differences ...

==== //depot/projects/ia64_epc/etc/mac.conf#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/etc/mac.conf,v 1.1 2002/10/22 14:38:49 rwatson Exp $
+# $FreeBSD: src/etc/mac.conf,v 1.2 2003/04/20 03:09:35 rwatson Exp $
 #
 # TrustedBSD MAC userland policy configuration file.  Kernel modules
 # export label information, and mac.conf indicates to userland
@@ -11,7 +11,7 @@
 # Default label set to be used by simple MAC applications
 #
 
-default_file_labels ?biba,?mls,?sebsd,?te
-default_ifnet_labels ?biba,?mls,?sebsd,?te
-default_process_labels ?biba,?mls,?partition,?sebsd,?te
+default_file_labels ?biba,?mls,?sebsd
+default_ifnet_labels ?biba,?mls,?sebsd
+default_process_labels ?biba,?mls,?partition,?sebsd
 

==== //depot/projects/ia64_epc/include/pthread.h#2 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/include/pthread.h,v 1.27 2003/02/10 08:48:03 alfred Exp $
+ * $FreeBSD: src/include/pthread.h,v 1.28 2003/04/20 01:53:12 jdp Exp $
  */
 #ifndef _PTHREAD_H_
 #define _PTHREAD_H_
@@ -288,6 +288,8 @@
 			struct sched_param *);
 int		pthread_setschedparam(pthread_t, int,
 			const struct sched_param *);
+int		pthread_getconcurrency(void);
+int		pthread_setconcurrency(int);
 __END_DECLS
 
 #endif

==== //depot/projects/ia64_epc/lib/libc/gen/getgrent.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
  *
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.26 2003/04/18 01:00:37 nectar Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.27 2003/04/20 01:12:00 nectar Exp $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -500,7 +500,6 @@
 		if (rv & NS_TERMINATE)
 			break;
 	}
-fin:
 	if (!stayopen && st->fp != NULL) {
 		fclose(st->fp);
 		st->fp = NULL;
@@ -1083,7 +1082,7 @@
 __gr_parse_entry(char *line, size_t linesize, struct group *grp, char *membuf,
     size_t membufsize, int *errnop)
 {
-	char	       *s_gid, *s_mem, **members;
+	char	       *s_gid, *s_mem, *p, **members;
 	unsigned long	n;
 	int		maxmembers;
 
@@ -1104,13 +1103,12 @@
 		return (NS_NOTFOUND);
 	grp->gr_gid = (gid_t)n;
 	grp->gr_mem = members;
-	if (s_mem[0] == '\0') {
-		*members = NULL;
-		return (NS_SUCCESS);
-	}
 	while (maxmembers > 1 && s_mem != NULL) {
-		*members++ = strsep(&s_mem, ",");
-		maxmembers--;
+		p = strsep(&s_mem, ",");
+		if (p != NULL && *p != '\0') {
+			*members++ = p;
+			maxmembers--;
+		}
 	}
 	*members = NULL;
 	if (s_mem == NULL)

==== //depot/projects/ia64_epc/lib/libc/posix1e/Makefile.inc#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libc/posix1e/Makefile.inc,v 1.14 2003/01/15 00:45:31 chris Exp $
+# $FreeBSD: src/lib/libc/posix1e/Makefile.inc,v 1.15 2003/04/20 03:18:44 rwatson Exp $
 
 MAINTAINER=	rwatson@FreeBSD.org
 
@@ -51,6 +51,7 @@
 	acl_valid.3			\
 	extattr.3			\
 	mac.3				\
+	mac.conf.5			\
 	mac_free.3			\
 	mac_is_present_np.3		\
 	mac_get.3			\

==== //depot/projects/ia64_epc/lib/libc/posix1e/mac.3#4 (text+ko) ====

@@ -28,9 +28,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libc/posix1e/mac.3,v 1.10 2003/04/16 20:40:34 rwatson Exp $
+.\" $FreeBSD: src/lib/libc/posix1e/mac.3,v 1.12 2003/04/20 04:43:56 rwatson Exp $
 .\"
-.Dd December 21, 2001
+.Dd April 19, 2003
 .Dt MAC 3
 .Os
 .Sh NAME
@@ -112,6 +112,17 @@
 a text-form MAC label
 into a working
 .Vt mac_t .
+.It Fn mac_prepare
+.It Fn mac_prepare_file_label
+.It Fn mac_prepare_ifnet_label
+.It Fn mac_prepare_process_label
+These functions are described in
+.Xr mac_prepare 3 ,
+and may be used to preallocate storage for MAC label retrieval.
+.Xr mac_prepare 3
+prepares a label based on caller-specified label names; the other calls
+rely on the default configuration specified in
+.Xr mac.conf 5 .
 .It Fn mac_to_text
 This function is described in
 .Xr mac_text 3 ,
@@ -119,6 +130,18 @@
 .Vt mac_t
 into a text-form MAC label.
 .El
+The behavior of some of these calls is influenced by the configuration
+settings found in
+.Xr mac.conf 5 ,
+the MAC library run-time configuration file.
+.Sh FILES
+.Bl -tag -width ".Pa /etc/mac.conf" -compact
+.It Pa /etc/mac.conf
+MAC library configuration file, documented in
+.Xr mac.conf 5 .
+Provides default behavior for applications aware of MAC labels on
+system objects, but without policy-specific knowledge.
+.El
 .Sh IMPLEMENTATION NOTES
 .Fx Ns 's
 support for POSIX.1e interfaces and features
@@ -131,6 +154,7 @@
 .Xr mac_set 3 ,
 .Xr mac_text 3 ,
 .Xr mac 4 ,
+.Xr mac.conf 5 ,
 .Xr mac 9
 .Sh STANDARDS
 These APIs are loosely based on the APIs described in POSIX.1e.

==== //depot/projects/ia64_epc/lib/libc/posix1e/mac_prepare.3#3 (text+ko) ====

@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libc/posix1e/mac_prepare.3,v 1.2 2003/02/24 22:53:20 ru Exp $
+.\" $FreeBSD: src/lib/libc/posix1e/mac_prepare.3,v 1.3 2003/04/20 04:43:56 rwatson Exp $
 .\"
 .Dd December 12, 2002
 .Os
@@ -68,6 +68,8 @@
 .Fn mac_prepare_process_label
 functions allocate the storage to fit file, network interface,
 and process labels, respectively.
+The default label elements employed by these APIs is configured in
+.Xr mac.conf 5 .
 .Sh RETURN VALUES
 .Rv -std
 .Sh SEE ALSO
@@ -77,6 +79,7 @@
 .Xr mac_is_present_np 3 ,
 .Xr mac_set 3 ,
 .Xr mac 4 ,
+.Xr mac.conf 5 ,
 .Xr maclabel 7
 .Sh STANDARDS
 POSIX.1e is described in IEEE POSIX.1e draft 17.

==== //depot/projects/ia64_epc/lib/libc/stdio/vfprintf.c#5 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)vfprintf.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.58 2003/04/14 11:24:53 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.59 2003/04/19 23:53:19 das Exp $");
 
 /*
  * Actual printf innards.
@@ -920,6 +920,13 @@
 						prec = ndig - expt;
 					if (prec < 0)
 						prec = 0;
+				} else {
+					/*
+					 * Make %[gG] smell like %[eE], but
+					 * trim trailing zeroes if no # flag.
+					 */
+					if (!(flags & ALT))
+						prec = ndig;
 				}
 			}
 			if (expchar) {

==== //depot/projects/ia64_epc/lib/libc/stdio/vfwprintf.c#6 (text+ko) ====

@@ -41,7 +41,7 @@
 #endif /* LIBC_SCCS and not lint */
 __FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.58 2003/04/14 11:24:53 das Exp");
 #endif
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.11 2003/04/14 12:15:59 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.12 2003/04/19 23:53:19 das Exp $");
 
 /*
  * Actual wprintf innards.
@@ -889,6 +889,13 @@
 						prec = ndig - expt;
 					if (prec < 0)
 						prec = 0;
+				} else {
+					/*
+					 * Make %[gG] smell like %[eE], but
+					 * trim trailing zeroes if no # flag.
+					 */
+					if (!(flags & ALT))
+						prec = ndig;
 				}
 			}
 			if (expchar) {

==== //depot/projects/ia64_epc/lib/libc_r/man/Makefile.inc#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libc_r/man/Makefile.inc,v 1.19 2003/02/24 22:59:01 ru Exp $
+# $FreeBSD: src/lib/libc_r/man/Makefile.inc,v 1.20 2003/04/20 01:53:12 jdp Exp $
 
 # POSIX thread man files
 
@@ -10,6 +10,7 @@
 	pthread_cancel.3 \
 	pthread_cleanup_pop.3 \
 	pthread_cleanup_push.3 \
+	pthread_getconcurrency.3 \
 	pthread_condattr.3 \
 	pthread_cond_broadcast.3 \
 	pthread_cond_destroy.3 \
@@ -85,6 +86,7 @@
 	pthread_attr.3 pthread_attr_setstack.3 \
 	pthread_attr.3 pthread_attr_setstackaddr.3 \
 	pthread_attr.3 pthread_attr_setstacksize.3 \
+	pthread_getconcurrency.3 pthread_setconcurrency.3 \
 	pthread_condattr.3 pthread_condattr_init.3 \
 	pthread_condattr.3 pthread_condattr_destroy.3 \
 	pthread_multi_np.3 pthread_single_np.3 \

==== //depot/projects/ia64_epc/lib/libc_r/uthread/Makefile.inc#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libc_r/uthread/Makefile.inc,v 1.35 2003/02/11 07:28:28 alfred Exp $
+# $FreeBSD: src/lib/libc_r/uthread/Makefile.inc,v 1.36 2003/04/20 01:53:12 jdp Exp $
 
 # uthread sources
 .PATH: ${.CURDIR}/uthread
@@ -37,6 +37,7 @@
 	uthread_cancel.c \
 	uthread_clean.c \
 	uthread_close.c \
+	uthread_concurrency.c \
 	uthread_cond.c \
 	uthread_condattr_destroy.c \
 	uthread_condattr_init.c \

==== //depot/projects/ia64_epc/lib/libthr/thread/Makefile.inc#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libthr/thread/Makefile.inc,v 1.1 2003/04/01 03:46:28 jeff Exp $
+# $FreeBSD: src/lib/libthr/thread/Makefile.inc,v 1.2 2003/04/20 01:53:13 jdp Exp $
 
 # thr sources
 .PATH: ${.CURDIR}/thread
@@ -8,6 +8,7 @@
 	thr_autoinit.c \
 	thr_cancel.c \
 	thr_clean.c \
+	thr_concurrency.c \
 	thr_cond.c \
 	thr_condattr_destroy.c \
 	thr_condattr_init.c \

==== //depot/projects/ia64_epc/lib/libthr/thread/thr_create.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.3 2003/04/03 03:34:50 jake Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.4 2003/04/20 02:56:12 marcel Exp $
  */
 #include <errno.h>
 #include <stdlib.h>

==== //depot/projects/ia64_epc/lib/libthr/thread/thr_gc.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_gc.c,v 1.2 2003/04/02 03:05:39 jeff Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_gc.c,v 1.3 2003/04/20 02:56:12 marcel Exp $
  *
  * Garbage collector thread. Frees memory allocated for dead threads.
  *

==== //depot/projects/ia64_epc/lib/libthr/thread/thr_kern.c#3 (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/lib/libthr/thread/thr_kern.c,v 1.2 2003/04/01 22:41:41 jeff Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_kern.c,v 1.3 2003/04/20 02:58:30 marcel Exp $
  */
 
 #include <sys/cdefs.h>

==== //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/errata/article.sgml#6 (text+ko) ====

@@ -36,7 +36,7 @@
     The &os; Project
     </corpauthor>
 
-    <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.35 2003/03/31 18:12:56 bmah Exp $</pubdate>
+    <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.36 2003/04/20 06:17:31 bmah Exp $</pubdate>
 
     <copyright>
       <year>2000</year>
@@ -333,5 +333,12 @@
       &release.prev; server.  This bug has been fixed in
       &release.current;.</para>
 
+    <bridgehead renderas="sect3">nsswitch</bridgehead>
+
+    <para>The release note documenting the addition of
+      <application>nsswitch</application> support gave an incorrect
+      name for the old resolver configuration file.  It should have
+      been listed as <filename>/etc/host.conf</filename>.</para>
+
   </sect1>
 </article>

==== //depot/projects/ia64_epc/sys/dev/sound/pci/emu10k1.c#4 (text+ko) ====

@@ -32,14 +32,14 @@
 #include <pci/pcivar.h>
 #include <sys/queue.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/emu10k1.c,v 1.34 2003/04/18 04:13:38 obrien Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/emu10k1.c,v 1.36 2003/04/20 08:37:29 obrien Exp $");
 
 /* -------------------------------------------------------------------- */
 
-#define EMU10K1_PCI_ID 	0x00021102
-#define EMU10K2_PCI_ID 	0x00041102
-#define EMU_DEFAULT_BUFSZ	4096
-#define EMU_CHANS	4
+#define	EMU10K1_PCI_ID	0x00021102
+#define	EMU10K2_PCI_ID	0x00041102
+#define	EMU_DEFAULT_BUFSZ	4096
+#define	EMU_CHANS	4
 #undef EMUDEBUG
 
 struct emu_memblk {
@@ -55,7 +55,7 @@
 	void *silent_page;
 	bus_addr_t silent_page_addr;
 	bus_addr_t ptb_pages_addr;
-       	SLIST_HEAD(, emu_memblk) blocks;
+	SLIST_HEAD(, emu_memblk) blocks;
 };
 
 struct emu_voice {
@@ -90,7 +90,7 @@
 /* device private data */
 struct sc_info {
 	device_t	dev;
-	u_int32_t 	type, rev;
+	u_int32_t	type, rev;
 	u_int32_t	tos_link:1, APS:1;
 
 	bus_space_tag_t st;
@@ -203,37 +203,37 @@
 static u_int32_t
 emu_rdptr(struct sc_info *sc, int chn, int reg)
 {
-        u_int32_t ptr, val, mask, size, offset;
+	u_int32_t ptr, val, mask, size, offset;
 
-        ptr = ((reg << 16) & PTR_ADDRESS_MASK) | (chn & PTR_CHANNELNUM_MASK);
-        emu_wr(sc, PTR, ptr, 4);
-        val = emu_rd(sc, DATA, 4);
-        if (reg & 0xff000000) {
-                size = (reg >> 24) & 0x3f;
-                offset = (reg >> 16) & 0x1f;
-                mask = ((1 << size) - 1) << offset;
-                val &= mask;
+	ptr = ((reg << 16) & PTR_ADDRESS_MASK) | (chn & PTR_CHANNELNUM_MASK);
+	emu_wr(sc, PTR, ptr, 4);
+	val = emu_rd(sc, DATA, 4);
+	if (reg & 0xff000000) {
+		size = (reg >> 24) & 0x3f;
+		offset = (reg >> 16) & 0x1f;
+		mask = ((1 << size) - 1) << offset;
+		val &= mask;
 		val >>= offset;
 	}
-        return val;
+	return val;
 }
 
 static void
 emu_wrptr(struct sc_info *sc, int chn, int reg, u_int32_t data)
 {
-        u_int32_t ptr, mask, size, offset;
+	u_int32_t ptr, mask, size, offset;
 
-        ptr = ((reg << 16) & PTR_ADDRESS_MASK) | (chn & PTR_CHANNELNUM_MASK);
-        emu_wr(sc, PTR, ptr, 4);
-        if (reg & 0xff000000) {
-                size = (reg >> 24) & 0x3f;
-                offset = (reg >> 16) & 0x1f;
-                mask = ((1 << size) - 1) << offset;
+	ptr = ((reg << 16) & PTR_ADDRESS_MASK) | (chn & PTR_CHANNELNUM_MASK);
+	emu_wr(sc, PTR, ptr, 4);
+	if (reg & 0xff000000) {
+		size = (reg >> 24) & 0x3f;
+		offset = (reg >> 16) & 0x1f;
+		mask = ((1 << size) - 1) << offset;
 		data <<= offset;
-                data &= mask;
+		data &= mask;
 		data |= emu_rd(sc, DATA, 4) & ~mask;
 	}
-        emu_wr(sc, DATA, data, 4);
+	emu_wr(sc, DATA, data, 4);
 }
 
 static void
@@ -266,8 +266,8 @@
 }
 
 static kobj_method_t emu_ac97_methods[] = {
-    	KOBJMETHOD(ac97_read,		emu_rdcd),
-    	KOBJMETHOD(ac97_write,		emu_wrcd),
+	KOBJMETHOD(ac97_read,		emu_rdcd),
+	KOBJMETHOD(ac97_write,		emu_wrcd),
 	{ 0, 0 }
 };
 AC97_DECLARE(emu_ac97);
@@ -328,7 +328,7 @@
 static void
 emu_enastop(struct sc_info *sc, char channel, int enable)
 {
-	int reg = (channel & 0x20)? SOLEH : SOLEL;
+	int reg = (channel & 0x20) ? SOLEH : SOLEL;
 	channel &= 0x1f;
 	reg |= 1 << 24;
 	reg |= channel << 16;
@@ -392,9 +392,9 @@
 	for (i = 31; i > 0; i--) {
 		if (rate & 0x80000000) {	/* Detect leading "1" */
 			return (((u_int32_t) (i - 15) << 20) +
-			       logMagTable[0x7f & (rate >> 24)] +
-				      (0x7f & (rate >> 17)) *
-			     logSlopeTable[0x7f & (rate >> 24)]);
+			    logMagTable[0x7f & (rate >> 24)] +
+			    (0x7f & (rate >> 17)) *
+			    logSlopeTable[0x7f & (rate >> 24)]);
 		}
 		rate <<= 1;
 	}
@@ -469,8 +469,8 @@
 	struct emu_voice *v = ch->master;
 
 	if (ch->fmt) {
-		v->b16 = (ch->fmt & AFMT_16BIT)? 1 : 0;
-		v->stereo = (ch->fmt & AFMT_STEREO)? 1 : 0;
+		v->b16 = (ch->fmt & AFMT_16BIT) ? 1 : 0;
+		v->stereo = (ch->fmt & AFMT_STEREO) ? 1 : 0;
 		if (v->slave != NULL) {
 			v->slave->b16 = v->b16;
 			v->slave->stereo = v->stereo;
@@ -490,20 +490,20 @@
 	int l, r, x, y;
 	u_int32_t sa, ea, start, val, silent_page;
 
-	s = (v->stereo? 1 : 0) + (v->b16? 1 : 0);
+	s = (v->stereo ? 1 : 0) + (v->b16 ? 1 : 0);
 
 	sa = v->start >> s;
 	ea = v->end >> s;
 
 	l = r = x = y = v->vol;
 	if (v->stereo) {
-		l = v->ismaster? l : 0;
-		r = v->ismaster? 0 : r;
+		l = v->ismaster ? l : 0;
+		r = v->ismaster ? 0 : r;
 	}
 
-	emu_wrptr(sc, v->vnum, CPF, v->stereo? CPF_STEREO_MASK : 0);
-	val = v->stereo? 28 : 30;
-	val *= v->b16? 1 : 2;
+	emu_wrptr(sc, v->vnum, CPF, v->stereo ? CPF_STEREO_MASK : 0);
+	val = v->stereo ? 28 : 30;
+	val *= v->b16 ? 1 : 2;
 	start = sa + val;
 
 	emu_wrptr(sc, v->vnum, FXRT, 0xd01c0000);
@@ -511,7 +511,7 @@
 	emu_wrptr(sc, v->vnum, PTRX, (x << 8) | r);
 	emu_wrptr(sc, v->vnum, DSL, ea | (y << 24));
 	emu_wrptr(sc, v->vnum, PSST, sa | (l << 24));
-	emu_wrptr(sc, v->vnum, CCCA, start | (v->b16? 0 : CCCA_8BITSELECT));
+	emu_wrptr(sc, v->vnum, CCCA, start | (v->b16 ? 0 : CCCA_8BITSELECT));
 
 	emu_wrptr(sc, v->vnum, Z1, 0);
 	emu_wrptr(sc, v->vnum, Z2, 0);
@@ -550,10 +550,10 @@
 
 	if (go) {
 		cra = 64;
-		cs = v->stereo? 4 : 2;
-		ccis = v->stereo? 28 : 30;
-		ccis *= v->b16? 1 : 2;
-		sample = v->b16? 0x00000000 : 0x80808080;
+		cs = v->stereo ? 4 : 2;
+		ccis = v->stereo ? 28 : 30;
+		ccis *= v->b16 ? 1 : 2;
+		sample = v->b16 ? 0x00000000 : 0x80808080;
 
 		for (i = 0; i < cs; i++)
 			emu_wrptr(sc, v->vnum, CD0 + i, sample);
@@ -590,7 +590,7 @@
 {
 	int s, ptr;
 
-	s = (v->b16? 1 : 0) + (v->stereo? 1 : 0);
+	s = (v->b16 ? 1 : 0) + (v->stereo ? 1 : 0);
 	ptr = (emu_rdptr(sc, v->vnum, CCCA_CURRADDR) - (v->start >> s)) << s;
 	return ptr & ~0x0000001f;
 }
@@ -612,7 +612,7 @@
 		if (regname[i] == NULL)
 			continue;
 		printf("%s\t[%08x]", regname[i], emu_rdptr(sc, v->vnum, i));
-		printf("%s", (x == 2)? "\n" : "\t");
+		printf("%s", (x == 2) ? "\n" : "\t");
 		x++;
 		if (x > 2)
 			x = 0;
@@ -641,7 +641,7 @@
 	ch->master = emu_valloc(sc);
 	ch->slave = emu_valloc(sc);
 	snd_mtxunlock(sc->lock);
-	r = (emu_vinit(sc, ch->master, ch->slave, sc->bufsz, ch->buffer))? NULL : ch;
+	r = (emu_vinit(sc, ch->master, ch->slave, sc->bufsz, ch->buffer)) ? NULL : ch;
 
 	return r;
 }
@@ -711,14 +711,14 @@
 		emu_enatimer(sc, 1);
 #ifdef EMUDEBUG
 		printf("start [%d bit, %s, %d hz]\n",
-			ch->master->b16? 16 : 8,
-			ch->master->stereo? "stereo" : "mono",
+			ch->master->b16 ? 16 : 8,
+			ch->master->stereo ? "stereo" : "mono",
 			ch->master->speed);
 		emu_vdump(sc, ch->master);
 		emu_vdump(sc, ch->slave);
 #endif
 	}
-	ch->run = (go == PCMTRIG_START)? 1 : 0;
+	ch->run = (go == PCMTRIG_START) ? 1 : 0;
 	emu_vtrigger(sc, ch->master, ch->run);
 	snd_mtxunlock(sc->lock);
 	return 0;
@@ -745,14 +745,14 @@
 }
 
 static kobj_method_t emupchan_methods[] = {
-    	KOBJMETHOD(channel_init,		emupchan_init),
-    	KOBJMETHOD(channel_free,		emupchan_free),
-    	KOBJMETHOD(channel_setformat,		emupchan_setformat),
-    	KOBJMETHOD(channel_setspeed,		emupchan_setspeed),
-    	KOBJMETHOD(channel_setblocksize,	emupchan_setblocksize),
-    	KOBJMETHOD(channel_trigger,		emupchan_trigger),
-    	KOBJMETHOD(channel_getptr,		emupchan_getptr),
-    	KOBJMETHOD(channel_getcaps,		emupchan_getcaps),
+	KOBJMETHOD(channel_init,		emupchan_init),
+	KOBJMETHOD(channel_free,		emupchan_free),
+	KOBJMETHOD(channel_setformat,		emupchan_setformat),
+	KOBJMETHOD(channel_setspeed,		emupchan_setspeed),
+	KOBJMETHOD(channel_setblocksize,	emupchan_setblocksize),
+	KOBJMETHOD(channel_trigger,		emupchan_trigger),
+	KOBJMETHOD(channel_getptr,		emupchan_getptr),
+	KOBJMETHOD(channel_getcaps,		emupchan_getcaps),
 	{ 0, 0 }
 };
 CHANNEL_DECLARE(emupchan);
@@ -945,13 +945,13 @@
 }
 
 static kobj_method_t emurchan_methods[] = {
-    	KOBJMETHOD(channel_init,		emurchan_init),
-    	KOBJMETHOD(channel_setformat,		emurchan_setformat),
-    	KOBJMETHOD(channel_setspeed,		emurchan_setspeed),
-    	KOBJMETHOD(channel_setblocksize,	emurchan_setblocksize),
-    	KOBJMETHOD(channel_trigger,		emurchan_trigger),
-    	KOBJMETHOD(channel_getptr,		emurchan_getptr),
-    	KOBJMETHOD(channel_getcaps,		emurchan_getcaps),
+	KOBJMETHOD(channel_init,		emurchan_init),
+	KOBJMETHOD(channel_setformat,		emurchan_setformat),
+	KOBJMETHOD(channel_setspeed,		emurchan_setspeed),
+	KOBJMETHOD(channel_setblocksize,	emurchan_setblocksize),
+	KOBJMETHOD(channel_trigger,		emurchan_trigger),
+	KOBJMETHOD(channel_getptr,		emurchan_getptr),
+	KOBJMETHOD(channel_getcaps,		emurchan_getcaps),
 	{ 0, 0 }
 };
 CHANNEL_DECLARE(emurchan);
@@ -1024,12 +1024,12 @@
 {
 	bus_addr_t *phys = arg;
 
-	*phys = error? 0 : (bus_addr_t)segs->ds_addr;
+	*phys = error ? 0 : (bus_addr_t)segs->ds_addr;
 
 	if (bootverbose) {
 		printf("emu: setmap (%lx, %lx), nseg=%d, error=%d\n",
-		       (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len,
-		       nseg, error);
+		    (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len,
+		    nseg, error);
 	}
 }
 
@@ -1242,7 +1242,7 @@
 {
 	u_int32_t spcs, ch, tmp, i;
 
-   	/* disable audio and lock cache */
+	/* disable audio and lock cache */
 	emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4);
 
 	/* reset recording buffers */
@@ -1304,8 +1304,8 @@
 		sc->voice[ch].start = 0;
 		sc->voice[ch].end = 0;
 		sc->voice[ch].channel = NULL;
-       }
-       sc->pnum = sc->rnum = 0;
+	}
+	sc->pnum = sc->rnum = 0;
 
 	/*
 	 *  Init to 0x02109204 :
@@ -1322,9 +1322,9 @@
 	 *  P                 = 0     (Consumer)
 	 */
 	spcs = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
-	       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
-	       SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
-	       SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT;
+	    SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+	    SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 |
+	    SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT;
 	emu_wrptr(sc, 0, SPCS0, spcs);
 	emu_wrptr(sc, 0, SPCS1, spcs);
 	emu_wrptr(sc, 0, SPCS2, spcs);
@@ -1398,9 +1398,9 @@
 		emu_wrptr(sc, ch, CVCF, 0);
 		emu_wrptr(sc, ch, PTRX, 0);
 		emu_wrptr(sc, ch, CPF, 0);
-       }
+	}
 
-   	/* disable audio and lock cache */
+	/* disable audio and lock cache */
 	emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4);
 
 	emu_wrptr(sc, 0, PTB, 0);
@@ -1504,7 +1504,7 @@
 
 	codec = AC97_CREATE(dev, sc, emu_ac97);
 	if (codec == NULL) goto bad;
-	gotmic = (ac97_getcaps(codec) & AC97_CAP_MICCHANNEL)? 1 : 0;
+	gotmic = (ac97_getcaps(codec) & AC97_CAP_MICCHANNEL) ? 1 : 0;
 	if (mixer_init(dev, ac97_getmixerclass(), codec) == -1) goto bad;
 
 	i = 0;
@@ -1516,10 +1516,10 @@
 
 	snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld", rman_get_start(sc->reg), rman_get_start(sc->irq));
 
-	if (pcm_register(dev, sc, EMU_CHANS, gotmic? 3 : 2)) goto bad;
+	if (pcm_register(dev, sc, EMU_CHANS, gotmic ? 3 : 2)) goto bad;
 	for (i = 0; i < EMU_CHANS; i++)
 		pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc);
-	for (i = 0; i < (gotmic? 3 : 2); i++)
+	for (i = 0; i < (gotmic ? 3 : 2); i++)
 		pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc);
 
 	pcm_setstatus(dev, status);
@@ -1599,7 +1599,7 @@
 	}
 
 	if (s) device_set_desc(dev, s);
-	return s? -1000 : ENXIO;
+	return s ? -1000 : ENXIO;
 }
 
 static int

==== //depot/projects/ia64_epc/sys/dev/tx/if_txreg.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/tx/if_txreg.h,v 1.12 2002/10/22 00:57:51 semenu Exp $
+ * $FreeBSD: src/sys/dev/tx/if_txreg.h,v 1.13 2003/04/20 01:04:04 mux Exp $
  */
 
 #define	EPIC_MAX_MTU		1600	/* This is experiment-derived value */
@@ -190,12 +190,14 @@
 #define	EEPROM_SSID		0x0006	/* Subsystem Id */
 
 /*
- * Hardware structures
+ * Hardware structures.
  */
 
-/* EPIC's hardware descriptors, must be aligned on dword in memory */
-/* NB: to make driver happy, this two structures MUST have thier sizes */
-/* be divisor of PAGE_SIZE */
+/*
+ * EPIC's hardware descriptors, must be aligned on dword in memory.
+ * NB: to make driver happy, this two structures MUST have their sizes
+ * be divisor of PAGE_SIZE.
+ */
 struct epic_tx_desc {
 	volatile u_int16_t	status;
 	volatile u_int16_t	txlength;
@@ -212,9 +214,11 @@
 	volatile u_int32_t	next;
 };
 
-/* This structure defines EPIC's fragment list, maximum number of frags */
-/* is 63. Let use maximum, becouse size of struct MUST be divisor of */
-/* PAGE_SIZE, and sometimes come mbufs with more then 30 frags */
+/*
+ * This structure defines EPIC's fragment list, maximum number of frags
+ * is 63. Let's use the maximum, because size of struct MUST be divisor
+ * of PAGE_SIZE, and sometimes come mbufs with more then 30 frags.
+ */
 #define EPIC_MAX_FRAGS 63
 struct epic_frag_list {
 	volatile u_int32_t		numfrags;
@@ -242,4 +246,3 @@
 #define	SMC9434TX_XG_ADHOC	0xA021
 #define	SMC9432FTX_ADHOC	0xA022
 #define	SMC9432BTX1		0xA024
-

==== //depot/projects/ia64_epc/sys/i386/include/cpufunc.h#3 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.131 2003/04/19 02:40:39 davidxu Exp $
+ * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.133 2003/04/20 02:59:13 obrien Exp $
  */
 
 /*
@@ -444,16 +444,16 @@
 static __inline u_int
 rfs(void)
 {
-	u_short sel;
-	__asm __volatile("movw %%fs,%0" : "=rm" (sel));
+	u_int sel;
+	__asm __volatile("movl %%fs,%0" : "=rm" (sel));
 	return (sel);
 }
 
 static __inline u_int
 rgs(void)
 {
-	u_short sel;
-	__asm __volatile("movw %%gs,%0" : "=rm" (sel));
+	u_int sel;
+	__asm __volatile("movl %%gs,%0" : "=rm" (sel));
 	return (sel);
 }
 

==== //depot/projects/ia64_epc/sys/kern/vfs_bio.c#9 (text+ko) ====

@@ -11,7 +11,7 @@
  * 2. Absolutely no warranty of function or purpose is made by the author
  *		John S. Dyson.
  *
- * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.386 2003/04/19 21:15:43 alc Exp $
+ * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.388 2003/04/20 00:17:05 alc Exp $
  */
 
 /*
@@ -3106,6 +3106,8 @@
 		KASSERT(bp->b_offset != NOOFFSET,
 		    ("biodone: no buffer offset"));
 
+		if (obj != NULL)
+			VM_OBJECT_LOCK(obj);
 #if defined(VFS_BIO_DEBUG)
 		if (obj->paging_in_progress < bp->b_npages) {
 			printf("biodone: paging in progress(%d) < bp->b_npages(%d)\n",
@@ -3194,7 +3196,6 @@
 		}
 		vm_page_unlock_queues();
 		if (obj != NULL) {
-			VM_OBJECT_LOCK(obj);
 			vm_object_pip_wakeupn(obj, 0);
 			VM_OBJECT_UNLOCK(obj);
 		}
@@ -3321,6 +3322,8 @@
 		KASSERT(bp->b_offset != NOOFFSET,
 		    ("vfs_busy_pages: no buffer offset"));
 		vfs_setdirty(bp);
+		if (obj != NULL)
+			VM_OBJECT_LOCK(obj);
 retry:
 		vm_page_lock_queues();
 		for (i = 0; i < bp->b_npages; i++) {
@@ -3364,6 +3367,8 @@
 			foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK;
 		}
 		vm_page_unlock_queues();
+		if (obj != NULL)
+			VM_OBJECT_UNLOCK(obj);
 		if (bogus)
 			pmap_qenter(trunc_page((vm_offset_t)bp->b_data), bp->b_pages, bp->b_npages);
 	}

==== //depot/projects/ia64_epc/sys/kern/vfs_cluster.c#6 (text+ko) ====

@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)vfs_cluster.c	8.7 (Berkeley) 2/13/94
- * $FreeBSD: src/sys/kern/vfs_cluster.c,v 1.136 2003/03/30 02:57:32 jeff Exp $
+ * $FreeBSD: src/sys/kern/vfs_cluster.c,v 1.137 2003/04/20 07:29:50 alc Exp $
  */
 
 #include "opt_debug_cluster.h"
@@ -446,6 +446,8 @@
 		BUF_KERNPROC(tbp);
 		TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
 			tbp, b_cluster.cluster_entry);
+		if (tbp->b_object != NULL)
+			VM_OBJECT_LOCK(tbp->b_object);
 		vm_page_lock_queues();
 		for (j = 0; j < tbp->b_npages; j += 1) {
 			vm_page_t m;
@@ -461,6 +463,8 @@
 				tbp->b_pages[j] = bogus_page;
 		}
 		vm_page_unlock_queues();
+		if (tbp->b_object != NULL)
+			VM_OBJECT_UNLOCK(tbp->b_object);
 		/*
 		 * XXX shouldn't this be += size for both, like in
 		 * cluster_wbuild()?
@@ -928,6 +932,8 @@
 						}
 					}
 				}
+				if (tbp->b_object != NULL)
+					VM_OBJECT_LOCK(tbp->b_object);
 				vm_page_lock_queues();
 				for (j = 0; j < tbp->b_npages; j += 1) {
 					m = tbp->b_pages[j];
@@ -940,6 +946,8 @@
 					}
 				}
 				vm_page_unlock_queues();
+				if (tbp->b_object != NULL)
+					VM_OBJECT_UNLOCK(tbp->b_object);
 			}
 			bp->b_bcount += size;
 			bp->b_bufsize += size;

==== //depot/projects/ia64_epc/sys/vm/swap_pager.c#4 (text+ko) ====

@@ -64,7 +64,7 @@
  *
  *	@(#)swap_pager.c	8.9 (Berkeley) 3/21/94
  *
- * $FreeBSD: src/sys/vm/swap_pager.c,v 1.189 2003/04/19 21:15:44 alc Exp $
+ * $FreeBSD: src/sys/vm/swap_pager.c,v 1.192 2003/04/20 07:08:30 alc Exp $
  */
 
 #include <sys/param.h>
@@ -1002,7 +1002,6 @@
 	int i;
 	int j;
 	daddr_t blk;
-	vm_offset_t kva;
 	vm_pindex_t lastpindex;
 
 	GIANT_REQUIRED;
@@ -1077,20 +1076,18 @@
 	 * Get a swap buffer header to perform the IO
 	 */
 	bp = getpbuf(&nsw_rcount);
-	kva = (vm_offset_t) bp->b_data;
 
 	/*
 	 * map our page(s) into kva for input
 	 *
 	 * NOTE: B_PAGING is set by pbgetvp()
 	 */
-	pmap_qenter(kva, m + i, j - i);
+	pmap_qenter((vm_offset_t)bp->b_data, m + i, j - i);
 
 	bp->b_iocmd = BIO_READ;
 	bp->b_iodone = swp_pager_async_iodone;
 	bp->b_rcred = crhold(thread0.td_ucred);
 	bp->b_wcred = crhold(thread0.td_ucred);
-	bp->b_data = (caddr_t) kva;
 	bp->b_blkno = blk - (reqpage - i);

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



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