CVS commit: src/common/lib/libc/arch/arm/string

2012-12-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 29 05:36:57 UTC 2012

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_armv6.S

Log Message:
A few slight speedups (remove one instruction from the main loop).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlen_armv6.S

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

Modified files:

Index: src/common/lib/libc/arch/arm/string/strlen_armv6.S
diff -u src/common/lib/libc/arch/arm/string/strlen_armv6.S:1.1 src/common/lib/libc/arch/arm/string/strlen_armv6.S:1.2
--- src/common/lib/libc/arch/arm/string/strlen_armv6.S:1.1	Fri Dec 28 07:10:41 2012
+++ src/common/lib/libc/arch/arm/string/strlen_armv6.S	Sat Dec 29 05:36:57 2012
@@ -29,27 +29,27 @@
 
 #include 
 
-RCSID("$NetBSD: strlen_armv6.S,v 1.1 2012/12/28 07:10:41 matt Exp $")
+RCSID("$NetBSD: strlen_armv6.S,v 1.2 2012/12/29 05:36:57 matt Exp $")
 
 	.text
 ENTRY(strlen)
+	add	ip, r0, #4		/* for the final post-inc */
 	ands	r1, r0, #3		/* get misalignment */
-	bic	ip, r0, #3		/* align to word boundary */
-	ldr	r3, [ip], #4		/* load first word */
-	neg	r0, r1			/* subtract misalignment from length */
+	bic	r0, r0, #3		/* align to word boundary */
+	ldr	r3, [r0], #4		/* load first word */
 	beq	.Lpre_main_loop		/*   misaligned?  no, go to loop */
 	/*
 	 * For misaligned string, we need to make sure that the bytes before
 	 * the start of the string will not cause a false match to a NUL.
 	 */
 	mvn	r2, #0			/* create a mask */
-	and	r1, r0, #3		/* find out how many bytes to clear */
 	mov	r1, r1, lsl #3		/* bytes -> bits */
 #ifdef __ARMEL__
-	mov	r2, r2, lsr r1		/* clear relavent bytes */
-#else
 	mov	r2, r2, lsl r1		/* clear relavent bytes */
+#else
+	mov	r2, r2, lsr r1		/* clear relavent bytes */
 #endif
+	mvn	r2, r2			/* invert mask */
 	orr	r3, r3, r2		/* orr in mask for leading bytes */
 .Lpre_main_loop:
 #ifdef _ARM_ARCH_7
@@ -68,19 +68,24 @@ ENTRY(strlen)
 	 */
 	uqadd8	r3, r3, r1		/* magic happens here */
 	mvns	r3, r3			/* is the complemented result 0? */
-	bne	.Lreturn		/*no, return # of bytes */
-	add	r0, r0, #4		/* add 4 to the count */
-	ldr	r3, [ip], #4		/* load next word */
+	bne	.Lreturn		/*no, then we encountered a NUL */
+	ldr	r3, [r0], #4		/* load next word */
 	b	.Lmain_loop		/* and go */
-.Lreturn:
 	/*
 	 * We encountered a NUL.  Find out where by doing a CLZ and then
 	 * shifting right by 3.  That will be the number of non-NUL bytes.
 	 */
+.Lreturn:
 #ifdef __ARMEL__
 	rev	r3, r3			/* we want this in BE for the CLZ */
 #endif
 	clz	r3, r3			/* count how many leading zeros */
 	add	r0, r0, r3, lsr #3	/* divide that by 8 and add to count */
+	/*
+	 * r0 now points to 4 past the NUL due to the post-inc.  Subtract
+	 * the start of the string (which also has 4 added to it to compensate
+	 * for the post-inc.
+	 */
+	sub	r0, r0, ip		/* subtract start to get length */
 	RET
 END(strlen)



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

2012-12-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Dec 29 05:00:36 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBONE

