CVS commit: [matt-nb6-plus] src/sys/sys

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 07:19:41 UTC 2013

Modified Files:
src/sys/sys [matt-nb6-plus]: kernhist.h

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/sys/kernhist.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/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.4 src/sys/sys/kernhist.h:1.4.6.1
--- src/sys/sys/kernhist.h:1.4	Mon Nov 21 04:36:05 2011
+++ src/sys/sys/kernhist.h	Tue Feb 19 07:19:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernhist.h,v 1.4 2011/11/21 04:36:05 christos Exp $	*/
+/*	$NetBSD: kernhist.h,v 1.4.6.1 2013/02/19 07:19:40 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -93,9 +93,11 @@ LIST_HEAD(kern_history_head, kern_histor
  */
 #ifndef KERNHIST
 #define KERNHIST_DECL(NAME)
+#define KERNHIST_DEFINE(NAME)
 #define KERNHIST_INIT(NAME,N)
 #define KERNHIST_INIT_STATIC(NAME,BUF)
 #define KERNHIST_LOG(NAME,FMT,A,B,C,D)
+#define KERNHIST_CALLARGS(NAME,FMT,A,B,C,D)
 #define KERNHIST_CALLED(NAME)
 #define KERNHIST_FUNC(FNAME)
 #define kernhist_dump(NAME)
