CVS commit: src/libexec/httpd

2014-07-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jul 16 07:41:43 UTC 2014

Modified Files:
src/libexec/httpd: main.c

Log Message:
make -t chroot option available always again.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/libexec/httpd/main.c

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

Modified files:

Index: src/libexec/httpd/main.c
diff -u src/libexec/httpd/main.c:1.7 src/libexec/httpd/main.c:1.8
--- src/libexec/httpd/main.c:1.7	Thu Jan  2 08:21:38 2014
+++ src/libexec/httpd/main.c	Wed Jul 16 07:41:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.7 2014/01/02 08:21:38 mrg Exp $	*/
+/*	$NetBSD: main.c,v 1.8 2014/07/16 07:41:43 mrg Exp $	*/
 
 /*	$eterna: main.c,v 1.6 2011/11/18 09:21:15 mrg Exp $	*/
 /* from: eterna: bozohttpd.c,v 1.159 2009/05/23 02:14:30 mrg Exp 	*/
@@ -290,9 +290,12 @@ main(int argc, char **argv)
 #endif /* NO_DEBUG */
 			break;
 
+		case 't':
+			bozo_set_pref(prefs, chroot dir, optarg);
+			break;
+
 #ifdef NO_USER_SUPPORT
 		case 'p':
-		case 't':
 		case 'u':
 			bozo_err(httpd, 1, User support is not enabled);
 			/* NOTREACHED */
@@ -301,10 +304,6 @@ main(int argc, char **argv)
 			bozo_set_pref(prefs, public_html, optarg);
 			break;
 
-		case 't':
-			bozo_set_pref(prefs, chroot dir, optarg);
-			break;
-
 		case 'u':
 			bozo_set_pref(prefs, enable users, true);
 			break;



CVS commit: src/lib/libc/gen

2014-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 16 10:52:26 UTC 2014

Modified Files:
src/lib/libc/gen: basename.c dirname.c

Log Message:
basename_r and dirname_r are non-standard and different from what we define
here on FreeBSD. Their libgen.h exposes them unconditionally, so hide ours
for now.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gen/basename.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/dirname.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/gen/basename.c
diff -u src/lib/libc/gen/basename.c:1.10 src/lib/libc/gen/basename.c:1.11
--- src/lib/libc/gen/basename.c:1.10	Mon Jul 14 16:44:45 2014
+++ src/lib/libc/gen/basename.c	Wed Jul 16 06:52:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: basename.c,v 1.10 2014/07/14 20:44:45 christos Exp $	*/
+/*	$NetBSD: basename.c,v 1.11 2014/07/16 10:52:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: basename.c,v 1.10 2014/07/14 20:44:45 christos Exp $);
+__RCSID($NetBSD: basename.c,v 1.11 2014/07/16 10:52:26 christos Exp $);
 #endif /* !LIBC_SCCS  !lint */
 
 #include namespace.h
@@ -46,7 +46,7 @@ __weak_alias(basename,_basename)
 #endif
 
 static size_t