Log Message:
Enable the watchdog driver on BeagleBone.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/BEAGLEBONE

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/evbarm/conf/BEAGLEBONE
diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.5 src/sys/arch/evbarm/conf/BEAGLEBONE:1.6
--- src/sys/arch/evbarm/conf/BEAGLEBONE:1.5	Wed Dec 19 07:54:42 2012
+++ src/sys/arch/evbarm/conf/BEAGLEBONE	Sat Dec 29 05:00:36 2012
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBONE,v 1.5 2012/12/19 07:54:42 msaitoh Exp $
+#	$NetBSD: BEAGLEBONE,v 1.6 2012/12/29 05:00:36 riz Exp $
 #
 #	BEAGLEBONE -- TI AM335x board Kernel
 #
@@ -245,7 +245,7 @@ omapdmtimer2	at obio0 addr 0x48044000 si
 options OMAP_SYSTEM_CLOCK_FREQ=2400
 
 # Watchdog timers
-#omapwdt32k*	at obio0 addr 0x44e35000 size 0x1000	# WDT1
+omapwdt32k*	at obio0 addr 0x44e35000 size 0x1000	# WDT1
 
 # onboard video
 #omapfb* 	at obio0 addr 0x4805 size 0x1



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

2012-12-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Dec 29 04:59:21 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap_wdt.c

Log Message:
In kernel tickle mode, tickle once immediately upon setting the mode.
Works around a peculiarity where the first watchdog period (only) on the
BeagleBone is only half as long as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/omap_wdt.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/omap/omap_wdt.c
diff -u src/sys/arch/arm/omap/omap_wdt.c:1.5 src/sys/arch/arm/omap/omap_wdt.c:1.6
--- src/sys/arch/arm/omap/omap_wdt.c:1.5	Wed Sep  5 00:19:59 2012
+++ src/sys/arch/arm/omap/omap_wdt.c	Sat Dec 29 04:59:21 2012
@@ -193,6 +193,8 @@ omapwdt32k_setmode(struct sysmon_wdog *s
 			sc->sc_smw.smw_period = smw->smw_period;
 		omapwdt32k_set_timeout(sc->sc_smw.smw_period);
 		omapwdt32k_enable(1);
+		if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_KTICKLE)
+			omapwdt32k_tickle(smw);
 	}
 	return error;
 }



CVS commit: src/external/historical/nawk/dist

2012-12-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 29 02:44:26 UTC 2012

Modified Files:
src/external/historical/nawk/dist: awkgram.y b.c lib.c main.c makefile
proctab.c proto.h run.c tran.c

Log Message:
merge 2012-12-20


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/historical/nawk/dist/awkgram.y \
src/external/historical/nawk/dist/b.c \
src/external/historical/nawk/dist/proctab.c
cvs rdiff -u -r1.5 -r1.6 src/external/historical/nawk/dist/lib.c \
src/external/historical/nawk/dist/run.c
cvs rdiff -u -r1.7 -r1.8 src/external/historical/nawk/dist/main.c
cvs rdiff -u -r1.2 -r1.3 src/external/historical/nawk/dist/makefile
cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/dist/proto.h \
src/external/historical/nawk/dist/tran.c

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

Modified files:

Index: src/external/historical/nawk/dist/awkgram.y
diff -u src/external/historical/nawk/dist/awkgram.y:1.3 src/external/historical/nawk/dist/awkgram.y:1.4
--- src/external/historical/nawk/dist/awkgram.y:1.3	Sat May 28 11:13:04 2011
+++ src/external/historical/nawk/dist/awkgram.y	Fri Dec 28 21:44:26 2012
@@ -179,8 +179,8 @@ pa_pat:
 pa_stat:
 	  pa_pat			{ $$ = stat2(PASTAT, $1, stat2(PRINT, rectonode(), NIL)); }
 	| pa_pat lbrace stmtlist '}'	{ $$ = stat2(PASTAT, $1, $3); }
-	| pa_pat ',' pa_pat		{ $$ = pa2stat($1, $3, stat2(PRINT, rectonode(), NIL)); }
-	| pa_pat ',' pa_pat lbrace stmtlist '}'	{ $$ = pa2stat($1, $3, $5); }
+	| pa_pat ',' opt_nl pa_pat		{ $$ = pa2stat($1, $4, stat2(PRINT, rectonode(), NIL)); }
+	| pa_pat ',' opt_nl pa_pat lbrace stmtlist '}'	{ $$ = pa2stat($1, $4, $6); }
 	| lbrace stmtlist '}'		{ $$ = stat2(PASTAT, NIL, $2); }
 	| XBEGIN lbrace stmtlist '}'
 		{ beginloc = linkum(beginloc, $3); $$ = 0; }