@@ -106,7 +108,8 @@ LIST_HEAD(kern_history_head, kern_histor
 
 extern	struct kern_history_head kern_histories;
 
-#define KERNHIST_DECL(NAME) struct kern_history NAME
+#define KERNHIST_DECL(NAME) extern struct kern_history NAME
+#define KERNHIST_DEFINE(NAME) struct kern_history NAME
 
 #define KERNHIST_INIT(NAME,N) \
 do { \
@@ -130,13 +133,18 @@ do { \
 	LIST_INSERT_HEAD(&kern_histories, &(NAME), list); \
 } while (/*CONSTCOND*/ 0)
 
+#ifndef KERNHIST_DELAY
+#define KERNHIST_DELAY	10
+#endif
+
 #if defined(KERNHIST_PRINT)
 extern int kernhist_print_enabled;
 #define KERNHIST_PRINTNOW(E) \
 do { \
 		if (kernhist_print_enabled) { \
 			kernhist_entry_print(E); \
-			DELAY(10); \
+			if (KERNHISTDELAY != 0) \
+DELAY(KERNHIST_DELAY); \
 		} \
 } while (/*CONSTCOND*/ 0)
 #else
@@ -172,10 +180,20 @@ do { \
 	KERNHIST_LOG(NAME, "called!", 0, 0, 0, 0); \
 } while (/*CONSTCOND*/ 0)
 
+/*
+ * This extends kernhist to avoid wasting a separate "called!" entry on every
+ * function.
+ */
+#define KERNHIST_CALLARGS(NAME, FMT, A, B, C, D) \
+do { \
+	_kernhist_call = atomic_inc_uint_nv(&_kernhist_cnt); \
+	KERNHIST_LOG(NAME, "called: "FMT, (A), (B), (C), (D)); \
+} while (/*CONSTCOND*/ 0)
+
 #define KERNHIST_FUNC(FNAME) \
 	static unsigned int _kernhist_cnt = 0; \
 	static const char *const _kernhist_name = FNAME; \
-	int _kernhist_call = 0;
+	unsigned int _kernhist_call = 0;
 
 static inline void kernhist_entry_print(const struct kern_history_ent *);
 



CVS commit: src/doc

2013-02-18 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 19 06:06:54 UTC 2013

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of kyua-testers, version 0.1.


To generate a diff of this commit:
cvs rdiff -u -r1.1003 -r1.1004 src/doc/3RDPARTY
cvs rdiff -u -r1.1792 -r1.1793 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/3RDPARTY
diff -u src/doc/3RDPARTY:1.1003 src/doc/3RDPARTY:1.1004
--- src/doc/3RDPARTY:1.1003	Sat Feb 16 21:40:57 2013
+++ src/doc/3RDPARTY	Tue Feb 19 06:06:53 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1003 2013/02/16 21:40:57 jmmv Exp $
+#	$NetBSD: 3RDPARTY,v 1.1004 2013/02/19 06:06:53 jmmv Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -569,6 +569,21 @@ in sys/netinet6/in6.h.  No script is ava
 http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE has functionality comparison
 among KAME/*BSD, *BSD-current and recent *BSD releases.
 
+Package:	kyua-testers
+Version:	0.1
+Current Vers:	0.1
+Maintainer:	Julio Merino 
+Archive site:	http://code.google.com/p/kyua/downloads/list?can=1
+Home page:	http://code.google.com/p/kyua/
+Mailing List:	kyua-disc...@googlegroups.com
+Responsible:	jmmv
+License:	BSD 3-clause
+Location:	external/bsd/kyua-testers/dist
+Notes:
+The source files are in external/bsd/kyua-testers/dist.
+Use external/bsd/kyua-testers/prepare-import.sh to regenerate the dist/
+directory.
+
 Package:	less
 Version:	less-444
 Current Vers:	less-451

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1792 src/doc/CHANGES:1.1793
--- src/doc/CHANGES:1.1792	Sat Feb 16 21:40:58 2013
+++ src/doc/CHANGES	Tue Feb 19 06:06:54 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1792 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1793 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -193,3 +193,6 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	lutok: Import 0.2.  This is a new import that provides a C++ wrapper
 		for the Lua API and will be used by Kyua.  Its build depends
 		on the MKKYUA knob.  [jmmv 20130216]
+	kyua-testers(1): Import 0.1.  This is a new import that provides
+		scriptable utilities to invoke test programs that implement
+		different interfaces.  [jmmv 20130217]



CVS commit: src

2013-02-18 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 19 06:06:45 UTC 2013

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/external/bsd: Makefile

Log Message:
Enable the build of kyua-testers and register its files and directories.
This is conditional on MKKYUA.


To generate a diff of this commit:
cvs rdiff -u -r1.1018 -r1.1019 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1804 -r1.1805 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1419 -r1.1420 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.519 -r1.520 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.92 -r1.93 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.36 -r1.37 src/external/bsd/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1018 src/distrib/sets/lists/base/mi:1.1019
--- src/distrib/sets/lists/base/mi:1.1018	Tue Feb  5 17:52:22 2013
+++ src/distrib/sets/lists/base/mi	Tue Feb 19 06:06:39 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1018 2013/02/05 17:52:22 matt Exp $
+# $NetBSD: mi,v 1.1019 2013/02/19 06:06:39 jmmv Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1064,6 +1064,8 @@
 ./usr/libexec/kdcbase-obsolete		obsolete
 ./usr/libexec/kfdbase-obsolete		obsolete
 ./usr/libexec/kpasswddbase-krb5-bin		kerberos
+./usr/libexec/kyua-atf-tester			base-kyua-bin		kyua
+./usr/libexec/kyua-plain-tester			base-kyua-bin		kyua
 ./usr/libexec/lfs_cleanerd			base-obsolete		obsolete
 ./usr/libexec/locate.bigram			base-sysutil-bin
 ./usr/libexec/locate.code			base-sysutil-bin

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1804 src/distrib/sets/lists/comp/mi:1.1805
--- src/distrib/sets/lists/comp/mi:1.1804	Sat Feb 16 21:40:20 2013
+++ src/distrib/sets/lists/comp/mi	Tue Feb 19 06:06:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1804 2013/02/16 21:40:20 jmmv Exp $
+#	$NetBSD: mi,v 1.1805 2013/02/19 06:06:39 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3185,6 +3185,7 @@
 ./usr/lib/pkgconfig/atf-c.pc			comp-atf-lib		atf,share
 ./usr/lib/pkgconfig/atf-sh.pc			comp-atf-lib		atf,share
 ./usr/lib/pkgconfig/atf.pc			comp-obsolete		obsolete
+./usr/lib/pkgconfig/kyua-testers.pc		comp-kyua-lib		kyua,share
 ./usr/lib/pkgconfig/libcrypto.pc		comp-crypto-lib		crypto,share
 ./usr/lib/pkgconfig/libssl.pc			comp-crypto-lib		crypto,share
 ./usr/lib/pkgconfig/lutok.pc			comp-crypto-lib		kyua,share

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.6 src/distrib/sets/lists/debug/mi:1.7
--- src/distrib/sets/lists/debug/mi:1.6	Sat Feb 16 21:40:38 2013
+++ src/distrib/sets/lists/debug/mi	Tue Feb 19 06:06:42 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.6 2013/02/16 21:40:38 jmmv Exp $
+# $NetBSD: mi,v 1.7 2013/02/19 06:06:42 jmmv Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/libdata/debug/bin/cat.debug		comp-util-debug		debug
 ./usr/libdata/debug/bin/chio.debug		comp-util-debug		debug
@@ -643,6 +643,8 @@
 ./usr/libdata/debug/usr/libexec/ipropd-slave.debug	comp-krb5-debug		kerberos,debug
 ./usr/libdata/debug/usr/libexec/kadmind.debug	comp-krb5-debug		kerberos,debug
 ./usr/libdata/debug/usr/libexec/kpasswdd.debug	comp-krb5-debug		kerberos,debug
+./usr/libdata/debug/usr/libexec/kyua-atf-tester.debug	comp-kyua-debug		kyua,debug
+./usr/libdata/debug/usr/libexec/kyua-plain-tester.debug	comp-kyua-debug		kyua,debug
 ./usr/libdata/debug/usr/libexec/lfs_cleanerd.debug	comp-obsolete		obsolete
 ./usr/libdata/debug/usr/libexec/lint1.debug	comp-c-debug		debug
 ./usr/libdata/debug/usr/libexec/lint2.debug	comp-c-debug		debug
@@ -1320,6 +1322,21 @@
 ./usr/libdata/debug/usr/tests/kernel/t_ucontext.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/kernel/t_writev.debug			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/kernel/tty/t_pr.debug			tests-kernel-tests	debug,atf,rump
+./usr/libdata/debug/usr/tests/kyua-testers/atf_helpers.debug		tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/atf_inttest.debug		tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/atf_list_test.debug		tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/atf_result_test.debug	tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/cli_test.debug		tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/env_test.debug		tests-kyua-tests	debug,atf,kyua
+./usr/libdata/debug/usr/tests/kyua-testers/error_test.debug		tests-kyua-tests	debug,

CVS commit: src/external/bsd/kyua-testers

2013-02-18 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 19 06:04:44 UTC 2013

Added Files:
src/external/bsd/kyua-testers: Makefile prepare-import.sh
src/external/bsd/kyua-testers/lib: Makefile
src/external/bsd/kyua-testers/lib/libatf_tester: Makefile
src/external/bsd/kyua-testers/lib/libtester: Makefile config.h defs.h
src/external/bsd/kyua-testers/libexec: Makefile
src/external/bsd/kyua-testers/libexec/kyua-atf-tester: Makefile
src/external/bsd/kyua-testers/libexec/kyua-plain-tester: Makefile
src/external/bsd/kyua-testers/share: Makefile
src/external/bsd/kyua-testers/share/man: Makefile
src/external/bsd/kyua-testers/share/man/man1: Makefile
src/external/bsd/kyua-testers/share/man/man5: Makefile
src/external/bsd/kyua-testers/tests: Makefile
src/external/bsd/kyua-testers/tests/kyua-testers: Makefile

Log Message:
Add reachover build files for kyua-testers.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/Makefile \
src/external/bsd/kyua-testers/prepare-import.sh
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/lib/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-testers/lib/libatf_tester/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/lib/libtester/Makefile \
src/external/bsd/kyua-testers/lib/libtester/config.h \
src/external/bsd/kyua-testers/lib/libtester/defs.h
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/libexec/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-testers/libexec/kyua-atf-tester/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-testers/libexec/kyua-plain-tester/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/share/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/share/man/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/share/man/man1/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/share/man/man5/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/kyua-testers/tests/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/bsd/kyua-testers/tests/kyua-testers/Makefile

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

Added files:

Index: src/external/bsd/kyua-testers/Makefile
diff -u /dev/null src/external/bsd/kyua-testers/Makefile:1.1
--- /dev/null	Tue Feb 19 06:04:44 2013
+++ src/external/bsd/kyua-testers/Makefile	Tue Feb 19 06:04:42 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/02/19 06:04:42 jmmv Exp $
+
+SUBDIR= lib .WAIT libexec share tests
+
+.include 
Index: src/external/bsd/kyua-testers/prepare-import.sh
diff -u /dev/null src/external/bsd/kyua-testers/prepare-import.sh:1.1
--- /dev/null	Tue Feb 19 06:04:44 2013
+++ src/external/bsd/kyua-testers/prepare-import.sh	Tue Feb 19 06:04:42 2013
@@ -0,0 +1,107 @@
+#!/bin/sh
+# $NetBSD: prepare-import.sh,v 1.1 2013/02/19 06:04:42 jmmv Exp $
+#
+# Use this script to recreate the 'dist' subdirectory from a newly released
+# distfile.  The script takes care of unpacking the distfile, removing any
+# files that are not relevant to NetBSD and checking if there are any new
+# files in the new release that need to be addressed.
+#
+
+set -e
+
+ProgName=${0##*/}
+
+CLEAN_PATTERNS=
+CLEAN_PATTERNS="${CLEAN_PATTERNS} *.m4"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} INSTALL TODO"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} Doxyfile*"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} Makefile* */Makefile*"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} admin"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} api-docs"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} config.h.in"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} configure*"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} defs.h*"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} m4"
+
+err() {
+	echo "${ProgName}:" "${@}" 1>&2
+	exit 1
+}
+
+log() {
+	echo "${ProgName}:" "${@}"
+}
+
+backup_dist() {
+	if [ -d dist.old ]; then
+		log "Removing dist; dist.old exists"
+		rm -rf dist
+	else
+		log "Backing up dist as dist.old"
+		mv dist dist.old
+	fi
+}
+
+extract_distfile() {
+	local distfile="${1}"; shift
+	local distname="${1}"; shift
+
+	log "Extracting ${distfile}"
+	tar -xzf "${distfile}"
+	[ -d "${distname}" ] || err "Distfile did not create ${distname}"
+	log "Renaming ${distname} to dist"
+	mv "${distname}" dist
+}
+
+get_distname() {
+	local distfile="${1}"; shift
+	basename "${distfile}" | sed -e 's,\.tar.*,,'
+}
+
+cleanup_dist() {
+	log "Removing unnecessary files from dist"
+	( cd dist && rm -rf ${CLEAN_PATTERNS} )
+}
+
+diff_dirs() {
+	local old_dir="${1}"; shift
+	local new_dir="${1}"; shift
+
+	local old_list=$(mktemp -t kyua-testers-import.XX)
+	local new_list=$(mktemp -t kyua-testers-import.XX)
+	local diff=$(mktemp -t kyua-testers-import.XX)
+	trap "rm -f '${old_list}' '${new_list}' '${diff}'; exit 1" \
+	HUP INT QUIT TERM
+
+	( cd "${old_dir}" && find . | sort >>"${old_list}" )
+	( cd "${new_dir}" && find . | sort >>"${new_list}" )
+
+	di

CVS commit: src/external/bsd/kyua-testers/dist

2013-02-18 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Tue Feb 19 06:01:40 UTC 2013

Update of /cvsroot/src/external/bsd/kyua-testers/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv20265

Log Message:
Initial import of Kyua Testers, version 0.1:

This is a component of Kyua and its build will be guarded by the MKKYUA
knob.  core@ has approved this import.

Description:

Kyua (pronounced Q.A.) is a testing framework for both developers and
users.  Kyua is different from most other testing frameworks in that it
puts the end user experience before anything else.  There are multiple
reasons for users to run the tests themselves, and Kyua ensures that
they can do so in the most convenient way.

This module, kyua-testers, provides scriptable interfaces to interact
with test programs of various kinds.  The interface of such testers
allows the caller to execute a single test case of a single test program
in a controlled and homogeneous manner.

Status:

Vendor Tag: GOOGLE-CODE
Release Tags:   kyua-testers-0-1

N src/external/bsd/kyua-testers/dist/kyua-tester-list.5
N src/external/bsd/kyua-testers/dist/kyua-plain-interface.7
N src/external/bsd/kyua-testers/dist/kyua-atf-interface.7
N src/external/bsd/kyua-testers/dist/README
N src/external/bsd/kyua-testers/dist/NEWS
N src/external/bsd/kyua-testers/dist/kyua-tester-result.5
N src/external/bsd/kyua-testers/dist/Kyuafile
N src/external/bsd/kyua-testers/dist/AUTHORS
N src/external/bsd/kyua-testers/dist/COPYING
N src/external/bsd/kyua-testers/dist/atf_helpers.c
N src/external/bsd/kyua-testers/dist/atf_list.c
N src/external/bsd/kyua-testers/dist/atf_list.h
N src/external/bsd/kyua-testers/dist/atf_result.c
N src/external/bsd/kyua-testers/dist/atf_result.h
N src/external/bsd/kyua-testers/dist/cli.c
N src/external/bsd/kyua-testers/dist/cli.h
N src/external/bsd/kyua-testers/dist/cli_fwd.h
N src/external/bsd/kyua-testers/dist/env.c
N src/external/bsd/kyua-testers/dist/env.h
N src/external/bsd/kyua-testers/dist/error.c
N src/external/bsd/kyua-testers/dist/error.h
N src/external/bsd/kyua-testers/dist/error_fwd.h
N src/external/bsd/kyua-testers/dist/fs.c
N src/external/bsd/kyua-testers/dist/fs.h
N src/external/bsd/kyua-testers/dist/result.c
N src/external/bsd/kyua-testers/dist/result.h
N src/external/bsd/kyua-testers/dist/run.c
N src/external/bsd/kyua-testers/dist/run.h
N src/external/bsd/kyua-testers/dist/run_fwd.h
N src/external/bsd/kyua-testers/dist/stacktrace.c
N src/external/bsd/kyua-testers/dist/stacktrace.h
N src/external/bsd/kyua-testers/dist/text.c
N src/external/bsd/kyua-testers/dist/text.h
N src/external/bsd/kyua-testers/dist/atf_inttest.c
N src/external/bsd/kyua-testers/dist/common_inttest.h
N src/external/bsd/kyua-testers/dist/atf_list_test.c
N src/external/bsd/kyua-testers/dist/plain_helpers.c
N src/external/bsd/kyua-testers/dist/cli_test.c
N src/external/bsd/kyua-testers/dist/atf_result_test.c
N src/external/bsd/kyua-testers/dist/env_test.c
N src/external/bsd/kyua-testers/dist/error_test.c
N src/external/bsd/kyua-testers/dist/fs_test.c
N src/external/bsd/kyua-testers/dist/atf_main.c
N src/external/bsd/kyua-testers/dist/plain_main.c
N src/external/bsd/kyua-testers/dist/stacktrace_helper.c
N src/external/bsd/kyua-testers/dist/plain_inttest.c
N src/external/bsd/kyua-testers/dist/result_test.c
N src/external/bsd/kyua-testers/dist/run_test.c
N src/external/bsd/kyua-testers/dist/kyua-plain-tester.1.in
N src/external/bsd/kyua-testers/dist/stacktrace_test.c
N src/external/bsd/kyua-testers/dist/text_test.c
N src/external/bsd/kyua-testers/dist/kyua-atf-tester.1.in
N src/external/bsd/kyua-testers/dist/kyua-testers.pc.in
N src/external/bsd/kyua-testers/dist/kyua-tester.1.in

No conflicts created by this import



CVS commit: src/tests/kernel

2013-02-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Feb 19 04:58:40 UTC 2013

Modified Files:
src/tests/kernel: t_lockf.c

Log Message:
Rather than just sleeping and hoping that all the sub-processes are
ready to be ptrace()d, use a positive barrier.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/kernel/t_lockf.c

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

Modified files:

Index: src/tests/kernel/t_lockf.c
diff -u src/tests/kernel/t_lockf.c:1.5 src/tests/kernel/t_lockf.c:1.6
--- src/tests/kernel/t_lockf.c:1.5	Tue Feb 19 04:46:46 2013
+++ src/tests/kernel/t_lockf.c	Tue Feb 19 04:58:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_lockf.c,v 1.5 2013/02/19 04:46:46 pgoyette Exp $	*/
+/*	$NetBSD: t_lockf.c,v 1.6 2013/02/19 04:58:40 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -119,8 +119,10 @@ ATF_TC_HEAD(randlock, tc)
 ATF_TC_BODY(randlock, tc)
 {
 	int i, j, fd;
+	int pipe_fd[2];
 	pid_t *pid;
 	int status;
+	char pipe_in, pipe_out;
 
 	(void)unlink(lockfile);
 
@@ -130,26 +132,36 @@ ATF_TC_BODY(randlock, tc)
 	ATF_REQUIRE_MSG(ftruncate(fd, filesize) >= 0,
 	"ftruncate(%s): %s", lockfile, strerror(errno));
 
+	ATF_REQUIRE_MSG(pipe(pipe_fd) == 0, "pipe: %s", strerror(errno));
+
 	fsync(fd);
 	close(fd);
 
 	pid = malloc(nprocs * sizeof(pid_t));
 	
 	for (i = 0; i < nprocs; i++) {
+		pipe_out = (char)('A' + i);
 		pid[i] = fork();
 		switch (pid[i]) {
 		case 0:
-			trylocks(i);
+			if (write(pipe_fd[1], &pipe_out, 1) != 1)
+printf("write_pipe(%i): %s", i,
+strerror(errno));
+			else
+trylocks(i);
 			_exit(0);
 			break;
 		case -1:
 			atf_tc_fail("fork %d failed", i);
 			break;
 		default:
+			ATF_REQUIRE_MSG(read(pipe_fd[0], &pipe_in, 1) == 1,
+			"parent: read_pipe(%i): %s", i, strerror(errno));
+			ATF_REQUIRE_MSG(pipe_in == pipe_out,
+			"parent: pipe does not match");
 			break;
 		}
 	}
-	usleep(sleeptime/10);
 	for (j = 0; j < npasses; j++) {
 		printf("parent: run %i\n", j+1);
 		for (i = 0; i < nprocs; i++) {



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Feb 19 04:53:08 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Welcome to 6.1_RC1!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.105 src/doc/CHANGES-6.1:1.1.2.106
--- src/doc/CHANGES-6.1:1.1.2.105	Tue Feb 19 04:49:25 2013
+++ src/doc/CHANGES-6.1	Tue Feb 19 04:53:08 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.105 2013/02/19 04:49:25 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.106 2013/02/19 04:53:08 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8575,3 +8575,7 @@ crypto/external/bsd/openssl/lib/libcrypt
 	Fix build for OpenSSL AES-NI support.
 	[riastradh, ticket #832]
 
+sys/sys/param.h	patched by hand
+
+	Welcome to 6.1_RC1!
+	[riz]



CVS commit: [netbsd-6] src/sys/sys

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Feb 19 04:52:49 UTC 2013

Modified Files:
src/sys/sys [netbsd-6]: param.h

Log Message:
Welcome to 6.1_RC1!


To generate a diff of this commit:
cvs rdiff -u -r1.408.2.7 -r1.408.2.8 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.408.2.7 src/sys/sys/param.h:1.408.2.8
--- src/sys/sys/param.h:1.408.2.7	Wed Oct 17 20:53:29 2012
+++ src/sys/sys/param.h	Tue Feb 19 04:52:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.408.2.7 2012/10/17 20:53:29 riz Exp $	*/
+/*	$NetBSD: param.h,v 1.408.2.8 2013/02/19 04:52:48 riz Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	6	/* NetBSD 6.0_STABLE */
+#define	__NetBSD_Version__	60100	/* NetBSD 6.1_RC1 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Feb 19 04:49:26 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 832


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.104 src/doc/CHANGES-6.1:1.1.2.105
--- src/doc/CHANGES-6.1:1.1.2.104	Mon Feb 18 22:01:29 2013
+++ src/doc/CHANGES-6.1	Tue Feb 19 04:49:25 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.104 2013/02/18 22:01:29 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.105 2013/02/19 04:49:25 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8568,3 +8568,10 @@ sys/kern/uipc_usrreq.c1.141
 	Fix various problems in cmsg file descriptor handling.
 	[riastradh, ticket #831]
 
+crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc 1.3
+crypto/external/bsd/openssl/lib/libcrypto/evp.inc 1.5
+crypto/external/bsd/openssl/lib/libcrypto/modes.inc 1.3
+
+	Fix build for OpenSSL AES-NI support.
+	[riastradh, ticket #832]
+



CVS commit: [netbsd-6] src/crypto/external/bsd/openssl/lib/libcrypto

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Feb 19 04:47:13 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-6]: evp.inc
modes.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386 [netbsd-6]:
aes.inc

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #832):
crypto/external/bsd/openssl/lib/libcrypto/modes.inc: revision 1.3
crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc: revision 
1.3
crypto/external/bsd/openssl/lib/libcrypto/evp.inc: revision 1.5
Fix build goo for OpenSSL AES-NI support.
OpenSSL now supports AES-NI in evp, not in an engine.  We can now get
rid of the no longer maintained aesni engine, which was broken last
summer.  Not only can OpenSSL now use AES-NI for everything it did
before we broke it last summer, but it can also use AES-NI for more
encryption modes than before, such as CTR.
Tested on amd64, both vanilla and in an i386 chroot.
ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
cvs rdiff -u -r1.1.8.1 -r1.1.8.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.2.4.1 src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.2.4.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.2.4.1	Tue Aug 14 07:57:03 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc	Tue Feb 19 04:47:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: evp.inc,v 1.2.4.1 2012/08/14 07:57:03 riz Exp $
+#	$NetBSD: evp.inc,v 1.2.4.2 2013/02/19 04:47:13 riz Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -25,3 +25,14 @@ SRCS += ${EVP_SRCS}
 .for cryptosrc in ${EVP_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/evp
 .endfor
+
+EVP_AES_SRCS = e_aes.c
+
+# XXX Should do this too, but it requires some other asm changes.
+#EVP_AES_SRCS += e_aes_cbc_hmac_sha1.c
+
+.for cryptosrc in ${EVP_AES_SRCS}
+CPPFLAGS.${cryptosrc} += ${AESCPPFLAGS}
+.endfor
+
+CPPFLAGS.e_aes.c += -I${OPENSSLSRC}/crypto/modes

Index: src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.1.8.1 src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.1.8.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.1.8.1	Tue Aug 14 07:57:03 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc	Tue Feb 19 04:47:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: modes.inc,v 1.1.8.1 2012/08/14 07:57:03 riz Exp $
+#	$NetBSD: modes.inc,v 1.1.8.2 2013/02/19 04:47:13 riz Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -16,4 +16,3 @@ SRCS += ${MODES_SRCS}
 .for cryptosrc in ${MODES_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/modes
 .endfor
-CPPFLAGS.e_aes.c = -I${OPENSSLSRC}/crypto/modes

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.2.4.1
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.2	Tue Jul  5 16:53:58 2011
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc	Tue Feb 19 04:47:13 2013
@@ -1,5 +1,5 @@
 .PATH.S: ${.PARSEDIR}
-AES_SRCS = aes-586.S aesni-586.S
+AES_SRCS = aes-586.S aesni-x86.S
 AESNI = yes
 AESCPPFLAGS = -DAES_ASM -DOPENSSL_IA32_SSE2
 .include "../../aes.inc"



CVS commit: src/tests/kernel

2013-02-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Feb 19 04:46:46 UTC 2013

Modified Files:
src/tests/kernel: t_lockf.c

Log Message:
White-space in for(...) loops.
Use #define instead of static variables to define test parameters.
No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/t_lockf.c

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

Modified files:

Index: src/tests/kernel/t_lockf.c
diff -u src/tests/kernel/t_lockf.c:1.4 src/tests/kernel/t_lockf.c:1.5
--- src/tests/kernel/t_lockf.c:1.4	Tue Feb 19 03:22:54 2013
+++ src/tests/kernel/t_lockf.c	Tue Feb 19 04:46:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_lockf.c,v 1.4 2013/02/19 03:22:54 pgoyette Exp $	*/
+/*	$NetBSD: t_lockf.c,v 1.5 2013/02/19 04:46:46 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -53,11 +53,11 @@
  * When finished, reap all the children.
  */
 
-int nlocks = 500;		/* number of locks per thread */
-int nprocs = 10;		/* number of processes to spawn */
-int npasses = 50;		/* number of passes to make over the children */
-int sleeptime = 15;		/* sleep time between locks, usec */
-off_t size = 8192;		/* size of file to lock */
+#define	nlocks		500	/* number of locks per thread */
+#define	nprocs		10	/* number of processes to spawn */
+#define	npasses		50	/* number of passes to make over the children */
+#define	sleeptime	15	/* sleep time between locks, usec */
+#define	filesize 	8192	/* size of file to lock */
 
 const char *lockfile = "lockf_test";
 
@@ -81,11 +81,11 @@ trylocks(int id)
 
 	printf("%d: start\n", id);
 
-	for (i=0; i= 0, "open(%s): %s", lockfile, strerror(errno));
 
-	ATF_REQUIRE_MSG(ftruncate(fd, size) >= 0,
+	ATF_REQUIRE_MSG(ftruncate(fd, filesize) >= 0,
 	"ftruncate(%s): %s", lockfile, strerror(errno));
 
 	fsync(fd);
@@ -135,7 +135,7 @@ ATF_TC_BODY(randlock, tc)
 
 	pid = malloc(nprocs * sizeof(pid_t));
 	
-	for (i=0; i= 0,
 			"ptrace attach %d", pid[i]);
 			ATF_REQUIRE_MSG(waitpid(pid[i], &status, WUNTRACED) >= 0,
 			"waitpid(ptrace)");
-			usleep(sleeptime/3);
+			usleep(sleeptime / 3);
 			ATF_REQUIRE_MSG(ptrace(PT_DETACH, pid[i], (caddr_t)1,
 	   0) >= 0,
 			"ptrace detach %d", pid[i]);
-			usleep(sleeptime/3);
+			usleep(sleeptime / 3);
 		}
 	}
-	for (i=0; i= 0, "open(%s): %s", lockfile, strerror(errno));
 
-	ATF_REQUIRE_MSG(ftruncate(fd, size) >= 0,
+	ATF_REQUIRE_MSG(ftruncate(fd, filesize) >= 0,
 	"ftruncate(%s): %s", lockfile, strerror(errno));
 
 	fsync(fd);



CVS commit: src/tests/kernel

2013-02-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Feb 19 03:22:54 UTC 2013

Modified Files:
src/tests/kernel: t_lockf.c

Log Message:
Create a variable for max number of passes to make.  While we're here,
reduce the pass-count from 100 to 50;  this is more than enough to prove
that the test is working, and helps reduce the ever-increasing time it's
taking to run the entire test suite.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/kernel/t_lockf.c

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

Modified files:

Index: src/tests/kernel/t_lockf.c
diff -u src/tests/kernel/t_lockf.c:1.3 src/tests/kernel/t_lockf.c:1.4
--- src/tests/kernel/t_lockf.c:1.3	Tue Feb 19 00:54:47 2013
+++ src/tests/kernel/t_lockf.c	Tue Feb 19 03:22:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_lockf.c,v 1.3 2013/02/19 00:54:47 pgoyette Exp $	*/
+/*	$NetBSD: t_lockf.c,v 1.4 2013/02/19 03:22:54 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -55,6 +55,7 @@
 
 int nlocks = 500;		/* number of locks per thread */
 int nprocs = 10;		/* number of processes to spawn */
+int npasses = 50;		/* number of passes to make over the children */
 int sleeptime = 15;		/* sleep time between locks, usec */
 off_t size = 8192;		/* size of file to lock */
 
@@ -149,7 +150,7 @@ ATF_TC_BODY(randlock, tc)
 		}
 	}
 	usleep(sleeptime/10);
-	for (j=0; j<100; j++) {
+	for (j = 0; j < npasses; j++) {
 		printf("parent: run %i\n", j+1);
 		for (i=0; i= 0,



CVS commit: [matt-nb6-plus] src/sys/arch/arm/broadcom

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:31:55 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom [matt-nb6-plus]: bcm53xx_board.c

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.5 -r1.8.4.6 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.5 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.6
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.5	Tue Feb 19 02:22:02 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Tue Feb 19 02:31:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.8.4.5 2013/02/19 02:22:02 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.8.4.6 2013/02/19 02:31:55 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.8.4.5 2013/02/19 02:22:02 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.8.4.6 2013/02/19 02:31:55 matt Exp $");
 
 #include 
 #include 
@@ -106,18 +106,9 @@ struct arm32_bus_dma_tag bcm53xx_coheren
 };
 
 #ifdef _ARM32_NEED_BUS_DMA_BOUNCE
-struct arm32_dma_range bcm53xx_bounce_dma_ranges[] = {
-	[0] = {
-		.dr_sysbase = 0x8000,
-		.dr_busbase = 0x8000,
-		.dr_len = 0x1000,
-		.dr_flags = _BUS_DMAMAP_COHERENT,
-	},
-};
-
 struct arm32_bus_dma_tag bcm53xx_bounce_dma_tag = {
-	._ranges = bcm53xx_bounce_dma_ranges,
-	._nranges = __arraycount(bcm53xx_bounce_dma_ranges),
+	._ranges = bcm53xx_coherent_dma_ranges,
+	._nranges = 1,
 	_BUS_DMAMAP_FUNCS,
 	_BUS_DMAMEM_FUNCS,
 	_BUS_DMATAG_FUNCS,
@@ -544,11 +535,7 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		bcm53xx_dma_ranges[0].dr_len = memsize;
 		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
 		bcm53xx_dma_tag._nranges = 1;
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
-#else
-		bcm53xx_bounce_dma_ranges[0].dr_len = memsize;
-#endif
 	} else {
 		/*
 		 * By setting up two ranges, bus_dmamem_alloc will always
@@ -557,9 +544,6 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
-#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
-		bcm53xx_bounce_dma_ranges[1].dr_len = memsize - 0x1000;
-#endif
 	}
 	KASSERT(bcm53xx_dma_tag._ranges[0].dr_flags == 0);
 	KASSERT(bcm53xx_coherent_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);



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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:30:55 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
Use the coherent dma_ranges in the bounce dmatag but only use the first one.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.14 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.15
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.14	Tue Feb 19 02:15:17 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Tue Feb 19 02:30:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.14 2013/02/19 02:15:17 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.15 2013/02/19 02:30:55 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.14 2013/02/19 02:15:17 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.15 2013/02/19 02:30:55 matt Exp $");
 
 #include 
 #include 
@@ -106,18 +106,9 @@ struct arm32_bus_dma_tag bcm53xx_coheren
 };
 
 #ifdef _ARM32_NEED_BUS_DMA_BOUNCE
-struct arm32_dma_range bcm53xx_bounce_dma_ranges[] = {
-	[0] = {
-		.dr_sysbase = 0x8000,
-		.dr_busbase = 0x8000,
-		.dr_len = 0x1000,
-		.dr_flags = _BUS_DMAMAP_COHERENT,
-	},
-};
-
 struct arm32_bus_dma_tag bcm53xx_bounce_dma_tag = {
-	._ranges = bcm53xx_bounce_dma_ranges,
-	._nranges = __arraycount(bcm53xx_bounce_dma_ranges),
+	._ranges = bcm53xx_coherent_dma_ranges,
+	._nranges = 1,
 	_BUS_DMAMAP_FUNCS,
 	_BUS_DMAMEM_FUNCS,
 	_BUS_DMATAG_FUNCS,
@@ -544,11 +535,7 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		bcm53xx_dma_ranges[0].dr_len = memsize;
 		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
 		bcm53xx_dma_tag._nranges = 1;
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
-#else
-		bcm53xx_bounce_dma_ranges[0].dr_len = memsize;
-#endif
 	} else {
 		/*
 		 * By setting up two ranges, bus_dmamem_alloc will always
@@ -557,9 +544,6 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
-#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
-		bcm53xx_bounce_dma_ranges[1].dr_len = memsize - 0x1000;
-#endif
 	}
 	KASSERT(bcm53xx_dma_tag._ranges[0].dr_flags == 0);
 	KASSERT(bcm53xx_coherent_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);



CVS commit: [matt-nb6-plus] src/sys/arch/arm/broadcom

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:22:02 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom [matt-nb6-plus]: bcm53xx_board.c
bcm53xx_eth.c bcm53xx_pax.c bcm53xx_var.h

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.4 -r1.8.4.5 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.17.2.4 -r1.17.2.5 src/sys/arch/arm/broadcom/bcm53xx_eth.c
cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/sys/arch/arm/broadcom/bcm53xx_pax.c
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/sys/arch/arm/broadcom/bcm53xx_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/arch/arm/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.4 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.5
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.8.4.4	Wed Feb 13 23:52:18 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Tue Feb 19 02:22:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.8.4.4 2013/02/13 23:52:18 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.8.4.5 2013/02/19 02:22:02 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.8.4.4 2013/02/13 23:52:18 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.8.4.5 2013/02/19 02:22:02 matt Exp $");
 
 #include 
 #include 
@@ -91,11 +91,9 @@ struct arm32_dma_range bcm53xx_coherent_
 		.dr_busbase = 0x8000,
 		.dr_len = 0x1000,
 		.dr_flags = _BUS_DMAMAP_COHERENT,
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 	}, [1] = {
 		.dr_sysbase = 0x9000,
 		.dr_busbase = 0x9000,
-#endif
 	},
 };
 
@@ -107,6 +105,25 @@ struct arm32_bus_dma_tag bcm53xx_coheren
 	_BUS_DMATAG_FUNCS,
 };
 
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+struct arm32_dma_range bcm53xx_bounce_dma_ranges[] = {
+	[0] = {
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
+		.dr_len = 0x1000,
+		.dr_flags = _BUS_DMAMAP_COHERENT,
+	},
+};
+
+struct arm32_bus_dma_tag bcm53xx_bounce_dma_tag = {
+	._ranges = bcm53xx_bounce_dma_ranges,
+	._nranges = __arraycount(bcm53xx_bounce_dma_ranges),
+	_BUS_DMAMAP_FUNCS,
+	_BUS_DMAMEM_FUNCS,
+	_BUS_DMATAG_FUNCS,
+};
+#endif
+
 #ifdef BCM53XX_CONSOLE_EARLY
 #include 
 #include 
@@ -529,6 +546,8 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		bcm53xx_dma_tag._nranges = 1;
 #ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
+#else
+		bcm53xx_bounce_dma_ranges[0].dr_len = memsize;
 #endif
 	} else {
 		/*
@@ -537,12 +556,16 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 * below 256MB which for PCI and GMAC are coherent.
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+		bcm53xx_bounce_dma_ranges[1].dr_len = memsize - 0x1000;
 #endif
 	}
 	KASSERT(bcm53xx_dma_tag._ranges[0].dr_flags == 0);
 	KASSERT(bcm53xx_coherent_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+	KASSERT(bcm53xx_bounce_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);
+#endif
 }
 
 #ifdef MULTIPROCESSOR

Index: src/sys/arch/arm/broadcom/bcm53xx_eth.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.17.2.4 src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.17.2.5
--- src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.17.2.4	Thu Feb  7 06:51:49 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_eth.c	Tue Feb 19 02:22:02 2013
@@ -35,7 +35,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.17.2.4 2013/02/07 06:51:49 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.17.2.5 2013/02/19 02:22:02 matt Exp $");
 
 #include 
 #include 
@@ -281,6 +281,11 @@ bcmeth_ccb_attach(device_t parent, devic
 	 * We need to use the coherent dma tag for the GMAC.
 	 */
 	sc->sc_dmat = &bcm53xx_coherent_dma_tag;
+#if _ARM32_NEED_BUS_DMA_BOUNCE
+	if (device_cfdata(self)->cf_flags & 2) {
+		sc->sc_dmat = &bcm53xx_bounce_dma_tag;
+	}
+#endif
 
 	prop_data_t eaprop = prop_dictionary_get(dict, "mac-address");
 if (eaprop == NULL) {

Index: src/sys/arch/arm/broadcom/bcm53xx_pax.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.7.4.2 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.7.4.3
--- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.7.4.2	Wed Nov 28 22:40:23 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c	Tue Feb 19 02:22:02 2013
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.7.4.2 2012/11/28 22:40:23 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.7.4.3 2013/02/19 02:22:02 matt Exp $");
 
 #include 
 #include 
@@ -199,10 +199,15 @@ bcmpax_ccb_attach(device_t parent, devic
 	struct bcmccb_attach_args * const ccbaa = aux;
 	const struct bcm_locators * const loc = &ccbaa->ccbaa_loc;
 	const char * const xname = device_xname(self);
+	cfdata_t cf = de

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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:18:29 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_eth.c

Log Message:
As with pax, use cf_flags 2 to indicate to use the bounce dma tag.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/broadcom/bcm53xx_eth.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/broadcom/bcm53xx_eth.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.23 src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.24
--- src/sys/arch/arm/broadcom/bcm53xx_eth.c:1.23	Sat Jan 19 00:35:24 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_eth.c	Tue Feb 19 02:18:29 2013
@@ -35,7 +35,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.23 2013/01/19 00:35:24 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.24 2013/02/19 02:18:29 matt Exp $");
 
 #include 
 #include 
@@ -281,6 +281,11 @@ bcmeth_ccb_attach(device_t parent, devic
 	 * We need to use the coherent dma tag for the GMAC.
 	 */
 	sc->sc_dmat = &bcm53xx_coherent_dma_tag;
+#if _ARM32_NEED_BUS_DMA_BOUNCE
+	if (device_cfdata(self)->cf_flags & 2) {
+		sc->sc_dmat = &bcm53xx_bounce_dma_tag;
+	}
+#endif
 
 	prop_data_t eaprop = prop_dictionary_get(dict, "mac-address");
 if (eaprop == NULL) {



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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:15:18 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c bcm53xx_pax.c bcm53xx_var.h

Log Message:
Add a bounce dmatag which only has the coherent memory region.
The coherent dmatag now always has all of memory (both coherent and normal
memory).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm53xx_board.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/broadcom/bcm53xx_pax.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm53xx_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/arch/arm/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.13 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.14
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.13	Wed Feb 13 23:09:39 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Tue Feb 19 02:15:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.13 2013/02/13 23:09:39 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.14 2013/02/19 02:15:17 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.13 2013/02/13 23:09:39 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.14 2013/02/19 02:15:17 matt Exp $");
 
 #include 
 #include 
@@ -91,11 +91,9 @@ struct arm32_dma_range bcm53xx_coherent_
 		.dr_busbase = 0x8000,
 		.dr_len = 0x1000,
 		.dr_flags = _BUS_DMAMAP_COHERENT,
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 	}, [1] = {
 		.dr_sysbase = 0x9000,
 		.dr_busbase = 0x9000,
-#endif
 	},
 };
 
@@ -107,6 +105,25 @@ struct arm32_bus_dma_tag bcm53xx_coheren
 	_BUS_DMATAG_FUNCS,
 };
 
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+struct arm32_dma_range bcm53xx_bounce_dma_ranges[] = {
+	[0] = {
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
+		.dr_len = 0x1000,
+		.dr_flags = _BUS_DMAMAP_COHERENT,
+	},
+};
+
+struct arm32_bus_dma_tag bcm53xx_bounce_dma_tag = {
+	._ranges = bcm53xx_bounce_dma_ranges,
+	._nranges = __arraycount(bcm53xx_bounce_dma_ranges),
+	_BUS_DMAMAP_FUNCS,
+	_BUS_DMAMEM_FUNCS,
+	_BUS_DMATAG_FUNCS,
+};
+#endif
+
 #ifdef BCM53XX_CONSOLE_EARLY
 #include 
 #include 
@@ -529,6 +546,8 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		bcm53xx_dma_tag._nranges = 1;
 #ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
+#else
+		bcm53xx_bounce_dma_ranges[0].dr_len = memsize;
 #endif
 	} else {
 		/*
@@ -537,12 +556,16 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 * below 256MB which for PCI and GMAC are coherent.
 		 */
 		bcm53xx_dma_ranges[1].dr_len = memsize - 0x1000;
-#ifndef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x1000;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+		bcm53xx_bounce_dma_ranges[1].dr_len = memsize - 0x1000;
 #endif
 	}
 	KASSERT(bcm53xx_dma_tag._ranges[0].dr_flags == 0);
 	KASSERT(bcm53xx_coherent_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
+	KASSERT(bcm53xx_bounce_dma_tag._ranges[0].dr_flags == _BUS_DMAMAP_COHERENT);
+#endif
 }
 
 #ifdef MULTIPROCESSOR

Index: src/sys/arch/arm/broadcom/bcm53xx_pax.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.8 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.9
--- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.8	Tue Feb 19 02:03:06 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c	Tue Feb 19 02:15:18 2013
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.8 2013/02/19 02:03:06 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.9 2013/02/19 02:15:18 matt Exp $");
 
 #include 
 #include 
@@ -202,11 +202,12 @@ bcmpax_ccb_attach(device_t parent, devic
 	cfdata_t cf = device_cfdata(self);
 
 	sc->sc_dev = self;
+	sc->sc_dmat = &bcm53xx_coherent_dma_tag;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 	if (cf->cf_flags & 2) {
-		sc->sc_dmat = &bcm53xx_coherent_dma_tag;
-	} else {
-		sc->sc_dmat = ccbaa->ccbaa_dmat;
+		sc->sc_dmat = &bcm53xx_bounce_dma_tag;
 	}
+#endif
 
 	for (u_int i = 0; i < 4; i++) {
 		snprintf(sc->sc_intrstring[i], sizeof(sc->sc_intrstring[i]),

Index: src/sys/arch/arm/broadcom/bcm53xx_var.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_var.h:1.4 src/sys/arch/arm/broadcom/bcm53xx_var.h:1.5
--- src/sys/arch/arm/broadcom/bcm53xx_var.h:1.4	Wed Oct 17 20:18:55 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_var.h	Tue Feb 19 02:15:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_var.h,v 1.4 2012/10/17 20:18:55 matt Exp $	*/
+/*	$NetBSD: bcm53xx_var.h,v 1.5 2013/02/19 02:15:18 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -115,6 +115,9 @@ uint64_t	bcm53xx_srab_read_8(u_int);
 void	bcm53xx_srab_write_4(u_int, uint32_t);
 void	bcm53xx_srab_write_8(u_int, uint64_t);
 extern struct arm32_bus_dma_tag bcm53xx_dma_tag, bcm53xx_coherent_dma_tag;
+#if

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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:04:24 UTC 2013

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

Log Message:
Turn on BUSDMA_COUNTERS and BCMETH_COUNTERS.
Add a commented out options for MEMSIZE=256


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/BCM5301X

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/BCM5301X
diff -u src/sys/arch/evbarm/conf/BCM5301X:1.10 src/sys/arch/evbarm/conf/BCM5301X:1.11
--- src/sys/arch/evbarm/conf/BCM5301X:1.10	Wed Dec 19 07:54:42 2012
+++ src/sys/arch/evbarm/conf/BCM5301X	Tue Feb 19 02:04:24 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BCM5301X,v 1.10 2012/12/19 07:54:42 msaitoh Exp $
+#	$NetBSD: BCM5301X,v 1.11 2013/02/19 02:04:24 matt Exp $
 #
 #	BCM5301X -- Broadcom BCM5301X Eval Board Kernel
 #
@@ -21,10 +21,13 @@ options 	RTC_OFFSET=0	# hardware clock i
 options 	UVMHIST
 #options 	UVMHIST_PRINT,A9WDT_PERIOD_DEFAULT=30
 options 	BCM53XX_CONSOLE_EARLY
+options 	BCMETH_COUNTERS
 #options 	MULTIPROCESSOR
 options 	CPU_CORTEXA9
+#options 	MEMSIZE=256
 options 	BCM5301
 options 	PMAPCOUNTERS
+options 	BUSDMA_COUNTERS
 
 # Architecture options
 
@@ -198,7 +201,7 @@ com*		at bcmcca? channel 1
 
 # ChipCommonB Peripherals
 bcmccb0		at mainbus?		# ChipCommonB
-bcmpax*		at bcmccb? port ? flags 1
+bcmpax*		at bcmccb? port ? flags 2 # use bounce buffers
 pci*		at bcmpax?
 ppb*		at pci? dev ? function ?
 pci*		at ppb?



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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 02:03:07 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_pax.c

Log Message:
Use a bit in cf_flags to decide whether to use bounce buffers or not.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/broadcom/bcm53xx_pax.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/broadcom/bcm53xx_pax.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.7 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.8
--- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.7	Wed Oct 17 20:18:55 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c	Tue Feb 19 02:03:06 2013
@@ -34,7 +34,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.7 2012/10/17 20:18:55 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.8 2013/02/19 02:03:06 matt Exp $");
 
 #include 
 #include 
@@ -199,10 +199,14 @@ bcmpax_ccb_attach(device_t parent, devic
 	struct bcmccb_attach_args * const ccbaa = aux;
 	const struct bcm_locators * const loc = &ccbaa->ccbaa_loc;
 	const char * const xname = device_xname(self);
+	cfdata_t cf = device_cfdata(self);
 
 	sc->sc_dev = self;
-	//sc->sc_dmat = ccbaa->ccbaa_dmat;
-	sc->sc_dmat = &bcm53xx_coherent_dma_tag;
+	if (cf->cf_flags & 2) {
+		sc->sc_dmat = &bcm53xx_coherent_dma_tag;
+	} else {
+		sc->sc_dmat = ccbaa->ccbaa_dmat;
+	}
 
 	for (u_int i = 0; i < 4; i++) {
 		snprintf(sc->sc_intrstring[i], sizeof(sc->sc_intrstring[i]),
@@ -293,7 +297,7 @@ bcmpax_ccb_attach(device_t parent, devic
 	/*
 	 * This will force the device to negotiate to a max of gen1.
 	 */
-	if (device_cfdata(self)->cf_flags & 1) {
+	if (cf->cf_flags & 1) {
 		bcmpax_conf_write(sc, 0, offset + PCI_PCIE_LCSR2, 1); 
 	}
 



CVS commit: src/sys/sys

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 19 00:56:25 UTC 2013

Modified Files:
src/sys/sys: kernhist.h

Log Message:
Add KERNHIST_CALLARGS and make the delay tunable (KERNHIST_DELAY)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/kernhist.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/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.5 src/sys/sys/kernhist.h:1.6
--- src/sys/sys/kernhist.h:1.5	Mon Jul 30 23:56:48 2012
+++ src/sys/sys/kernhist.h	Tue Feb 19 00:56:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernhist.h,v 1.5 2012/07/30 23:56:48 matt Exp $	*/
+/*	$NetBSD: kernhist.h,v 1.6 2013/02/19 00:56:25 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -97,6 +97,7 @@ LIST_HEAD(kern_history_head, kern_histor
 #define KERNHIST_INIT(NAME,N)
 #define KERNHIST_INIT_STATIC(NAME,BUF)
 #define KERNHIST_LOG(NAME,FMT,A,B,C,D)
+#define KERNHIST_CALLARGS(NAME,FMT,A,B,C,D)
 #define KERNHIST_CALLED(NAME)
 #define KERNHIST_FUNC(FNAME)
 #define kernhist_dump(NAME)
@@ -132,13 +133,18 @@ do { \
 	LIST_INSERT_HEAD(&kern_histories, &(NAME), list); \
 } while (/*CONSTCOND*/ 0)
 
+#ifndef KERNHIST_DELAY
+#define KERNHIST_DELAY	10
+#endif
+
 #if defined(KERNHIST_PRINT)
 extern int kernhist_print_enabled;
 #define KERNHIST_PRINTNOW(E) \
 do { \
 		if (kernhist_print_enabled) { \
 			kernhist_entry_print(E); \
-			DELAY(10); \
+			if (KERNHISTDELAY != 0) \
+DELAY(KERNHIST_DELAY); \
 		} \
 } while (/*CONSTCOND*/ 0)
 #else
@@ -174,10 +180,20 @@ do { \
 	KERNHIST_LOG(NAME, "called!", 0, 0, 0, 0); \
 } while (/*CONSTCOND*/ 0)
 
+/*
+ * This extends kernhist to avoid wasting a separate "called!" entry on every
+ * function.
+ */
+#define KERNHIST_CALLARGS(NAME, FMT, A, B, C, D) \
+do { \
+	_kernhist_call = atomic_inc_uint_nv(&_kernhist_cnt); \
+	KERNHIST_LOG(NAME, "called: "FMT, (A), (B), (C), (D)); \
+} while (/*CONSTCOND*/ 0)
+
 #define KERNHIST_FUNC(FNAME) \
 	static unsigned int _kernhist_cnt = 0; \
 	static const char *const _kernhist_name = FNAME; \
-	int _kernhist_call = 0;
+	unsigned int _kernhist_call = 0;
 
 static inline void kernhist_entry_print(const struct kern_history_ent *);
 



CVS commit: src/tests/kernel

2013-02-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Feb 19 00:54:48 UTC 2013

Modified Files:
src/tests/kernel: t_lockf.c

Log Message:
Wait a little bit after fork()ing the lockers to give them a chance to
get started before trying to ptrace(ATTACH).  Otherwise, the traced
process doesn't seem to resume properly upon ptrace(DETACH) and on the
next pass the ptrace(ATTACH) just hangs forever, causing the test to
time-out.

XXX The failure-to-resume-properly might actually be a kernel bug that
we need to follow up on.  But for now, let's make the test work as
intended.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/t_lockf.c

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

Modified files:

Index: src/tests/kernel/t_lockf.c
diff -u src/tests/kernel/t_lockf.c:1.2 src/tests/kernel/t_lockf.c:1.3
--- src/tests/kernel/t_lockf.c:1.2	Mon Feb 18 20:59:19 2013
+++ src/tests/kernel/t_lockf.c	Tue Feb 19 00:54:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_lockf.c,v 1.2 2013/02/18 20:59:19 pgoyette Exp $	*/
+/*	$NetBSD: t_lockf.c,v 1.3 2013/02/19 00:54:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -148,6 +148,7 @@ ATF_TC_BODY(randlock, tc)
 			break;
 		}
 	}
+	usleep(sleeptime/10);
 	for (j=0; j<100; j++) {
 		printf("parent: run %i\n", j+1);
 		for (i=0; i

CVS commit: src/usr.sbin/npf/npftest/libnpftest

2013-02-18 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Feb 18 23:09:20 UTC 2013

Modified Files:
src/usr.sbin/npf/npftest/libnpftest: npf_rule_test.c

Log Message:
npftest/npf_blockall_rule: set NPF_RULE_DYNAMIC flag for the test rule.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.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.sbin/npf/npftest/libnpftest/npf_rule_test.c
diff -u src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.6 src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.7
--- src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c:1.6	Sat Feb 16 21:11:16 2013
+++ src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.c	Mon Feb 18 23:09:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_rule_test.c,v 1.6 2013/02/16 21:11:16 rmind Exp $	*/
+/*	$NetBSD: npf_rule_test.c,v 1.7 2013/02/18 23:09:20 rmind Exp $	*/
 
 /*
  * NPF ruleset test.
@@ -120,7 +120,7 @@ npf_blockall_rule(void)
 
 	rldict = prop_dictionary_create();
 	prop_dictionary_set_uint32(rldict, "attributes",
-	NPF_RULE_IN | NPF_RULE_OUT);
+	NPF_RULE_IN | NPF_RULE_OUT | NPF_RULE_DYNAMIC);
 	return npf_rule_alloc(rldict);
 }
 



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 22:01:30 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 831.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.103 src/doc/CHANGES-6.1:1.1.2.104
--- src/doc/CHANGES-6.1:1.1.2.103	Mon Feb 18 19:06:28 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 22:01:29 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.103 2013/02/18 19:06:28 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.104 2013/02/18 22:01:29 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8562,3 +8562,9 @@ sbin/atactl/atactl.c1.69
 	Decode 6Gbps signaling SATA capability in IDENTIFY DEVICE data.
 	[jakllsch, ticket #830]
 
+sys/kern/uipc_syscalls.c			1.159
+sys/kern/uipc_usrreq.c1.141
+
+	Fix various problems in cmsg file descriptor handling.
+	[riastradh, ticket #831]
+



CVS commit: [netbsd-6] src/sys/kern

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 22:00:49 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_syscalls.c uipc_usrreq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #831):
sys/kern/uipc_usrreq.c: revision 1.141
sys/kern/uipc_syscalls.c: revision 1.159
Fix some screw cases in cmsg file descriptor passing.
- Don't leave garbage in the control buffer if allocating file
descriptors fails in unp_externalize.
- Scrub the space between CMSG_LEN and CMSG_SPACE to avoid kernel
memory disclosure in unp_externalize.
- Don't read past cmsg_len when closing file descriptors that
couldn't get delivered, in free_rights.
ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.154.2.3 -r1.154.2.4 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.136.8.2 -r1.136.8.3 src/sys/kern/uipc_usrreq.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/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.154.2.3 src/sys/kern/uipc_syscalls.c:1.154.2.4
--- src/sys/kern/uipc_syscalls.c:1.154.2.3	Thu Feb 14 22:13:59 2013
+++ src/sys/kern/uipc_syscalls.c	Mon Feb 18 22:00:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.154.2.4 2013/02/18 22:00:49 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.154.2.4 2013/02/18 22:00:49 riz Exp $");
 
 #include "opt_pipe.h"
 
@@ -742,17 +742,21 @@ sys_recvmsg(struct lwp *l, const struct 
 static void
 free_rights(struct mbuf *m)
 {
-	int nfd;
-	int i;
+	struct cmsghdr *cm;
 	int *fdv;
+	unsigned int nfds, i;
 
-	nfd = m->m_len < CMSG_SPACE(sizeof(int)) ? 0
-	: (m->m_len - CMSG_SPACE(sizeof(int))) / sizeof(int) + 1;
-	fdv = (int *) CMSG_DATA(mtod(m,struct cmsghdr *));
-	for (i = 0; i < nfd; i++) {
+	KASSERT(sizeof(*cm) <= m->m_len);
+	cm = mtod(m, struct cmsghdr *);
+
+	KASSERT(CMSG_ALIGN(sizeof(*cm)) <= cm->cmsg_len);
+	KASSERT(cm->cmsg_len <= m->m_len);
+	nfds = (cm->cmsg_len - CMSG_ALIGN(sizeof(*cm))) / sizeof(int);
+	fdv = (int *)CMSG_DATA(cm);
+
+	for (i = 0; i < nfds; i++)
 		if (fd_getfile(fdv[i]) != NULL)
 			(void)fd_close(fdv[i]);
-	}
 }
 
 void

Index: src/sys/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.136.8.2 src/sys/kern/uipc_usrreq.c:1.136.8.3
--- src/sys/kern/uipc_usrreq.c:1.136.8.2	Tue Oct  9 23:45:21 2012
+++ src/sys/kern/uipc_usrreq.c	Mon Feb 18 22:00:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.136.8.2 2012/10/09 23:45:21 riz Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.136.8.3 2013/02/18 22:00:49 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136.8.2 2012/10/09 23:45:21 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136.8.3 2013/02/18 22:00:49 riz Exp $");
 
 #include 
 #include 
@@ -1336,14 +1336,24 @@ unp_externalize(struct mbuf *rights, str
 	}
  out:
 	if (__predict_false(error != 0)) {
-		rp = (file_t **)CMSG_DATA(cm);
-		for (size_t i = 0; i < nfds; i++) {
-			file_t * const fp = *rp;
-			*rp++ = 0;
-			unp_discard_now(fp);
-		}
+		file_t **const fpp = (file_t **)CMSG_DATA(cm);
+		for (size_t i = 0; i < nfds; i++)
+			unp_discard_now(fpp[i]);
+		/*
+		 * Truncate the array so that nobody will try to interpret
+		 * what is now garbage in it.
+		 */
+		cm->cmsg_len = CMSG_LEN(0);
+		rights->m_len = CMSG_SPACE(0);
 	}
 
+	/*
+	 * Don't disclose kernel memory in the alignment space.
+	 */
+	KASSERT(cm->cmsg_len <= rights->m_len);
+	memset(&mtod(rights, char *)[cm->cmsg_len], 0, rights->m_len -
+	cm->cmsg_len);
+
 	rw_exit(&p->p_cwdi->cwdi_lock);
 	kmem_free(fdp, nfds * sizeof(int));
 	return error;



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/evp

2013-02-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 18 21:20:50 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c

Log Message:
Touch e_aes.c to force a rebuild with new compiler flags for AES-NI.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.1.1.4 src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c:1.1.1.4	Tue Feb  5 19:04:44 2013
+++ src/crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c	Mon Feb 18 21:20:50 2013
@@ -48,6 +48,13 @@
  *
  */
 
+/*
+ * [This comment is a kludge to force e_aes.o to be rebuilt after
+ * changes to the makefiles to fix AES-NI support.  You may safely
+ * remove this comment to reduce the diffs from upstream OpenSSL.
+ * --riastradh, 2013-02-18]
+ */
+
 #include 
 #ifndef OPENSSL_NO_AES
 #include 



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2013-02-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Feb 18 21:15:25 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: evp.inc modes.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: aes.inc

Log Message:
Fix build goo for OpenSSL AES-NI support.

OpenSSL now supports AES-NI in evp, not in an engine.  We can now get
rid of the no longer maintained aesni engine, which was broken last
summer.  Not only can OpenSSL now use AES-NI for everything it did
before we broke it last summer, but it can also use AES-NI for more
encryption modes than before, such as CTR.

Tested on amd64, both vanilla and in an i386 chroot.

ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc:1.4	Tue Feb  5 23:38:46 2013
+++ src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc	Mon Feb 18 21:15:25 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: evp.inc,v 1.4 2013/02/05 23:38:46 christos Exp $
+#	$NetBSD: evp.inc,v 1.5 2013/02/18 21:15:25 riastradh Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -25,3 +25,14 @@ SRCS += ${EVP_SRCS}
 .for cryptosrc in ${EVP_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/evp
 .endfor
+
+EVP_AES_SRCS = e_aes.c
+
+# XXX Should do this too, but it requires some other asm changes.
+#EVP_AES_SRCS += e_aes_cbc_hmac_sha1.c
+
+.for cryptosrc in ${EVP_AES_SRCS}
+CPPFLAGS.${cryptosrc} += ${AESCPPFLAGS}
+.endfor
+
+CPPFLAGS.e_aes.c += -I${OPENSSLSRC}/crypto/modes

Index: src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc:1.2	Thu Jul 26 19:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc	Mon Feb 18 21:15:25 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: modes.inc,v 1.2 2012/07/26 19:58:40 christos Exp $
+#	$NetBSD: modes.inc,v 1.3 2013/02/18 21:15:25 riastradh Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -16,4 +16,3 @@ SRCS += ${MODES_SRCS}
 .for cryptosrc in ${MODES_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/modes
 .endfor
-CPPFLAGS.e_aes.c = -I${OPENSSLSRC}/crypto/modes

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc:1.2	Tue Jul  5 16:53:58 2011
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc	Mon Feb 18 21:15:25 2013
@@ -1,5 +1,5 @@
 .PATH.S: ${.PARSEDIR}
-AES_SRCS = aes-586.S aesni-586.S
+AES_SRCS = aes-586.S aesni-x86.S
 AESNI = yes
 AESCPPFLAGS = -DAES_ASM -DOPENSSL_IA32_SSE2
 .include "../../aes.inc"



CVS commit: src/tests/kernel

2013-02-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Feb 18 20:59:19 UTC 2013

Modified Files:
src/tests/kernel: t_lockf.c

Log Message:
Check that we did get EDEADLK error, and fail immediately if we did not.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/t_lockf.c

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

Modified files:

Index: src/tests/kernel/t_lockf.c
diff -u src/tests/kernel/t_lockf.c:1.1 src/tests/kernel/t_lockf.c:1.2
--- src/tests/kernel/t_lockf.c:1.1	Wed Nov  7 14:00:38 2012
+++ src/tests/kernel/t_lockf.c	Mon Feb 18 20:59:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_lockf.c,v 1.1 2012/11/07 14:00:38 pgoyette Exp $	*/
+/*	$NetBSD: t_lockf.c,v 1.2 2013/02/18 20:59:19 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -230,7 +230,7 @@ ATF_TC_BODY(deadlock, tc)
 	sleep(1);	/* give child time to grab its lock then block */
 
 	error = dolock(fd, F_LOCK, 1, 1);
-	ATF_CHECK_MSG(error != EDEADLK, "parent did not deadlock: %s",
+	ATF_REQUIRE_MSG(error == EDEADLK, "parent did not detect deadlock: %s",
 	strerror(errno));
 	ret = kill(pid, SIGKILL);
 	ATF_REQUIRE_MSG(ret != -1, "failed to kill child: %s", strerror(errno));



CVS commit: src/tools/llvm

2013-02-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb 18 20:30:16 UTC 2013

Modified Files:
src/tools/llvm: Makefile.inc

Log Message:
Explicitly include bsd.own.mk to allow building without tool make.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/llvm/Makefile.inc

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

Modified files:

Index: src/tools/llvm/Makefile.inc
diff -u src/tools/llvm/Makefile.inc:1.1 src/tools/llvm/Makefile.inc:1.2
--- src/tools/llvm/Makefile.inc:1.1	Sun Feb  6 01:14:11 2011
+++ src/tools/llvm/Makefile.inc	Mon Feb 18 20:30:16 2013
@@ -1,3 +1,5 @@
-#	$NetBSD: Makefile.inc,v 1.1 2011/02/06 01:14:11 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2013/02/18 20:30:16 joerg Exp $
+
+.include 
 
 LLVM_TOPLEVEL=	${NETBSDSRCDIR}/external/bsd/llvm



CVS commit: src/sys/dev/raidframe

2013-02-18 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Mon Feb 18 19:42:55 UTC 2013

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Fix a few spelling issues.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.298 src/sys/dev/raidframe/rf_netbsdkintf.c:1.299
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.298	Thu Aug  9 23:53:25 2012
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Mon Feb 18 19:42:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.298 2012/08/09 23:53:25 buhrow Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.299 2013/02/18 19:42:54 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.298 2012/08/09 23:53:25 buhrow Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.299 2013/02/18 19:42:54 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -421,7 +421,7 @@ rf_autoconfig(device_t self)
 	config_sets = rf_create_auto_sets(ac_list);
 
 	/*
-	 * 3. Evaluate each set andconfigure the valid ones.
+	 * 3. Evaluate each set and configure the valid ones.
 	 * This gets done in rf_buildroothack().
 	 */
 	rf_buildroothack(config_sets);
@@ -1424,7 +1424,7 @@ raidioctl(dev_t dev, u_long cmd, void *d
 		rf_ds_reconstructing) {
 			printf("raid%d: Unable to reconstruct to disk at:\n",
 			   raidPtr->raidid);
-			printf("raid%d:Col: %d   Reconstruction already occuring!\n", raidPtr->raidid, column);
+			printf("raid%d:Col: %d   Reconstruction already occurring!\n", raidPtr->raidid, column);
 
 			rf_unlock_mutex2(raidPtr->mutex);
 			return (EINVAL);
@@ -3253,7 +3253,7 @@ rf_reasonable_label(RF_ComponentLabel_t 
  * For reasons yet unknown, some old component labels have garbage in
  * the newer numBlocksHi region, and this causes lossage.  Since those
  * disks will also have numsecs set to less than 32 bits of sectors,
- * we can determine when this corruption has occured, and fix it.
+ * we can determine when this corruption has occurred, and fix it.
  *
  * The exact same problem, with the same unknown reason, happens to
  * the partitionSizeHi member as well.
@@ -3388,7 +3388,7 @@ rf_does_it_fit(RF_ConfigSet_t *cset, RF_
 	/* note that we are not checking partitionSize here..
 
 	   Note that we are also not checking the mod_counters here.
-	   If everything else matches execpt the mod_counter, that's
+	   If everything else matches except the mod_counter, that's
 	   good enough for this test.  We will deal with the mod_counters
 	   a little later in the autoconfiguration process.
 



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 19:06:28 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 830.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.102 src/doc/CHANGES-6.1:1.1.2.103
--- src/doc/CHANGES-6.1:1.1.2.102	Mon Feb 18 18:26:51 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 19:06:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.102 2013/02/18 18:26:51 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.103 2013/02/18 19:06:28 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8557,3 +8557,8 @@ usr.sbin/npf/npftest/libnpftest/npf_rule
 	incremented 64-bit counter.
 	[rmind, ticket #829]
 
+sbin/atactl/atactl.c1.69
+
+	Decode 6Gbps signaling SATA capability in IDENTIFY DEVICE data.
+	[jakllsch, ticket #830]
+



CVS commit: [netbsd-6] src/sbin/atactl

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 19:06:10 UTC 2013

Modified Files:
src/sbin/atactl [netbsd-6]: atactl.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #830):
sbin/atactl/atactl.c: revision 1.69
Decode 6Gbps signaling SATA capability in IDENTIFY DEVICE data.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.4.1 src/sbin/atactl/atactl.c

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

Modified files:

Index: src/sbin/atactl/atactl.c
diff -u src/sbin/atactl/atactl.c:1.66 src/sbin/atactl/atactl.c:1.66.4.1
--- src/sbin/atactl/atactl.c:1.66	Mon Oct 31 15:26:11 2011
+++ src/sbin/atactl/atactl.c	Mon Feb 18 19:06:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: atactl.c,v 1.66 2011/10/31 15:26:11 jakllsch Exp $	*/
+/*	$NetBSD: atactl.c,v 1.66.4.1 2013/02/18 19:06:10 riz Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: atactl.c,v 1.66 2011/10/31 15:26:11 jakllsch Exp $");
+__RCSID("$NetBSD: atactl.c,v 1.66.4.1 2013/02/18 19:06:10 riz Exp $");
 #endif
 
 
@@ -235,6 +235,7 @@ static const struct bitinfo ata_cmd_ext[
 static const struct bitinfo ata_sata_caps[] = {
 	{ SATA_SIGNAL_GEN1, "1.5Gb/s signaling" },
 	{ SATA_SIGNAL_GEN2, "3.0Gb/s signaling" },
+	{ SATA_SIGNAL_GEN3, "6.0Gb/s signaling" },
 	{ SATA_NATIVE_CMDQ, "Native Command Queuing" },
 	{ SATA_HOST_PWR_MGMT, "Host-Initiated Interface Power Management" },
 	{ SATA_PHY_EVNT_CNT, "PHY Event Counters" },



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:26:51 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Tickets 828,829


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.101 src/doc/CHANGES-6.1:1.1.2.102
--- src/doc/CHANGES-6.1:1.1.2.101	Mon Feb 18 18:13:39 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 18:26:51 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.101 2013/02/18 18:13:39 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.102 2013/02/18 18:26:51 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8536,3 +8536,24 @@ sys/dev/usb/dwc_otgvar.h			1.12 via patc
 	Avoid races between the workqueue and aborting.
 	[skrll, ticket #827]
 
+external/gpl3/gdb/dist/gdb/nbsd-thread.c	1.17
+
+	Fix "gdb -p N" when N is a threaded process.
+	[martin, ticket #828]
+
+lib/libnpf/npf.c1.18
+lib/libnpf/npf.h1.15
+sys/net/npf/npf_ctl.c1.23
+sys/net/npf/npf_impl.h1.28
+sys/net/npf/npf_ruleset.c			1.19
+usr.sbin/npf/npfctl/npf_build.c			1.21
+usr.sbin/npf/npfctl/npf_disassemble.c		1.17
+usr.sbin/npf/npfctl/npfctl.8			1.13
+usr.sbin/npf/npfctl/npfctl.c			1.31
+usr.sbin/npf/npfctl/npfctl.h			1.27
+usr.sbin/npf/npftest/libnpftest/npf_rule_test.c	1.6
+
+	Fix some NPF bugs, and convert dynamic rule ID to an
+	incremented 64-bit counter.
+	[rmind, ticket #829]
+



CVS commit: [netbsd-6] src

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:26:15 UTC 2013

Modified Files:
src/lib/libnpf [netbsd-6]: npf.c npf.h
src/sys/net/npf [netbsd-6]: npf_ctl.c npf_impl.h npf_ruleset.c
src/usr.sbin/npf/npfctl [netbsd-6]: npf_build.c npf_disassemble.c
npfctl.8 npfctl.c npfctl.h
src/usr.sbin/npf/npftest/libnpftest [netbsd-6]: npf_rule_test.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #829):
usr.sbin/npf/npfctl/npfctl.8: revision 1.13
usr.sbin/npf/npfctl/npf_build.c: revision 1.21
lib/libnpf/npf.c: revision 1.18
sys/net/npf/npf_ctl.c: revision 1.23
usr.sbin/npf/npfctl/npfctl.h: revision 1.27
lib/libnpf/npf.h: revision 1.15
sys/net/npf/npf_ruleset.c: revision 1.19
sys/net/npf/npf_impl.h: revision 1.28
usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.17
usr.sbin/npf/npfctl/npfctl.c: revision 1.31
usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.6
- Convert NPF dynamic rule ID to just incremented 64-bit counter.
- Fix multiple bugs.  Also, update the man page.


To generate a diff of this commit:
cvs rdiff -u -r1.7.2.9 -r1.7.2.10 src/lib/libnpf/npf.c
cvs rdiff -u -r1.6.2.7 -r1.6.2.8 src/lib/libnpf/npf.h
cvs rdiff -u -r1.12.2.8 -r1.12.2.9 src/sys/net/npf/npf_ctl.c
cvs rdiff -u -r1.10.2.13 -r1.10.2.14 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/sys/net/npf/npf_ruleset.c
cvs rdiff -u -r1.4.2.11 -r1.4.2.12 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.3.2.11 -r1.3.2.12 src/usr.sbin/npf/npfctl/npf_disassemble.c
cvs rdiff -u -r1.6.6.5 -r1.6.6.6 src/usr.sbin/npf/npfctl/npfctl.8
cvs rdiff -u -r1.10.2.14 -r1.10.2.15 src/usr.sbin/npf/npfctl/npfctl.c
cvs rdiff -u -r1.11.2.12 -r1.11.2.13 src/usr.sbin/npf/npfctl/npfctl.h
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 \
src/usr.sbin/npf/npftest/libnpftest/npf_rule_test.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/libnpf/npf.c
diff -u src/lib/libnpf/npf.c:1.7.2.9 src/lib/libnpf/npf.c:1.7.2.10
--- src/lib/libnpf/npf.c:1.7.2.9	Mon Feb 11 21:49:48 2013
+++ src/lib/libnpf/npf.c	Mon Feb 18 18:26:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.c,v 1.7.2.9 2013/02/11 21:49:48 riz Exp $	*/
+/*	$NetBSD: npf.c,v 1.7.2.10 2013/02/18 18:26:14 riz Exp $	*/
 
 /*-
  * Copyright (c) 2010-2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.7.2.9 2013/02/11 21:49:48 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.7.2.10 2013/02/18 18:26:14 riz Exp $");
 
 #include 
 #include 
@@ -263,25 +263,23 @@ _npf_prop_array_lookup(prop_array_t arra
  */
 
 int
-npf_ruleset_add(int fd, const char *rname, nl_rule_t *rl, uintptr_t *id)
+npf_ruleset_add(int fd, const char *rname, nl_rule_t *rl, uint64_t *id)
 {
 	prop_dictionary_t rldict = rl->nrl_dict;
 	prop_dictionary_t ret;
-	uint64_t id64;
 	int error;
 
 	prop_dictionary_set_cstring(rldict, "ruleset-name", rname);
 	prop_dictionary_set_uint32(rldict, "command", NPF_CMD_RULE_ADD);
 	error = prop_dictionary_sendrecv_ioctl(rldict, fd, IOC_NPF_RULE, &ret);
 	if (!error) {
-		prop_dictionary_get_uint64(ret, "id", &id64);
-		*id = (uintptr_t)id64;
+		prop_dictionary_get_uint64(ret, "id", id);
 	}
 	return error;
 }
 
 int
-npf_ruleset_remove(int fd, const char *rname, uintptr_t id)
+npf_ruleset_remove(int fd, const char *rname, uint64_t id)
 {
 	prop_dictionary_t rldict;
 
@@ -291,8 +289,7 @@ npf_ruleset_remove(int fd, const char *r
 	}
 	prop_dictionary_set_cstring(rldict, "ruleset-name", rname);
 	prop_dictionary_set_uint32(rldict, "command", NPF_CMD_RULE_REMOVE);
-	__CTASSERT(sizeof(uintptr_t) <= sizeof(uint64_t));
-	prop_dictionary_set_uint64(rldict, "id", (uint64_t)id);
+	prop_dictionary_set_uint64(rldict, "id", id);
 	return prop_dictionary_send_ioctl(rldict, fd, IOC_NPF_RULE);
 }
 

Index: src/lib/libnpf/npf.h
diff -u src/lib/libnpf/npf.h:1.6.2.7 src/lib/libnpf/npf.h:1.6.2.8
--- src/lib/libnpf/npf.h:1.6.2.7	Mon Feb 11 21:49:48 2013
+++ src/lib/libnpf/npf.h	Mon Feb 18 18:26:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.6.2.7 2013/02/11 21:49:48 riz Exp $	*/
+/*	$NetBSD: npf.h,v 1.6.2.8 2013/02/18 18:26:14 riz Exp $	*/
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -79,8 +79,8 @@ void		npf_config_destroy(nl_config_t *);
 nl_config_t *	npf_config_retrieve(int, bool *, bool *);
 int		npf_config_flush(int);
 
-int		npf_ruleset_add(int, const char *, nl_rule_t *, uintptr_t *);
-int		npf_ruleset_remove(int, const char *, uintptr_t);
+int		npf_ruleset_add(int, const char *, nl_rule_t *, uint64_t *);
+int		npf_ruleset_remove(int, const char *, uint64_t);
 int		npf_ruleset_remkey(int, const char *, const void *, size_t);
 int		npf_ruleset_flush(int, const char *);
 

Index: src/sys/net/npf/npf_ctl.c
diff -u src/sys/net/npf/npf_ctl.c:1.12.2.8 src/sys/net/npf/npf_ctl.c:1.12.2.9
--- 

CVS commit: [netbsd-6] src/external/gpl3/gdb/dist/gdb

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:24:00 UTC 2013

Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-6]: nbsd-thread.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #828):
external/gpl3/gdb/dist/gdb/nbsd-thread.c: revision 1.17
When searching for an active thread (e.g. right after switching to threaded
mode), if no lwp is signaled, just stay with the current (inferior_ptid.lwp).
This fixes gdb -p to a threaded process with all threads active.
Previously we eroneously restored an lwp of 0 (returned as sentinel from
ptrace) to inferior_ptid.lwp, which then would not match any thread in
thread_list and caused assertion failures.


To generate a diff of this commit:
cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/external/gpl3/gdb/dist/gdb/nbsd-thread.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/gpl3/gdb/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.9.2.1 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.9.2.2
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.9.2.1	Tue Apr 24 19:38:35 2012
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Mon Feb 18 18:24:00 2013
@@ -282,6 +282,9 @@ find_active_thread (void)
   while ((val != -1) && (pl.pl_lwpid != 0) &&
 	 (pl.pl_event != PL_EVENT_SIGNAL))
 	val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)&pl, sizeof(pl));
+  if (pl.pl_lwpid == 0)
+	/* found no "active" thread, stay with current */
+	pl.pl_lwpid = inferior_ptid.lwp;
 }
   else
 {



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:13:39 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Tickets 825-827


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.100 src/doc/CHANGES-6.1:1.1.2.101
--- src/doc/CHANGES-6.1:1.1.2.100	Mon Feb 18 17:59:33 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 18:13:39 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.100 2013/02/18 17:59:33 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.101 2013/02/18 18:13:39 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8511,3 +8511,28 @@ sys/dev/pci/if_wm.c1.235-1.236 via p
 	non-64bit platforms.
 	[msaitoh, ticket #823]
 
+sys/dev/pci/if_wm.c1.240-1.242
+sys/dev/pci/if_wmreg.h1.49
+
+	Skip 64-bit BAR correctly, add some debugging and fix
+	RAL_TABSIZE for ICH8, 82576, 82580 and I350.
+	[msaitoh, ticket #824]
+
+lib/libc/arch/sparc64/softfloat/qp.c		1.10
+
+	Fix conversions from long double floats to integral types.
+	PR#47535.
+	[martin, ticket #825]
+
+lib/libc/arch/sparc64/gen/fpsetround.c		1.6
+
+	Make fpsetround update the softfloat rounding mode when
+	using softfloat for 128 bit long double values.
+	[martin, ticket #826]
+
+sys/dev/usb/dwc_otg.c1.46 via patch
+sys/dev/usb/dwc_otgvar.h			1.12 via patch
+
+	Avoid races between the workqueue and aborting.
+	[skrll, ticket #827]
+



CVS commit: [netbsd-6] src/sys/dev/usb

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:13:06 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: dwc_otg.c dwc_otgvar.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #827):
sys/dev/usb/dwc_otg.c: revision 1.46
sys/dev/usb/dwc_otgvar.h: revision 1.12
Track transfer state better to avoid races between the workqueue and
aborting.


To generate a diff of this commit:
cvs rdiff -u -r1.45.2.3 -r1.45.2.4 src/sys/dev/usb/dwc_otg.c
cvs rdiff -u -r1.11.2.3 -r1.11.2.4 src/sys/dev/usb/dwc_otgvar.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/dev/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.45.2.3 src/sys/dev/usb/dwc_otg.c:1.45.2.4
--- src/sys/dev/usb/dwc_otg.c:1.45.2.3	Fri Feb 15 08:21:21 2013
+++ src/sys/dev/usb/dwc_otg.c	Mon Feb 18 18:13:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.45.2.3 2013/02/15 08:21:21 msaitoh Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.45.2.4 2013/02/18 18:13:05 riz Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.45.2.3 2013/02/15 08:21:21 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.45.2.4 2013/02/18 18:13:05 riz Exp $");
 
 #include 
 #include 
@@ -411,13 +411,20 @@ dwc_otg_softintr(void *v)
 
 	mutex_spin_enter(&sc->sc_intr_lock);
 	while ((dxfer = TAILQ_FIRST(&sc->sc_complete)) != NULL) {
-		TAILQ_REMOVE(&sc->sc_complete, dxfer, xnext);
+		KASSERT(dxfer->state == DXFER_COMPLETING);
 
+		/*
+		 * dwc_otg_abort_xfer will remove this transfer from the
+		 * sc_complete queue
+		 */
 		if (dxfer->xfer.hcflags & UXFER_ABORTING) {
 			wakeup(&dxfer->xfer.hcflags);
 			continue;
 		}
 
+		TAILQ_REMOVE(&sc->sc_complete, dxfer, xnext);
+		dxfer->state = DXFER_DONE;
+
 		mutex_spin_exit(&sc->sc_intr_lock);
 		usb_transfer_complete(&dxfer->xfer);
 		mutex_spin_enter(&sc->sc_intr_lock);
@@ -616,9 +623,23 @@ dwc_otg_abort_xfer(usbd_xfer_handle xfer
 	xfer->status = status;	/* make software ignore it */
 	callout_stop(&xfer->timeout_handle);
 
-	if (dxfer->active) {
+	switch (dxfer->state) {
+	case DXFER_INIT:
+		dxfer->state = DXFER_ABORTING;
+		break;
+	case DXFER_WORKQ:
+		/* Give the workqueue a chance */
+		break;
+	case DXFER_ACTIVE:
 		TAILQ_REMOVE(&sc->sc_active, dxfer, xnext);
-		dxfer->active = false;
+		dxfer->state = DXFER_ABORTING;
+		break;
+	case DXFER_COMPLETING:
+		TAILQ_REMOVE(&sc->sc_complete, dxfer, xnext);
+		dxfer->state = DXFER_ABORTING;
+		break;
+	default:
+		KASSERT(false);
 	}
 	mutex_spin_exit(&sc->sc_intr_lock);
 
@@ -626,10 +647,11 @@ dwc_otg_abort_xfer(usbd_xfer_handle xfer
 		dwc_otg_host_channel_free(dxfer->td_transfer_cache);
 	}
 
-	while (dxfer->queued) {
-		wakeup(&xfer->hcflags);
+	while (dxfer->state != DXFER_ABORTING) {
+		tsleep(&xfer->hcflags, PZERO, "dotgxw", 0);
 	}
 
+	dxfer->state = DXFER_DONE;
 	/*
 	 * Step 2: Execute callback.
 	 */
@@ -1598,15 +1620,15 @@ dwc_otg_worker(struct work *wk, void *pr
 		dwc_otg_timer(sc);
 	} else {
 		KASSERT(dwork->xfer != NULL);
-		KASSERT(dxfer->queued == true);
+		KASSERT(dxfer->state == DXFER_WORKQ);
 
 		if (!(xfer->hcflags & UXFER_ABORTING)) {
 			dwc_otg_start_standard_chain(xfer);
+		} else {
+			dxfer->state = DXFER_ABORTING;
+			wakeup(&xfer->hcflags);
 		}
-		dxfer->queued = false;
-		wakeup(&xfer->hcflags);
 	}
-
 }
 
 int dwc_otg_intr(void *p)
@@ -3778,7 +3800,7 @@ dwc_otg_setup_standard_chain(usbd_xfer_h
 
 // 	DPRINTF(("%s: xfer->length %d\n", __func__, xfer->length));
 
-	dxfer->queued = false;
+	dxfer->state = DXFER_INIT;
 
 	/* get first again */
 	td = dxfer->td_transfer_first;
@@ -3887,11 +3909,13 @@ dwc_otg_start_standard_chain(usbd_xfer_h
 
 	/* poll one time - will turn on interrupts */
 	mutex_spin_enter(&sc->sc_intr_lock);
+	dxfer->state = DXFER_STARTED;
+
 	if (dwc_otg_xfer_do_fifo(xfer)) {
 
 		/* put transfer on interrupt queue */
 
-		dxfer->active = true;
+		dxfer->state = DXFER_ACTIVE;
 		TAILQ_INSERT_TAIL(&sc->sc_active, dxfer, xnext);
 
 		/* start timeout, if any */
@@ -3980,12 +4004,12 @@ dwc_otg_standard_done(usbd_xfer_handle x
 		dwc_otg_host_channel_free(td);
 
 	xfer->status = err;
-	if (dxfer->active) {
+	if (dxfer->state == DXFER_ACTIVE) {
 		TAILQ_REMOVE(&sc->sc_active, dxfer, xnext);
-		dxfer->active = false;
 	}
 	callout_stop(&xfer->timeout_handle);
 
+	dxfer->state = DXFER_COMPLETING;
 	TAILQ_INSERT_TAIL(&sc->sc_complete, dxfer, xnext);
 
 	usb_schedsoftintr(&sc->sc_bus);
@@ -4324,8 +4348,8 @@ dwc_otg_xfer_start(usbd_xfer_handle xfer
 	if (sc->sc_bus.use_polling) {
 		dwc_otg_start_standard_chain(xfer);
 	} else {
-		KASSERT(dxfer->queued == false);
-		dxfer->queued = true;
+		KASSERT(dxfer->state == DXFER_INIT);
+		dxfer->state = DXFER_WORKQ;
 		workqueue_enqueue(sc->sc_wq, (struct work *)&dxfer->work, NULL);
 	}
 }

Index: src/sys/dev/usb/dwc_otgvar.h
diff -u src/sys

CVS commit: [netbsd-6] src/lib/libc/arch/sparc64/softfloat

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:10:58 UTC 2013

Modified Files:
src/lib/libc/arch/sparc64/softfloat [netbsd-6]: qp.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #825):
lib/libc/arch/sparc64/softfloat/qp.c: revision 1.10
Make all conversions from 128bit (long double) floats to integral types
use rounding towards zero (casts to int/long are not affected by current
rounding mode).
Fixes PR port-sparc64/47535.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.24.1 src/lib/libc/arch/sparc64/softfloat/qp.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/libc/arch/sparc64/softfloat/qp.c
diff -u src/lib/libc/arch/sparc64/softfloat/qp.c:1.7 src/lib/libc/arch/sparc64/softfloat/qp.c:1.7.24.1
--- src/lib/libc/arch/sparc64/softfloat/qp.c:1.7	Mon Apr 28 20:22:57 2008
+++ src/lib/libc/arch/sparc64/softfloat/qp.c	Mon Feb 18 18:10:58 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: qp.c,v 1.7 2008/04/28 20:22:57 martin Exp $ */
+/* $NetBSD: qp.c,v 1.7.24.1 2013/02/18 18:10:58 riz Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -194,7 +194,7 @@ _Qp_qtod(float128 *a)
 int
 _Qp_qtoi(float128 *a)
 {
-	return float128_to_int32(*a);
+	return float128_to_int32_round_to_zero(*a);
 }
 
 
@@ -215,7 +215,7 @@ float
 unsigned int
 _Qp_qtoui(float128 *a)
 {
-	return (unsigned int)float128_to_int64(*a);
+	return (unsigned int)float128_to_int64_round_to_zero(*a);
 }
 
 



CVS commit: [netbsd-6] src/lib/libc/arch/sparc64/gen

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:10:25 UTC 2013

Modified Files:
src/lib/libc/arch/sparc64/gen [netbsd-6]: fpsetround.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #826):
lib/libc/arch/sparc64/gen/fpsetround.c: revision 1.6
While we are using softfloat for 128 bit long double values, make fpsetround
update the softfloat rounding mode as well.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.46.1 src/lib/libc/arch/sparc64/gen/fpsetround.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/libc/arch/sparc64/gen/fpsetround.c
diff -u src/lib/libc/arch/sparc64/gen/fpsetround.c:1.4 src/lib/libc/arch/sparc64/gen/fpsetround.c:1.4.46.1
--- src/lib/libc/arch/sparc64/gen/fpsetround.c:1.4	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/sparc64/gen/fpsetround.c	Mon Feb 18 18:10:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetround.c,v 1.4 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: fpsetround.c,v 1.4.46.1 2013/02/18 18:10:25 riz Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 10, 1995
@@ -7,7 +7,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetround.c,v 1.4 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.4.46.1 2013/02/18 18:10:25 riz Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -24,9 +24,16 @@ fpsetround(rnd_dir)
 {
 	fp_rnd old;
 	fp_rnd new;
+#ifdef SOFTFLOATSPARC64_FOR_GCC
+	extern fp_rnd _softfloat_float_rounding_mode;
+#endif
 
 	__asm("st %%fsr,%0" : "=m" (*&old));
 
+#ifdef SOFTFLOATSPARC64_FOR_GCC
+	_softfloat_float_rounding_mode = rnd_dir;
+#endif
+
 	new = old;
 	new &= ~(0x03 << 30); 
 	new |= ((rnd_dir & 0x03) << 30);



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 18:05:30 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wm.c if_wmreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #824):
sys/dev/pci/if_wm.c: revision 1.240
sys/dev/pci/if_wm.c: revision 1.241
sys/dev/pci/if_wm.c: revision 1.242
sys/dev/pci/if_wmreg.h: revision 1.49
- Add WM_DEBUG_NVM.
- If WM_DEBUG_NVM is enabled, dump the FLASH ROM data.
Skip 64bit BAR correctly. I don't know if this bug causes a real problem.
Fix RAL_TABSIZE for ICH8, 82576, 82580 and I350.


To generate a diff of this commit:
cvs rdiff -u -r1.227.2.7 -r1.227.2.8 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/sys/dev/pci/if_wmreg.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/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.227.2.7 src/sys/dev/pci/if_wm.c:1.227.2.8
--- src/sys/dev/pci/if_wm.c:1.227.2.7	Mon Feb 18 17:57:57 2013
+++ src/sys/dev/pci/if_wm.c	Mon Feb 18 18:05:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.7 2013/02/18 17:57:57 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.8 2013/02/18 18:05:29 riz Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.7 2013/02/18 17:57:57 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.8 2013/02/18 18:05:29 riz Exp $");
 
 #include 
 #include 
@@ -132,8 +132,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.
 #define	WM_DEBUG_RX		0x04
 #define	WM_DEBUG_GMII		0x08
 #define	WM_DEBUG_MANAGE		0x10
+#define	WM_DEBUG_NVM		0x20
 int	wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII
-| WM_DEBUG_MANAGE;
+| WM_DEBUG_MANAGE | WM_DEBUG_NVM;
 
 #define	DPRINTF(x, y)	if (wm_debug & (x)) printf y
 #else
@@ -1218,11 +1219,14 @@ wm_attach(device_t parent, device_t self
 	if (sc->sc_type >= WM_T_82544) {
 		/* First we have to find the I/O BAR. */
 		for (i = PCI_MAPREG_START; i < PCI_MAPREG_END; i += 4) {
-			if (pci_mapreg_type(pa->pa_pc, pa->pa_tag, i) ==
-			PCI_MAPREG_TYPE_IO)
+			memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, i);
+			if (memtype == PCI_MAPREG_TYPE_IO)
 break;
+			if (PCI_MAPREG_MEM_TYPE(memtype) ==
+			PCI_MAPREG_MEM_TYPE_64BIT)
+i += 4;	/* skip high bits, too */
 		}
-		if (i != PCI_MAPREG_END) {
+		if (i < PCI_MAPREG_END) {
 			/*
 			 * We found PCI_MAPREG_TYPE_IO. Note that 82580
 			 * (and newer?) chip has no PCI_MAPREG_TYPE_IO.
@@ -5261,6 +5265,32 @@ wm_validate_eeprom_checksum(struct wm_so
 
 	checksum = 0;
 
+#ifdef WM_DEBUG
+	/* Dump EEPROM image for debug */
+	if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
+	|| (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
+	|| (sc->sc_type == WM_T_PCH2)) {
+		wm_read_eeprom(sc, 0x19, 1, &eeprom_data);
+		if ((eeprom_data & 0x40) == 0) {
+			DPRINTF(WM_DEBUG_NVM,("%s: NVM need to be updated\n",
+device_xname(sc->sc_dev)));
+		}
+	}
+
+	if ((wm_debug & WM_DEBUG_NVM) != 0) {
+		printf("%s: NVM dump:\n", device_xname(sc->sc_dev));
+		for (i = 0; i < EEPROM_SIZE; i++) {
+			if (wm_read_eeprom(sc, i, 1, &eeprom_data))
+printf("XX ");
+			else
+printf("%04x ", eeprom_data);
+			if (i % 8 == 7)
+printf("\n");
+		}
+	}
+
+#endif /* WM_DEBUG */
+
 	for (i = 0; i < EEPROM_SIZE; i++) {
 		if (wm_read_eeprom(sc, i, 1, &eeprom_data))
 			return 1;
@@ -5614,10 +5644,17 @@ wm_set_filter(struct wm_softc *sc)
 	 * Set the station address in the first RAL slot, and
 	 * clear the remaining slots.
 	 */
-	if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
-	|| (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
-	|| (sc->sc_type == WM_T_PCH2))
-		size = WM_ICH8_RAL_TABSIZE;
+	if (sc->sc_type == WM_T_ICH8)
+		size = WM_RAL_TABSIZE_ICH8 -1;
+	else if ((sc->sc_type == WM_T_ICH9) || (sc->sc_type == WM_T_ICH10)
+	|| (sc->sc_type == WM_T_PCH) || (sc->sc_type == WM_T_PCH2))
+		size = WM_RAL_TABSIZE_ICH8;
+	else if (sc->sc_type == WM_T_82575)
+		size = WM_RAL_TABSIZE_82575;
+	else if ((sc->sc_type == WM_T_82576) || (sc->sc_type == WM_T_82580))
+		size = WM_RAL_TABSIZE_82576;
+	else if (sc->sc_type == WM_T_I350)
+		size = WM_RAL_TABSIZE_I350;
 	else
 		size = WM_RAL_TABSIZE;
 	wm_set_ral(sc, CLLADDR(ifp->if_sadl), 0);

Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.46.2.2 src/sys/dev/pci/if_wmreg.h:1.46.2.3
--- src/sys/dev/pci/if_wmreg.h:1.46.2.2	Mon Sep  3 19:09:41 2012
+++ src/sys/dev/pci/if_wmreg.h	Mon Feb 18 18:05:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.46.2.2 2012/09/03 19:09:41 riz Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.46.2.3 2013/02/18 18:05:30 riz Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -420,8 +420,11 @@ struct livengood_tcpip_ctxdesc {
 #define	RAL_RDR1	(1U << 30)	/* put packet in alt. rx ring */
 #define	R

CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 17:59:34 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 823.  While here, make sure there's only one entry for ticket 813.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.99 -r1.1.2.100 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.99 src/doc/CHANGES-6.1:1.1.2.100
--- src/doc/CHANGES-6.1:1.1.2.99	Mon Feb 18 17:54:41 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 17:59:33 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.99 2013/02/18 17:54:41 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.100 2013/02/18 17:59:33 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8505,6 +8505,9 @@ sys/kern/uipc_syscalls.c			1.160
 	not set SS_NBIO.
 	[christos, ticket #822]
 
-sys/dev/usb/dwc_otg.cpatch
-	Fix a locking error in the last commit
-	[skrll, ticket #813]
+sys/dev/pci/if_wm.c1.235-1.236 via patch
+
+	Fix a problem that if_wm.c can't compile with WM_DEBUG on
+	non-64bit platforms.
+	[msaitoh, ticket #823]
+



CVS commit: [netbsd-6] src/sys/dev/pci

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 17:57:58 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wm.c

Log Message:
sys/dev/pci/if_wm.c 1.235-1.236 via patch

Use PRIx64 and explicitly cast to uint64_t to print a DMA address.
This fixes a problem that if_wm.c can't compile with WM_DEBUG on
non-64bit platforms.
[msaitoh, ticket #823]


To generate a diff of this commit:
cvs rdiff -u -r1.227.2.6 -r1.227.2.7 src/sys/dev/pci/if_wm.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/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.227.2.6 src/sys/dev/pci/if_wm.c:1.227.2.7
--- src/sys/dev/pci/if_wm.c:1.227.2.6	Thu Feb 14 22:08:28 2013
+++ src/sys/dev/pci/if_wm.c	Mon Feb 18 17:57:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.6 2013/02/14 22:08:28 jdc Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.7 2013/02/18 17:57:57 riz Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.6 2013/02/14 22:08:28 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.7 2013/02/18 17:57:57 riz Exp $");
 
 #include 
 #include 
@@ -2695,10 +2695,10 @@ wm_start(struct ifnet *ifp)
 lasttx = nexttx;
 
 DPRINTF(WM_DEBUG_TX,
-("%s: TX: desc %d: low %#" PRIxPADDR ", "
+("%s: TX: desc %d: low %#" PRIx64 ", "
  "len %#04zx\n",
 device_xname(sc->sc_dev), nexttx,
-curaddr & 0xUL, curlen));
+(uint64_t)curaddr, curlen));
 			}
 		}
 
@@ -3158,7 +3158,7 @@ wm_nq_start(struct ifnet *ifp)
 			DPRINTF(WM_DEBUG_TX,
 			("%s: TX: adv data desc %d 0x%" PRIx64 "\n",
 			device_xname(sc->sc_dev), nexttx, 
-			dmamap->dm_segs[0].ds_addr));
+			(uint64_t)dmamap->dm_segs[0].ds_addr));
 			DPRINTF(WM_DEBUG_TX,
 			("\t 0x%08x%08x\n", fields,
 			(uint32_t)dmamap->dm_segs[0].ds_len | cmdlen));
@@ -3182,10 +3182,10 @@ wm_nq_start(struct ifnet *ifp)
 			lasttx = nexttx;
 
 			DPRINTF(WM_DEBUG_TX,
-			("%s: TX: desc %d: %#" PRIxPADDR ", "
+			("%s: TX: desc %d: %#" PRIx64 ", "
 			 "len %#04zx\n",
 			device_xname(sc->sc_dev), nexttx,
-			dmamap->dm_segs[seg].ds_addr,
+			(uint64_t)dmamap->dm_segs[seg].ds_addr,
 			dmamap->dm_segs[seg].ds_len));
 		}
 



CVS commit: [netbsd-6] src/doc

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 17:54:42 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Adjust ticket 818.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.98 -r1.1.2.99 src/doc/CHANGES-6.1

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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.98 src/doc/CHANGES-6.1:1.1.2.99
--- src/doc/CHANGES-6.1:1.1.2.98	Fri Feb 15 08:23:17 2013
+++ src/doc/CHANGES-6.1	Mon Feb 18 17:54:41 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.98 2013/02/15 08:23:17 msaitoh Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.99 2013/02/18 17:54:41 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8466,6 +8466,7 @@ sys/dev/videomode/edid.c1.12 via pat
 	Ethernet should work.
 	[skrll, ticket #813]
 
+distrib/sets/lists/xcomp/md.evbarm		new
 distrib/sets/lists/xserver/md.evbarm		1.1
 external/mit/xorg/server/drivers/Makefile	1.61
 external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile 1.15



CVS commit: [netbsd-6] src/distrib/sets/lists/xcomp

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 17:54:27 UTC 2013

Added Files:
src/distrib/sets/lists/xcomp [netbsd-6]: md.evbarm

Log Message:
Adjust ticket 818:  fix debug builds and PR#47572.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/distrib/sets/lists/xcomp/md.evbarm

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

Added files:

Index: src/distrib/sets/lists/xcomp/md.evbarm
diff -u /dev/null src/distrib/sets/lists/xcomp/md.evbarm:1.1.2.1
--- /dev/null	Mon Feb 18 17:54:27 2013
+++ src/distrib/sets/lists/xcomp/md.evbarm	Mon Feb 18 17:54:26 2013
@@ -0,0 +1,22 @@
+# $NetBSD: md.evbarm,v 1.1.2.1 2013/02/18 17:54:26 riz Exp $
+./usr/libdata/debug/usr/X11R7/bin/Xorg.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/bin/cvt.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/bin/gtf.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri.so.0.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri2.so.0.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libextmod.so.0.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libglx.so.0.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/librecord.so.0.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libshadow.so.0.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libexa.so.0.debug			-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libfb.so.0.debug			-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libi2c.so.0.debug			-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libshadowfb.so.0.debug		-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libvbe.so.0.debug			-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libvgahw.so.0.debug			-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/libxaa.so.0.debug			-unknown-	xorg,debug



CVS commit: src/sys/netinet6

2013-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 18 16:45:50 UTC 2013

Modified Files:
src/sys/netinet6: nd6_rtr.c

Log Message:
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.85 src/sys/netinet6/nd6_rtr.c:1.86
--- src/sys/netinet6/nd6_rtr.c:1.85	Mon Jan 28 12:57:34 2013
+++ src/sys/netinet6/nd6_rtr.c	Mon Feb 18 11:45:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.85 2013/01/28 17:57:34 joerg Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.86 2013/02/18 16:45:50 christos Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.85 2013/01/28 17:57:34 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.86 2013/02/18 16:45:50 christos Exp $");
 
 #include 
 #include 
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext->nprefixes--;
-	if (ext->nprefixes < 0) {
-		log(LOG_WARNING, "prelist_remove: negative count on %s\n",
-		pr->ndpr_ifp->if_xname);
+	if (ext) {
+		ext->nprefixes--;
+		if (ext->nprefixes < 0) {
+			log(LOG_WARNING, "prelist_remove: negative count on "
+			"%s\n", pr->ndpr_ifp->if_xname);
+		}
 	}
 	splx(s);
 



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

2013-02-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb 18 16:03:25 UTC 2013

Modified Files:
src/sys/arch/arm/arm32: bus_dma.c

Log Message:
Disable when using extended MMU support.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/arm/arm32/bus_dma.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/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.79 src/sys/arch/arm/arm32/bus_dma.c:1.80
--- src/sys/arch/arm/arm32/bus_dma.c:1.79	Sat Feb 16 06:49:43 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Mon Feb 18 16:03:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.79 2013/02/16 06:49:43 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.80 2013/02/18 16:03:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.79 2013/02/16 06:49:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.80 2013/02/18 16:03:25 matt Exp $");
 
 #include 
 #include 
@@ -1064,6 +1064,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	}
 #endif /* _ARM32_NEED_BUS_DMA_BOUNCE */
 
+#ifndef ARM_MMU_EXTENDED
 	/*
 	 * If the mapping belongs to a non-kernel vmspace, and the
 	 * vmspace has not been active since the last time a full
@@ -1072,6 +1073,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 	if (__predict_false(!VMSPACE_IS_KERNEL_P(map->_dm_vmspace) &&
 	vm_map_pmap(&map->_dm_vmspace->vm_map)->pm_cstate.cs_cache_d == 0))
 		return;
+#endif
 
 	int buftype = map->_dm_buftype;
 #ifdef _ARM32_NEED_BUS_DMA_BOUNCE



CVS commit: src/external/gpl3/binutils/usr.sbin/mdsetimage

2013-02-18 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Mon Feb 18 15:32:02 UTC 2013

Modified Files:
src/external/gpl3/binutils/usr.sbin/mdsetimage: Makefile

Log Message:
Adjust blank lines.  Add comment about missing DPADD for -lz.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile

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

Modified files:

Index: src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile
diff -u src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.8 src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.9
--- src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.8	Sun Feb 17 20:36:02 2013
+++ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile	Mon Feb 18 15:32:02 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2013/02/17 20:36:02 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2013/02/18 15:32:02 gdt Exp $
 
 .include 
 
@@ -35,6 +35,8 @@ LDADD+=		-lintl
 DPADD+=		${LIBINTL}
 DPADD+=		${LIBZ}
 .endif # HOSTPROG
+
 LDADD+=		-lz
-.endif # MKBINUTILS != no
+# No DPADD because we don't know the format and we didn't build it.
 
+.endif # MKBINUTILS != no



CVS commit: src/external/gpl3/binutils/usr.sbin/dbsym

2013-02-18 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Mon Feb 18 15:29:37 UTC 2013

Modified Files:
src/external/gpl3/binutils/usr.sbin/dbsym: Makefile

Log Message:
Adjust blank lines, add comment about DPADD


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/binutils/usr.sbin/dbsym/Makefile

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

Modified files:

Index: src/external/gpl3/binutils/usr.sbin/dbsym/Makefile
diff -u src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.8 src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.9
--- src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.8	Sun Feb 17 20:36:01 2013
+++ src/external/gpl3/binutils/usr.sbin/dbsym/Makefile	Mon Feb 18 15:29:36 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2013/02/17 20:36:01 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2013/02/18 15:29:36 gdt Exp $
 
 .include 
 
@@ -33,7 +33,8 @@ CPPFLAGS+=	-I${TOP}/${BFDSUBDIR}/libbfd/
 LDADD+=		-lintl
 DPADD+=		${LIBINTL}
 .endif # HOSTPROG
-LDADD+=		-lz
-.endif # MKBINUTILS != no
 
+LDADD+=		-lz
+# No DPADD because we don't know the format and we didn't build it.
 
+.endif # MKBINUTILS != no