CVS commit: src/lib/libm/src

2013-11-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 01:03:08 UTC 2013

Modified Files:
src/lib/libm/src: w_fmodl.c

Log Message:
Add missing __HAVE_LONG_DOUBLE protection.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/w_fmodl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/src/w_fmodl.c
diff -u src/lib/libm/src/w_fmodl.c:1.1 src/lib/libm/src/w_fmodl.c:1.2
--- src/lib/libm/src/w_fmodl.c:1.1	Tue Nov 12 16:48:39 2013
+++ src/lib/libm/src/w_fmodl.c	Wed Nov 13 01:03:08 2013
@@ -11,7 +11,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: w_fmodl.c,v 1.1 2013/11/12 16:48:39 joerg Exp $");
+__RCSID("$NetBSD: w_fmodl.c,v 1.2 2013/11/13 01:03:08 joerg Exp $");
 
 /*
  * wrapper fmodl(x,y)
@@ -21,6 +21,8 @@ __RCSID("$NetBSD: w_fmodl.c,v 1.1 2013/1
 #include "math.h"
 #include "math_private.h"
 
+#ifdef __HAVE_LONG_DOUBLE
+
 #ifdef __weak_alias
 __weak_alias(fmodl, _fmodl)
 #endif
@@ -40,3 +42,5 @@ fmodl(long double x, long double y)	/* w
 	return z;
 #endif
 }
+
+#endif



CVS commit: src/distrib/sets/lists/debug

2013-11-12 Thread Hisashi T Fujinaka
Module Name:src
Committed By:   htodd
Date:   Tue Nov 12 23:39:59 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
Add debug file for hals_end.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/debug/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.40 src/distrib/sets/lists/debug/mi:1.41
--- src/distrib/sets/lists/debug/mi:1.40	Tue Nov 12 16:48:39 2013
+++ src/distrib/sets/lists/debug/mi	Tue Nov 12 23:39:58 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.40 2013/11/12 16:48:39 joerg Exp $
+# $NetBSD: mi,v 1.41 2013/11/12 23:39:58 htodd Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -835,6 +835,7 @@
 ./usr/libdata/debug/usr/games/fortune.debug	comp-utils-debug	debug
 ./usr/libdata/debug/usr/games/gomoku.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/hack.debug	comp-games-debug	debug
+./usr/libdata/debug/usr/games/hals_end.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/hangman.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/hunt.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/huntd.debug	comp-games-debug	debug



CVS commit: xsrc/external/mit/xf86-video-mach64/dist/src

2013-11-12 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Tue Nov 12 23:09:32 UTC 2013

Modified Files:
xsrc/external/mit/xf86-video-mach64/dist/src: atimach64render.c

Log Message:
"Deal with pPict->pDrawable == NULL for source-only pictures.
Falling back to software rendering for such source pictures (solid/gradient)."
from Matthieu Herrb via x.org


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c
diff -u xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c:1.1.1.3 xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c:1.2
--- xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c:1.1.1.3	Sun Jun  2 08:23:46 2013
+++ xsrc/external/mit/xf86-video-mach64/dist/src/atimach64render.c	Tue Nov 12 23:09:32 2013
@@ -339,10 +339,15 @@ Mach64GetOrder(int val, int *shift)
 static Bool
 Mach64CheckTexture(PicturePtr pPict)
 {
-int w = pPict->pDrawable->width;
-int h = pPict->pDrawable->height;
+int h, w;
 int l2w, l2h, level, i;
 
+if  (pPict->pDrawable == NULL)
+	return FALSE;
+
+w = pPict->pDrawable->width;
+h = pPict->pDrawable->height;
+
 for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) {
 if (Mach64TexFormats[i].pictFormat == pPict->format)
 break;



CVS commit: src/doc

2013-11-12 Thread Fredrik Pettai
Module Name:src
Committed By:   pettai
Date:   Tue Nov 12 22:19:57 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
mention new command zless


To generate a diff of this commit:
cvs rdiff -u -r1.1860 -r1.1861 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1860 src/doc/CHANGES:1.1861
--- src/doc/CHANGES:1.1860	Fri Nov  8 19:22:19 2013
+++ src/doc/CHANGES	Tue Nov 12 22:19:57 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1860 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1861 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -267,7 +267,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		CPUs (which implement a subset of m68k instructions and
 		addressing modes). [matt 20130719]
 	bind: update to 9.9.3-P2 to fix CVE-2013-4854 remote query can cause
-		named to terminate
+		named to terminate [christos 2013-07-27]
 	iwn(4): Add support for Centrino Wireless-N 1030 and Centrino
 		Advanced-N 6230 [prlw1 20130728]
 	dhcpcd(8): Import dhcpcd-6.0.5 [roy 20130803]
@@ -302,3 +302,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	x68k: Support upto 1008 MB extended memory that is found on the XM6i
 		emulator. [tsutsui 20131027]
 	OpenSSH: Imported 6.4 [christos 20131108]
+	zless(1): Added via lastest version of zmore(1) from OpenBSD
+		[pettai 20131112]



CVS commit: src

2013-11-12 Thread Fredrik Pettai
Module Name:src
Committed By:   pettai
Date:   Tue Nov 12 21:58:37 UTC 2013

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/man: mi
src/usr.bin/gzip: Makefile zmore zmore.1

Log Message:
Added zless(1) - comes in the lastest version of zmore(1) from OpenBSD
(OKed by tron@)


To generate a diff of this commit:
cvs rdiff -u -r1.1048 -r1.1049 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1448 -r1.1449 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/gzip/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/gzip/zmore src/usr.bin/gzip/zmore.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1048 src/distrib/sets/lists/base/mi:1.1049
--- src/distrib/sets/lists/base/mi:1.1048	Fri Nov  1 07:48:31 2013
+++ src/distrib/sets/lists/base/mi	Tue Nov 12 21:58:37 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1048 2013/11/01 07:48:31 mrg Exp $
+# $NetBSD: mi,v 1.1049 2013/11/12 21:58:37 pettai Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -801,6 +801,7 @@
 ./usr/bin/zfgrepbase-util-bin
 ./usr/bin/zforcebase-util-bin
 ./usr/bin/zgrep	base-util-bin
+./usr/bin/zless	base-util-bin
 ./usr/bin/zmore	base-util-bin
 ./usr/bin/znew	base-util-bin
 ./usr/bin/ztest	base-zfs-bin		zfs

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1448 src/distrib/sets/lists/man/mi:1.1449
--- src/distrib/sets/lists/man/mi:1.1448	Tue Oct 29 09:40:43 2013
+++ src/distrib/sets/lists/man/mi	Tue Nov 12 21:58:37 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1448 2013/10/29 09:40:43 mbalmer Exp $
+# $NetBSD: mi,v 1.1449 2013/11/12 21:58:37 pettai Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -628,6 +628,7 @@
 ./usr/share/man/cat1/zfgrep.0			man-util-catman		.cat
 ./usr/share/man/cat1/zforce.0			man-util-catman		.cat
 ./usr/share/man/cat1/zgrep.0			man-util-catman		.cat
+./usr/share/man/cat1/zless.0			man-util-catman		.cat
 ./usr/share/man/cat1/zmore.0			man-util-catman		.cat
 ./usr/share/man/cat1/znew.0			man-util-catman		.cat
 ./usr/share/man/cat3/atari/ahdi_buildlabel.0	man-obsolete		obsolete
@@ -3682,6 +3683,7 @@
 ./usr/share/man/html1/zfgrep.html		man-util-htmlman	html
 ./usr/share/man/html1/zforce.html		man-util-htmlman	html
 ./usr/share/man/html1/zgrep.html		man-util-htmlman	html
+./usr/share/man/html1/zless.html		man-util-htmlman	html
 ./usr/share/man/html1/zmore.html		man-util-htmlman	html
 ./usr/share/man/html1/znew.html			man-util-htmlman	html
 ./usr/share/man/html3lua/gpio.attach.html	man-sys-htmlman		html
@@ -6396,6 +6398,7 @@
 ./usr/share/man/man1/zfgrep.1			man-util-man		.man
 ./usr/share/man/man1/zforce.1			man-util-man		.man
 ./usr/share/man/man1/zgrep.1			man-util-man		.man
+./usr/share/man/man1/zless.1			man-util-man		.man
 ./usr/share/man/man1/zmore.1			man-util-man		.man
 ./usr/share/man/man1/znew.1			man-util-man		.man
 ./usr/share/man/man3/atari/ahdi_buildlabel.3	man-obsolete		obsolete

Index: src/usr.bin/gzip/Makefile
diff -u src/usr.bin/gzip/Makefile:1.16 src/usr.bin/gzip/Makefile:1.17
--- src/usr.bin/gzip/Makefile:1.16	Tue Jun 21 13:25:45 2011
+++ src/usr.bin/gzip/Makefile	Tue Nov 12 21:58:37 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2011/06/21 13:25:45 joerg Exp $
+#	$NetBSD: Makefile,v 1.17 2013/11/12 21:58:37 pettai Exp $
 
 USE_FORT?= yes	# data-driven bugs?
 
@@ -15,13 +15,14 @@ MLINKS+=	gzip.1 gunzip.1 \
 		gzip.1 zcat.1 \
 		zdiff.1 zcmp.1 \
 		zgrep.1 zegrep.1 \
-		zgrep.1 zfgrep.1
+		zgrep.1 zfgrep.1 \
+		zmore.1 zless.1
 
 LINKS+=		${BINDIR}/gzip ${BINDIR}/gunzip \
 		${BINDIR}/gzip ${BINDIR}/gzcat \
 		${BINDIR}/gzip ${BINDIR}/zcat \
 		${BINDIR}/zdiff ${BINDIR}/zcmp \
 		${BINDIR}/zgrep ${BINDIR}/zegrep \
-		${BINDIR}/zgrep ${BINDIR}/zfgrep
+		${BINDIR}/zmore ${BINDIR}/zless
 
 .include 

Index: src/usr.bin/gzip/zmore
diff -u src/usr.bin/gzip/zmore:1.3 src/usr.bin/gzip/zmore:1.4
--- src/usr.bin/gzip/zmore:1.3	Mon Mar 29 09:59:42 2004
+++ src/usr.bin/gzip/zmore	Tue Nov 12 21:58:37 2013
@@ -1,8 +1,8 @@
 #!/bin/sh -
 #
-# $NetBSD: zmore,v 1.3 2004/03/29 09:59:42 wiz Exp $
+# $NetBSD: zmore,v 1.4 2013/11/12 21:58:37 pettai Exp $
 #
-# $OpenBSD: zmore,v 1.4 2003/07/29 07:42:45 otto Exp $
+# $OpenBSD: zmore,v 1.6 2008/08/20 09:22:02 mpf Exp $
 #
 # Copyright (c) 2003 Todd C. Miller 
 #
@@ -41,6 +41,12 @@ while test $# -ne 0; do
 	esac
 done
 
+if [ `basename $0` == "zless" ] ; then
+	pager=${PAGER-less}
+else
+	pager=${PAGER-more}
+fi
+
 # No files means read from stdin
 if [ $# -eq 0 ]; then
 	gzip -cdfq 2>&1 | ${PAGER-more} $flags
Index: src/usr.bin/gzip/zmore.1
diff -u src/usr.bin/gzip/zmore.1:1.3 src/usr.bin/gzip/zmore.1:1.4
--- src/usr.bin/gzip/zmore.1:1.3	Sun Dec 28 12:47:52 2003
+++ src/usr.bin/gzip/zmore.1	Tue Nov 12 21:

CVS commit: src/distrib/sets/lists/comp

2013-11-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Nov 12 19:06:06 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: ad.mips

Log Message:
add GCC 4.8 mips64 subdirs.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/comp/ad.mips

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/ad.mips
diff -u src/distrib/sets/lists/comp/ad.mips:1.43 src/distrib/sets/lists/comp/ad.mips:1.44
--- src/distrib/sets/lists/comp/ad.mips:1.43	Fri Nov  1 07:48:31 2013
+++ src/distrib/sets/lists/comp/ad.mips	Tue Nov 12 19:06:06 2013
@@ -1,6 +1,9 @@
-# $NetBSD: ad.mips,v 1.43 2013/11/01 07:48:31 mrg Exp $
+# $NetBSD: ad.mips,v 1.44 2013/11/12 19:06:06 mrg Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
+./usr/include/g++/bits/mips32			comp-c-include		arch64
+./usr/include/g++/bits/mips64			comp-c-include		arch64
+./usr/include/g++/bits/mipso32			comp-c-include		arch64
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.8/loongson.h		comp-c-include		gcccmds,gcc=48



CVS commit: src/distrib/sets/lists/tests

2013-11-12 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Tue Nov 12 18:28:36 UTC 2013

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
mark t_ldp_static obsolete (this time correctly)


To generate a diff of this commit:
cvs rdiff -u -r1.550 -r1.551 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.550 src/distrib/sets/lists/tests/mi:1.551
--- src/distrib/sets/lists/tests/mi:1.550	Tue Nov 12 16:48:39 2013
+++ src/distrib/sets/lists/tests/mi	Tue Nov 12 18:28:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.550 2013/11/12 16:48:39 joerg Exp $
+# $NetBSD: mi,v 1.551 2013/11/12 18:28:36 kefren Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2606,7 +2606,7 @@
 ./usr/tests/net/mpls/Atffile			tests-net-tests		atf,rump
 ./usr/tests/net/mpls/Kyuafile			tests-net-tests		atf,rump,kyua
 ./usr/tests/net/mpls/t_ldp_regen		tests-net-tests		atf,rump
-./usr/tests/net/mpls/t_ldp_static		tests-net-tests		atf,rump	obsolete
+./usr/tests/net/mpls/t_ldp_static		tests-net-tests		obsolete
 ./usr/tests/net/mpls/t_mpls_fw			tests-net-tests		atf,rump
 ./usr/tests/net/mpls/t_rfc4182			tests-net-tests		atf,rump
 ./usr/tests/net/nettests-net-tests



CVS commit: src

2013-11-12 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Tue Nov 12 17:46:21 UTC 2013

Modified Files:
src/distrib/sets/lists/games: mi
src/games: Makefile
Added Files:
src/games/hals_end: Makefile hals_end.6 hals_end.c

Log Message:
hals_end(6) outputs the last words of the supercomputer HAL 9000 aboard
the spaceship in Stanley Kubrick's famous film "2001 - A Space Odissey".
The source code and output of this program were used to illustrate
an article in the book "Total Interaction".  How this looks in print can
be at http://www.netbsd.org/~mbalmer/hals_end.jpg.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/games/mi
cvs rdiff -u -r1.28 -r1.29 src/games/Makefile
cvs rdiff -u -r0 -r1.1 src/games/hals_end/Makefile \
src/games/hals_end/hals_end.6 src/games/hals_end/hals_end.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/games/mi
diff -u src/distrib/sets/lists/games/mi:1.48 src/distrib/sets/lists/games/mi:1.49
--- src/distrib/sets/lists/games/mi:1.48	Sun Sep  1 18:37:23 2013
+++ src/distrib/sets/lists/games/mi	Tue Nov 12 17:46:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.48 2013/09/01 18:37:23 dholland Exp $
+# $NetBSD: mi,v 1.49 2013/11/12 17:46:21 mbalmer Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -27,6 +27,7 @@
 ./usr/games/fortunegames-utils-bin
 ./usr/games/gomokugames-games-bin
 ./usr/games/hackgames-games-bin
+./usr/games/hals_endgames-games-bin
 ./usr/games/hangmangames-games-bin
 ./usr/games/hide/adventure			games-obsolete		obsolete
 ./usr/games/hide/arithmetic			games-obsolete		obsolete
@@ -214,6 +215,7 @@
 ./usr/share/man/cat6/fortune.0			games-utils-catman	.cat
 ./usr/share/man/cat6/gomoku.0			games-games-catman	.cat
 ./usr/share/man/cat6/hack.0			games-games-catman	.cat
+./usr/share/man/cat6/hals_end.0			games-games-catman	.cat
 ./usr/share/man/cat6/hangman.0			games-games-catman	.cat
 ./usr/share/man/cat6/hunt.0			games-games-catman	.cat
 ./usr/share/man/cat6/huntd.0			games-games-catman	.cat
@@ -268,6 +270,7 @@
 ./usr/share/man/html6/fortune.html		games-utils-htmlman	html
 ./usr/share/man/html6/gomoku.html		games-games-htmlman	html
 ./usr/share/man/html6/hack.html			games-games-htmlman	html
+./usr/share/man/html6/hals_end.html		games-games-htmlman	html
 ./usr/share/man/html6/hangman.html		games-games-htmlman	html
 ./usr/share/man/html6/hunt.html			games-games-htmlman	html
 ./usr/share/man/html6/huntd.html		games-games-htmlman	html
@@ -323,6 +326,7 @@
 ./usr/share/man/man6/fortune.6			games-utils-man		.man
 ./usr/share/man/man6/gomoku.6			games-games-man		.man
 ./usr/share/man/man6/hack.6			games-games-man		.man
+./usr/share/man/man6/hals_end.6			games-games-man		.man
 ./usr/share/man/man6/hangman.6			games-games-man		.man
 ./usr/share/man/man6/hunt.6			games-games-man		.man
 ./usr/share/man/man6/huntd.6			games-games-man		.man

Index: src/games/Makefile
diff -u src/games/Makefile:1.28 src/games/Makefile:1.29
--- src/games/Makefile:1.28	Sun Sep  1 18:37:06 2013
+++ src/games/Makefile	Tue Nov 12 17:46:20 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2013/09/01 18:37:06 dholland Exp $
+#	$NetBSD: Makefile,v 1.29 2013/11/12 17:46:20 mbalmer Exp $
 #	@(#)Makefile	8.3 (Berkeley) 7/24/94
 
 # Missing: dungeon warp
@@ -11,7 +11,7 @@ SUBDIR=	adventure arithmetic atc \
 	backgammon banner battlestar bcd boggle \
 	caesar canfield cgram ching colorbars countmail cribbage \
 	dm factor fish fortune gomoku \
-	hack hangman hunt larn mille monop morse number \
+	hack hals_end hangman hunt larn mille monop morse number \
 	phantasia pig pom ppt primes quiz \
 	rain random robots rogue sail snake tetris trek \
 	wargames worm worms wtf wump

Added files:

Index: src/games/hals_end/Makefile
diff -u /dev/null src/games/hals_end/Makefile:1.1
--- /dev/null	Tue Nov 12 17:46:21 2013
+++ src/games/hals_end/Makefile	Tue Nov 12 17:46:21 2013
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2013/11/12 17:46:21 mbalmer Exp $
+
+PROG=	hals_end
+
+BINDIR=	/usr/games
+
+MAN=	hals_end.6
+
+.include  
Index: src/games/hals_end/hals_end.6
diff -u /dev/null src/games/hals_end/hals_end.6:1.1
--- /dev/null	Tue Nov 12 17:46:21 2013
+++ src/games/hals_end/hals_end.6	Tue Nov 12 17:46:21 2013
@@ -0,0 +1,66 @@
+.\"	$NetBSD: hals_end.6,v 1.1 2013/11/12 17:46:21 mbalmer Exp $
+.\"
+.\" Copyright (c) 2003 - 2013 Marc Balmer .
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in t

CVS commit: src/lib/libm/src

2013-11-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Nov 12 17:37:43 UTC 2013

Modified Files:
src/lib/libm/src: s_finite.c s_finitef.c

Log Message:
Typo.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/s_finite.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/s_finitef.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/src/s_finite.c
diff -u src/lib/libm/src/s_finite.c:1.11 src/lib/libm/src/s_finite.c:1.12
--- src/lib/libm/src/s_finite.c:1.11	Sun May 26 22:01:55 2002
+++ src/lib/libm/src/s_finite.c	Tue Nov 12 17:37:43 2013
@@ -12,11 +12,11 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_finite.c,v 1.11 2002/05/26 22:01:55 wiz Exp $");
+__RCSID("$NetBSD: s_finite.c,v 1.12 2013/11/12 17:37:43 joerg Exp $");
 #endif
 
 /*
- * finite(x) returns 1 is x is finite, else 0;
+ * finite(x) returns 1 if x is finite, else 0;
  * no branching!
  */
 