Index: src/external/historical/nawk/dist/b.c
diff -u src/external/historical/nawk/dist/b.c:1.3 src/external/historical/nawk/dist/b.c:1.4
--- src/external/historical/nawk/dist/b.c:1.3	Sat Mar 10 14:18:48 2012
+++ src/external/historical/nawk/dist/b.c	Fri Dec 28 21:44:26 2012
@@ -843,7 +843,7 @@ Node *unary(Node *np)
  * to nelson beebe for the suggestion; let's see if it works everywhere.
  */
 
-/* #define HAS_ISBLANK */
+#define HAS_ISBLANK
 
 static const struct charclass {
 	const char *cc_name;
@@ -852,7 +852,11 @@ static const struct charclass {
 } charclasses[] = {
 	{ "alnum",	5,	isalnum },
 	{ "alpha",	5,	isalpha },
+#ifndef HAS_ISBLANK
+	{ "blank",	5,	isspace }, /* was isblank */
+#else
 	{ "blank",	5,	isblank },
+#endif
 	{ "cntrl",	5,	iscntrl },
 	{ "digit",	5,	isdigit },
 	{ "graph",	5,	isgraph },
Index: src/external/historical/nawk/dist/proctab.c
diff -u src/external/historical/nawk/dist/proctab.c:1.3 src/external/historical/nawk/dist/proctab.c:1.4
--- src/external/historical/nawk/dist/proctab.c:1.3	Fri Aug 27 12:49:47 2010
+++ src/external/historical/nawk/dist/proctab.c	Fri Dec 28 21:44:26 2012
@@ -7,100 +7,100 @@
 #include "awkgram.h"
 
 static const char * const printname[94] = {
-	"FIRSTTOKEN",	/* 257 */
-	"PROGRAM",	/* 258 */
-	"PASTAT",	/* 259 */
-	"PASTAT2",	/* 260 */
-	"XBEGIN",	/* 261 */
-	"XEND",	/* 262 */
-	"NL",	/* 263 */
-	"ARRAY",	/* 264 */
-	"MATCH",	/* 265 */
-	"NOTMATCH",	/* 266 */
-	"MATCHOP",	/* 267 */
-	"FINAL",	/* 268 */
-	"DOT",	/* 269 */
-	"ALL",	/* 270 */
-	"CCL",	/* 271 */
-	"NCCL",	/* 272 */
-	"CHAR",	/* 273 */
-	"OR",	/* 274 */
-	"STAR",	/* 275 */
-	"QUEST",	/* 276 */
-	"PLUS",	/* 277 */
-	"EMPTYRE",	/* 278 */
-	"AND",	/* 279 */
-	"BOR",	/* 280 */
-	"APPEND",	/* 281 */
-	"EQ",	/* 282 */
-	"GE",	/* 283 */
-	"GT",	/* 284 */
-	"LE",	/* 285 */
-	"LT",	/* 286 */
-	"NE",	/* 287 */
-	"IN",	/* 288 */
-	"ARG",	/* 289 */
-	"BLTIN",	/* 290 */
-	"BREAK",	/* 291 */
-	"CLOSE",	/* 292 */
-	"CONTINUE",	/* 293 */
-	"DELETE",	/* 294 */
-	"DO",	/* 295 */
-	"EXIT",	/* 296 */
-	"FOR",	/* 297 */
-	"FUNC",	/* 298 */
-	"SUB",	/* 299 */
-	"GSUB",	/* 300 */
-	"IF",	/* 301 */
-	"INDEX",	/* 302 */
-	"LSUBSTR",	/* 303 */
-	"MATCHFCN",	/* 304 */
-	"NEXT",	/* 305 */
-	"NEXTFILE",	/* 306 */
-	"ADD",	/* 307 */
-	"MINUS",	/* 308 */
-	"MULT",	/* 309 */
-	"DIVIDE",	/* 310 */
-	"MOD",	/* 311 */
-	"ASSIGN",	/* 312 */
-	"ASGNOP",	/* 313 */
-	"ADDEQ",	/* 314 */
-	"SUBEQ",	/* 315 */
-	"MULTEQ",	/* 316 */
-	"DIVEQ",	/* 317 */
-	"MODEQ",	/* 318 */
-	"POWEQ",	/* 319 */
-	"PRINT",	/* 320 */
-	"PRINTF",	/* 321 */
-	"SPRINTF",	/* 322 */
-	"ELSE",	/* 323 */
-	"INTEST",	/* 324 */
-	"CONDEXPR",	/* 325 */
-	"POSTINCR",	/* 326 */
-	"PREINCR",	/* 327 */
-	"POSTDECR",	/* 328 */
-	"PREDECR",	/* 329 */
-	"VAR",	/* 330 */
-	"IVAR",	/* 331 */
-	"VARNF",	/* 332 */
-	"CALL",	/* 333 */
-	"NUMBER",	/* 334 */
-	"STRING",	/* 335 */
-	"REGEXPR",	/* 336 */
-	"GETLINE",	/* 337 */
-	"GENSUB",	/* 338 */
-	"RETURN",	/* 339 */
-	"SPLIT",	/* 340 */
-	"SUBSTR",	/* 341 */
-	"WHILE",	/* 342 */
-	"CAT",	/* 343 */
-	"NOT",	/* 344 */
-	"UMINUS",	/* 345 */
-	"POWER",	/* 346 */
-	"DECR",	/* 347 */

CVS commit: src/external/historical/nawk/dist

2012-12-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 29 02:14:53 UTC 2012

Update of /cvsroot/src/external/historical/nawk/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29526

Log Message:
from http://www.cs.princeton.edu/~bwk/btl.mirror/

Status:

Vendor Tag: NAWK
Release Tags:   NAWK20121220

C src/external/historical/nawk/dist/awkgram.y
U src/external/historical/nawk/dist/README
U src/external/historical/nawk/dist/FIXES
U src/external/historical/nawk/dist/awk.h
N src/external/historical/nawk/dist/ytab.c
N src/external/historical/nawk/dist/ytab.h
C src/external/historical/nawk/dist/proto.h
U src/external/historical/nawk/dist/maketab.c
C src/external/historical/nawk/dist/lex.c
C src/external/historical/nawk/dist/b.c
C src/external/historical/nawk/dist/main.c
C src/external/historical/nawk/dist/proctab.c
U src/external/historical/nawk/dist/parse.c
C src/external/historical/nawk/dist/lib.c
C src/external/historical/nawk/dist/run.c
C src/external/historical/nawk/dist/tran.c
C src/external/historical/nawk/dist/makefile
U src/external/historical/nawk/dist/awk.1

10 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jNAWK:yesterday -jNAWK src/external/historical/nawk/dist



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

2012-12-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Dec 29 00:08:26 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c

Log Message:
no need to print irq twice


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/omap3_sdhc.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/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.8 src/sys/arch/arm/omap/omap3_sdhc.c:1.9
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.8	Sat Dec 29 00:05:45 2012
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Sat Dec 29 00:08:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.8 2012/12/29 00:05:45 jmcneill Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.9 2012/12/29 00:08:26 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.8 2012/12/29 00:05:45 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.9 2012/12/29 00:08:26 jmcneill Exp $");
 
 #include "opt_omap.h"
 
@@ -220,8 +220,6 @@ obiosdhc_attach(device_t parent, device_
 		 oa->obio_intr);
 		goto fail;
 	}
-	aprint_normal_dev(self, "interrupting on irq %d\n",
-	 oa->obio_intr);
 
 	error = sdhc_host_found(&sc->sc, sc->sc_bst, sc->sc_sdhc_bsh,
 	oa->obio_size - OMAP3_SDMMC_SDHC_OFFSET);



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

2012-12-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Dec 29 00:05:45 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c

Log Message:
dont set SDHC_FLAG_SINGLE_ONLY for OMAP3530 either


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/omap/omap3_sdhc.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/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.7 src/sys/arch/arm/omap/omap3_sdhc.c:1.8
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.7	Sun Dec 23 18:34:01 2012
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Sat Dec 29 00:05:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.7 2012/12/23 18:34:01 jakllsch Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.8 2012/12/29 00:05:45 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.7 2012/12/23 18:34:01 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.8 2012/12/29 00:05:45 jmcneill Exp $");
 
 #include "opt_omap.h"
 
@@ -154,6 +154,9 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_flags |= SDHC_FLAG_WAIT_RESET;
 	sc->sc.sc_flags &= ~SDHC_FLAG_SINGLE_ONLY;
 #endif
+#ifdef OMAP_3530
+	sc->sc.sc_flags &= ~SDHC_FLAG_SINGLE_ONLY;
+#endif
 	sc->sc.sc_host = sc->sc_hosts;
 	sc->sc.sc_clkbase = 96000;	/* 96MHZ */
 	if (!prop_dictionary_get_uint32(prop, "clkmask", &sc->sc.sc_clkmsk))



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

2012-12-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Dec 28 23:24:47 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBOARD

Log Message:
enable WDT2 (MPU) for watchdog instead of WDT3 (IVA2). remove WDT1, it doesnt 
exist on OMAP3530


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbarm/conf/BEAGLEBOARD

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/evbarm/conf/BEAGLEBOARD
diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.35 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.36
--- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.35	Wed Dec 19 07:54:42 2012
+++ src/sys/arch/evbarm/conf/BEAGLEBOARD	Fri Dec 28 23:24:47 2012
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBOARD,v 1.35 2012/12/19 07:54:42 msaitoh Exp $
+#	$NetBSD: BEAGLEBOARD,v 1.36 2012/12/28 23:24:47 jmcneill Exp $
 #
 #	BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel
 #
@@ -242,9 +242,8 @@ omapmputmr2	at obio2 addr 0x49036000 int
 options OMAP_MPU_TIMER_CLOCK_FREQ=1200
 
 # Watchdog timers
-omapwdt32k*	at obio2 addr 0x4903 size 2048	# WDT3
-#omapwdt32k*	at obio1 addr 0x4830c000 size 2048	# WDT1
-#omapwdt32k*	at obio1 addr 0x48314000 size 2048	# WDT2
+#omapwdt32k*	at obio2 addr 0x4903 size 2048	# WDT3
+omapwdt32k*	at obio1 addr 0x48314000 size 2048	# WDT2
 
 # onboard video
 #omapfb* 	at obio0 addr 0x4805 size 0x1



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

2012-12-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 28 19:23:30 UTC 2012

Modified Files:
src/sys/arch/ia64/conf: GENERIC.SKI

Log Message:
Add acpi0 at mainbus - it is not realy optional.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/conf/GENERIC.SKI

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/ia64/conf/GENERIC.SKI
diff -u src/sys/arch/ia64/conf/GENERIC.SKI:1.8 src/sys/arch/ia64/conf/GENERIC.SKI:1.9
--- src/sys/arch/ia64/conf/GENERIC.SKI:1.8	Sat Apr 28 23:03:40 2012
+++ src/sys/arch/ia64/conf/GENERIC.SKI	Fri Dec 28 19:23:29 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.SKI,v 1.8 2012/04/28 23:03:40 rmind Exp $
+# $NetBSD: GENERIC.SKI,v 1.9 2012/12/28 19:23:29 martin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/ia64/conf/std.ia64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.8 $"
+#ident 		"GENERIC-$Revision: 1.9 $"
 
 maxusers	32		# estimated number of users
 
@@ -64,6 +64,7 @@ config		netbsd	root on md0a type ffs
 mainbus0 at root
 
 cpu* at mainbus?
+acpi0 at mainbus?
 
 
 # Pull in optional local configuration



CVS commit: src/usr.bin/units

2012-12-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Dec 28 17:57:46 UTC 2012

Modified Files:
src/usr.bin/units: units.lib

Log Message:
Rename "tappit-hen" to "tappithen" because unit names cannot contain
hyphens.  Also change the definition from "3 imperial" (a dimensionless
quantity) to "3 bottle" (2.25 litres).  Wikipedia and several other web
sites say 3 bottles or 2.25 litres, but

says:

There seems to be no firm definition of the bottle size referred to
as "tappit-hen". Believed to be of Scottish origin, a tappit-hen
can vary, according to which definition one follows, from 1 1/2
bottles to a tregnum or 3-bottle bottle. It is safest to say that it
approximates to a magnum.

and ends with:

1 Tappit-Hen (2.25 liters) per lot


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/units/units.lib

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

Modified files:

Index: src/usr.bin/units/units.lib
diff -u src/usr.bin/units/units.lib:1.16 src/usr.bin/units/units.lib:1.17
--- src/usr.bin/units/units.lib:1.16	Fri Dec 28 13:45:53 2012
+++ src/usr.bin/units/units.lib	Fri Dec 28 17:57:46 2012
@@ -1,4 +1,4 @@
-/	$NetBSD: units.lib,v 1.16 2012/12/28 13:45:53 apb Exp $
+/	$NetBSD: units.lib,v 1.17 2012/12/28 17:57:46 apb Exp $
 
 / primitive units
 
@@ -220,7 +220,7 @@ sovereign		34 bottle
 
 pony			split
 fillette		half
-tappit-hen		3 imperial
+tappithen		3 bottle
 rheoboam		rehoboam
 shalmaneser		salmanazar
 



CVS commit: src/usr.bin/units

2012-12-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Dec 28 17:07:04 UTC 2012

Modified Files:
src/usr.bin/units: units.c

Log Message:
Allow a number and a unit to be juxtaposed without an intervening space.
Now "litres/100km" works as desired, instead of silently being
treated as "litres/100".


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/units/units.c

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

Modified files:

Index: src/usr.bin/units/units.c
diff -u src/usr.bin/units/units.c:1.18 src/usr.bin/units/units.c:1.19
--- src/usr.bin/units/units.c:1.18	Tue Mar 20 20:34:59 2012
+++ src/usr.bin/units/units.c	Fri Dec 28 17:07:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: units.c,v 1.18 2012/03/20 20:34:59 matt Exp $	*/
+/*	$NetBSD: units.c,v 1.19 2012/12/28 17:07:03 apb Exp $	*/
 
 /*
  * units.c   Copyright (c) 1993 by Adrian Mariano (adr...@cam.cornell.edu)
@@ -321,22 +321,30 @@ addunit(struct unittype * theunit, const
 	do {
 		item = strtok(scratch, " *\t\n/");
 		while (item) {
-			if (strchr("0123456789.", *item)) { /* item is a number */
+			if (strchr("0123456789.", *item)) {
+/* item starts with a number */
+char *endptr;
 double num;
 
 divider = strchr(item, '|');
 if (divider) {
 	*divider = 0;
-	num = atof(item);
+	num = strtod(item, &endptr);
 	if (!num) {
 		zeroerror();
 		return 1;
 	}
+	if (endptr != divider) {
+		/* "6foo|2" is an error */
+		warnx("Junk between number "
+		  "and '|'");
+		return 1;
+	}
 	if (doingtop ^ flip)
 		theunit->factor *= num;
 	else
 		theunit->factor /= num;
-	num = atof(divider + 1);
+	num = strtod(divider + 1, &endptr);
 	if (!num) {
 		zeroerror();
 		return 1;
@@ -345,9 +353,14 @@ addunit(struct unittype * theunit, const
 		theunit->factor /= num;
 	else
 		theunit->factor *= num;
+	if (*endptr) {
+		/* "6|2foo" is like "6|2 foo" */
+		item = endptr;
+		continue;
+	}
 }
 else {
-	num = atof(item);
+	num = strtod(item, &endptr);
 	if (!num) {
 		zeroerror();
 		return 1;
@@ -356,7 +369,11 @@ addunit(struct unittype * theunit, const
 		theunit->factor *= num;
 	else
 		theunit->factor /= num;
-
+	if (*endptr) {
+		/* "3foo" is like "3 foo" */
+		item = endptr;
+		continue;
+	}
 }
 			}
 			else {	/* item is not a number */



CVS commit: src/lib/libc/string

2012-12-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 28 13:53:12 UTC 2012

Modified Files:
src/lib/libc/string: wcsdup.3

Log Message:
Add "wide" to description. From OpenBSD via Ingo Schwarze.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/string/wcsdup.3

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

Modified files:

Index: src/lib/libc/string/wcsdup.3
diff -u src/lib/libc/string/wcsdup.3:1.3 src/lib/libc/string/wcsdup.3:1.4
--- src/lib/libc/string/wcsdup.3:1.3	Thu Dec 16 17:42:28 2010
+++ src/lib/libc/string/wcsdup.3	Fri Dec 28 13:53:12 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wcsdup.3,v 1.3 2010/12/16 17:42:28 wiz Exp $
+.\"	$NetBSD: wcsdup.3,v 1.4 2012/12/28 13:53:12 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 .Os
 .Sh NAME
 .Nm wcsdup
-.Nd save a copy of a string
+.Nd save a copy of a wide string
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS



CVS commit: src/usr.bin/units

2012-12-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Dec 28 13:45:53 UTC 2012

Modified Files:
src/usr.bin/units: units.lib

Log Message:
Fix references to undefined units:
* "southamericarand" should be "southafricarand";
* "sidereal day" should be "siderealday";
* "perusol" should be "perunewsol".


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/units/units.lib

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

Modified files:

Index: src/usr.bin/units/units.lib
diff -u src/usr.bin/units/units.lib:1.15 src/usr.bin/units/units.lib:1.16
--- src/usr.bin/units/units.lib:1.15	Mon Mar 28 00:08:47 2011
+++ src/usr.bin/units/units.lib	Fri Dec 28 13:45:53 2012
@@ -1,4 +1,4 @@
-/	$NetBSD: units.lib,v 1.15 2011/03/28 00:08:47 dholland Exp $
+/	$NetBSD: units.lib,v 1.16 2012/12/28 13:45:53 apb Exp $
 
 / primitive units
 
@@ -290,7 +290,7 @@ polandzloty		.59 $
 saudiarabiariyal	.26702 $
 singaporedollar		.6157 $
 slovakkoruna		.034 $
-southamericarand	.21 $
+southafricarand	.21 $
 southkoreawon		.001 $
 swedenkrona		.13 $
 switzerlandfranc	.66 $
@@ -322,7 +322,7 @@ bolivar			venezuelabolivar
 peseta			spainpeseta
 rand			southafricarand
 escudo			portugalescudo
-sol			perusol
+newsol			perunewsol
 guilder			netherlandsguilder
 hollandguilder		netherlandsguilder
 peso			mexicopeso
@@ -623,7 +623,7 @@ kilohm			kiloohm
 megohm			megaohm
 siderealyear		365.256360417 day
 siderealday		23.934469444 hour
-siderealhour		1|24 sidereal day
+siderealhour		1|24 siderealday
 lunarmonth		29.530 day
 synodicmonth		lunarmonth
 siderealmonth		27.32152777 day



CVS commit: src/usr.bin/units

2012-12-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Dec 28 13:25:26 UTC 2012

Modified Files:
src/usr.bin/units: units.1

Log Message:
Improve the description of the [count] from-unit to-unit arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/units/units.1

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

Modified files:

Index: src/usr.bin/units/units.1
diff -u src/usr.bin/units/units.1:1.17 src/usr.bin/units/units.1:1.18
--- src/usr.bin/units/units.1:1.17	Sun Apr  3 19:44:15 2011
+++ src/usr.bin/units/units.1	Fri Dec 28 13:25:25 2012
@@ -1,5 +1,5 @@
-.\"	$NetBSD: units.1,v 1.17 2011/04/03 19:44:15 dholland Exp $
-.Dd April 3, 2011
+.\"	$NetBSD: units.1,v 1.18 2012/12/28 13:25:25 apb Exp $
+.Dd December 28, 2012
 .Dt UNITS 1
 .Os
 .Sh NAME
@@ -21,8 +21,8 @@ their equivalents in other scales.
 can only handle multiplicative scale changes.
 It cannot convert Centigrade to Fahrenheit, for example.
 .Pp
-The following options are supported:
-.Bl -tag -width "from-unit to-unit" -offset indent
+The following options and arguments are supported:
+.Bl -tag -width "-fXfilenameX" -offset indent
 .It Fl f Ar filename
 Specifies the name of the units data file to load.
 .It Fl q
@@ -30,17 +30,20 @@ Suppresses prompting of the user for uni
 about the number of units loaded.
 .It Fl v
 Prints the version number.
-.It Ar from-unit Ar to-unit
+.It Oo Ar count Oc Ar from-unit Ar to-unit
 Allows a single unit conversion to be done directly from the command
 line.
 No prompting will occur.
 .Nm
 will print out only the result of this single conversion.
-The
+Specifying
 .Ar count
-argument can be prepended to the
+and
 .Ar from-unit
-or it can be separate.
+as two separate arguments is equivalent to embedding both parts
+inside a single
+.Ar from-unit
+argument, with the parts separated by a space.
 .El
 .Pp
 .Nm



CVS commit: src/sys/dev/marvell

2012-12-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec 28 08:16:53 UTC 2012

Modified Files:
src/sys/dev/marvell: if_mvgbe.c

Log Message:
Fix a bug that a multicast filter entry is incorrectly overrode
on some cases.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/marvell/if_mvgbe.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/dev/marvell/if_mvgbe.c
diff -u src/sys/dev/marvell/if_mvgbe.c:1.33 src/sys/dev/marvell/if_mvgbe.c:1.34
--- src/sys/dev/marvell/if_mvgbe.c:1.33	Thu Dec 20 10:01:28 2012
+++ src/sys/dev/marvell/if_mvgbe.c	Fri Dec 28 08:16:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mvgbe.c,v 1.33 2012/12/20 10:01:28 msaitoh Exp $	*/
+/*	$NetBSD: if_mvgbe.c,v 1.34 2012/12/28 08:16:53 msaitoh Exp $	*/
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.33 2012/12/20 10:01:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.34 2012/12/28 08:16:53 msaitoh Exp $");
 
 #include 
 #include 
@@ -2059,11 +2059,11 @@ mvgbe_filter_setup(struct mvgbe_softc *s
 		/* chip handles some IPv4 multicast specially */
 		if (memcmp(enm->enm_addrlo, special, 5) == 0) {
 			i = enm->enm_addrlo[5];
-			dfsmt[i>>2] =
+			dfsmt[i>>2] |=
 			MVGBE_DF(i&3, MVGBE_DF_QUEUE(0) | MVGBE_DF_PASS);
 		} else {
 			i = mvgbe_crc8(enm->enm_addrlo, ETHER_ADDR_LEN);
-			dfomt[i>>2] =
+			dfomt[i>>2] |=
 			MVGBE_DF(i&3, MVGBE_DF_QUEUE(0) | MVGBE_DF_PASS);
 		}
 



CVS commit: src/sys/fs/msdosfs

2012-12-28 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Dec 28 08:04:00 UTC 2012

Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Move the initialization of n to after the error branch.

>From Taylor R Campbell 


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/fs/msdosfs/msdosfs_vnops.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/fs/msdosfs/msdosfs_vnops.c
diff -u src/sys/fs/msdosfs/msdosfs_vnops.c:1.84 src/sys/fs/msdosfs/msdosfs_vnops.c:1.85
--- src/sys/fs/msdosfs/msdosfs_vnops.c:1.84	Thu Dec 20 08:03:42 2012
+++ src/sys/fs/msdosfs/msdosfs_vnops.c	Fri Dec 28 08:03:59 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vnops.c,v 1.84 2012/12/20 08:03:42 hannken Exp $	*/
+/*	$NetBSD: msdosfs_vnops.c,v 1.85 2012/12/28 08:03:59 hannken Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.84 2012/12/20 08:03:42 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.85 2012/12/28 08:03:59 hannken Exp $");
 
 #include 
 #include 
@@ -525,10 +525,10 @@ msdosfs_read(void *v)
 		 */
 		error = bread(pmp->pm_devvp, de_bn2kb(pmp, lbn), blsize,
 		NOCRED, 0, &bp);
-		n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
 		if (error) {
 			goto bad;
 		}
+		n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
 		error = uiomove((char *)bp->b_data + on, (int) n, uio);
 		brelse(bp, 0);
 	} while (error == 0 && uio->uio_resid > 0 && n != 0);