-basename_r(const char *path, char *buf, size_t buflen)
+xbasename_r(const char *path, char *buf, size_t buflen)
 {
 	const char *startp, *endp;
 	size_t len;
@@ -94,7 +94,7 @@ char *
 basename(char *path) {
 	static char result[PATH_MAX];
 
-	(void)basename_r(path, result, sizeof(result));
+	(void)xbasename_r(path, result, sizeof(result));
 	return result;
 }
 

Index: src/lib/libc/gen/dirname.c
diff -u src/lib/libc/gen/dirname.c:1.12 src/lib/libc/gen/dirname.c:1.13
--- src/lib/libc/gen/dirname.c:1.12	Mon Jul 14 16:44:45 2014
+++ src/lib/libc/gen/dirname.c	Wed Jul 16 06:52:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dirname.c,v 1.12 2014/07/14 20:44:45 christos Exp $	*/
+/*	$NetBSD: dirname.c,v 1.13 2014/07/16 10:52:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: dirname.c,v 1.12 2014/07/14 20:44:45 christos Exp $);
+__RCSID($NetBSD: dirname.c,v 1.13 2014/07/16 10:52:26 christos Exp $);
 #endif /* !LIBC_SCCS  !lint */
 
 #include namespace.h
@@ -45,7 +45,7 @@ __weak_alias(dirname,_dirname)
 #endif
 
 static size_t
-dirname_r(const char *path, char *buf, size_t buflen)
+xdirname_r(const char *path, char *buf, size_t buflen)
 {
 	const char *endp;
 	size_t len;
@@ -94,7 +94,7 @@ char *
 dirname(char *path)
 {
 	static char result[PATH_MAX];
-	(void)dirname_r(path, result, sizeof(result));
+	(void)xdirname_r(path, result, sizeof(result));
 	return result;
 }
 #endif



CVS commit: src/external/gpl3/gdb/dist/gdb

2014-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 16 11:48:37 UTC 2014

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c

Log Message:
PR/30756: Thomas Klausner: Deactivate threads after detaching the main thread.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 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.20 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.21
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.20	Tue Jul 15 13:35:39 2014
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c	Wed Jul 16 07:48:37 2014
@@ -196,7 +196,6 @@ static void
 nbsd_thread_detach (struct target_ops *ops, const char *args, int from_tty)
 {
   struct target_ops *beneath = find_target_beneath (ops);
-  nbsd_thread_deactivate ();
   unpush_target (ops);
   /* Ordinarily, gdb caches solib information, but this means that it
  won't call the new_obfile hook on a reattach. Clear the symbol file
@@ -204,6 +203,7 @@ nbsd_thread_detach (struct target_ops *o
   clear_solib();
   symbol_file_clear(0);
   beneath-to_detach (beneath, args, from_tty);
+  nbsd_thread_deactivate ();
 }
 
 static int nsusp;



CVS commit: src/sys/kern

2014-07-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 16 13:26:33 UTC 2014

Modified Files:
src/sys/kern: subr_kobj.c

Log Message:
Keep setting 'error' as appropriate (even if this place is broken enough
to crash in many other ways...)


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/subr_kobj.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/subr_kobj.c
diff -u src/sys/kern/subr_kobj.c:1.49 src/sys/kern/subr_kobj.c:1.50
--- src/sys/kern/subr_kobj.c:1.49	Wed Jul  9 05:50:51 2014
+++ src/sys/kern/subr_kobj.c	Wed Jul 16 13:26:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kobj.c,v 1.49 2014/07/09 05:50:51 maxv Exp $	*/
+/*	$NetBSD: subr_kobj.c,v 1.50 2014/07/16 13:26:33 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_kobj.c,v 1.49 2014/07/09 05:50:51 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_kobj.c,v 1.50 2014/07/16 13:26:33 maxv Exp $);
 
 #include opt_modular.h
 
@@ -173,7 +173,6 @@ kobj_load(kobj_t ko)
 	KASSERT(ko-ko_source != NULL);
 
 	shdr = NULL;
-	mapsize = 0;
 	error = 0;
 	hdr = NULL;
 
@@ -361,8 +360,7 @@ kobj_load(kobj_t ko)
 	error = kobj_renamespace(ko-ko_symtab, ko-ko_symcnt,
 	ko-ko_strtab, ko-ko_strtabsz);
 	if (error != 0) {
-		kobj_error(ko, renamespace failed %d,
-		error);
+		kobj_error(ko, renamespace failed %d, error);
 		goto out;
 	}
 
@@ -393,6 +391,7 @@ kobj_load(kobj_t ko)
 	 */
 	alignmask = 0;
 	mapbase = 0;
+	mapsize = 0;
 	for (i = 0; i  hdr-e_shnum; i++) {
 		switch (shdr[i].sh_type) {
 		case SHT_PROGBITS:
@@ -414,6 +413,7 @@ kobj_load(kobj_t ko)
 	 */
 	if (mapsize == 0) {
 		kobj_error(ko, no text/data/bss);
+		error = ENOEXEC;
 		goto out;
 	}
 	if (ko-ko_type == KT_MEMORY) {
@@ -449,6 +449,7 @@ kobj_load(kobj_t ko)
 if (((vaddr_t)addr  alignmask) != 0) {
 	kobj_error(ko,
 	section %d not aligned, i);
+	error = ENOEXEC;
 	goto out;
 }
 			} else {
@@ -463,16 +464,15 @@ kobj_load(kobj_t ko)
 error = ko-ko_read(ko, addr,
 shdr[i].sh_size, shdr[i].sh_offset, false);
 if (error != 0) {
-	kobj_error(ko, read failed %d,
-	error);
+	kobj_error(ko, read failed %d, error);
 	goto out;
 }
 			} else if (ko-ko_type == KT_MEMORY 
 			shdr[i].sh_size != 0) {
-				kobj_error(ko, non-loadable BSS 
+kobj_error(ko, non-loadable BSS 
 section in pre-loaded module);
-error = EINVAL;
-				goto out;
+error = ENOEXEC;
+goto out;
 			} else {
 ko-ko_progtab[pb].name = NOBITS;
 memset(addr, 0, shdr[i].sh_size);
@@ -531,8 +531,7 @@ kobj_load(kobj_t ko)
 shdr[i].sh_size,
 shdr[i].sh_offset, true);
 if (error != 0) {
-	kobj_error(ko, read failed %d,
-	error);
+	kobj_error(ko, read failed %d, error);
 	goto out;
 }
 			}



CVS commit: src/external/mit/xorg/lib/fontconfig/src

2014-07-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed Jul 16 14:05:04 UTC 2014

Modified Files:
src/external/mit/xorg/lib/fontconfig/src: Makefile

Log Message:
The placeholder name in fontconfig.pc.in has been changed.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/mit/xorg/lib/fontconfig/src/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/mit/xorg/lib/fontconfig/src/Makefile
diff -u src/external/mit/xorg/lib/fontconfig/src/Makefile:1.16 src/external/mit/xorg/lib/fontconfig/src/Makefile:1.17
--- src/external/mit/xorg/lib/fontconfig/src/Makefile:1.16	Sun Mar 23 20:40:18 2014
+++ src/external/mit/xorg/lib/fontconfig/src/Makefile	Wed Jul 16 14:05:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2014/03/23 20:40:18 mrg Exp $
+#	$NetBSD: Makefile,v 1.17 2014/07/16 14:05:04 nakayama Exp $
 
 .include bsd.own.mk
 
@@ -125,7 +125,7 @@ PKGCONFIG=	fontconfig
 PKGCONFIG_SED_FLAGS= \
 	-e s,@sysconfdir@,${X11ETCDIR},; \
 	s,@localstatedir@,/var,; \
-	s,@baseconfigdir@,/etc/fonts,; \
+	s,@BASECONFIGDIR@,/etc/fonts,; \
 	s,@fc_cachedir@,${FONTCONFIG_PATH},
 
 # XXX



CVS commit: src/share/mk

2014-07-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed Jul 16 14:10:26 UTC 2014

Modified Files:
src/share/mk: bsd.x11.mk

Log Message:
Add new transform for gl.pc.
Now GLX_TLS is no since GLX_USE_TLS is not defined.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/share/mk/bsd.x11.mk

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

Modified files:

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.112 src/share/mk/bsd.x11.mk:1.113
--- src/share/mk/bsd.x11.mk:1.112	Mon Mar 31 01:59:36 2014
+++ src/share/mk/bsd.x11.mk	Wed Jul 16 14:10:26 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.112 2014/03/31 01:59:36 mrg Exp $
+#	$NetBSD: bsd.x11.mk,v 1.113 2014/07/16 14:10:26 nakayama Exp $
 
 .include bsd.init.mk
 
@@ -322,7 +322,8 @@ ${_pkg}.pc: ${PKGDIST.${_pkg}}/configure
 		s,@GL_LIB@,GL,; \
 		s,@GL_PC_REQ_PRIV@,x11 xext,; \
 		s,@GL_PC_LIB_PRIV@,-lm -lpthread,; \
-		s,@GL_PC_CFLAGS@,, \
+		s,@GL_PC_CFLAGS@,,; \
+		s,@GLX_TLS@,no, \
 		-e s,@GLU_LIB@,GLU,; \
 		s,@GLU_PC_REQ@,gl,; \
 		s,@GLU_PC_REQ_PRIV@,,; \



CVS commit: src/libexec/httpd/testsuite

2014-07-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jul 16 14:47:59 UTC 2014

Modified Files:
src/libexec/httpd/testsuite: t10.out

Log Message:
make a minor output change match again.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/libexec/httpd/testsuite/t10.out

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

Modified files:

Index: src/libexec/httpd/testsuite/t10.out
diff -u src/libexec/httpd/testsuite/t10.out:1.1.1.1 src/libexec/httpd/testsuite/t10.out:1.2
--- src/libexec/httpd/testsuite/t10.out:1.1.1.1	Sat Apr 18 07:09:27 2009
+++ src/libexec/httpd/testsuite/t10.out	Wed Jul 16 14:47:59 2014
@@ -1,8 +1,8 @@
-HTTP/1.0 500 Internal Error
+HTTP/1.0 404 Not Found
 Content-Type: text/html
-Content-Length: 10296
-Server: bozohttpd/20090417
+Content-Length: 1024
+Server: bozohttpd/20140708
 
-htmlheadtitle500 Internal Error/title/head
-bodyh1500 Internal Error/h1
-
\ No newline at end of file
+htmlheadtitle404 Not Found/title/head
+bodyh1404 Not Found/h1
+/x
\ No newline at end of file



CVS commit: src/usr.bin/make

2014-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 16 15:33:41 UTC 2014

Modified Files:
src/usr.bin/make: job.c make.h parse.c

Log Message:
PR/48367: David A. Holland: Mark possible submake nodes so that we can
avoid closing the job pipe on exec for them in order to make recursive
makes work in parallel.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/usr.bin/make/job.c
cvs rdiff -u -r1.92 -r1.93 src/usr.bin/make/make.h
cvs rdiff -u -r1.194 -r1.195 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.176 src/usr.bin/make/job.c:1.177
--- src/usr.bin/make/job.c:1.176	Sun Aug  4 12:48:15 2013
+++ src/usr.bin/make/job.c	Wed Jul 16 11:33:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $	*/
+/*	$NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $;
+static char rcsid[] = $NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)job.c	8.2 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $);
+__RCSID($NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1346,7 +1346,7 @@ JobExec(Job *job, char **argv)
 	(void)fcntl(0, F_SETFD, 0);
 	(void)lseek(0, (off_t)0, SEEK_SET);
 
-	if (job-node-type  OP_MAKE) {
+	if (job-node-type  (OP_MAKE | OP_SUBMAKE)) {
 		/*
 		 * Pass job token pipe to submakes.
 		 */

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.92 src/usr.bin/make/make.h:1.93
--- src/usr.bin/make/make.h:1.92	Wed Sep  4 11:38:26 2013
+++ src/usr.bin/make/make.h	Wed Jul 16 11:33:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.92 2013/09/04 15:38:26 sjg Exp $	*/
+/*	$NetBSD: make.h,v 1.93 2014/07/16 15:33:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -273,6 +273,7 @@ typedef struct GNode {
 #define OP_NOMETA	0x0008  /* .NOMETA do not create a .meta file */
 #define OP_META		0x0010  /* .META we _do_ want a .meta file */
 #define OP_NOMETA_CMP	0x0020  /* Do not compare commands in .meta file */
+#define OP_SUBMAKE	0x0040  /* Possibly a submake node */
 /* Attributes applied by PMake */
 #define OP_TRANSFORM	0x8000  /* The node is a transformation rule */
 #define OP_MEMBER 	0x4000  /* Target is a member of an archive */

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.194 src/usr.bin/make/parse.c:1.195
--- src/usr.bin/make/parse.c:1.194	Fri Feb 14 19:17:17 2014
+++ src/usr.bin/make/parse.c	Wed Jul 16 11:33:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.194 2014/02/15 00:17:17 christos Exp $	*/
+/*	$NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: parse.c,v 1.194 2014/02/15 00:17:17 christos Exp $;
+static char rcsid[] = $NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)parse.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: parse.c,v 1.194 2014/02/15 00:17:17 christos Exp $);
+__RCSID($NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1952,6 +1952,42 @@ Parse_DoVar(char *line, GNode *ctxt)
 }
 
 
+/*
+ * ParseMaybeSubMake --
+ * 	Scan the command string to see if it a possible submake node
+ * Input:
+ *	cmd		the command to scan
+ * Results:
+ *	TRUE if the command is possibly a submake, FALSE if not.
+ */
+static Boolean
+ParseMaybeSubMake(const char *cmd)
+{
+static struct {
+	const char *name;
+	size_t len;
+} vals[] = {
+#define MKV(A)	{	A, sizeof(A) - 1	}
+	MKV(${MAKE}),
+	MKV(${.MAKE}),
+	MKV($(MAKE)),
+	MKV($(.MAKE)),
+	MKV(make),
+};
+for (size_t i = 0; i  __arraycount(vals); i++) {
+	char *ptr;
+	if ((ptr = strstr(cmd, vals[i].name)) == NULL)
+	continue;
+	if ((ptr == cmd || !isalnum((unsigned char)ptr[-1]))
+	 !isalnum((unsigned char)ptr[vals[i].len])) {
+	printf(good [%c] [%c] [%s]\n, ptr[-1], ptr[vals[i].len], cmd);
+	return TRUE;
+	}
+	printf(bad [%c] [%c] [%s]\n, ptr[-1], ptr[vals[i].len], cmd);
+}
+return FALSE;
+}
+
 /*-
  * ParseAddCmd  --
  *	Lst_ForEach function to add a command line to all targets
@@ -1964,7 +2000,9 @@ Parse_DoVar(char *line, GNode *ctxt)
  *	Always 0
  *
  * Side Effects:
- *	A new element is added to the commands list of the node.
+ *	A new element is added to the commands list of the node,
+ *	and the node can be marked as a submake node if the command is
+ *	

CVS commit: src/usr.bin/make

2014-07-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 16 16:52:59 UTC 2014

Modified Files:
src/usr.bin/make: parse.c

Log Message:
remove debugging


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.195 src/usr.bin/make/parse.c:1.196
--- src/usr.bin/make/parse.c:1.195	Wed Jul 16 11:33:41 2014
+++ src/usr.bin/make/parse.c	Wed Jul 16 12:52:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $	*/
+/*	$NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $;
+static char rcsid[] = $NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)parse.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: parse.c,v 1.195 2014/07/16 15:33:41 christos Exp $);
+__RCSID($NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1979,11 +1979,8 @@ ParseMaybeSubMake(const char *cmd)
 	if ((ptr = strstr(cmd, vals[i].name)) == NULL)
 	continue;
 	if ((ptr == cmd || !isalnum((unsigned char)ptr[-1]))
-	 !isalnum((unsigned char)ptr[vals[i].len])) {
-	printf(good [%c] [%c] [%s]\n, ptr[-1], ptr[vals[i].len], cmd);
+	 !isalnum((unsigned char)ptr[vals[i].len]))
 	return TRUE;
-	}
-	printf(bad [%c] [%c] [%s]\n, ptr[-1], ptr[vals[i].len], cmd);
 }
 return FALSE;
 }
@@ -2016,7 +2013,7 @@ ParseAddCmd(void *gnp, void *cmd)
 /* if target already supplied, ignore commands */
 if (!(gn-type  OP_HAS_COMMANDS)) {
 	(void)Lst_AtEnd(gn-commands, cmd);
-	if (ParseIsSubMake(cmd))
+	if (ParseMaybeSubMake(cmd))
 	gn-type |= OP_SUBMAKE;
 	ParseMark(gn);
 } else {



CVS commit: src/sys/dev/sbus

2014-07-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jul 16 17:58:35 UTC 2014

Modified Files:
src/sys/dev/sbus: tcx.c tcxreg.h

Log Message:
- move all register definitions and hardware documenting comments to
  tcxreg.h
- expand hardware documenting comments
no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/sbus/tcx.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sbus/tcxreg.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/sbus/tcx.c
diff -u src/sys/dev/sbus/tcx.c:1.53 src/sys/dev/sbus/tcx.c:1.54
--- src/sys/dev/sbus/tcx.c:1.53	Mon Jul  7 15:22:07 2014
+++ src/sys/dev/sbus/tcx.c	Wed Jul 16 17:58:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcx.c,v 1.53 2014/07/07 15:22:07 macallan Exp $ */
+/*	$NetBSD: tcx.c,v 1.54 2014/07/16 17:58:35 macallan Exp $ */
 
 /*
  *  Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.53 2014/07/07 15:22:07 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.54 2014/07/16 17:58:35 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,30 +124,6 @@ struct wsscreen_list tcx_screenlist = {
 	_tcx_scrlist
 };
 
-/*
- * The S24 provides the framebuffer RAM mapped in three ways:
- * 26 bits per pixel, in 32-bit words; the low-order 24 bits are
- * blue, green, and red values, and the other two bits select the
- * display modes, per pixel);
- * 24 bits per pixel, in 32-bit words; the high-order byte reads as
- * zero, and is ignored on writes (so the mode bits cannot be altered);
- * 8 bits per pixel, unpadded; writes to this space do not modify the
- * other 18 bits.
- */
-#define TCX_CTL_8_MAPPED	0x	/* 8 bits, uses color map */
-#define TCX_CTL_24_MAPPED	0x0100	/* 24 bits, uses color map */
-#define TCX_CTL_24_LEVEL	0x0300	/* 24 bits, ignores color map */
-#define TCX_CTL_PIXELMASK	0x00FF	/* mask for index/level */
-
-/*
- * differences between S24 and tcx, as far as this driver is concerned:
- * - S24 has 4MB VRAM, 24bit + 2bit control planes, no expansion possible
- * - tcx has 1MB VRAM, 8bit, no control planes, may have a VSIMM toat bumps
- *   VRAM to 2MB
- * - tcx can apply ROPs to STIP operations, unlike S24
- * - tcx has a Bt458 DAC, just like CG6. S24 has an ATT 20C567
- */
-
 /* autoconfiguration driver */
 static void	tcxattach(device_t, device_t, void *);
 static int	tcxmatch(device_t, cfdata_t, void *);
@@ -263,7 +239,7 @@ tcxattach(device_t parent, device_t self
 
 	/*
 	 * actual FB size ( of the 8bit region )
-	 * no need to restrict userland mappings to the visible VRAM
+	 * no reason to restrict userland mappings to the visible VRAM
 	 */
 	if (sc-sc_8bit) {
 		aprint_normal( (8-bit only TCX)\n);

Index: src/sys/dev/sbus/tcxreg.h
diff -u src/sys/dev/sbus/tcxreg.h:1.5 src/sys/dev/sbus/tcxreg.h:1.6
--- src/sys/dev/sbus/tcxreg.h:1.5	Thu Aug  6 18:26:03 2009
+++ src/sys/dev/sbus/tcxreg.h	Wed Jul 16 17:58:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcxreg.h,v 1.5 2009/08/06 18:26:03 macallan Exp $ */
+/*	$NetBSD: tcxreg.h,v 1.6 2014/07/16 17:58:35 macallan Exp $ */
 /*
  *  Copyright (c) 1996 The NetBSD Foundation, Inc.
  *  All rights reserved.
@@ -29,21 +29,43 @@
  */
 
 /*
+ * differences between S24 and tcx, as far as this driver is concerned:
+ * - S24 has 4MB VRAM, 24bit + 2bit control planes, no expansion possible
+ * - tcx has 1MB VRAM, 8bit, no control planes, may have a VSIMM that bumps
+ *   VRAM to 2MB
+ * - tcx can apply ROPs to STIP operations, unlike S24
+ * - tcx has a Bt458 DAC, just like CG6. S24 has an ATT 20C567
+ * - the chip itself seems to be (almost) the same, just with different DACs
+ *   and VRAM configuration
+ */
+
+/*
  * A TCX is composed of numerous groups of control registers, all with TLAs:
  *	DHC - ???
  *	TEC - transform engine control?
  *	THC - TEC Hardware Configuration
  *	ROM - a 128Kbyte ROM with who knows what in it.
- *	STIP - ???
- *	RSTIP - Raw ???
- *	BLIT - ???
- *	RBLIT - Raw ???
+ *	STIP - stipple engine, doesn't write attribute bits
+ *	RSTIP - stipple engine, writes attribute bits
+ *	BLIT - blit engine, doesn't copy attribute bits
+ *	RBLIT - blit engine, does copy attribute bits
  *	ALT - ???
  *	colormap - see below
  *	frame buffer memory (video RAM)
  *	possible other stuff
  *
+ *	RSTIP and RBLIT are set to size zero on my SS4's tcx, they work anyway
+ *	though. No sense using them since tcx has only the lower 8bit planes,
+ *	with no control planes, so there is no actual difference to STIP and
+ *	BLIT ops, and things like qemu and temlib may not actually implement
+ *	them.
+ *	The hardware cursor registers in the THC range are cut off by the size
+ *	attribute but seem to exist, although the parts that display the cursor
+ *	( the DAC's overlay support ) only exist on the S24.
+ * 	At this point I wouldn't be surprised if 8bit tcx 

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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:24:35 UTC 2014

Modified Files:
src/sys/arch/arm/omap: am335x_prcm.h

Log Message:
Add peripheral clock defines, from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/omap/am335x_prcm.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/omap/am335x_prcm.h
diff -u src/sys/arch/arm/omap/am335x_prcm.h:1.6 src/sys/arch/arm/omap/am335x_prcm.h:1.7
--- src/sys/arch/arm/omap/am335x_prcm.h:1.6	Thu Aug 29 15:50:41 2013
+++ src/sys/arch/arm/omap/am335x_prcm.h	Wed Jul 16 18:24:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.h,v 1.6 2013/08/29 15:50:41 riz Exp $	*/
+/*	$NetBSD: am335x_prcm.h,v 1.7 2014/07/16 18:24:35 bouyer Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -44,8 +44,73 @@ struct omap_module {
 };
 
 #define AM335X_PRCM_CM_PER	0x
+#define CM_PER_L4LS_CLKSTCTRL		0x000
+#define CM_PER_L3S_CLKSTCTRL		0x004
+#define CM_PER_L3_CLKSTCTRL		0x00C
+#define CM_PER_CPGMAC0_CLKCTRL		0x014
+#define CM_PER_LCDC_CLKCTRL		0x018
+#define CM_PER_USB0_CLKCTRL		0x01C
+#define CM_PER_TPTC0_CLKCTRL		0x024
+#define CM_PER_UART5_CLKCTRL		0x038
+#define CM_PER_MMC0_CLKCTRL		0x03C
+#define CM_PER_I2C2_CLKCTRL		0x044
+#define CM_PER_I2C1_CLKCTRL		0x048
+#define CM_PER_UART1_CLKCTRL		0x06C
+#define CM_PER_UART2_CLKCTRL		0x070
+#define CM_PER_UART3_CLKCTRL		0x074
+#define CM_PER_UART4_CLKCTRL		0x078
+#define CM_PER_TIMER7_CLKCTRL		0x07C
+#define CM_PER_TIMER2_CLKCTRL		0x080
+#define CM_PER_TIMER3_CLKCTRL		0x084
+#define CM_PER_TIMER4_CLKCTRL		0x088
+#define CM_PER_GPIO1_CLKCTRL		0x0AC
+#define CM_PER_GPIO2_CLKCTRL		0x0B0
+#define CM_PER_GPIO3_CLKCTRL		0x0B4
+#define CM_PER_TPCC_CLKCTRL		0x0BC
+#define CM_PER_EPWMSS1_CLKCTRL		0x0CC
+#define CM_PER_EPWMSS0_CLKCTRL		0x0D4
+#define CM_PER_EPWMSS2_CLKCTRL		0x0D8
+#define CM_PER_L3_INSTR_CLKCTRL		0x0DC
+#define CM_PER_L3_CLKCTRL		0x0E0
+#define CM_PER_PRUSS_CLKCTRL		0x0E8
+#define CM_PER_TIMER5_CLKCTRL		0x0EC
+#define CM_PER_TIMER6_CLKCTRL		0x0F0
+#define CM_PER_MMC1_CLKCTRL		0x0F4
+#define CM_PER_MMC2_CLKCTRL		0x0F8
+#define CM_PER_TPTC1_CLKCTRL		0x0FC
+#define CM_PER_TPTC2_CLKCTRL		0x100
+#define CM_PER_SPINLOCK0_CLKCTRL	0x10C
+#define CM_PER_MAILBOX0_CLKCTRL		0x110
+#define CM_PER_OCPWP_L3_CLKSTCTRL	0x12C
+#define CM_PER_OCPWP_CLKCTRL		0x130
+#define CM_PER_CPSW_CLKSTCTRL		0x144
+#define CM_PER_PRUSS_CLKSTCTRL		0x140
+
 #define AM335X_PRCM_CM_WKUP	0x0400
+#define CM_WKUP_CLKSTCTRL		0x000
+#define CM_WKUP_CONTROL_CLKCTRL		0x004
+#define CM_WKUP_GPIO0_CLKCTRL		0x008
+#define CM_WKUP_CM_L3_AON_CLKSTCTRL	0x01C
+#define CM_WKUP_CM_CLKSEL_DPLL_MPU	0x02C
+#define CM_WKUP_CM_IDLEST_DPLL_DISP	0x048
+#define CM_WKUP_CM_CLKSEL_DPLL_DISP	0x054
+#define CM_WKUP_CM_CLKDCOLDO_DPLL_PER	0x07C
+#define CM_WKUP_CM_CLKDCOLDO_DPLL_PER_CLKDCOLDO_ST		0x200
+#define CM_WKUP_CM_CLKDCOLDO_DPLL_PER_CLKDCOLDO_GATE_CTRL	0x100
+
+#define CM_WKUP_CM_CLKMODE_DPLL_DISP	0x098
+#define CM_WKUP_I2C0_CLKCTRL		0x0B8
+#define CM_WKUP_ADC_TSC_CLKCTRL		0x0BC
+
 #define AM335X_PRCM_CM_DPLL	0x0500
+#define CLKSEL_TIMER7_CLK		0x004
+#define CLKSEL_TIMER2_CLK		0x008
+#define CLKSEL_TIMER3_CLK		0x00C
+#define CLKSEL_TIMER4_CLK		0x010
+#define CLKSEL_TIMER5_CLK		0x018
+#define CLKSEL_TIMER6_CLK		0x01C
+#define CLKSEL_PRUSS_OCP_CLK		0x030
+
 #define AM335X_PRCM_CM_MPU	0x0600
 #define AM335X_PRCM_CM_DEVICE	0x0700
 #define AM335X_PRCM_CM_RTC	0x0800



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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:25:24 UTC 2014

Modified Files:
src/sys/arch/arm/omap: sitara_cmreg.h

Log Message:
Add USB control registers.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/sitara_cmreg.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/omap/sitara_cmreg.h
diff -u src/sys/arch/arm/omap/sitara_cmreg.h:1.1 src/sys/arch/arm/omap/sitara_cmreg.h:1.2
--- src/sys/arch/arm/omap/sitara_cmreg.h:1.1	Wed Apr 17 15:04:39 2013
+++ src/sys/arch/arm/omap/sitara_cmreg.h	Wed Jul 16 18:25:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sitara_cmreg.h,v 1.1 2013/04/17 15:04:39 bouyer Exp $	*/
+/*	$NetBSD: sitara_cmreg.h,v 1.2 2014/07/16 18:25:24 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
@@ -39,6 +39,12 @@
 #define SCM_REVISION_CUSTOM(x)	(((x)  0x00c0)   6)
 #define SCM_REVISION_MINOR(x)	(((x)  0x001f)   0)
 
+#define OMAP2SCM_USB_CTL0	0x620
+#define OMAP2SCM_USB_CTL1	0x628
+#define OMAP2SCM_USB_CTLx_SESSIONEND	0x10
+#define OMAP2SCM_USB_CTLx_VBUSDET	0x08
+#define OMAP2SCM_USB_CTLx_OTGPHY_PWD	0x02
+#define OMAP2SCM_USB_CTLx_CMPHY_PWD	0x01
 #define OMAP2SCM_MAC_ID0_LO	0x630
 #define OMAP2SCM_MAC_ID0_HI	0x634
 



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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:27:19 UTC 2014

Added Files:
src/sys/arch/arm/omap: tiotg.c tiotgreg.h

Log Message:
Add the bus front end for the Mentor Graphics USB OTG controllers found
in the TI am355x SoCs.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/tiotg.c \
src/sys/arch/arm/omap/tiotgreg.h

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

Added files:

Index: src/sys/arch/arm/omap/tiotg.c
diff -u /dev/null src/sys/arch/arm/omap/tiotg.c:1.1
--- /dev/null	Wed Jul 16 18:27:19 2014
+++ src/sys/arch/arm/omap/tiotg.c	Wed Jul 16 18:27:19 2014
@@ -0,0 +1,421 @@
+/* $NetBSD: tiotg.c,v 1.1 2014/07/16 18:27:19 bouyer Exp $ */
+/*
+ * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *	notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *	notice, this list of conditions and the following disclaimer in the
+ *	documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: tiotg.c,v 1.1 2014/07/16 18:27:19 bouyer Exp $);
+
+#include opt_omap.h
+#include locators.h
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/conf.h
+#include sys/bus.h
+#include sys/proc.h
+#include sys/kernel.h
+#include sys/mutex.h
+#include sys/condvar.h
+#include arm/omap/omap2_obiovar.h
+
+#include arm/omap/omap2_reg.h
+#include arm/omap/tiotgreg.h
+
+#ifdef TI_AM335X
+#  include arm/omap/am335x_prcm.h
+#  include arm/omap/omap2_prcm.h
+#  include arm/omap/sitara_cm.h
+#  include arm/omap/sitara_cmreg.h
+#endif
+
+#include dev/usb/usb.h
+#include dev/usb/usbdi.h
+#include dev/usb/usbdivar.h
+#include dev/usb/usb_mem.h
+#include dev/usb/motgvar.h
+
+#define MOTG_DEBUG
+#ifdef MOTG_DEBUG
+extern int motgdebug;
+#define DPRINTF(x) if (motgdebug) printf x
+#else
+#define DPRINTF(x)
+#endif
+
+struct tiotg_softc {
+	device_t		sc_dev;
+	bus_space_tag_t		sc_iot;
+	bus_space_handle_t	sc_ioh;
+	bus_dma_tag_t		sc_dmat;
+	int			sc_intrbase;
+	void *			sc_ih;
+	device_t		sc_motgdev[TI_OTG_NPORTS];
+};
+
+static int	tiotg_match(device_t, cfdata_t, void *);
+static void	tiotg_attach(device_t, device_t, void *);
+static int	tiotg_rescan(device_t, const char *, const int *);
+static void	tiotg_childdet(device_t, device_t);
+
+static int	tiotg_intr(void *);
+
+CFATTACH_DECL2_NEW(tiotg, sizeof(struct tiotg_softc),
+tiotg_match, tiotg_attach, NULL, NULL,
+tiotg_rescan, tiotg_childdet);
+
+/*
+ * motg device attachement and driver,
+ * for the per-port part of the controller: TI-specific part, phy and
+ * MI Mentor OTG.
+ */
+
+struct motg_attach_args {
+	int			aa_port;
+	int			aa_intr;
+	bus_space_tag_t		aa_iot;
+	bus_space_handle_t	aa_ioh;
+	bus_dma_tag_t		aa_dmat;
+};
+
+struct ti_motg_softc {
+	struct motg_softc	sc_motg;
+	bus_space_tag_t		sc_ctrliot;
+	bus_space_handle_t	sc_ctrlioh;
+	void *			sc_ctrlih;
+	int			sc_ctrlport;
+};
+static int	ti_motg_match(device_t, cfdata_t, void *);
+static void	ti_motg_attach(device_t, device_t, void *);
+static int	ti_motg_rescan(device_t, const char *, const int *);
+static void	ti_motg_childdet(device_t, device_t);
+static int	ti_motg_print(void *, const char *);
+static int	ti_motg_intr(void *);
+static void	ti_motg_poll(void *);
+
+CFATTACH_DECL2_NEW(motg, sizeof(struct ti_motg_softc),
+ti_motg_match, ti_motg_attach, NULL, NULL,
+ti_motg_rescan, ti_motg_childdet);
+
+static int
+tiotg_match(device_t parent, cfdata_t match, void *aux)
+{
+struct obio_attach_args *obio = aux;
+
+if ((obio-obio_addr == -1) || (obio-obio_size == 0) ||
+	(obio-obio_intrbase == -1))
+return 0;
+return 1;
+}
+
+static void
+tiotg_attach(device_t parent, device_t self, void *aux)
+{
+	struct tiotg_softc   *sc = device_private(self);
+	struct obio_attach_args *obio = aux;
+	

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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:31:17 UTC 2014

Modified Files:
src/sys/arch/arm/omap: files.omap2

Log Message:
Glue in tifb and tiotg drivers.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/omap/files.omap2

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

Modified files:

Index: src/sys/arch/arm/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.27 src/sys/arch/arm/omap/files.omap2:1.28
--- src/sys/arch/arm/omap/files.omap2:1.27	Tue Jun 18 15:22:37 2013
+++ src/sys/arch/arm/omap/files.omap2	Wed Jul 16 18:31:17 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.27 2013/06/18 15:22:37 matt Exp $
+#	$NetBSD: files.omap2,v 1.28 2014/07/16 18:31:17 bouyer Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -143,6 +143,13 @@ file	arch/arm/omap/obio_ohci.c		obioohci
 attach	ehci at obio with omap3_ehci
 file	arch/arm/omap/omap3_ehci.c		omap3_ehci
 
+# TI OTG controller
+define  tiotg_port {[port = -1], [mode = -1]}
+device	tiotg: tiotg_port
+attach	tiotg at obio
+file	arch/arm/omap/tiotg.c			tiotg
+attach  motg at tiotg_port
+
 attach	ahcisata at obio with omap5_ahcisata
 file	arch/arm/omap/omap5_ahcisata.c		omap5_ahcisata
 
@@ -150,6 +157,11 @@ device	omapfb: rasops16, rasops8, wsemul
 attach	omapfb at obio
 file	arch/arm/omap/omapfb.c			omapfb
 
+# TI AM335x framebuffer
+device	tifb: rasops16, rasops8, wsemuldisplaydev, vcons, edid
+attach	tifb at obio
+file	arch/arm/omap/tifb.c			tifb
+
 device	cpsw: ether, ifnet, arp, mii, mii_phy
 attach	cpsw at obio
 file	arch/arm/omap/if_cpsw.c			cpsw



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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:30:43 UTC 2014

Added Files:
src/sys/arch/arm/omap: tifb.c tifbreg.h

Log Message:
Work in progress on a driver for the graphic controller found in TI am355x SoCs,
based on the FreeBSD driver.
Only dumb framebuffer mode supported.
At this time, the video timings are hardcoded in the driver's source.
The timings inclued here are for the 12 1280x800 LCD+LVDS cape from
Chalk Elec.
A better way to define video modes is clearly needed.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/tifb.c \
src/sys/arch/arm/omap/tifbreg.h

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

Added files:

Index: src/sys/arch/arm/omap/tifb.c
diff -u /dev/null src/sys/arch/arm/omap/tifb.c:1.1
--- /dev/null	Wed Jul 16 18:30:43 2014
+++ src/sys/arch/arm/omap/tifb.c	Wed Jul 16 18:30:43 2014
@@ -0,0 +1,1068 @@
+/*	$NetBSD: tifb.c,v 1.1 2014/07/16 18:30:43 bouyer Exp $	*/
+
+/*
+ * Copyright (c) 2010 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2013 Oleksandr Tymoshenko go...@freebsd.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * A framebuffer driver for TI 35xx built-in video controller
+ * tested on beaglebone
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: tifb.c,v 1.1 2014/07/16 18:30:43 bouyer Exp $);
+
+#include opt_omap.h
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/kernel.h
+#include sys/device.h
+#include sys/malloc.h
+#include sys/lwp.h
+#include sys/kauth.h
+
+#include uvm/uvm_extern.h
+
+#include dev/videomode/videomode.h
+
+#include sys/bus.h
+#include arm/omap/tifbreg.h
+#include arm/omap/omap_var.h
+#include arm/omap/omap2_obiovar.h
+#include arm/omap/omap2_obioreg.h
+#ifdef TI_AM335X
+#  include arm/omap/am335x_prcm.h
+#  include arm/omap/omap2_prcm.h
+#  include arm/omap/sitara_cm.h
+#  include arm/omap/sitara_cmreg.h
+#endif
+
+#include dev/wscons/wsdisplayvar.h
+#include dev/wscons/wsconsio.h
+#include dev/wsfont/wsfont.h
+#include dev/rasops/rasops.h
+#include dev/wscons/wsdisplay_vconsvar.h
+
+#include dev/videomode/edidvar.h
+
+#include locators.h
+
+struct panel_info {
+	uint32_t panel_width;
+	uint32_t panel_height;
+	uint32_t panel_hfp;
+	uint32_t panel_hbp;
+	uint32_t panel_hsw;
+	uint32_t panel_vfp;
+	uint32_t panel_vbp;
+	uint32_t panel_vsw;
+	uint32_t ac_bias;
+	

CVS commit: src/sys/dev

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:32:21 UTC 2014

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add tifb and tiotg


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.290 src/sys/dev/DEVNAMES:1.291
--- src/sys/dev/DEVNAMES:1.290	Wed Jul 16 18:22:23 2014
+++ src/sys/dev/DEVNAMES	Wed Jul 16 18:32:21 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.290 2014/07/16 18:22:23 bouyer Exp $
+#	$NetBSD: DEVNAMES,v 1.291 2014/07/16 18:32:21 bouyer Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -1327,6 +1327,8 @@ tea5757			MI
 tfb			MI
 tga			MI
 ti			MI
+tiotg			arm
+tifb			arm
 timer			news68k
 timer			sparc
 timer			sparc64



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

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 18:36:46 UTC 2014

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

Log Message:
Add a commented out tifb and associated wsdisplay entry; mark the
driver as experimental and point out that video mode is hardcoded.
Add tiotg, mark as experimental but I think it's good enough to have
it in by default.


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

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

Modified files:

Index: src/sys/arch/evbarm/conf/BEAGLEBONE
diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.20 src/sys/arch/evbarm/conf/BEAGLEBONE:1.21
--- src/sys/arch/evbarm/conf/BEAGLEBONE:1.20	Fri Aug 16 02:21:53 2013
+++ src/sys/arch/evbarm/conf/BEAGLEBONE	Wed Jul 16 18:36:46 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBONE,v 1.20 2013/08/16 02:21:53 jmcneill Exp $
+#	$NetBSD: BEAGLEBONE,v 1.21 2014/07/16 18:36:46 bouyer Exp $
 #
 #	BEAGLEBONE -- TI AM335x board Kernel
 #
@@ -243,45 +243,77 @@ omapdmtimer2	at obio0 addr 0x48044000 si
 # Watchdog timers
 omapwdt32k*	at obio0 addr 0x44e35000 size 0x1000	# WDT1
 
-# onboard video
-#omapfb* 	at obio0 addr 0x4805 size 0x1
+# onboard video, experimental. Video mode is hardcoded in the driver
+#tifb* 	at obio0 addr 0x4830E000 size 0x1000 intr 36
 
 # make sure the console display is always wsdisplay0
-#wsdisplay0	at wsemuldisplaydev? console 1
 #wsdisplay*	at wsemuldisplaydev?
 
 # various options for wscons - we try to look as much like a standard
 # sun console as possible
-#options 	WSEMUL_VT100		# sun terminal emulation
-#options 	WS_DEFAULT_FG=WSCOL_BLACK
-#options 	WS_DEFAULT_BG=WSCOL_LIGHT_WHITE
-#options		WS_KERNEL_FG=WSCOL_GREEN
-#options		WS_KERNEL_BG=WSCOL_LIGHT_WHITE
-#options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
-#options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
+options 	WSEMUL_VT100
+options 	WSDISPLAY_COMPAT_PCVT
+options 	WSDISPLAY_COMPAT_SYSCONS
+options 	WSDISPLAY_COMPAT_USL
+options 	WSDISPLAY_SCROLLSUPPORT
+options 	WS_KERNEL_FG=WSCOL_GREEN
 #options 	WSDISPLAY_DEFAULTSCREENS=4
-#options		FONT_QVSS8x15
-#options 	FONT_GALLANT12x22	# the console font
+options 	FONT_GALLANT12x22
+options 	FONT_BOLD8x16
+# compatibility to other console drivers
+options 	WSDISPLAY_COMPAT_RAWKBD 	# can get raw scancodes
 
 pseudo-device	wsmux			# mouse  keyboard multiplexor
 pseudo-device	wsfont
 
-# On-board USB
-#ehci*		at obio0 addr 0x48064800 size 0x0400 intr 77
-#ohci*		at obio0 addr 0x48064400 size 0x0400 intr 76
-#usb*		at ohci?
-#usb*		at ehci?
-#uhub*		at usb?
-#uhub*		at uhub? port ?
-#umass*		at uhub? port ? configuration ? interface ?
-#wd*		at umass?
-#uhidev*		at uhub?
-#ukbd*		at uhidev?
-#ums*		at uhidev?
-#wskbd*		at ukbd?
-#wsmouse*	at ums?
+# On-board USB. Experimental
+tiotg* 	at obio0 addr 0x4740 size 0x5000 intrbase 17
+motg*	at tiotg? port ?
+usb*		at motg?
+uhub*		at usb?
+uhub*		at uhub? port ?
+uhidev*		at uhub?
+ukbd*		at uhidev?
+ums*		at uhidev?
+wskbd*		at ukbd?
+wsmouse*	at ums?
+# USB Modem
+umodem* at uhub? port ? configuration ?
+ucom*	at umodem?
+# Serial adapters
+ubsa*	at uhub? port ?		# Belkin serial adapter
+ucom*	at ubsa? portno ?
+
+uchcom* at uhub? port ? 	# WinChipHead CH341/CH340 serial adapter
+ucom*	at uchcom? portno ?
+
+uftdi*	at uhub? port ?		# FTDI FT8U100AX serial adapter
+ucom*	at uftdi? portno ?
+
+uipaq*	at uhub? port ?		# iPAQ PDAs
+ucom*	at uipaq? portno ?
+
+umct*	at uhub? port ?		# MCT USB-RS232 serial adapter
+ucom*	at umct? portno ?
+
+uplcom* at uhub? port ? 	# I/O DATA USB-RSAQ2 serial adapter
+ucom*	at uplcom? portno ?
+
+uslsa*	at uhub? port ?		# Silicon Labs USB-RS232 serial adapter
+ucom*	at uslsa? portno ?
+
+uvscom* at uhub? port ? 	# SUNTAC Slipper U VS-10U serial adapter
+ucom*	at uvscom? portno ?
+
+
+umass*		at uhub? port ? configuration ? interface ?
+wd*		at umass?
+# SCSI bus support
+scsibus*	at scsi?
+# SCSI devices
+sd*		at scsibus? target ? lun ?  # SCSI disk drives
 
-#axe*		at uhub? port ? configuration ? interface ?
+axe*		at uhub? port ? configuration ? interface ?
 
 # Ethernet
 cpsw*		at obio0 addr 0x4a10 size 0x8000 intrbase 40



CVS commit: src/usr.bin/make

2014-07-16 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Wed Jul 16 18:58:07 UTC 2014

Modified Files:
src/usr.bin/make: parse.c

Log Message:
Remove an accidental C99-ism in tools which needs to be portable


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.196 src/usr.bin/make/parse.c:1.197
--- src/usr.bin/make/parse.c:1.196	Wed Jul 16 16:52:59 2014
+++ src/usr.bin/make/parse.c	Wed Jul 16 18:58:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $	*/
+/*	$NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $;
+static char rcsid[] = $NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)parse.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $);
+__RCSID($NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1963,6 +1963,7 @@ Parse_DoVar(char *line, GNode *ctxt)
 static Boolean
 ParseMaybeSubMake(const char *cmd)
 {
+size_t i;
 static struct {
 	const char *name;
 	size_t len;
@@ -1974,7 +1975,7 @@ ParseMaybeSubMake(const char *cmd)
 	MKV($(.MAKE)),
 	MKV(make),
 };
-for (size_t i = 0; i  __arraycount(vals); i++) {
+for (i = 0; i  __arraycount(vals); i++) {
 	char *ptr;
 	if ((ptr = strstr(cmd, vals[i].name)) == NULL)
 	continue;



CVS commit: src/doc

2014-07-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 16 19:05:37 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
Mention tiotg and tifb


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1947 src/doc/CHANGES:1.1948
--- src/doc/CHANGES:1.1947	Mon Jul 14 14:08:41 2014
+++ src/doc/CHANGES	Wed Jul 16 19:05:37 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1947 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1948 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -443,3 +443,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	dhcpcd(8): Import dhcpcd-6.4.2 [roy 20140714]
 	wskbd(4): Added belgian keyboard layouts (KB_BE) to pckbd(4) and
 		ukbd(4). [mbalmer 20140714]
+	tiotg(4): added a driver for the Texas Instruments AM335x SoC's
+	USB OTG controller. [bouyer 20140716]
+	tifb(4): added an experimental driver for the Texas Instruments AM335x
+	SoC's graphic controller. [bouyer 20140716]



CVS commit: src/doc

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 19:05:42 UTC 2014

Modified Files:
src/doc: 3RDPARTY

Log Message:
Add doc/3RDPARTY entry for MesaLib.


To generate a diff of this commit:
cvs rdiff -u -r1.1136 -r1.1137 src/doc/3RDPARTY

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.1136 src/doc/3RDPARTY:1.1137
--- src/doc/3RDPARTY:1.1136	Mon Jul 14 14:08:41 2014
+++ src/doc/3RDPARTY	Wed Jul 16 19:05:42 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1136 2014/07/14 14:08:41 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1137 2014/07/16 19:05:42 riastradh Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -826,6 +826,20 @@ License:	BSD
 Location:	sys/external/bsd/drm/dist
 Notes:
 
+Package:	MesaLib
+Version:	7.11.2
+Current Vers:	10.2.3
+Maintainer:	mesa-git@?
+Archive Site:	ftp://ftp.freedesktop.org/pub/mesa/
+Home Page:	http://www.mesa3d.org/
+Mailing List:
+Responsible:	riastradh, mrg
+License:	ISC
+Location:	xsrc/external/mit/MesaLib/dist
+Notes:
+Vendor tag:	xorg
+Release tag:	MesaLib-X-Y-Z
+
 Package:	mopd
 Version:	2.5.3
 Current Vers:	2.5.3



CVS commit: src/lib/libc/stdlib

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 19:09:53 UTC 2014

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR 47428).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.32 src/lib/libc/stdlib/jemalloc.c:1.33
--- src/lib/libc/stdlib/jemalloc.c:1.32	Tue Feb 25 12:13:19 2014
+++ src/lib/libc/stdlib/jemalloc.c	Wed Jul 16 19:09:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.33 2014/07/16 19:09:53 riastradh Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans jas...@freebsd.org.
@@ -118,7 +118,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $); */ 
-__RCSID($NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $);
+__RCSID($NetBSD: jemalloc.c,v 1.33 2014/07/16 19:09:53 riastradh Exp $);
 
 #ifdef __FreeBSD__
 #include libc_private.h
@@ -3928,7 +3928,6 @@ _malloc_prefork(void)
 		if (arenas[i] != NULL)
 			malloc_mutex_lock(arenas[i]-mtx);
 	}
-	malloc_mutex_unlock(arenas_mtx);
 
 	malloc_mutex_lock(base_mtx);
 
@@ -3946,7 +3945,6 @@ _malloc_postfork(void)
 
 	malloc_mutex_unlock(base_mtx);
 
-	malloc_mutex_lock(arenas_mtx);
 	for (i = 0; i  narenas; i++) {
 		if (arenas[i] != NULL)
 			malloc_mutex_unlock(arenas[i]-mtx);



CVS commit: src/usr.bin/make

2014-07-16 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Wed Jul 16 19:31:11 UTC 2014

Modified Files:
src/usr.bin/make: parse.c

Log Message:
Avoid use of __arraycount in tools as not portable


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.197 src/usr.bin/make/parse.c:1.198
--- src/usr.bin/make/parse.c:1.197	Wed Jul 16 18:58:07 2014
+++ src/usr.bin/make/parse.c	Wed Jul 16 19:31:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $	*/
+/*	$NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 justin Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $;
+static char rcsid[] = $NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 justin Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)parse.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $);
+__RCSID($NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 justin Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1975,7 +1975,7 @@ ParseMaybeSubMake(const char *cmd)
 	MKV($(.MAKE)),
 	MKV(make),
 };
-for (i = 0; i  __arraycount(vals); i++) {
+for (i = 0; i  sizeof(vals)/sizeof(vals[0]); i++) {
 	char *ptr;
 	if ((ptr = strstr(cmd, vals[i].name)) == NULL)
 	continue;



CVS import: src/sys/external/bsd/drm2/dist

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 19:35:31 UTC 2014

Update of /cvsroot/src/sys/external/bsd/drm2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv11977

Log Message:
Import drm from Linux 3.15 (commitid 1860e379875dfe7271c649058aeddffe5afd9d0d).

   drivers/gpu/drm  - sys/external/bsd/drm2/dist/drm
   include/drm  - sys/external/bsd/drm2/dist/include/drm
   include/uapi/drm - sys/external/bsd/drm2/dist/uapi/drm

GPL sources excluded.

Status:

Vendor Tag: LINUX
Release Tags:   linux-3-15-drm-bsd

U src/sys/external/bsd/drm2/dist/drm/Kconfig
U src/sys/external/bsd/drm2/dist/drm/Makefile
U src/sys/external/bsd/drm2/dist/drm/README.drm
U src/sys/external/bsd/drm2/dist/drm/ati_pcigart.c
C src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c
U src/sys/external/bsd/drm2/dist/drm/drm_auth.c
C src/sys/external/bsd/drm2/dist/drm/drm_buffer.c
C src/sys/external/bsd/drm2/dist/drm/drm_bufs.c
U src/sys/external/bsd/drm2/dist/drm/drm_cache.c
C src/sys/external/bsd/drm2/dist/drm/drm_context.c
C src/sys/external/bsd/drm2/dist/drm/drm_crtc.c
C src/sys/external/bsd/drm2/dist/drm/drm_crtc_helper.c
N src/sys/external/bsd/drm2/dist/drm/drm_crtc_internal.h
C src/sys/external/bsd/drm2/dist/drm/drm_debugfs.c
U src/sys/external/bsd/drm2/dist/drm/drm_dma.c
C src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c
U src/sys/external/bsd/drm2/dist/drm/drm_drv.c
C src/sys/external/bsd/drm2/dist/drm/drm_edid.c
U src/sys/external/bsd/drm2/dist/drm/drm_encoder_slave.c
C src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
N src/sys/external/bsd/drm2/dist/drm/drm_flip_work.c
U src/sys/external/bsd/drm2/dist/drm/drm_fops.c
C src/sys/external/bsd/drm2/dist/drm/drm_gem.c
C src/sys/external/bsd/drm2/dist/drm/drm_global.c
U src/sys/external/bsd/drm2/dist/drm/drm_hashtab.c
U src/sys/external/bsd/drm2/dist/drm/drm_info.c
U src/sys/external/bsd/drm2/dist/drm/drm_ioc32.c
C src/sys/external/bsd/drm2/dist/drm/drm_ioctl.c
C src/sys/external/bsd/drm2/dist/drm/drm_irq.c
U src/sys/external/bsd/drm2/dist/drm/drm_lock.c
U src/sys/external/bsd/drm2/dist/drm/drm_memory.c
N src/sys/external/bsd/drm2/dist/drm/drm_mipi_dsi.c
C src/sys/external/bsd/drm2/dist/drm/drm_mm.c
C src/sys/external/bsd/drm2/dist/drm/drm_modes.c
N src/sys/external/bsd/drm2/dist/drm/drm_panel.c
C src/sys/external/bsd/drm2/dist/drm/drm_pci.c
N src/sys/external/bsd/drm2/dist/drm/drm_plane_helper.c
C src/sys/external/bsd/drm2/dist/drm/drm_platform.c
U src/sys/external/bsd/drm2/dist/drm/drm_prime.c
N src/sys/external/bsd/drm2/dist/drm/drm_probe_helper.c
N src/sys/external/bsd/drm2/dist/drm/drm_rect.c
U src/sys/external/bsd/drm2/dist/drm/drm_scatter.c
C src/sys/external/bsd/drm2/dist/drm/drm_stub.c
N src/sys/external/bsd/drm2/dist/drm/drm_trace.h
N src/sys/external/bsd/drm2/dist/drm/drm_trace_points.c
U src/sys/external/bsd/drm2/dist/drm/drm_vm.c
N src/sys/external/bsd/drm2/dist/drm/drm_vma_manager.c
U src/sys/external/bsd/drm2/dist/drm/ast/Kconfig
U src/sys/external/bsd/drm2/dist/drm/ast/Makefile
U src/sys/external/bsd/drm2/dist/drm/ast/ast_dram_tables.h
U src/sys/external/bsd/drm2/dist/drm/ast/ast_drv.c
U src/sys/external/bsd/drm2/dist/drm/ast/ast_drv.h
U src/sys/external/bsd/drm2/dist/drm/ast/ast_fb.c
U src/sys/external/bsd/drm2/dist/drm/ast/ast_main.c
U src/sys/external/bsd/drm2/dist/drm/ast/ast_mode.c
U src/sys/external/bsd/drm2/dist/drm/ast/ast_post.c
U src/sys/external/bsd/drm2/dist/drm/ast/ast_tables.h
U src/sys/external/bsd/drm2/dist/drm/ast/ast_ttm.c
N src/sys/external/bsd/drm2/dist/drm/i2c/Kconfig
U src/sys/external/bsd/drm2/dist/drm/i2c/Makefile
U src/sys/external/bsd/drm2/dist/drm/i2c/ch7006_drv.c
U src/sys/external/bsd/drm2/dist/drm/i2c/ch7006_mode.c
U src/sys/external/bsd/drm2/dist/drm/i2c/ch7006_priv.h
U src/sys/external/bsd/drm2/dist/drm/i2c/sil164_drv.c
U src/sys/external/bsd/drm2/dist/drm/i810/Makefile
U src/sys/external/bsd/drm2/dist/drm/i810/i810_dma.c
U src/sys/external/bsd/drm2/dist/drm/i810/i810_drv.c
U src/sys/external/bsd/drm2/dist/drm/i810/i810_drv.h
N src/sys/external/bsd/drm2/dist/drm/i915/Kconfig
U src/sys/external/bsd/drm2/dist/drm/i915/Makefile
U src/sys/external/bsd/drm2/dist/drm/i915/dvo.h
U src/sys/external/bsd/drm2/dist/drm/i915/dvo_ch7017.c
C src/sys/external/bsd/drm2/dist/drm/i915/dvo_ch7xxx.c
U src/sys/external/bsd/drm2/dist/drm/i915/dvo_ivch.c
U src/sys/external/bsd/drm2/dist/drm/i915/dvo_ns2501.c
U src/sys/external/bsd/drm2/dist/drm/i915/dvo_sil164.c
U src/sys/external/bsd/drm2/dist/drm/i915/dvo_tfp410.c
N src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
U src/sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c
C src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
C src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
C src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
C src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
C src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c
U src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_debug.c
U 

CVS commit: src/sys/arch/sparc64

2014-07-16 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jul 16 19:53:18 UTC 2014

Modified Files:
src/sys/arch/sparc64/include: ctlreg.h
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
sun4v: Introduce SET_MMU_CONTEXTID macro for setting the mmu context id on both 
sun4u and sun4v


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sparc64/include/ctlreg.h
cvs rdiff -u -r1.363 -r1.364 src/sys/arch/sparc64/sparc64/locore.s

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

Modified files:

Index: src/sys/arch/sparc64/include/ctlreg.h
diff -u src/sys/arch/sparc64/include/ctlreg.h:1.60 src/sys/arch/sparc64/include/ctlreg.h:1.61
--- src/sys/arch/sparc64/include/ctlreg.h:1.60	Mon Dec 16 20:17:35 2013
+++ src/sys/arch/sparc64/include/ctlreg.h	Wed Jul 16 19:53:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.60 2013/12/16 20:17:35 palle Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.61 2014/07/16 19:53:18 palle Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -55,6 +55,8 @@
 #define	ASI_PHYS_CACHED_LITTLE		0x1c	/* [4u] MMU bypass to main memory, little endian */
 #define	ASI_PHYS_NON_CACHED_LITTLE	0x1d	/* [4u] MMU bypass to I/O location, little endian */
 
+#define ASI_MMU0x21	/* [4v] MMU context control - both IMMU and DMMU */
+
 #define	ASI_NUCLEUS_QUAD_LDD		0x24	/* [4u] use w/LDDA to load 128-bit item */
 #define	ASI_NUCLEUS_QUAD_LDD_LITTLE	0x2c	/* [4u] use w/LDDA to load 128-bit item, little endian */
 

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.363 src/sys/arch/sparc64/sparc64/locore.s:1.364
--- src/sys/arch/sparc64/sparc64/locore.s:1.363	Sun Jul 13 22:32:49 2014
+++ src/sys/arch/sparc64/sparc64/locore.s	Wed Jul 16 19:53:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.363 2014/07/13 22:32:49 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.364 2014/07/16 19:53:18 palle Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -101,7 +101,7 @@
 #include ksyms.h
 
 	/* Misc. macros */
-	
+
 	.macro	GET_MAXCWP reg
 #ifdef SUN4V
 	sethi	%hi(cputyp), \reg
@@ -120,7 +120,27 @@
 3:
 	.endm
 
-		
+
+	.macro	SET_MMU_CONTEXTID ctxid,ctx,scratch
+#ifdef SUN4V
+	sethi	%hi(cputyp), \scratch
+	ld	[\scratch + %lo(cputyp)], \scratch
+	cmp	\scratch, CPU_SUN4V
+	bne,pt	%icc, 2f
+	 nop
+	/* sun4v */
+	stxa	\ctxid, [\ctx] ASI_MMU;
+	ba	3f
+	 nop
+2:		
+#endif	
+	/* sun4u */
+	stxa	\ctxid, [\ctx] ASI_DMMU;
+3:
+	
+	.endm
+
+
 #ifdef SUN4V
 	/* Misc. sun4v macros */
 	
@@ -1362,13 +1382,13 @@ intr_setup_msg:
 	\
 	wrpr	%g0, %g5, %otherwin; \
 	\
-	sethi	%hi(KERNBASE), %g5; \
 	mov	CTX_PRIMARY, %g7; \
 	\
 	wrpr	%g0, WSTATE_KERN, %wstate;			/* Enable kernel mode window traps -- now we can trap again */ \
 	\
-	stxa	%g0, [%g7] ASI_DMMU; /* Switch MMU to kernel primary context */ \
+	SET_MMU_CONTEXTID %g0, %g7, %g5;			/* Switch MMU to kernel primary context */ \
 	\
+	sethi	%hi(KERNBASE), %g5; \
 	flush	%g5;		/* Some convenient address that won't trap */ \
 1:
 	
@@ -1463,9 +1483,9 @@ intr_setup_msg:
 	wrpr	%g0, 0, %canrestore; \
 	mov	CTX_PRIMARY, %g7; \
 	wrpr	%g0, %g5, %otherwin; \
-	sethi	%hi(KERNBASE), %g5; \
 	wrpr	%g0, WSTATE_KERN, %wstate;			/* Enable kernel mode window traps -- now we can trap again */ \
-	stxa	%g0, [%g7] ASI_DMMU; /* Switch MMU to kernel primary context */ \
+	SET_MMU_CONTEXTID %g0, %g7, %g5;			/* Switch MMU to kernel primary context */ \
+	sethi	%hi(KERNBASE), %g5; \
 	flush	%g5;		/* Some convenient address that won't trap */ \
 1:
 #endif /* _LP64 */



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

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 20:03:57 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm: drm_agpsupport.c drm_buffer.c
drm_bufs.c drm_context.c drm_crtc.c drm_crtc_helper.c drm_debugfs.c
drm_dp_helper.c drm_edid.c drm_fb_helper.c drm_gem.c drm_ioctl.c
drm_irq.c drm_mm.c drm_modes.c drm_pci.c drm_platform.c drm_stub.c
src/sys/external/bsd/drm2/dist/drm/i915: dvo_ch7xxx.c i915_dma.c
i915_drv.c i915_drv.h i915_gem.c i915_gem_context.c
i915_gem_execbuffer.c i915_gem_tiling.c i915_irq.c intel_bios.c
intel_crt.c intel_ddi.c intel_display.c intel_dp.c intel_drv.h
intel_hdmi.c intel_i2c.c intel_lvds.c intel_opregion.c
intel_overlay.c intel_panel.c intel_pm.c intel_ringbuffer.c
intel_ringbuffer.h intel_sdvo.c intel_tv.c intel_uncore.c
src/sys/external/bsd/drm2/dist/drm/vmwgfx: vmwgfx_kms.c
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_crtc.h
drm_crtc_helper.h drm_fb_helper.h drm_mm.h drm_modes.h
src/sys/external/bsd/drm2/dist/uapi/drm: drm.h drm_mode.h
Removed Files:
src/sys/external/bsd/drm2/dist/drm: drm_edid_modes.h drm_proc.c
src/sys/external/bsd/drm2/dist/drm/i915: intel_fb.c
src/sys/external/bsd/drm2/dist/uapi/drm: mga_drm.h

Log Message:
fix merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c \
src/sys/external/bsd/drm2/dist/drm/drm_buffer.c \
src/sys/external/bsd/drm2/dist/drm/drm_context.c \
src/sys/external/bsd/drm2/dist/drm/drm_crtc.c \
src/sys/external/bsd/drm2/dist/drm/drm_crtc_helper.c \
src/sys/external/bsd/drm2/dist/drm/drm_debugfs.c \
src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c \
src/sys/external/bsd/drm2/dist/drm/drm_edid.c \
src/sys/external/bsd/drm2/dist/drm/drm_gem.c \
src/sys/external/bsd/drm2/dist/drm/drm_ioctl.c \
src/sys/external/bsd/drm2/dist/drm/drm_mm.c \
src/sys/external/bsd/drm2/dist/drm/drm_pci.c \
src/sys/external/bsd/drm2/dist/drm/drm_platform.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/drm_bufs.c \
src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/sys/external/bsd/drm2/dist/drm/drm_edid_modes.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/drm/drm_irq.c \
src/sys/external/bsd/drm2/dist/drm/drm_modes.c \
src/sys/external/bsd/drm2/dist/drm/drm_stub.c
cvs rdiff -u -r1.2 -r0 src/sys/external/bsd/drm2/dist/drm/drm_proc.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/i915/dvo_ch7xxx.c \
src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c \
src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c \
src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_hdmi.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h \
src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_crt.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_ddi.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_overlay.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_tv.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_bios.c \
src/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c
cvs rdiff -u -r1.1.1.1 -r0 src/sys/external/bsd/drm2/dist/drm/i915/intel_fb.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h \
src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h \
src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_mm.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

CVS commit: src/sys/external/bsd/drm2/dist/drm

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 20:08:37 UTC 2014

Removed Files:
src/sys/external/bsd/drm2/dist/drm: drm_trace.h drm_trace_points.c

Log Message:
Delete troublesome drm_trace.h and drm_trace_points.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/sys/external/bsd/drm2/dist/drm/drm_trace.h \
src/sys/external/bsd/drm2/dist/drm/drm_trace_points.c

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



CVS commit: src/sys/fs/msdosfs

2014-07-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 16 20:09:00 UTC 2014

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

Log Message:
Limit the minimum size of a disk sector to 512 bytes, to prevent memory
overflow on extremely low secsize. This normally conforms to the old standard
(for which there doesn't seem to be a clear spec). Since 2011, IDEMA's Advanced
Format standardizes it to 4k, so this change won't cause any trouble on
new devices.

Put the printf under DIAGNOSTIC temporarily to see if someone complains.

after a quick discussion on tech-kern


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/fs/msdosfs/msdosfs_vfsops.c

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

Modified files:

Index: src/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.113 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.114
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.113	Tue Jul 15 11:43:54 2014
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Wed Jul 16 20:09:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.113 2014/07/15 11:43:54 christos Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.114 2014/07/16 20:09:00 maxv Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.113 2014/07/15 11:43:54 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.114 2014/07/16 20:09:00 maxv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -493,6 +493,14 @@ msdosfs_mountfs(struct vnode *devvp, str
 		psize = 0;
 		error = 0;
 	}
+	if (secsize  DEV_BSIZE) {
+#ifdef DIAGNOSTIC /* XXX: to be converted to DPRINTF */
+		printf(%s(): Invalid block secsize (%d  DEV_BSIZE)\n, __func__,
+		secsize);
+#endif
+		error = EINVAL;
+		goto error_exit;
+	}
 
 	if (argp-flags  MSDOSFSMNT_GEMDOSFS) {
 		if (secsize != GEMDOSFS_BSIZE) {



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 21:11:47 UTC 2014

Removed Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_trace.h

Log Message:
I thought I removed this troublemaker already.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_trace.h

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 21:28:50 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: intel_display.c

Log Message:
Restore error message tweak that got lost in the merge.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_display.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/external/bsd/drm2/dist/drm/i915/intel_display.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.8 src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.9
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c:1.8	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c	Wed Jul 16 21:28:50 2014
@@ -11329,10 +11329,12 @@ static void i915_disable_vga(struct drm_
 	const bus_size_t vgabase = 0x3c0;
 	const bus_space_tag_t iot = dev-pdev-pd_pa.pa_iot;
 	bus_space_handle_t ioh;
+	int error;
 
-	if (bus_space_map(iot, vgabase, 0x10, 0, ioh)) {
+	error = bus_space_map(iot, vgabase, 0x10, 0, ioh);
+	if (error) {
 		aprint_error_dev(dev-pdev-pd_dev,
-		unable to map VGA registers);
+		unable to map VGA registers: %d\n, error);
 	} else {
 		CTASSERT(vgabase = VGA_SR_INDEX);
 		CTASSERT(vgabase = VGA_SR_DATA);



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 21:48:53 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c

Log Message:
Explain why i915_gem_release_mmap is broken.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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/external/bsd/drm2/dist/drm/i915/i915_gem.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.13 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.14
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.13	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c	Wed Jul 16 21:48:53 2014
@@ -2140,6 +2140,24 @@ i915_gem_release_mmap(struct drm_i915_ge
 		mutex_enter(obj-base.gemo_shm_uao-vmobjlock);
 		KASSERT(obj-pages != NULL);
 		/* Force a fresh fault for each page.  */
+		/*
+		 * XXX OOPS!  This doesn't actually do what we want.
+		 * This causes a fresh fault for access to the backing
+		 * pages -- but nothing accesses the backing pages
+		 * directly!  What is actually entered into CPU page
+		 * table entries is aperture addresses which have been
+		 * programmed by the GTT to refer to those backing
+		 * pages.
+		 *
+		 * We need to clear those page table entries, but
+		 * there's no good way to do that at the moment: nobody
+		 * records for us a map from either uvm objects or
+		 * physical device addresses to a list of all virtual
+		 * pages where they have been mapped.  pmap(9) records
+		 * a map only from physical RAM addresses to virtual
+		 * pages; it does nothing for physical device
+		 * addresses.
+		 */
 		TAILQ_FOREACH(page, obj-igo_pageq, pageq.queue)
 			pmap_page_protect(page, VM_PROT_NONE);
 		mutex_exit(obj-base.gemo_shm_uao-vmobjlock);



CVS commit: src/sys/external/bsd/drm2/include/linux

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 23:24:24 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux: pci.h

Log Message:
Remove needless pci_map_rom error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/pci.h

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

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/pci.h
diff -u src/sys/external/bsd/drm2/include/linux/pci.h:1.5 src/sys/external/bsd/drm2/include/linux/pci.h:1.6
--- src/sys/external/bsd/drm2/include/linux/pci.h:1.5	Wed Jul 16 20:59:58 2014
+++ src/sys/external/bsd/drm2/include/linux/pci.h	Wed Jul 16 23:24:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.h,v 1.5 2014/07/16 20:59:58 riastradh Exp $	*/
+/*	$NetBSD: pci.h,v 1.6 2014/07/16 23:24:23 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -439,16 +439,13 @@ pci_map_rom(struct pci_dev *pdev, size_t
 	if (pci_mapreg_map(pdev-pd_pa, PCI_MAPREG_ROM, PCI_MAPREG_TYPE_ROM,
 		(BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR),
 		pdev-pd_rom_bst, pdev-pd_rom_bsh, NULL, pdev-pd_rom_size)
-	!= 0) {
-		aprint_error_dev(pdev-pd_dev, unable to map ROM\n);
+	!= 0)
 		return NULL;
-	}
 	pdev-pd_kludges |= NBPCI_KLUDGE_MAP_ROM;
 
 	/* XXX This type is obviously wrong in general...  */
 	if (pci_find_rom(pdev-pd_pa, pdev-pd_rom_bst, pdev-pd_rom_bsh,
 		PCI_ROM_CODE_TYPE_X86, bsh, size)) {
-		aprint_error_dev(pdev-pd_dev, unable to find ROM\n);
 		pci_unmap_rom(pdev, NULL);
 		return NULL;
 	}



CVS commit: src/sys/external/bsd/drm2

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Jul 16 23:25:18 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c i915_drv.c
i915_drv.h intel_uncore.c
src/sys/external/bsd/drm2/i915drm: i915_pci.c

Log Message:
Get suspend/resume sorta working for i915drm.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/i915drm/i915_pci.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/external/bsd/drm2/dist/drm/i915/i915_dma.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.10
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.9	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c	Wed Jul 16 23:25:18 2014
@@ -1851,6 +1851,7 @@ out_gtt:
 	dev_priv-gtt.base.cleanup(dev_priv-gtt.base);
 out_regs:
 	intel_uncore_fini(dev);
+	intel_uncore_destroy(dev);
 	pci_iounmap(dev-pdev, dev_priv-regs);
 put_bridge:
 	pci_dev_put(dev_priv-bridge_dev);
@@ -1966,6 +1967,7 @@ int i915_driver_unload(struct drm_device
 	dev_priv-gtt.base.cleanup(dev_priv-gtt.base);
 
 	intel_uncore_fini(dev);
+	intel_uncore_destroy(dev);
 	if (dev_priv-regs != NULL)
 		pci_iounmap(dev-pdev, dev_priv-regs);
 

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.5
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.4	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c	Wed Jul 16 23:25:18 2014
@@ -427,7 +427,7 @@ bool i915_semaphore_is_enabled(struct dr
 	return true;
 }
 
-static int i915_drm_freeze(struct drm_device *dev)
+int i915_drm_freeze(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev-dev_private;
 	struct drm_crtc *crtc;
@@ -563,7 +563,7 @@ static void intel_resume_hotplug(struct 
 	drm_helper_hpd_irq_event(dev);
 }
 
-static int i915_drm_thaw_early(struct drm_device *dev)
+int i915_drm_thaw_early(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev-dev_private;
 
@@ -644,15 +644,13 @@ static int __i915_drm_thaw(struct drm_de
 	return error;
 }
 
-#ifndef __NetBSD__		/* XXX freeze/thaw */
-static int i915_drm_thaw(struct drm_device *dev)
+int i915_drm_thaw(struct drm_device *dev)
 {
 	if (drm_core_check_feature(dev, DRIVER_MODESET))
 		i915_check_and_clear_faults(dev);
 
 	return __i915_drm_thaw(dev, true);
 }
-#endif
 
 static int i915_resume_early(struct drm_device *dev)
 {

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.5 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.6
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.5	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h	Wed Jul 16 23:25:18 2014
@@ -2158,6 +2158,10 @@ extern int i915_resume(struct drm_device
 extern int i915_master_create(struct drm_device *dev, struct drm_master *master);
 extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
 
+extern int i915_drm_freeze(struct drm_device *dev);
+extern int i915_drm_thaw_early(struct drm_device *dev);
+extern int i915_drm_thaw(struct drm_device *dev);
+
 /* i915_params.c */
 struct i915_params {
 	int modeset;
@@ -2230,6 +2234,7 @@ extern void intel_uncore_early_sanitize(
 extern void intel_uncore_init(struct drm_device *dev);
 extern void intel_uncore_check_errors(struct drm_device *dev);
 extern void intel_uncore_fini(struct drm_device *dev);
+extern void intel_uncore_destroy(struct drm_device *dev);
 
 void
 i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,

Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c:1.4
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c:1.3	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c	Wed Jul 16 23:25:18 2014
@@ -868,14 +868,16 @@ void intel_uncore_init(struct drm_device
 
 void intel_uncore_fini(struct drm_device *dev)
 {
-#ifdef __NetBSD__
-	struct drm_i915_private *const dev_priv = dev-dev_private;
-#endif
-
 	/* Paranoia: make sure we have disabled everything before we exit. */
 	intel_uncore_sanitize(dev);
 	intel_uncore_forcewake_reset(dev, false);
+}
+
+void intel_uncore_destroy(struct drm_device *dev)
+{
 #ifdef __NetBSD__
+	struct drm_i915_private *const dev_priv = 

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

2014-07-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul 16 23:54:32 UTC 2014

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
need opt_arm_debug.h for VERBOSE_INIT_ARM


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/rpi/rpi_machdep.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.41 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.42
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.41	Sun Apr  6 12:43:19 2014
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Jul 16 23:54:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.41 2014/04/06 12:43:19 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.42 2014/07/16 23:54:32 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,11 +30,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.41 2014/04/06 12:43:19 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.42 2014/07/16 23:54:32 jmcneill Exp $);
 
 #include opt_evbarm_boardtype.h
 #include opt_ddb.h
 #include opt_kgdb.h
+#include opt_arm_debug.h
 
 #include sdhc.h
 #include bcmdwctwo.h



CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm

2014-07-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul 16 23:59:58 UTC 2014

Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_kern_lib.c
vchiq_shim.c

Log Message:
From 
https://github.com/raspberrypi/linux/commit/517d5c1c9ceb7bf94c4e56e4fb97758e13f24b3b

 Fix for ALSA driver crash
 Avoids an issue when closing and opening vchiq where a message can arrive 
 before service handle has been written


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.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/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.4 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.5
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.4	Thu Mar 27 23:03:07 2014
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c	Wed Jul 16 23:59:58 2014
@@ -288,12 +288,13 @@ VCHIQ_STATUS_T vchiq_open_service(
 		NULL);
 
 	if (service) {
+		*phandle = service-handle;
 		status = vchiq_open_service_internal(service,
 		(uintptr_t)current);
-		if (status == VCHIQ_SUCCESS)
-			*phandle = service-handle;
-		else
+		if (status != VCHIQ_SUCCESS) {
 			vchiq_remove_service(service-handle);
+			*phandle = VCHIQ_SERVICE_HANDLE_INVALID;
+		}
 	}
 
 failed:

Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c:1.3 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c:1.4
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c:1.3	Thu Mar 27 23:03:07 2014
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c	Wed Jul 16 23:59:58 2014
@@ -632,6 +632,9 @@ int32_t vchi_service_open(VCHI_INSTANCE_
 {
 	VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle;
 	SHIM_SERVICE_T *service = service_alloc(instance, setup);
+
+	*handle = (VCHI_SERVICE_HANDLE_T)service;
+
 	if (service) {
 		VCHIQ_SERVICE_PARAMS_T params;
 		VCHIQ_STATUS_T status;
@@ -648,11 +651,10 @@ int32_t vchi_service_open(VCHI_INSTANCE_
 		if (status != VCHIQ_SUCCESS) {
 			service_free(service);
 			service = NULL;
+			*handle = NULL;
 		}
 	}
 
-	*handle = (VCHI_SERVICE_HANDLE_T)service;
-
 	return (service != NULL) ? 0 : -1;
 }
 EXPORT_SYMBOL(vchi_service_open);
@@ -663,6 +665,9 @@ int32_t vchi_service_create(VCHI_INSTANC
 {
 	VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle;
 	SHIM_SERVICE_T *service = service_alloc(instance, setup);
+
+	*handle = (VCHI_SERVICE_HANDLE_T)service;
+
 	if (service) {
 		VCHIQ_SERVICE_PARAMS_T params;
 		VCHIQ_STATUS_T status;
@@ -678,11 +683,10 @@ int32_t vchi_service_create(VCHI_INSTANC
 		if (status != VCHIQ_SUCCESS) {
 			service_free(service);
 			service = NULL;
+			*handle = NULL;
 		}
 	}
 
-	*handle = (VCHI_SERVICE_HANDLE_T)service;
-
 	return (service != NULL) ? 0 : -1;
 }
 EXPORT_SYMBOL(vchi_service_create);



CVS import: src/sys/external/bsd/drm2/dist/drm/nouveau/core

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 17 01:51:00 UTC 2014

Update of /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core
In directory ivanova.netbsd.org:/tmp/cvs-serv20940

Log Message:
Import the part of Nouveau that got eaten by CVS default ignore patterns.

No, this is *not* a core file.  This is a directory with most of the
source code!

Status:

Vendor Tag: LINUX
Release Tags:   linux-3-15-drm-bsd

N src/sys/external/bsd/drm2/dist/drm/nouveau/core/os.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/client.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/engctx.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/engine.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/enum.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/event.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/gpuobj.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/handle.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/mm.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/namedb.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/object.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/option.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/parent.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/printk.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/ramht.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/subdev.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/falcon.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/xtensa.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nv84.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nv98.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nvc0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nve0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nva3.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nvc0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nve0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/fuc/nva3.fuc
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nv84.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nv98.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/base.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/ctrl.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/gm100.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv04.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv10.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv20.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv30.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv40.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nv50.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nvc0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nve0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/priv.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/base.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/dacnv50.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/dport.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/dport.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/gm107.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/hdanva3.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/hdanvd0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/hdminv84.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/hdminva3.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/hdminvd0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv04.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv50.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv50.h
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv84.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv94.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nva0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nva3.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nvd0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nve0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nvf0.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/piornv50.c
N src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/priv.h
N 

CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2014-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 17 03:34:13 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ttm.c

Log Message:
Actually hook up the radeon_ttm uvm pager ops!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.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/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.2	Wed Jul 16 20:59:57 2014
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c	Thu Jul 17 03:34:13 2014
@@ -45,6 +45,7 @@
 
 #ifdef __NetBSD__
 #include uvm/uvm_extern.h
+#include uvm/uvm_fault.h
 #include uvm/uvm_param.h
 #include drm/bus_dma_hacks.h
 #endif
@@ -702,10 +703,24 @@ static void radeon_ttm_tt_unpopulate(str
 #endif
 }
 
+#ifdef __NetBSD__
+static int	radeon_ttm_fault(struct uvm_faultinfo *, vaddr_t,
+		struct vm_page **, int, int, vm_prot_t, int);
+
+static const struct uvm_pagerops radeon_uvm_ops = {
+	.pgo_reference = ttm_bo_uvm_reference,
+	.pgo_detach = ttm_bo_uvm_detach,
+	.pgo_fault = radeon_ttm_fault,
+};
+#endif
+
 static struct ttm_bo_driver radeon_bo_driver = {
 	.ttm_tt_create = radeon_ttm_tt_create,
 	.ttm_tt_populate = radeon_ttm_tt_populate,
 	.ttm_tt_unpopulate = radeon_ttm_tt_unpopulate,
+#ifdef __NetBSD__
+	.ttm_uvm_ops = radeon_uvm_ops,
+#endif
 	.invalidate_caches = radeon_invalidate_caches,
 	.init_mem_type = radeon_init_mem_type,
 	.evict_flags = radeon_evict_flags,
@@ -830,9 +845,7 @@ void radeon_ttm_set_active_vram_size(str
 
 #ifdef __NetBSD__
 
-#include uvm/uvm_fault.h
-
-int
+static int
 radeon_ttm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr,
 struct vm_page **pps, int npages, int centeridx, vm_prot_t access_type,
 int flags)