Index: src/lib/libm/src/s_finitef.c
diff -u src/lib/libm/src/s_finitef.c:1.7 src/lib/libm/src/s_finitef.c:1.8
--- src/lib/libm/src/s_finitef.c:1.7	Sun May 26 22:01:55 2002
+++ src/lib/libm/src/s_finitef.c	Tue Nov 12 17:37:43 2013
@@ -15,11 +15,11 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_finitef.c,v 1.7 2002/05/26 22:01:55 wiz Exp $");
+__RCSID("$NetBSD: s_finitef.c,v 1.8 2013/11/12 17:37:43 joerg Exp $");
 #endif
 
 /*
- * finitef(x) returns 1 is x is finite, else 0;
+ * finitef(x) returns 1 if x is finite, else 0;
  * no branching!
  */
 



CVS commit: src/lib/libm

2013-11-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Nov 12 17:36:14 UTC 2013

Modified Files:
src/lib/libm: Makefile
src/lib/libm/src: namespace.h
Added Files:
src/lib/libm/src: ldbl_dummy.c

Log Message:
Add some fake long double -> double wrappers for various transcendental
functions. They are expected to be implement properly at a later time.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/ldbl_dummy.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/namespace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.146 src/lib/libm/Makefile:1.147
--- src/lib/libm/Makefile:1.146	Tue Nov 12 16:48:39 2013
+++ src/lib/libm/Makefile	Tue Nov 12 17:36:14 2013
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.146 2013/11/12 16:48:39 joerg Exp $
+#  $NetBSD: Makefile,v 1.147 2013/11/12 17:36:14 joerg Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -159,6 +159,7 @@ COMMON_SRCS+= b_exp.c b_log.c b_tgamma.c
 	e_scalbf.c e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c \
 	k_cos.c k_cosf.c k_rem_pio2.c k_rem_pio2f.c k_sin.c k_sinf.c \
 	k_standard.c k_tan.c k_tanf.c \
+	ldbl_dummy.c \
 	s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_cbrt.c s_cbrtf.c \
 	s_ceil.c s_ceilf.c s_ceill.c s_copysign.c s_copysignf.c s_copysignl.c \
 	s_cos.c s_cosf.c s_erf.c \

Index: src/lib/libm/src/namespace.h
diff -u src/lib/libm/src/namespace.h:1.7 src/lib/libm/src/namespace.h:1.8
--- src/lib/libm/src/namespace.h:1.7	Tue Nov 12 16:48:39 2013
+++ src/lib/libm/src/namespace.h	Tue Nov 12 17:36:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.7 2013/11/12 16:48:39 joerg Exp $ */
+/* $NetBSD: namespace.h,v 1.8 2013/11/12 17:36:14 joerg Exp $ */
 
 #define atan2 _atan2
 #define atan2f _atan2f
@@ -50,3 +50,18 @@
 #define floorl _floorl
 #define roundl _roundl
 #define fmodl _fmodl
+
+#define exp2l _exp2l
+#define cosl _cosl
+#define sinl _sinl
+#define tanl _tanl
+#define powl _powl
+#define coshl _coshl
+#define sinhl _sinhl
+#define acosl _acosl
+#define atanl _atanl
+#define asinhl _asinhl
+#define acoshl _acoshl
+#define tanhl _tanhl
+#define atanhl _atanhl
+#define log10l _log10l

Added files:

Index: src/lib/libm/src/ldbl_dummy.c
diff -u /dev/null src/lib/libm/src/ldbl_dummy.c:1.1
--- /dev/null	Tue Nov 12 17:36:14 2013
+++ src/lib/libm/src/ldbl_dummy.c	Tue Nov 12 17:36:14 2013
@@ -0,0 +1,175 @@
+/* $NetBSD: ldbl_dummy.c,v 1.1 2013/11/12 17:36:14 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Simple long double -> double wrappers for various transcendental functions.
+ * They work neither on the additional range of long double nor do they use
+ * the additional precision. They exist as stop gap fix for various programs
+ * picking up long double, e.g. via the C++ run time.
+ */
+
+#include 
+__RCSID("$NetBSD: ldbl_dummy.c,v 1.1 2013/11/12 17:36:14 joerg Exp $");
+
+#include "namespace.h"
+#include 
+
+__weak_alias(atan2l, _atan2l)
+__weak_alias(hypotl, _hypotl)
+__weak_alias(logl, _logl)
+__weak_alias(log10l, _log10l)
+__weak_alias(expl, _expl)
+__weak_alias(exp2l, _exp2l)
+__weak_alias(powl, _powl)
+__weak_alias(cosl, _cosl)
+__weak_alias(sinl, _sinl)
+__weak_alias(tanl, _tanl)
+__weak_alias(coshl, _coshl)
+__weak_alias(sinhl, _sinhl)
+__weak_alias(tanhl, _tanhl)
+__weak_alias(acosl, _acosl)
+__weak_alias(asinl, _asinl)
+__weak_alias(atanl, _atanl)
+__weak_alias(acoshl, _acoshl)
+__weak_alias(asinhl, _asinhl)
+__weak_alias(atanhl, _atanhl)
+
+long 

CVS commit: src/sys/arch/arm/arm

2013-11-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov 12 17:31:55 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpufunc.c

Log Message:
Make sure CPU_CONTROL_UNAL_ENABLE is enabled for armv7 cpus (should be
already but ...)


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/arm/arm/cpufunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.129 src/sys/arch/arm/arm/cpufunc.c:1.130
--- src/sys/arch/arm/arm/cpufunc.c:1.129	Tue Nov 12 17:14:39 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Tue Nov 12 17:31:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.129 2013/11/12 17:14:39 skrll Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.130 2013/11/12 17:31:55 matt Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.129 2013/11/12 17:14:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.130 2013/11/12 17:31:55 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -2996,7 +2996,9 @@ pj4bv7_setup(char *args)
 	pj4b_config();
 
 	cpuctrl = CPU_CONTROL_MMU_ENABLE;
-#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
+#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
+	cpuctrl |= CPU_CONTROL_UNAL_ENABLE;
+#else
 	cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
 #endif
 	cpuctrl |= CPU_CONTROL_DC_ENABLE;
@@ -3047,16 +3049,14 @@ armv7_setup(char *args)
 	| CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
 	| CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
 
-#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
+#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
+	cpuctrl |= CPU_CONTROL_UNAL_ENABLE;
+#else
 	cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
 #endif
 
 	cpuctrl = parse_cpu_options(args, armv7_options, cpuctrl);
 
-#ifdef __ARMEB__
-	cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
 #ifndef ARM_HAS_VBAR
 	if (vector_page == ARM_VECTORS_HIGH)
 		cpuctrl |= CPU_CONTROL_VECRELOC;



CVS commit: src/sys/arch

2013-11-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 12 17:14:39 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpufunc.c
src/sys/arch/evbarm/rpi: rpi_start.S

Log Message:
Add CPU_CONTROL_UNAL_ENABLE. New ABIs demand unaligned accesses!


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/arm/arm/cpufunc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/rpi/rpi_start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.128 src/sys/arch/arm/arm/cpufunc.c:1.129
--- src/sys/arch/arm/arm/cpufunc.c:1.128	Wed Nov  6 02:36:36 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Tue Nov 12 17:14:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.128 2013/11/06 02:36:36 christos Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.129 2013/11/12 17:14:39 skrll Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.128 2013/11/06 02:36:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.129 2013/11/12 17:14:39 skrll Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -3092,6 +3092,7 @@ arm11x6_setup(char *args)
 		CPU_CONTROL_32BD_ENABLE |
 		CPU_CONTROL_LABT_ENABLE |
 		CPU_CONTROL_SYST_ENABLE |
+		CPU_CONTROL_UNAL_ENABLE |
 		CPU_CONTROL_IC_ENABLE;
 
 	/*

Index: src/sys/arch/evbarm/rpi/rpi_start.S
diff -u src/sys/arch/evbarm/rpi/rpi_start.S:1.7 src/sys/arch/evbarm/rpi/rpi_start.S:1.8
--- src/sys/arch/evbarm/rpi/rpi_start.S:1.7	Sun Sep 23 15:56:32 2012
+++ src/sys/arch/evbarm/rpi/rpi_start.S	Tue Nov 12 17:14:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_start.S,v 1.7 2012/09/23 15:56:32 skrll Exp $	*/
+/*	$NetBSD: rpi_start.S,v 1.8 2013/11/12 17:14:39 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
@@ -87,7 +87,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: rpi_start.S,v 1.7 2012/09/23 15:56:32 skrll Exp $")
+RCSID("$NetBSD: rpi_start.S,v 1.8 2013/11/12 17:14:39 skrll Exp $")
 
 /*
  * Workaround Erratum 411920 
@@ -277,6 +277,7 @@ Lcontrol_set:
 	  CPU_CONTROL_SYST_ENABLE | \
 		(1 << 16) | 	/* SBO - Global enable for data tcm */ \
 		(1 << 18) |	/* SBO - Global enable for insn tcm */ \
+	  CPU_CONTROL_UNAL_ENABLE | \
 	  CPU_CONTROL_IC_ENABLE
 
 



CVS commit: src/sys/arch/arm/cortex

2013-11-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov 12 17:10:39 UTC 2013

Modified Files:
src/sys/arch/arm/cortex: a9_mpsubr.S

Log Message:
Deal with ARM32_DISABLE_ALIGNMENT_FAULTS


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/cortex/a9_mpsubr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.9 src/sys/arch/arm/cortex/a9_mpsubr.S:1.10
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.9	Sat Sep  7 00:33:32 2013
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Tue Nov 12 17:10:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.9 2013/09/07 00:33:32 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.10 2013/11/12 17:10:39 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -117,6 +117,10 @@ arm_boot_l1pt_init:
 #undef CPU_CONTROL_EX_BEND		// needs to clear on LE systems
 #define	CPU_CONTROL_EX_BEND		0
 #endif
+#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
+#undef CPU_CONTROL_AFLT_ENABLE
+#define CPU_CONTROL_AFLT_ENABLE		0
+#endif
 
 #define	CPU_CONTROL_SET \
 	(CPU_CONTROL_MMU_ENABLE		|	\
@@ -125,7 +129,8 @@ arm_boot_l1pt_init:
 	 CPU_CONTROL_DC_ENABLE		|	\
 	 CPU_CONTROL_SWP_ENABLE		|	\
 	 CPU_CONTROL_BPRD_ENABLE	|	\
-	 CPU_CONTROL_IC_ENABLE)
+	 CPU_CONTROL_IC_ENABLE		|	\
+	 CPU_CONTROL_UNAL_ENABLE)
 
 arm_cpuinit:
 	/*



CVS commit: src/sys/arch/arm/conf

2013-11-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov 12 17:05:09 UTC 2013

Modified Files:
src/sys/arch/arm/conf: files.arm

Log Message:
CPU_ARMV[67] imply ARM32_DISABLE_ALIGNMENT_FAULTS
Make it explicit.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/arm/conf/files.arm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/conf/files.arm
diff -u src/sys/arch/arm/conf/files.arm:1.122 src/sys/arch/arm/conf/files.arm:1.123
--- src/sys/arch/arm/conf/files.arm:1.122	Sat Aug 17 22:21:02 2013
+++ src/sys/arch/arm/conf/files.arm	Tue Nov 12 17:05:09 2013
@@ -1,10 +1,15 @@
-#	$NetBSD: files.arm,v 1.122 2013/08/17 22:21:02 matt Exp $
+#	$NetBSD: files.arm,v 1.123 2013/11/12 17:05:09 matt Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflagARM32
 
+# predefine for CPU_ARMV6 and CPU_ARMV7
+defflag	opt_cpuoptions.h	ARM32_DISABLE_ALIGNMENT_FAULTS
+
 # CPU types.  Make sure to update  if you change this list.
-defflag	opt_cputypes.h		CPU_PRE_ARMV6 CPU_ARMV6 CPU_ARMV7
+defflag	opt_cputypes.h		CPU_PRE_ARMV6
+defflag	opt_cputypes.h		CPU_ARMV6: ARM32_DISABLE_ALIGNMENT_FAULTS
+defflag	opt_cputypes.h		CPU_ARMV7: ARM32_DISABLE_ALIGNMENT_FAULTS
 defflag	opt_cputypes.h		CPU_ARM2: CPU_PRE_ARMV6
 defflag	opt_cputypes.h		CPU_ARM250: CPU_PRE_ARMV6
 defflag	opt_cputypes.h		CPU_ARM3: CPU_PRE_ARMV6
@@ -44,7 +49,6 @@ defflag  opt_cpuoptions.h	XSCALE_CACHE_W
 defflag  opt_cpuoptions.h	XSCALE_CACHE_WRITE_BACK
 defflag  opt_cpuoptions.h	XSCALE_NO_COALESCE_WRITES
 defflag  opt_cpuoptions.h	XSCALE_CACHE_READ_WRITE_ALLOCATE
-defflag  opt_cpuoptions.h	ARM32_DISABLE_ALIGNMENT_FAULTS
 defflag  opt_cpuoptions.h	ARM9_CACHE_WRITE_THROUGH
 defflag  opt_cpuoptions.h	TPIDRPRW_IS_CURLWP
 defflag  opt_cpuoptions.h	TPIDRPRW_IS_CURCPU



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 16:57:30 UTC 2013

Modified Files:
src/sys/arch/x86/x86: intel_busclock.c

Log Message:
 Check the CPU display model instead of the base model. Re-enable the
checking for Atom and Silvermont.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/intel_busclock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.15 src/sys/arch/x86/x86/intel_busclock.c:1.16
--- src/sys/arch/x86/x86/intel_busclock.c:1.15	Mon Nov 11 17:02:53 2013
+++ src/sys/arch/x86/x86/intel_busclock.c	Tue Nov 12 16:57:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.15 2013/11/11 17:02:53 christos Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.16 2013/11/12 16:57:30 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.15 2013/11/11 17:02:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.16 2013/11/12 16:57:30 msaitoh Exp $");
 
 #include 
 #include 
@@ -92,8 +92,16 @@ p3_get_bus_clock(struct cpu_info *ci)
 {
 	uint64_t msr;
 	int bus, bus_clock = 0;
+	uint32_t family, model;
 
-	switch (CPUID2MODEL(ci->ci_signature)) {
+	family = CPUID2FAMILY(ci->ci_signature);
+	model = CPUID2MODEL(ci->ci_signature);
+
+	/* Note that this function is called only when family != 0xf */
+	if (family == 6)
+		model |= CPUID2EXTMODEL(ci->ci_signature) << 4;
+		
+	switch (model) {
 	case 0x9: /* Pentium M (130 nm, Banias) */
 		bus_clock = 1;
 		break;
@@ -213,7 +221,6 @@ p3_get_bus_clock(struct cpu_info *ci)
 			goto print_msr;
 		}
 		break;
-#if 0
 	case 0x1c: /* Atom */
 	case 0x26:
 	case 0x27:
@@ -274,7 +281,6 @@ p3_get_bus_clock(struct cpu_info *ci)
 			goto print_msr;
 		}
 		break;
-#endif
 	default:
 		aprint_debug("%s: unknown i686 model %d, can't get bus clock",
 		device_xname(ci->ci_dev),



CVS commit: src

2013-11-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Nov 12 16:48:39 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/lib/libm: Makefile
src/lib/libm/man: fmod.3
src/lib/libm/src: math_private.h namespace.h w_fmod.c
src/tests/lib/libm: Makefile
Added Files:
src/lib/libm/src: e_fmodl.c w_fmodl.c
src/tests/lib/libm: t_fmod.c

Log Message:
Initial version of fmodl from FreeBSD.
Basic test case for the fmod family.


To generate a diff of this commit:
cvs rdiff -u -r1.1856 -r1.1857 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.39 -r1.40 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.549 -r1.550 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.145 -r1.146 src/lib/libm/Makefile
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/man/fmod.3
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/e_fmodl.c src/lib/libm/src/w_fmodl.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libm/src/math_private.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/w_fmod.c
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_fmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1856 src/distrib/sets/lists/comp/mi:1.1857
--- src/distrib/sets/lists/comp/mi:1.1856	Tue Nov 12 16:39:39 2013
+++ src/distrib/sets/lists/comp/mi	Tue Nov 12 16:48:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1856 2013/11/12 16:39:39 joerg Exp $
+#	$NetBSD: mi,v 1.1857 2013/11/12 16:48:39 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6282,6 +6282,7 @@
 ./usr/share/man/cat3/fminl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fmod.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fmodf.0			comp-c-catman		.cat
+./usr/share/man/cat3/fmodl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fmtcheck.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fmtmsg.0			comp-c-catman		.cat
 ./usr/share/man/cat3/fnmatch.0			comp-c-catman		.cat
@@ -12838,6 +12839,7 @@
 ./usr/share/man/html3/fminl.html		comp-c-htmlman		html
 ./usr/share/man/html3/fmod.html			comp-c-htmlman		html
 ./usr/share/man/html3/fmodf.html		comp-c-htmlman		html
+./usr/share/man/html3/fmodl.html		comp-c-htmlman		html
 ./usr/share/man/html3/fmtcheck.html		comp-c-htmlman		html
 ./usr/share/man/html3/fmtmsg.html		comp-c-htmlman		html
 ./usr/share/man/html3/fnmatch.html		comp-c-htmlman		html
@@ -19308,6 +19310,7 @@
 ./usr/share/man/man3/fminl.3			comp-c-man		.man
 ./usr/share/man/man3/fmod.3			comp-c-man		.man
 ./usr/share/man/man3/fmodf.3			comp-c-man		.man
+./usr/share/man/man3/fmodl.3			comp-c-man		.man
 ./usr/share/man/man3/fmtcheck.3			comp-c-man		.man
 ./usr/share/man/man3/fmtmsg.3			comp-c-man		.man
 ./usr/share/man/man3/fnmatch.3			comp-c-man		.man

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.39 src/distrib/sets/lists/debug/mi:1.40
--- src/distrib/sets/lists/debug/mi:1.39	Mon Nov 11 11:10:45 2013
+++ src/distrib/sets/lists/debug/mi	Tue Nov 12 16:48:39 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.39 2013/11/11 11:10:45 joerg Exp $
+# $NetBSD: mi,v 1.40 2013/11/12 16:48:39 joerg Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -1975,6 +1975,7 @@
 ./usr/libdata/debug/usr/tests/lib/libm/t_erf.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_exp.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_floor.debug			tests-obsolete		obsolete
+./usr/libdata/debug/usr/tests/lib/libm/t_fmod.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_infinity.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_ldexp.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libm/t_libm.debug			tests-obsolete		obsolete

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.549 src/distrib/sets/lists/tests/mi:1.550
--- src/distrib/sets/lists/tests/mi:1.549	Tue Nov 12 12:22:33 2013
+++ src/distrib/sets/lists/tests/mi	Tue Nov 12 16:48:39 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.549 2013/11/12 12:22:33 kefren Exp $
+# $NetBSD: mi,v 1.550 2013/11/12 16:48:39 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2353,6 +2353,7 @@
 ./usr/tests/lib/libm/t_erf			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_exp			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_floor			tests-obsolete		obsolete
+./usr/tests/lib/libm/t_fmod			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_infinity			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_ldexp			tests-lib-tests		atf
 ./usr/tests/lib/libm/t_libm			tests-obsolete		obsolete

Index: src/lib/libm/Makefile
diff

CVS commit: src

2013-11-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Nov 12 16:39:39 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: mi
src/external/bsd/libc++/include: Makefile
src/external/bsd/libc++/lib: Makefile

Log Message:
Update build system for C++14 support.


To generate a diff of this commit:
cvs rdiff -u -r1.1855 -r1.1856 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libc++/include/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libc++/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1855 src/distrib/sets/lists/comp/mi:1.1856
--- src/distrib/sets/lists/comp/mi:1.1855	Tue Nov 12 00:10:29 2013
+++ src/distrib/sets/lists/comp/mi	Tue Nov 12 16:39:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1855 2013/11/12 00:10:29 joerg Exp $
+#	$NetBSD: mi,v 1.1856 2013/11/12 16:39:39 joerg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -259,6 +259,7 @@
 ./usr/include/c++/cwctype			comp-cxx-include	libcxx
 ./usr/include/c++/cxxabi.h			comp-cxx-include	libcxx
 ./usr/include/c++/dequecomp-cxx-include	libcxx
+./usr/include/c++/dynarray			comp-cxx-include	libcxx
 ./usr/include/c++/exception			comp-cxx-include	libcxx
 ./usr/include/c++/ext/__hash			comp-cxx-include	libcxx
 ./usr/include/c++/ext/hash_map			comp-cxx-include	libcxx
@@ -282,6 +283,7 @@
 ./usr/include/c++/mutexcomp-cxx-include	libcxx
 ./usr/include/c++/newcomp-cxx-include	libcxx
 ./usr/include/c++/numeric			comp-cxx-include	libcxx
+./usr/include/c++/optional			comp-cxx-include	libcxx
 ./usr/include/c++/ostream			comp-cxx-include	libcxx
 ./usr/include/c++/queuecomp-cxx-include	libcxx
 ./usr/include/c++/random			comp-cxx-include	libcxx
@@ -289,6 +291,7 @@
 ./usr/include/c++/regexcomp-cxx-include	libcxx
 ./usr/include/c++/scoped_allocator		comp-cxx-include	libcxx
 ./usr/include/c++/setcomp-cxx-include	libcxx
+./usr/include/c++/shared_mutex			comp-cxx-include	libcxx
 ./usr/include/c++/sstream			comp-cxx-include	libcxx
 ./usr/include/c++/stackcomp-cxx-include	libcxx
 ./usr/include/c++/stdexcept			comp-cxx-include	libcxx

Index: src/external/bsd/libc++/include/Makefile
diff -u src/external/bsd/libc++/include/Makefile:1.3 src/external/bsd/libc++/include/Makefile:1.4
--- src/external/bsd/libc++/include/Makefile:1.3	Thu Oct 17 22:07:59 2013
+++ src/external/bsd/libc++/include/Makefile	Tue Nov 12 16:39:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2013/10/17 22:07:59 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2013/11/12 16:39:39 joerg Exp $
 
 .include 
 
@@ -55,6 +55,7 @@ INCS=	__bit_reference \
 	cwchar \
 	cwctype \
 	deque \
+	dynarray \
 	exception \
 	forward_list \
 	fstream \
@@ -75,6 +76,7 @@ INCS=	__bit_reference \
 	mutex \
 	new \
 	numeric \
+	optional \
 	ostream \
 	queue \
 	random \
@@ -82,6 +84,7 @@ INCS=	__bit_reference \
 	regex \
 	scoped_allocator \
 	set \
+	shared_mutex \
 	sstream \
 	stack \
 	stdexcept \

Index: src/external/bsd/libc++/lib/Makefile
diff -u src/external/bsd/libc++/lib/Makefile:1.3 src/external/bsd/libc++/lib/Makefile:1.4
--- src/external/bsd/libc++/lib/Makefile:1.3	Fri May 17 22:57:27 2013
+++ src/external/bsd/libc++/lib/Makefile	Tue Nov 12 16:39:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2013/05/17 22:57:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2013/11/12 16:39:39 joerg Exp $
 
 LIB=		c++
 WARNS=		4
@@ -10,7 +10,8 @@ NOLINT=		# defined
 
 SRCS=	algorithm.cpp bind.cpp chrono.cpp condition_variable.cpp debug.cpp \
 	exception.cpp future.cpp hash.cpp ios.cpp iostream.cpp locale.cpp \
-	memory.cpp mutex.cpp new.cpp random.cpp regex.cpp stdexcept.cpp \
+	memory.cpp mutex.cpp new.cpp optional.cpp random.cpp regex.cpp \
+	shared_mutex.cpp stdexcept.cpp \
 	string.cpp strstream.cpp system_error.cpp thread.cpp \
 	utility.cpp valarray.cpp
 # typeinfo.cc: prefer libcxxrt's version



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 16:35:57 UTC 2013

Modified Files:
src/sys/arch/x86/x86: cpu_topology.c

Log Message:
 Fix calculation of the cpu family (display family) in x86_cpu_topology().
More than bit 3 in cpu_family variable is checked in the function, so the
variable is assumed that it is not the base family but the display family
(base family + extended family).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/cpu_topology.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu_topology.c
diff -u src/sys/arch/x86/x86/cpu_topology.c:1.6 src/sys/arch/x86/x86/cpu_topology.c:1.7
--- src/sys/arch/x86/x86/cpu_topology.c:1.6	Sat May 29 05:53:57 2010
+++ src/sys/arch/x86/x86/cpu_topology.c	Tue Nov 12 16:35:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $	*/
+/*	$NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009 Mindaugas Rasiukevicius ,
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $");
 
 #include 
 #include 
@@ -58,6 +58,8 @@ x86_cpu_topology(struct cpu_info *ci)
 
 	apic_id = ci->ci_initapicid;
 	cpu_family = CPUID2FAMILY(ci->ci_signature);
+	if (cpu_family == 0xf)
+		cpu_family += CPUID2EXTFAMILY(ci->ci_signature);
 
 	/* Initial values. */
 	ci->ci_package_id = apic_id;



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 16:15:54 UTC 2013

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Revert previos. I accidentally committed a debug code. Sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.104 src/sys/arch/x86/x86/cpu.c:1.105
--- src/sys/arch/x86/x86/cpu.c:1.104	Tue Nov 12 16:13:56 2013
+++ src/sys/arch/x86/x86/cpu.c	Tue Nov 12 16:15:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $	*/
+/*	$NetBSD: cpu.c,v 1.105 2013/11/12 16:15:54 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.105 2013/11/12 16:15:54 msaitoh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -245,7 +245,6 @@ cpu_vm_init(struct cpu_info *ci)
 		struct x86_cache_info *cai;
 		int tcolors;
 
-		printf("CAI = %d\n", i);
 		cai = &ci->ci_cinfo[i];
 
 		tcolors = atop(cai->cai_totalsize);
@@ -259,8 +258,6 @@ cpu_vm_init(struct cpu_info *ci)
 		default:
 			tcolors /= cai->cai_associativity;
 		}
-		printf("associativity = %d, totalsize = %d\n",
-		cai->cai_associativity, cai->cai_totalsize);
 		ncolors = max(ncolors, tcolors);
 		/*
 		 * If the desired number of colors is not a power of



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 16:13:56 UTC 2013

Modified Files:
src/sys/arch/x86/x86: cpu.c identcpu.c

Log Message:
Fix a bug in last commit. Check correct variable.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.103 src/sys/arch/x86/x86/cpu.c:1.104
--- src/sys/arch/x86/x86/cpu.c:1.103	Wed Oct 23 20:18:50 2013
+++ src/sys/arch/x86/x86/cpu.c	Tue Nov 12 16:13:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.103 2013/10/23 20:18:50 drochner Exp $	*/
+/*	$NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.103 2013/10/23 20:18:50 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -245,6 +245,7 @@ cpu_vm_init(struct cpu_info *ci)
 		struct x86_cache_info *cai;
 		int tcolors;
 
+		printf("CAI = %d\n", i);
 		cai = &ci->ci_cinfo[i];
 
 		tcolors = atop(cai->cai_totalsize);
@@ -258,6 +259,8 @@ cpu_vm_init(struct cpu_info *ci)
 		default:
 			tcolors /= cai->cai_associativity;
 		}
+		printf("associativity = %d, totalsize = %d\n",
+		cai->cai_associativity, cai->cai_totalsize);
 		ncolors = max(ncolors, tcolors);
 		/*
 		 * If the desired number of colors is not a power of

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.36 src/sys/arch/x86/x86/identcpu.c:1.37
--- src/sys/arch/x86/x86/identcpu.c:1.36	Tue Nov 12 16:11:39 2013
+++ src/sys/arch/x86/x86/identcpu.c	Tue Nov 12 16:13:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.36 2013/11/12 16:11:39 msaitoh Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.37 2013/11/12 16:13:56 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.36 2013/11/12 16:11:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.37 2013/11/12 16:13:56 msaitoh Exp $");
 
 #include "opt_xen.h"
 
@@ -122,7 +122,7 @@ cpu_probe_amd_cache(struct cpu_info *ci)
 	if (family == 0xf)
 		family += CPUID2EXTFAMILY(ci->ci_signature);
 
-	if ((family == 0xf) || (model == 0x6))
+	if ((family == 0xf) || (family == 0x6))
 		model |= CPUID2EXTMODEL(ci->ci_signature) << 4;
 
 	/*



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 16:11:39 UTC 2013

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
 Fix calculation of the cpu model (display model) in cpu_probe_amd_cache().
The CPUID2MODEL() must be used only when the CPUID2FAMILY() macro returns
0xf or 0x6. Also fix a bug that CPUID2EXTMODEL() is _ADDED_. The correct way
is shifting the return value of CPUID2EXTMODEL() 4bit left and _OR_ it.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.35 src/sys/arch/x86/x86/identcpu.c:1.36
--- src/sys/arch/x86/x86/identcpu.c:1.35	Mon Oct 21 06:33:11 2013
+++ src/sys/arch/x86/x86/identcpu.c	Tue Nov 12 16:11:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.35 2013/10/21 06:33:11 msaitoh Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.36 2013/11/12 16:11:39 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.35 2013/10/21 06:33:11 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.36 2013/11/12 16:11:39 msaitoh Exp $");
 
 #include "opt_xen.h"
 
@@ -119,10 +119,11 @@ cpu_probe_amd_cache(struct cpu_info *ci)
 	/*
 	 * Get extended values for K8 and up.
 	 */
-	if (family == 0xf) {
+	if (family == 0xf)
 		family += CPUID2EXTFAMILY(ci->ci_signature);
-		model += CPUID2EXTMODEL(ci->ci_signature);
-	}
+
+	if ((family == 0xf) || (model == 0x6))
+		model |= CPUID2EXTMODEL(ci->ci_signature) << 4;
 
 	/*
 	 * Determine the largest extended function value.



CVS commit: src/sys/arch/x86/x86

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 15:58:38 UTC 2013

Modified Files:
src/sys/arch/x86/x86: coretemp.c

Log Message:
 Fix calculation of the cpu model (display model) in coretemp_tjmax().
The CPUID2MODEL() macro returns only low 4bit, so the checking against 0x17
doesn't work correctly. The correct way is to use the display model.
Remove incorrect extmodel check. Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/coretemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/coretemp.c
diff -u src/sys/arch/x86/x86/coretemp.c:1.29 src/sys/arch/x86/x86/coretemp.c:1.30
--- src/sys/arch/x86/x86/coretemp.c:1.29	Tue Aug 14 14:36:43 2012
+++ src/sys/arch/x86/x86/coretemp.c	Tue Nov 12 15:58:38 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.29 2012/08/14 14:36:43 jruoho Exp $ */
+/* $NetBSD: coretemp.c,v 1.30 2013/11/12 15:58:38 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.29 2012/08/14 14:36:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.30 2013/11/12 15:58:38 msaitoh Exp $");
 
 #include 
 #include 
@@ -256,11 +256,13 @@ coretemp_tjmax(device_t self)
 {
 	struct coretemp_softc *sc = device_private(self);
 	struct cpu_info *ci = sc->sc_ci;
-	uint32_t extmodel, model, stepping;
+	uint32_t family, model, stepping;
 	uint64_t msr;
 
+	family = CPUID2FAMILY(ci->ci_signature);
 	model = CPUID2MODEL(ci->ci_signature);
-	extmodel = CPUID2EXTMODEL(ci->ci_signature);
+	if ((family == 0xf) || (family == 0x6))
+		model |= CPUID2EXTMODEL(ci->ci_signature) << 4;
 	stepping = CPUID2STEPPING(ci->ci_signature);
 
 	sc->sc_tjmax = 100;
@@ -279,7 +281,7 @@ coretemp_tjmax(device_t self)
 	 * that MSR_IA32_EXT_CONFIG is not safe on all CPUs.
 	 */
 	if ((model == 0x0F && stepping >= 2) ||
-	(model == 0x0E && extmodel != 1)) {
+	(model == 0x0E)) {
 
 		if (rdmsr_safe(MSR_IA32_EXT_CONFIG, &msr) == EFAULT)
 			return;
@@ -295,7 +297,7 @@ coretemp_tjmax(device_t self)
 	 * but only consider the interval [70, 100] C as valid.
 	 * It is not fully known which CPU models have the MSR.
 	 */
-	if (model == 0x0E && extmodel != 0) {
+	if (model == 0x0E) {
 
 		if (rdmsr_safe(MSR_TEMPERATURE_TARGET, &msr) == EFAULT)
 			return;



CVS commit: src/sys/external/bsd/dwc2/dist

2013-11-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 12 15:13:14 UTC 2013

Modified Files:
src/sys/external/bsd/dwc2/dist: dwc2_hcd.h

Log Message:
Make CONFIG_USB_DWC2_DEBUG_PERIODIC compile.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/dwc2/dist/dwc2_hcd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/dwc2/dist/dwc2_hcd.h
diff -u src/sys/external/bsd/dwc2/dist/dwc2_hcd.h:1.6 src/sys/external/bsd/dwc2/dist/dwc2_hcd.h:1.7
--- src/sys/external/bsd/dwc2/dist/dwc2_hcd.h:1.6	Sat Oct  5 06:51:43 2013
+++ src/sys/external/bsd/dwc2/dist/dwc2_hcd.h	Tue Nov 12 15:13:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2_hcd.h,v 1.6 2013/10/05 06:51:43 skrll Exp $	*/
+/*	$NetBSD: dwc2_hcd.h,v 1.7 2013/11/12 15:13:14 skrll Exp $	*/
 
 /*
  * hcd.h - DesignWare HS OTG Controller host-mode declarations
@@ -508,7 +508,6 @@ extern void dwc2_hcd_qh_free_ddma(struct
 #ifdef CONFIG_USB_DWC2_DEBUG_PERIODIC
 static inline bool dbg_hc(struct dwc2_host_chan *hc) { return true; }
 static inline bool dbg_qh(struct dwc2_qh *qh) { return true; }
-static inline bool dbg_urb(struct urb *urb) { return true; }
 static inline bool dbg_perio(void) { return true; }
 #else /* !CONFIG_USB_DWC2_DEBUG_PERIODIC */
 static inline bool dbg_hc(struct dwc2_host_chan *hc)



CVS commit: src/sys/arch/x86/pci

2013-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Nov 12 15:08:01 UTC 2013

Modified Files:
src/sys/arch/x86/pci: amdtemp.c

Log Message:
 Calcurate the processor family correctly. The extended family bits
should be added only when the base family is 0xf.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/pci/amdtemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/pci/amdtemp.c
diff -u src/sys/arch/x86/pci/amdtemp.c:1.16 src/sys/arch/x86/pci/amdtemp.c:1.17
--- src/sys/arch/x86/pci/amdtemp.c:1.16	Mon Jul 16 01:52:37 2012
+++ src/sys/arch/x86/pci/amdtemp.c	Tue Nov 12 15:08:01 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: amdtemp.c,v 1.16 2012/07/16 01:52:37 pgoyette Exp $ */
+/*  $NetBSD: amdtemp.c,v 1.17 2013/11/12 15:08:01 msaitoh Exp $ */
 /*  $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $   */
 
 /*
@@ -48,7 +48,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.16 2012/07/16 01:52:37 pgoyette Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.17 2013/11/12 15:08:01 msaitoh Exp $ ");
 
 #include 
 #include 
@@ -239,7 +239,8 @@ amdtemp_attach(device_t parent, device_t
 	KASSERT(cpu_signature != 0x0);
 
 	sc->sc_family = CPUID2FAMILY(cpu_signature);
-	sc->sc_family += CPUID2EXTFAMILY(cpu_signature);
+	if (sc->sc_family == 0xf)
+		sc->sc_family += CPUID2EXTFAMILY(cpu_signature);
 
 	KASSERT(sc->sc_family >= 0xf);
 



CVS commit: src/lib/lua/syslog

2013-11-12 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Tue Nov 12 14:32:03 UTC 2013

Added Files:
src/lib/lua/syslog: Makefile syslog.c

Log Message:
Add a syslog(3) binding for Lua (not yet linked to the build.)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/lua/syslog/Makefile \
src/lib/lua/syslog/syslog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/lib/lua/syslog/Makefile
diff -u /dev/null src/lib/lua/syslog/Makefile:1.1
--- /dev/null	Tue Nov 12 14:32:03 2013
+++ src/lib/lua/syslog/Makefile	Tue Nov 12 14:32:03 2013
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2013/11/12 14:32:03 mbalmer Exp $
+
+LUA_MODULES=		syslog
+LUA_SRCS.syslog=	syslog.c
+
+.include 
Index: src/lib/lua/syslog/syslog.c
diff -u /dev/null src/lib/lua/syslog/syslog.c:1.1
--- /dev/null	Tue Nov 12 14:32:03 2013
+++ src/lib/lua/syslog/syslog.c	Tue Nov 12 14:32:03 2013
@@ -0,0 +1,165 @@
+/*	$NetBSD: syslog.c,v 1.1 2013/11/12 14:32:03 mbalmer Exp $ */
+
+/*
+ * Copyright (c) 2013 Marc Balmer 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Lua binding for syslog */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+int luaopen_syslog(lua_State *);
+
+static int
+syslog_openlog(lua_State *L)
+{
+	const char *ident;
+	int option;
+	int facility;
+
+	ident = luaL_checkstring(L, 1);
+	option = luaL_checkinteger(L, 2);
+	facility = luaL_checkinteger(L, 3);
+	openlog(ident, option, facility);
+	return 0;
+}
+
+static int
+syslog_syslog(lua_State *L)
+{
+	syslog(luaL_checkint(L, 1), "%s", luaL_checkstring(L, 2));
+	return 0;
+}
+
+static int
+syslog_closelog(lua_State *L)
+{
+	closelog();
+	return 0;
+}
+
+static int
+syslog_setlogmask(lua_State *L)
+{
+	lua_pushinteger(L, setlogmask(luaL_checkint(L, 1)));
+	return 1;
+}
+
+static void
+syslog_set_info(lua_State *L)
+{
+	lua_pushliteral(L, "_COPYRIGHT");
+	lua_pushliteral(L, "Copyright (C) 2013 by "
+	"Marc Balmer ");
+	lua_settable(L, -3);
+	lua_pushliteral(L, "_DESCRIPTION");
+	lua_pushliteral(L, "syslog binding for Lua");
+	lua_settable(L, -3);
+	lua_pushliteral(L, "_VERSION");
+	lua_pushliteral(L, "syslog 1.0.0");
+	lua_settable(L, -3);
+}
+
+struct constant {
+	const char *name;
+	int value;
+};
+
+#define CONSTANT(NAME)		{ #NAME, NAME }
+
+static struct constant syslog_constant[] = {
+	/* syslog options */
+	CONSTANT(LOG_CONS),
+	CONSTANT(LOG_NDELAY),
+	CONSTANT(LOG_NOWAIT),
+	CONSTANT(LOG_ODELAY),
+	CONSTANT(LOG_PERROR),
+	CONSTANT(LOG_PID),
+
+	/* syslog facilities */
+	CONSTANT(LOG_AUTH),
+	CONSTANT(LOG_AUTHPRIV),
+	CONSTANT(LOG_CRON),
+	CONSTANT(LOG_DAEMON),
+	CONSTANT(LOG_FTP),
+	CONSTANT(LOG_KERN),
+	CONSTANT(LOG_LOCAL0),
+	CONSTANT(LOG_LOCAL1),
+	CONSTANT(LOG_LOCAL2),
+	CONSTANT(LOG_LOCAL3),
+	CONSTANT(LOG_LOCAL4),
+	CONSTANT(LOG_LOCAL5),
+	CONSTANT(LOG_LOCAL6),
+	CONSTANT(LOG_LOCAL7),
+	CONSTANT(LOG_LPR),
+	CONSTANT(LOG_MAIL),
+	CONSTANT(LOG_NEWS),
+	CONSTANT(LOG_SYSLOG),
+	CONSTANT(LOG_USER),
+	CONSTANT(LOG_UUCP),
+
+	/* syslog levels */
+	CONSTANT(LOG_EMERG),
+	CONSTANT(LOG_ALERT),
+	CONSTANT(LOG_CRIT),
+	CONSTANT(LOG_ERR),
+	CONSTANT(LOG_WARNING),
+	CONSTANT(LOG_NOTICE),
+	CONSTANT(LOG_INFO),
+	CONSTANT(LOG_DEBUG),
+
+	{ NULL, 0 }
+};
+
+int
+luaopen_syslog(lua_State *L)
+{
+	int n;
+	struct luaL_Reg luasyslog[] = {
+		{ "openlog",	syslog_openlog },
+		{ "syslog",	syslog_syslog },
+		{ "closelog",	syslog_closelog },
+		{ "setlogmask",	syslog_setlogmask },
+		{ NULL, NULL }
+	};
+
+#if LUA_VERSION_NUM >= 502
+	luaL_newlib(L, luasyslog);
+#else
+	luaL_register(L, "syslog", luasyslog);
+#endif
+	syslog_set_info(L);
+	for (n = 0; syslog_constant[n].name != NULL; n++) {
+		lua_pushinteger

CVS commit: src

2013-11-12 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Tue Nov 12 12:22:33 UTC 2013

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/net/mpls: Makefile
Removed Files:
src/tests/net/mpls: t_ldp_static.sh

Log Message:
Retire t_ldp_static. It's too heavy weighted for releng's anita and mostly
unsuited for atf.


To generate a diff of this commit:
cvs rdiff -u -r1.548 -r1.549 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.3 -r1.4 src/tests/net/mpls/Makefile
cvs rdiff -u -r1.2 -r0 src/tests/net/mpls/t_ldp_static.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.548 src/distrib/sets/lists/tests/mi:1.549
--- src/distrib/sets/lists/tests/mi:1.548	Mon Nov 11 11:10:45 2013
+++ src/distrib/sets/lists/tests/mi	Tue Nov 12 12:22:33 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.548 2013/11/11 11:10:45 joerg Exp $
+# $NetBSD: mi,v 1.549 2013/11/12 12:22:33 kefren Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2605,7 +2605,7 @@
 ./usr/tests/net/mpls/Atffile			tests-net-tests		atf,rump
 ./usr/tests/net/mpls/Kyuafile			tests-net-tests		atf,rump,kyua
 ./usr/tests/net/mpls/t_ldp_regen		tests-net-tests		atf,rump
-./usr/tests/net/mpls/t_ldp_static		tests-net-tests		atf,rump
+./usr/tests/net/mpls/t_ldp_static		tests-net-tests		atf,rump	obsolete
 ./usr/tests/net/mpls/t_mpls_fw			tests-net-tests		atf,rump
 ./usr/tests/net/mpls/t_rfc4182			tests-net-tests		atf,rump
 ./usr/tests/net/nettests-net-tests

Index: src/tests/net/mpls/Makefile
diff -u src/tests/net/mpls/Makefile:1.3 src/tests/net/mpls/Makefile:1.4
--- src/tests/net/mpls/Makefile:1.3	Thu Jul 25 14:28:29 2013
+++ src/tests/net/mpls/Makefile	Tue Nov 12 12:22:33 2013
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2013/07/25 14:28:29 kefren Exp $
+# $NetBSD: Makefile,v 1.4 2013/11/12 12:22:33 kefren Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/net/mpls
 
-TESTS_SH=	t_mpls_fw t_rfc4182 t_ldp_regen t_ldp_static
+TESTS_SH=	t_mpls_fw t_rfc4182 t_ldp_regen
 
 .include 



CVS commit: src/sys/netinet

2013-11-12 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Tue Nov 12 09:02:05 UTC 2013

Modified Files:
src/sys/netinet: tcp_congctl.c tcp_congctl.h tcp_input.c tcp_sack.c
tcp_subr.c tcp_var.h

Log Message:
* implement TCP CUBIC congestion control algorithm
* move tcp_sack_newack bits inside reno and newreno_fast_retransmit_newack
* notify ECN peer about cwnd shrink in [new]reno_slow_retransmit

Based on the patch proposed on tech-net@ on Nov 7 with minor improvments:
 * adapt wmax for no-fast convergence case
 * correct cbrt calculation for big window sizes (>750KB)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/netinet/tcp_congctl.c
cvs rdiff -u -r1.6 -r1.7 src/sys/netinet/tcp_congctl.h
cvs rdiff -u -r1.329 -r1.330 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.28 -r1.29 src/sys/netinet/tcp_sack.c
cvs rdiff -u -r1.250 -r1.251 src/sys/netinet/tcp_subr.c
cvs rdiff -u -r1.170 -r1.171 src/sys/netinet/tcp_var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_congctl.c
diff -u src/sys/netinet/tcp_congctl.c:1.17 src/sys/netinet/tcp_congctl.c:1.18
--- src/sys/netinet/tcp_congctl.c:1.17	Fri Oct 25 16:29:20 2013
+++ src/sys/netinet/tcp_congctl.c	Tue Nov 12 09:02:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_congctl.c,v 1.17 2013/10/25 16:29:20 martin Exp $	*/
+/*	$NetBSD: tcp_congctl.c,v 1.18 2013/11/12 09:02:05 kefren Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2001, 2005, 2006 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_congctl.c,v 1.17 2013/10/25 16:29:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_congctl.c,v 1.18 2013/11/12 09:02:05 kefren Exp $");
 
 #include "opt_inet.h"
 #include "opt_tcp_debug.h"
@@ -194,6 +194,9 @@ __KERNEL_RCSID(0, "$NetBSD: tcp_congctl.
  *   consider separating the actual implementations in another file.
  */
 
+static void tcp_common_congestion_exp(struct tcpcb *, int, int);
+
+static int  tcp_reno_do_fast_retransmit(struct tcpcb *, const struct tcphdr *);
 static int  tcp_reno_fast_retransmit(struct tcpcb *, const struct tcphdr *);
 static void tcp_reno_slow_retransmit(struct tcpcb *);
 static void tcp_reno_fast_retransmit_newack(struct tcpcb *,
@@ -206,6 +209,10 @@ static void tcp_newreno_fast_retransmit_
 	const struct tcphdr *);
 static void tcp_newreno_newack(struct tcpcb *, const struct tcphdr *);
 
+static int tcp_cubic_fast_retransmit(struct tcpcb *, const struct tcphdr *);
+static void tcp_cubic_slow_retransmit(struct tcpcb *tp);
+static void tcp_cubic_newack(struct tcpcb *, const struct tcphdr *);
+static void tcp_cubic_congestion_exp(struct tcpcb *);
 
 static void tcp_congctl_fillnames(void);
 
@@ -241,6 +248,8 @@ tcp_congctl_init(void)
 	KASSERT(r == 0);
 	r = tcp_congctl_register("newreno", &tcp_newreno_ctl);
 	KASSERT(r == 0);
+	r = tcp_congctl_register("cubic", &tcp_cubic_ctl);
+	KASSERT(r == 0);
 
 	/* NewReno is the default. */
 #ifndef TCP_CONGCTL_DEFAULT
@@ -406,18 +415,28 @@ tcp_congctl_fillnames(void)
 /*  */
 
 /*
- * TCP/Reno congestion control.
+ * Common stuff
  */
+
+/* Window reduction (1-beta) for [New]Reno: 0.5 */
+#define RENO_BETAA 1
+#define RENO_BETAB 2
+/* Window reduction (1-beta) for Cubic: 0.8 */
+#define CUBIC_BETAA 4
+#define CUBIC_BETAB 5
+/* Draft Rhee Section 4.1 */
+#define CUBIC_CA 4
+#define CUBIC_CB 10
+
 static void
-tcp_reno_congestion_exp(struct tcpcb *tp)
+tcp_common_congestion_exp(struct tcpcb *tp, int betaa, int betab)
 {
 	u_int win;
 
 	/* 
-	 * Halve the congestion window and reduce the
-	 * slow start threshold.
+	 * Reduce the congestion window and the slow start threshold.
 	 */
-	win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_segsz;
+	win = min(tp->snd_wnd, tp->snd_cwnd) * betaa / betab / tp->t_segsz;
 	if (win < 2)
 		win = 2;
 
@@ -434,9 +453,20 @@ tcp_reno_congestion_exp(struct tcpcb *tp
 }
 
 
+/*  */
+
+/*
+ * TCP/Reno congestion control.
+ */
+static void
+tcp_reno_congestion_exp(struct tcpcb *tp)
+{
+
+	tcp_common_congestion_exp(tp, RENO_BETAA, RENO_BETAB);
+}
 
 static int
-tcp_reno_fast_retransmit(struct tcpcb *tp, const struct tcphdr *th)
+tcp_reno_do_fast_retransmit(struct tcpcb *tp, const struct tcphdr *th)
 {
 	/*
 	 * We know we're losing at the current
@@ -458,10 +488,8 @@ tcp_reno_fast_retransmit(struct tcpcb *t
 	 * irrespective of the number of DupAcks.
 	 */
 	
-	tcp_seq onxt;
-	
-	onxt = tp->snd_nxt;
-	tcp_reno_congestion_exp(tp);
+	tcp_seq onxt = tp->snd_nxt;
+
 	tp->t_partialacks = 0;
 	TCP_TIMER_DISARM(tp, TCPT_REXMT);
 	tp->t_rtttime = 0;
@@ -482,6 +510,14 @@ tcp_reno_fast_retransmit(struct tcpcb *t
 	return 0;
 }
 
+static int
+tcp_reno_fast_retransmit(struct tcpcb *tp, const struct tcphdr *th)
+{
+
+	tcp_reno_congestion_exp(tp);
+	return tcp_re