CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 07:54:04 UTC 2013

Modified Files:
src/libexec/ld.elf_so: headers.c

Log Message:
Add some DEBUG code.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/headers.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/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.48 src/libexec/ld.elf_so/headers.c:1.49
--- src/libexec/ld.elf_so/headers.c:1.48	Thu May  2 21:11:03 2013
+++ src/libexec/ld.elf_so/headers.c	Mon May  6 07:54:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.48 2013/05/02 21:11:03 matt Exp $	 */
+/*	$NetBSD: headers.c,v 1.49 2013/05/06 07:54:04 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: headers.c,v 1.48 2013/05/02 21:11:03 matt Exp $);
+__RCSID($NetBSD: headers.c,v 1.49 2013/05/06 07:54:04 skrll Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -75,7 +75,9 @@ _rtld_digest_dynamic(const char *execnam
 	Elf_Addr	pltrel = 0, pltrelsz = 0;
 	Elf_Addr	init = 0, fini = 0;
 
+	dbg((headers: digesting PT_DYNAMIC at %p, obj-dynamic));
 	for (dynp = obj-dynamic; dynp-d_tag != DT_NULL; ++dynp) {
+		dbg((  d_tag %ld at %p, (long)dynp-d_tag, dynp));
 		switch (dynp-d_tag) {
 
 		case DT_REL:
@@ -231,10 +233,14 @@ _rtld_digest_dynamic(const char *execnam
 		case DT_INIT_ARRAY:
 			obj-init_array =
 			(fptr_t *)(obj-relocbase + dynp-d_un.d_ptr);
+			dbg((headers: DT_INIT_ARRAY at %p,
+			obj-init_array));
 			break;
 
 		case DT_INIT_ARRAYSZ:
 			obj-init_arraysz = dynp-d_un.d_val / sizeof(fptr_t);
+			dbg((headers: DT_INIT_ARRAYZ %zu,
+			obj-init_arraysz));
 			break;
 #endif
 
@@ -246,10 +252,14 @@ _rtld_digest_dynamic(const char *execnam
 		case DT_FINI_ARRAY:
 			obj-fini_array =
 			(fptr_t *)(obj-relocbase + dynp-d_un.d_ptr);
+			dbg((headers: DT_FINI_ARRAY at %p,
+			obj-fini_array));
 			break;
 
 		case DT_FINI_ARRAYSZ:
 			obj-fini_arraysz = dynp-d_un.d_val / sizeof(fptr_t); 
+			dbg((headers: DT_FINI_ARRAYZ %zu,
+			obj-fini_arraysz));
 			break;
 #endif
 
@@ -374,8 +384,8 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 		obj-phdr = (void *)(uintptr_t)ph-p_vaddr;
 		obj-phsize = ph-p_memsz;
 		obj-relocbase = (caddr_t)((uintptr_t)phdr - (uintptr_t)ph-p_vaddr);
-		dbg((headers: phdr %p (%p) phsize %zu relocbase %lx,
-		obj-phdr, phdr, obj-phsize, (long)obj-relocbase));
+		dbg((headers: phdr %p (%p) phsize %zu relocbase %p,
+		obj-phdr, phdr, obj-phsize, obj-relocbase));
 		break;
 	}
 	
@@ -385,6 +395,9 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 
 		case PT_INTERP:
 			obj-interp = (const char *)(uintptr_t)vaddr;
+			dbg((headers: %s %p phsize %zu,
+			PT_INTERP, (void *)(uintptr_t)vaddr,
+			 ph-p_memsz));
 			break;
 
 		case PT_LOAD:
@@ -399,12 +412,16 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 obj-vaddrbase;
 			}
 			++nsegs;
+			dbg((headers: %s %p phsize %zu,
+			PT_LOAD, (void *)(uintptr_t)vaddr,
+			 ph-p_memsz));
 			break;
 
 		case PT_DYNAMIC:
 			obj-dynamic = (Elf_Dyn *)(uintptr_t)vaddr;
-			dbg((headers: PT_DYNAMIC %p phsize %zu,
-			obj-dynamic, (size_t)ph-p_memsz));
+			dbg((headers: %s %p phsize %zu,
+			PT_DYNAMIC, (void *)(uintptr_t)vaddr,
+			 ph-p_memsz));
 			break;
 
 #if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II)
@@ -414,12 +431,18 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 			obj-tlsalign = ph-p_align;
 			obj-tlsinitsize = ph-p_filesz;
 			obj-tlsinit = (void *)(uintptr_t)ph-p_vaddr;
+			dbg((headers: %s %p phsize %zu,
+			PT_TLS, (void *)(uintptr_t)vaddr,
+			 ph-p_memsz));
 			break;
 #endif
 #ifdef __ARM_EABI__
 		case PT_ARM_EXIDX:
 			obj-exidx_start = (void *)(uintptr_t)vaddr;
 			obj-exidx_sz = ph-p_memsz;
+			dbg((headers: %s %p phsize %zu,
+			PT_ARM_EXIDX, (void *)(uintptr_t)vaddr,
+			 ph-p_memsz));
 			break;
 #endif
 		}



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 07:58:43 UTC 2013

Modified Files:
src/libexec/ld.elf_so: rtld.c

Log Message:
Disalble a debug only where it causes problems.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/libexec/ld.elf_so/rtld.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/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.163 src/libexec/ld.elf_so/rtld.c:1.164
--- src/libexec/ld.elf_so/rtld.c:1.163	Fri May  3 18:31:24 2013
+++ src/libexec/ld.elf_so/rtld.c	Mon May  6 07:58:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.163 2013/05/03 18:31:24 matt Exp $	 */
+/*	$NetBSD: rtld.c,v 1.164 2013/05/06 07:58:43 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: rtld.c,v 1.163 2013/05/03 18:31:24 matt Exp $);
+__RCSID($NetBSD: rtld.c,v 1.164 2013/05/06 07:58:43 skrll Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -443,7 +443,7 @@ _rtld(Elf_Addr *sp, Elf_Addr relocbase)
 	debug = 1;
 	dbg((sp = %p, argc = %ld, argv = %p %s relocbase %p, sp,
 	(long)sp[2], sp[3], (char *) sp[3], (void *)relocbase));
-#if 0
+#ifndef __x86_64__
 	dbg((got is at %p, dynamic is at %p, _GLOBAL_OFFSET_TABLE_,
 	_DYNAMIC));
 #endif



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 08:02:20 UTC 2013

Modified Files:
src/libexec/ld.elf_so: debug.h expand.c headers.c load.c map_object.c
paths.c rtld.c rtld.h rtldenv.h search.c sysident.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/libexec/ld.elf_so/debug.h \
src/libexec/ld.elf_so/expand.c
cvs rdiff -u -r1.49 -r1.50 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.42 -r1.43 src/libexec/ld.elf_so/load.c
cvs rdiff -u -r1.47 -r1.48 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.40 -r1.41 src/libexec/ld.elf_so/paths.c
cvs rdiff -u -r1.164 -r1.165 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.113 -r1.114 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.11 -r1.12 src/libexec/ld.elf_so/rtldenv.h
cvs rdiff -u -r1.23 -r1.24 src/libexec/ld.elf_so/search.c
cvs rdiff -u -r1.14 -r1.15 src/libexec/ld.elf_so/sysident.h

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

Modified files:

Index: src/libexec/ld.elf_so/debug.h
diff -u src/libexec/ld.elf_so/debug.h:1.5 src/libexec/ld.elf_so/debug.h:1.6
--- src/libexec/ld.elf_so/debug.h:1.5	Thu Sep 12 22:56:28 2002
+++ src/libexec/ld.elf_so/debug.h	Mon May  6 08:02:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: debug.h,v 1.5 2002/09/12 22:56:28 mycroft Exp $	*/
+/*	$NetBSD: debug.h,v 1.6 2013/05/06 08:02:20 skrll Exp $	*/
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -35,7 +35,7 @@
  * Support for printing debugging messages.
  */
 
-#ifndef DEBUG_H 
+#ifndef DEBUG_H
 #define DEBUG_H
 
 
@@ -46,7 +46,7 @@ extern void debug_printf __P((const char
 extern int debug;
 
 # define dbg(a)		debug_printf a
-#else 
+#else
 # define dbg(a)		((void) 0)
 #endif
 #ifdef RTLD_DEBUG_RELOC
Index: src/libexec/ld.elf_so/expand.c
diff -u src/libexec/ld.elf_so/expand.c:1.5 src/libexec/ld.elf_so/expand.c:1.6
--- src/libexec/ld.elf_so/expand.c:1.5	Mon Apr 28 20:23:03 2008
+++ src/libexec/ld.elf_so/expand.c	Mon May  6 08:02:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.5 2008/04/28 20:23:03 martin Exp $	*/
+/*	$NetBSD: expand.c,v 1.6 2013/05/06 08:02:20 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: expand.c,v 1.5 2008/04/28 20:23:03 martin Exp $);
+__RCSID($NetBSD: expand.c,v 1.6 2013/05/06 08:02:20 skrll Exp $);
 #endif /* not lint */
 
 #include ctype.h
@@ -91,7 +91,7 @@ expand(char *buf, const char *execname, 
 	case 3:	/* OSNAME */
 	case 4:	/* OSREL */
 	case 5:	/* PLATFORM */
-		len = sizeof(name);	
+		len = sizeof(name);
 		if (sysctl(mib[what - 3], 2, name, len, NULL, 0) == -1) {
 			xwarn(sysctl);
 			return 0;
@@ -107,7 +107,7 @@ expand(char *buf, const char *execname, 
 
 	return bp - buf;
 }
-		
+
 
 size_t
 _rtld_expand_path(char *buf, size_t bufsize, const char *execname,

Index: src/libexec/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.49 src/libexec/ld.elf_so/headers.c:1.50
--- src/libexec/ld.elf_so/headers.c:1.49	Mon May  6 07:54:04 2013
+++ src/libexec/ld.elf_so/headers.c	Mon May  6 08:02:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.49 2013/05/06 07:54:04 skrll Exp $	 */
+/*	$NetBSD: headers.c,v 1.50 2013/05/06 08:02:20 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: headers.c,v 1.49 2013/05/06 07:54:04 skrll Exp $);
+__RCSID($NetBSD: headers.c,v 1.50 2013/05/06 08:02:20 skrll Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -257,7 +257,7 @@ _rtld_digest_dynamic(const char *execnam
 			break;
 
 		case DT_FINI_ARRAYSZ:
-			obj-fini_arraysz = dynp-d_un.d_val / sizeof(fptr_t); 
+			obj-fini_arraysz = dynp-d_un.d_val / sizeof(fptr_t);
 			dbg((headers: DT_FINI_ARRAYZ %zu,
 			obj-fini_arraysz));
 			break;
@@ -380,7 +380,7 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 	for (ph = phdr; ph  phlimit; ++ph) {
 		if (ph-p_type != PT_PHDR)
 			continue;
-		
+
 		obj-phdr = (void *)(uintptr_t)ph-p_vaddr;
 		obj-phsize = ph-p_memsz;
 		obj-relocbase = (caddr_t)((uintptr_t)phdr - (uintptr_t)ph-p_vaddr);
@@ -388,7 +388,7 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 		obj-phdr, phdr, obj-phsize, obj-relocbase));
 		break;
 	}
-	
+
 	for (ph = phdr; ph  phlimit; ++ph) {
 		vaddr = (Elf_Addr)(uintptr_t)(obj-relocbase + ph-p_vaddr);
 		switch (ph-p_type) {

Index: src/libexec/ld.elf_so/load.c
diff -u src/libexec/ld.elf_so/load.c:1.42 src/libexec/ld.elf_so/load.c:1.43
--- src/libexec/ld.elf_so/load.c:1.42	Fri Dec 24 12:41:43 2010
+++ src/libexec/ld.elf_so/load.c	Mon May  6 08:02:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: load.c,v 1.42 2010/12/24 12:41:43 skrll Exp $	 */
+/*	$NetBSD: load.c,v 1.43 2013/05/06 08:02:20 skrll Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: load.c,v 1.42 2010/12/24 12:41:43 skrll Exp $);
+__RCSID($NetBSD: 

CVS commit: src/usr.bin/skeyinit

2013-05-06 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Mon May  6 11:00:16 UTC 2013

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

Log Message:
 * Remove OPTIONS section (uncommon) and put options to the DESCRIPTION.
 * Fix capitalisation.

Patch supplied by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/skeyinit/skeyinit.1

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

Modified files:

Index: src/usr.bin/skeyinit/skeyinit.1
diff -u src/usr.bin/skeyinit/skeyinit.1:1.14 src/usr.bin/skeyinit/skeyinit.1:1.15
--- src/usr.bin/skeyinit/skeyinit.1:1.14	Mon Sep 19 15:12:09 2005
+++ src/usr.bin/skeyinit/skeyinit.1	Mon May  6 11:00:16 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: skeyinit.1,v 1.14 2005/09/19 15:12:09 elad Exp $
+.\	$NetBSD: skeyinit.1,v 1.15 2013/05/06 11:00:16 jdf Exp $
 .\	@(#)skeyinit.1	1.1 	10/28/93
 .\
 .Dd September 19, 2005
@@ -27,7 +27,8 @@ or using S/Key one-time passwords.
 .Nm
 requires you to type a secret password, so it should be used
 only on a secure terminal.
-.Sh OPTIONS
+.Pp
+The following options are available:
 .Bl -tag -width Ds
 .It Fl k Ar passphrase
 Use pass phrase
@@ -63,7 +64,7 @@ Available choices are md4 (the default),
 .It Fl x
 Displays one-time password in hexadecimal instead of ASCII.
 .It Fl z
-Allows the user to zero their S/Key entry.
+allows the user to zero their S/Key entry.
 .It Ar user
 The username to be changed/added.
 By default the current user is operated on, only root may



CVS commit: src/lib/libc/compat-43

2013-05-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon May  6 13:29:12 UTC 2013

Modified Files:
src/lib/libc/compat-43: sigsetmask.3

Log Message:
End sentence with a dot.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/compat-43/sigsetmask.3

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

Modified files:

Index: src/lib/libc/compat-43/sigsetmask.3
diff -u src/lib/libc/compat-43/sigsetmask.3:1.18 src/lib/libc/compat-43/sigsetmask.3:1.19
--- src/lib/libc/compat-43/sigsetmask.3:1.18	Thu Aug  7 16:42:40 2003
+++ src/lib/libc/compat-43/sigsetmask.3	Mon May  6 13:29:12 2013
@@ -26,7 +26,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)sigsetmask.2	8.1 (Berkeley) 6/2/93
-.\	$NetBSD: sigsetmask.3,v 1.18 2003/08/07 16:42:40 agc Exp $
+.\	$NetBSD: sigsetmask.3,v 1.19 2013/05/06 13:29:12 wiz Exp $
 .\
 .Dd August 10, 2002
 .Dt SIGSETMASK 3
@@ -48,7 +48,7 @@ This interface is made obsolete by:
 .Xr sigprocmask 2 .
 .Pp
 .Fn sigsetmask
-sets the current signal mask
+sets the current signal mask.
 Signals are blocked from delivery if the
 corresponding bit in
 .Fa mask



CVS commit: src/usr.bin/skeyinit

2013-05-06 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Mon May  6 13:44:17 UTC 2013

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

Log Message:
Fix capitalisation (again, last time the wrong sentence).


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

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

Modified files:

Index: src/usr.bin/skeyinit/skeyinit.1
diff -u src/usr.bin/skeyinit/skeyinit.1:1.15 src/usr.bin/skeyinit/skeyinit.1:1.16
--- src/usr.bin/skeyinit/skeyinit.1:1.15	Mon May  6 11:00:16 2013
+++ src/usr.bin/skeyinit/skeyinit.1	Mon May  6 13:44:17 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: skeyinit.1,v 1.15 2013/05/06 11:00:16 jdf Exp $
+.\	$NetBSD: skeyinit.1,v 1.16 2013/05/06 13:44:17 jdf Exp $
 .\	@(#)skeyinit.1	1.1 	10/28/93
 .\
 .Dd September 19, 2005
@@ -45,7 +45,7 @@ Use password
 .Ar password
 instead of asking for one to be entered.
 .It Fl s
-allows the user to set the seed and count for complete control
+Allows the user to set the seed and count for complete control
 of the parameters.
 To do this run
 .Nm
@@ -64,7 +64,7 @@ Available choices are md4 (the default),
 .It Fl x
 Displays one-time password in hexadecimal instead of ASCII.
 .It Fl z
-allows the user to zero their S/Key entry.
+Allows the user to zero their S/Key entry.
 .It Ar user
 The username to be changed/added.
 By default the current user is operated on, only root may



CVS commit: src/sys/dev/ic

2013-05-06 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May  6 14:52:51 UTC 2013

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Put back AT_POLL hack in mvsata_bio_ready().  Without it 1.5Gbps
SATA WD800JD drives cause the kernel to stall during autoconf on
Orion.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ic/mvsata.c

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

Modified files:

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.30 src/sys/dev/ic/mvsata.c:1.31
--- src/sys/dev/ic/mvsata.c:1.30	Wed Apr  3 17:15:07 2013
+++ src/sys/dev/ic/mvsata.c	Mon May  6 14:52:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.30 2013/04/03 17:15:07 bouyer Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.31 2013/05/06 14:52:51 jakllsch Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mvsata.c,v 1.30 2013/04/03 17:15:07 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: mvsata.c,v 1.31 2013/05/06 14:52:51 jakllsch Exp $);
 
 #include opt_mvsata.h
 
@@ -1469,6 +1469,8 @@ mvsata_bio_ready(struct mvsata_port *mvp
 	struct ata_drive_datas *drvp = chp-ch_drive[drive];
 	const char *errstring;
 
+	flags |= AT_POLL;	/* XXX */
+
 	/*
 	 * disable interrupts, all commands here should be quick
 	 * enough to be able to poll, and we don't go here that often



CVS commit: src/sys/rump/librump/rumpkern

2013-05-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May  6 16:28:17 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern: locks_up.c

Log Message:
update for new hypercalls


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/locks_up.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/rump/librump/rumpkern/locks_up.c
diff -u src/sys/rump/librump/rumpkern/locks_up.c:1.8 src/sys/rump/librump/rumpkern/locks_up.c:1.9
--- src/sys/rump/librump/rumpkern/locks_up.c:1.8	Sun Apr 28 13:37:52 2013
+++ src/sys/rump/librump/rumpkern/locks_up.c	Mon May  6 16:28:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks_up.c,v 1.8 2013/04/28 13:37:52 pooka Exp $	*/
+/*	$NetBSD: locks_up.c,v 1.9 2013/05/06 16:28:17 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: locks_up.c,v 1.8 2013/04/28 13:37:52 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: locks_up.c,v 1.9 2013/05/06 16:28:17 pooka Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -426,8 +426,11 @@ cv_broadcast(kcondvar_t *cv)
 bool
 cv_has_waiters(kcondvar_t *cv)
 {
+	int n;
 
-	return rumpuser_cv_has_waiters(RUMPCV(cv));
+	rumpuser_cv_has_waiters(RUMPCV(cv), n);
+
+	return n  0;
 }
 
 /* this is not much of an attempt, but ... */



CVS commit: src/distrib/evbarm/instkernel/instkernel

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 17:42:31 UTC 2013

Modified Files:
src/distrib/evbarm/instkernel/instkernel: Makefile

Log Message:
Fix up evbearm* release builds.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/evbarm/instkernel/instkernel/Makefile

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

Modified files:

Index: src/distrib/evbarm/instkernel/instkernel/Makefile
diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.19 src/distrib/evbarm/instkernel/instkernel/Makefile:1.20
--- src/distrib/evbarm/instkernel/instkernel/Makefile:1.19	Tue Mar 19 22:16:53 2013
+++ src/distrib/evbarm/instkernel/instkernel/Makefile	Mon May  6 17:42:30 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2013/03/19 22:16:53 garbled Exp $
+#	$NetBSD: Makefile,v 1.20 2013/05/06 17:42:30 skrll Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -22,12 +22,20 @@ MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDIS
 			OPENRD_INSTALL		${RAMDISK}	-	\
 			TS7200_INSTALL		${RAMDISK}	- 	\
 			TEAMASA_NPWR_INSTALL	${RAMDISK}	-	\
-			RPI_INSTALL		${SSHRAMDISK}	-	\
 			KUROBOX_PRO_INSTALL	${RAMDISK}	-
 .else
 # Big endian platforms.
 MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDISK}	-
 .endif
+
+.if \
+${MACHINE_ARCH} == arm || \
+${MACHINE_ARCH} == earm || \
+${MACHINE_ARCH} == earmhf
+# Little endian (any ABI) platforms.
+MDSETTARGETS+=		RPI_INSTALL		${SSHRAMDISK}	-
+.endif
+
 MDSET_RELEASEDIR=	installation/instkernel
 
 MDSET_SUFFIXES.-=	srec create-srec  bin create-bin



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

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 18:53:41 UTC 2013

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

Log Message:
s/i2C2_SCL/I2C2_SCL/


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/am335x_cm_padconf.c

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

Modified files:

Index: src/sys/arch/arm/omap/am335x_cm_padconf.c
diff -u src/sys/arch/arm/omap/am335x_cm_padconf.c:1.1 src/sys/arch/arm/omap/am335x_cm_padconf.c:1.2
--- src/sys/arch/arm/omap/am335x_cm_padconf.c:1.1	Wed Apr 17 14:31:02 2013
+++ src/sys/arch/arm/omap/am335x_cm_padconf.c	Mon May  6 18:53:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: am335x_cm_padconf.c,v 1.1 2013/04/17 14:31:02 bouyer Exp $ */
+/* $NetBSD: am335x_cm_padconf.c,v 1.2 2013/05/06 18:53:40 rkujawa Exp $ */
 /*-
  * Copyright (c) 2012 Damjan Marion dmar...@freebsd.org
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: am335x_cm_padconf.c,v 1.1 2013/04/17 14:31:02 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: am335x_cm_padconf.c,v 1.2 2013/05/06 18:53:40 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -157,7 +157,7 @@ const struct sitara_cm_padconf ti_padcon
 	_PIN(0x948, MDIO,		0, 7, mdio_data, timer6, uart5_rxd, uart3_ctsn, mmc0_sdcd,mmc1_cmd, mmc2_cmd,gpio0_0),
 	_PIN(0x94c, MDC,		1, 7, mdio_clk, timer5, uart5_txd, uart3_rtsn, mmc0_sdwp, mmc1_clk, mmc2_clk, gpio0_1),
 	_PIN(0x950, SPI0_SCLK,	2, 7, spi0_sclk, uart2_rxd, I2C2_SDA, ehrpwm0A, pr1_uart0_cts_n, pr1_edio_sof, EMU2, gpio0_2),
-	_PIN(0x954, SPI0_D0,		3, 7, spi0_d0, uart2_txd, i2C2_SCL, ehrpwm0B, pr1_uart0_rts_n, pr1_edio_latch_in, EMU3, gpio0_3),
+	_PIN(0x954, SPI0_D0,		3, 7, spi0_d0, uart2_txd, I2C2_SCL, ehrpwm0B, pr1_uart0_rts_n, pr1_edio_latch_in, EMU3, gpio0_3),
 	_PIN(0x958, SPIO_D1,		4, 7, spi0_d1, mmc1_sdwp, I2C1_SDA, ehrpwm0_tripzone_input, pr1_uart0_rxd, pr1_edio_data_in0, pr1_edio_data_out0, gpio0_4),
 	_PIN(0x95c, SPI0_CS0,		5, 7, spi0_cs0, mmc2_sdwp, I2C1_SCL, ehrpwm0_synci, pr1_uart0_txd, pr1_edio_data_in1, pr1_edio_data_out1, gpio0_5),
 	_PIN(0x960, SPI0_CS1,		6, 7, spi0_cs1, uart3_rxd, eCAP1_in_PWM1_out, mcc0_pow, xdm_event_intr2, mmc0_sdcd, EMU4, gpio0_6),



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May  6 19:59:30 UTC 2013

Modified Files:
src/libexec/ld.elf_so: headers.c load.c map_object.c rtld.c rtld.h
symver.c

Log Message:
Fixed handling of DT_SONAME:

- add function to add name aliases for shared libraries loaded
  XXX[1]: we don't add a name during load time, only when DT_SONAME
  is present.
- search already loaded objects in load_by_name for an already
  loaded object that matches our name and return it.
- add missing initialization and cleanup for obj-names
  XXX[2]: should we make them SIMPLEQ?
- Add XXX in rtld.c about getting the name of an object.

NB: This makes the jdk work again without resorting to a hack of putting
the build path of libjvm.so into the run path (which is a security
problem).
XXX: Pullup-6?


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.43 -r1.44 src/libexec/ld.elf_so/load.c
cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.165 -r1.166 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.114 -r1.115 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/symver.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/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.50 src/libexec/ld.elf_so/headers.c:1.51
--- src/libexec/ld.elf_so/headers.c:1.50	Mon May  6 04:02:20 2013
+++ src/libexec/ld.elf_so/headers.c	Mon May  6 15:59:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.50 2013/05/06 08:02:20 skrll Exp $	 */
+/*	$NetBSD: headers.c,v 1.51 2013/05/06 19:59:29 christos Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: headers.c,v 1.50 2013/05/06 08:02:20 skrll Exp $);
+__RCSID($NetBSD: headers.c,v 1.51 2013/05/06 19:59:29 christos Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -68,6 +68,7 @@ _rtld_digest_dynamic(const char *execnam
 {
 	Elf_Dyn*dynp;
 	Needed_Entry  **needed_tail = obj-needed;
+	const Elf_Dyn  *dyn_soname = NULL;
 	const Elf_Dyn  *dyn_rpath = NULL;
 	bool		use_pltrel = false;
 	bool		use_pltrela = false;
@@ -222,7 +223,7 @@ _rtld_digest_dynamic(const char *execnam
 			break;
 
 		case DT_SONAME:
-			/* Not used by the dynamic linker. */
+			dyn_soname = dynp;
 			break;
 
 		case DT_INIT:
@@ -358,6 +359,10 @@ _rtld_digest_dynamic(const char *execnam
 		_rtld_add_paths(execname, obj-rpaths, obj-strtab +
 		dyn_rpath-d_un.d_val);
 	}
+	if (dyn_soname != NULL) {
+		_rtld_object_add_name(obj, obj-strtab +
+		dyn_soname-d_un.d_val);
+	}
 }
 
 /*

Index: src/libexec/ld.elf_so/load.c
diff -u src/libexec/ld.elf_so/load.c:1.43 src/libexec/ld.elf_so/load.c:1.44
--- src/libexec/ld.elf_so/load.c:1.43	Mon May  6 04:02:20 2013
+++ src/libexec/ld.elf_so/load.c	Mon May  6 15:59:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: load.c,v 1.43 2013/05/06 08:02:20 skrll Exp $	 */
+/*	$NetBSD: load.c,v 1.44 2013/05/06 19:59:30 christos Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: load.c,v 1.43 2013/05/06 08:02:20 skrll Exp $);
+__RCSID($NetBSD: load.c,v 1.44 2013/05/06 19:59:30 christos Exp $);
 #endif /* not lint */
 
 #include err.h
@@ -199,7 +199,7 @@ _rtld_load_by_name(const char *name, Obj
 int flags)
 {
 	Library_Xform *x = _rtld_xforms;
-	Obj_Entry *o = NULL;
+	Obj_Entry *o;
 	size_t j;
 	ssize_t i;
 	bool got = false;
@@ -210,6 +210,12 @@ _rtld_load_by_name(const char *name, Obj
 	} val;
 
 	dbg((load by name %s %p, name, x));
+	for (o = _rtld_objlist-next; o != NULL; o = o-next)
+		if (_rtld_object_match_name(o, name)) {
+			(*needed)-obj = o;
+			return true;
+		}
+
 	for (; x; x = x-next) {
 		if (strcmp(x-name, name) != 0)
 			continue;

Index: src/libexec/ld.elf_so/map_object.c
diff -u src/libexec/ld.elf_so/map_object.c:1.48 src/libexec/ld.elf_so/map_object.c:1.49
--- src/libexec/ld.elf_so/map_object.c:1.48	Mon May  6 04:02:20 2013
+++ src/libexec/ld.elf_so/map_object.c	Mon May  6 15:59:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: map_object.c,v 1.48 2013/05/06 08:02:20 skrll Exp $	 */
+/*	$NetBSD: map_object.c,v 1.49 2013/05/06 19:59:30 christos Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: map_object.c,v 1.48 2013/05/06 08:02:20 skrll Exp $);
+__RCSID($NetBSD: map_object.c,v 1.49 2013/05/06 19:59:30 christos Exp $);
 #endif /* not lint */
 
 #include errno.h
@@ -432,6 +432,11 @@ _rtld_obj_free(Obj_Entry *obj)
 		obj-needed = needed-next;
 		xfree(needed);
 	}
+	while (!STAILQ_EMPTY(obj-names)) {
+		Name_Entry *entry = STAILQ_FIRST(obj-names);
+		STAILQ_REMOVE_HEAD(obj-names, link);
+		free(entry);
+	}
 	while ((elm = SIMPLEQ_FIRST(obj-dldags)) != NULL) {
 	

CVS commit: src/distrib/sets

2013-05-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May  6 20:38:43 UTC 2013

Modified Files:
src/distrib/sets: sets.subr

Log Message:
The gcc keyword in the set lists is used both as boolean and as list
filter. Skip the HAVE_GCC variables when adding it as boolean, so that
MKGCC=no actually skips the gcc entries.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.148 src/distrib/sets/sets.subr:1.149
--- src/distrib/sets/sets.subr:1.148	Tue Apr 30 16:26:26 2013
+++ src/distrib/sets/sets.subr	Mon May  6 20:38:42 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.148 2013/04/30 16:26:26 matt Exp $
+#	$NetBSD: sets.subr,v 1.149 2013/05/06 20:38:42 joerg Exp $
 #
 
 #
@@ -179,7 +179,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.148 2013/04/30 16:26:26 matt Exp $
+# 	# $NetBSD: sets.subr,v 1.149 2013/05/06 20:38:42 joerg Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -295,7 +295,7 @@ list_set_files()
 sub(/^mk/, , kw)
 sub(/^have_/, , kw)
 sub(/^target_endianness/, endian, kw)
-if (ENVIRON[nv] != no)
+if (nv != HAVE_GCC  ENVIRON[nv] != no)
 	wanted[kw] = 1 
 			}
 



CVS commit: src/distrib/notes/common

2013-05-06 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon May  6 21:21:15 UTC 2013

Modified Files:
src/distrib/notes/common: main

Log Message:
add a comment about keeping this in sync with other docs


To generate a diff of this commit:
cvs rdiff -u -r1.494 -r1.495 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.494 src/distrib/notes/common/main:1.495
--- src/distrib/notes/common/main:1.494	Sun Jan 13 00:19:41 2013
+++ src/distrib/notes/common/main	Mon May  6 21:21:14 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.494 2013/01/13 00:19:41 htodd Exp $
+.\	$NetBSD: main,v 1.495 2013/05/06 21:21:14 jnemeth Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1040,6 +1040,8 @@ If you're one of them, and would like to
 .br_ne 2i
 .It Em The portmasters (and their ports):
 .\
+.\ Please keep src/doc/RESPONSIBLE in sync with this list.
+.\
 .\ XXX created by list-portmasters.pl
 .\
 .It Ta Reinoud ZandijkTa Mt  reinoud Ta Sy acorn32



CVS commit: src/sys/dev/i2c

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 22:04:12 UTC 2013

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: mcp980x.c mcp980xreg.h

Log Message:
Add driver for Microchip MCP9800/1/2/3 temperature sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/mcp980x.c src/sys/dev/i2c/mcp980xreg.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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.48 src/sys/dev/i2c/files.i2c:1.49
--- src/sys/dev/i2c/files.i2c:1.48	Thu Apr 25 20:55:34 2013
+++ src/sys/dev/i2c/files.i2c	Mon May  6 22:04:12 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.48 2013/04/25 20:55:34 rkujawa Exp $
+#	$NetBSD: files.i2c,v 1.49 2013/05/06 22:04:12 rkujawa Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -182,3 +182,8 @@ device	tps65217pmic: sysmon_envsys
 attach	tps65217pmic at iic
 file	dev/i2c/tps65217pmic.c 		tps65217pmic
 
+# Microchip MCP980x
+device	mcp980x: sysmon_envsys
+attach	mcp980x at iic
+file	dev/i2c/mcp980x.c 		mcp980x
+

Added files:

Index: src/sys/dev/i2c/mcp980x.c
diff -u /dev/null src/sys/dev/i2c/mcp980x.c:1.1
--- /dev/null	Mon May  6 22:04:12 2013
+++ src/sys/dev/i2c/mcp980x.c	Mon May  6 22:04:12 2013
@@ -0,0 +1,228 @@
+/*	$NetBSD: mcp980x.c,v 1.1 2013/05/06 22:04:12 rkujawa Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Radoslaw Kujawa.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Microchip MCP9800/1/2/3 2-Wire High-Accuracy Temperature Sensor driver.
+ * TODO: everything besides simple temperature read with default configuration.
+ *
+ * Note: MCP9805 is different and is supported by the sdtemp(4) driver.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.1 2013/05/06 22:04:12 rkujawa Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/kernel.h
+#include sys/mutex.h
+#include sys/endian.h
+
+#include sys/bus.h
+#include dev/i2c/i2cvar.h
+
+#include dev/sysmon/sysmonvar.h
+
+#include dev/i2c/mcp980xreg.h
+
+struct mcp980x_softc {
+	device_t		sc_dev;
+
+	i2c_tag_t		sc_tag;
+	i2c_addr_t		sc_addr;
+
+	/* envsys(4) stuff */
+	struct sysmon_envsys	*sc_sme;
+	envsys_data_t		sc_sensor;
+	kmutex_t		sc_lock; 
+};
+
+
+static int mcp980x_match(device_t, cfdata_t, void *);
+static void mcp980x_attach(device_t, device_t, void *);
+
+/*static uint8_t mcp980x_reg_read_1(struct mcp980x_softc *sc, uint8_t);*/
+static uint16_t mcp980x_reg_read_2(struct mcp980x_softc *sc, uint8_t reg);
+
+static uint32_t mcp980x_temperature(struct mcp980x_softc *sc);
+
+static void mcp980x_envsys_register(struct mcp980x_softc *);
+static void mcp980x_envsys_refresh(struct sysmon_envsys *, envsys_data_t *);
+
+CFATTACH_DECL_NEW(mcp980x, sizeof (struct mcp980x_softc),
+mcp980x_match, mcp980x_attach, NULL, NULL);
+
+static int
+mcp980x_match(device_t parent, cfdata_t cf, void *aux)
+{
+	/*
+	 * No sane way to probe? Perhaps at least try to match constant part
+	 * of the I2Caddress.
+	 */
+
+	return 1;
+}
+
+static void
+mcp980x_attach(device_t parent, device_t self, void *aux)
+{
+	struct mcp980x_softc *sc = device_private(self);
+	struct i2c_attach_args *ia = aux;
+
+	sc-sc_dev = self;
+	sc-sc_addr = ia-ia_addr;
+	sc-sc_tag = ia-ia_tag;
+
+	aprint_normal(: Microchip MCP980x Temperature Sensor\n);
+
+	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_NONE);
+
+	

CVS commit: src/doc

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 22:12:50 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Note mcp980x(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1821 -r1.1822 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.1821 src/doc/CHANGES:1.1822
--- src/doc/CHANGES:1.1821	Fri May  3 16:08:48 2013
+++ src/doc/CHANGES	Mon May  6 22:12:50 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1821 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1822 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -239,3 +239,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		userspace.  All sets are the same except for etc.tgz.
 		[matt 20130501]
 	disklabel: this is now a MI tool like installboot.  [matt 20130503]
+	mcp980x(4): Add driver for Microchip MCP9800/1/2/3 I2C temperature
+		sensor. [rkujawa 20130507]



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May  6 22:49:11 UTC 2013

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
don't overwrite COPTS


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/libexec/ld.elf_so/Makefile

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.117 src/libexec/ld.elf_so/Makefile:1.118
--- src/libexec/ld.elf_so/Makefile:1.117	Fri May  3 11:52:31 2013
+++ src/libexec/ld.elf_so/Makefile	Mon May  6 18:49:10 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.117 2013/05/03 15:52:31 matt Exp $
+#	$NetBSD: Makefile,v 1.118 2013/05/06 22:49:10 christos Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -97,7 +97,7 @@ CPPFLAGS+=	-DCOMBRELOC
 CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libexecinfo
 .endif
 #DBG=		-g
-COPTS=		-O3 -fomit-frame-pointer
+COPTS+=		-O3 -fomit-frame-pointer
 
 .if ${LDELFSO_MACHINE_ARCH} == i386 || ${LDELFSO_MACHINE_ARCH} == x86_64
 COPTS+=		-mno-3dnow -mno-mmx -mno-sse -mno-sse2 -mno-sse3



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

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 22:49:27 UTC 2013

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

Log Message:
Boot on the MicroSD card slot by default.

Tested on my Nokia N900 smartphone. This is the only way currently
supported on this device at the moment anyway (that I know of).


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

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/N900
diff -u src/sys/arch/evbarm/conf/N900:1.11 src/sys/arch/evbarm/conf/N900:1.12
--- src/sys/arch/evbarm/conf/N900:1.11	Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/conf/N900	Mon May  6 22:49:27 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: N900,v 1.11 2013/04/20 03:37:55 khorben Exp $
+#	$NetBSD: N900,v 1.12 2013/05/06 22:49:27 khorben Exp $
 #
 #	N900 -- Nokia N900 Kernel
 #
@@ -130,6 +130,7 @@ options 	KTRACE		# system call tracing, 
 #options 	PERFCTRS	# performance counters
 options 	DIAGNOSTIC	# internally consistency checks
 #options 	DEBUG
+#options 	LOCKDEBUG	# expensive locking checks/support
 #options 	PMAP_DEBUG	# Enable pmap_debug_level code
 #options 	IPKDB		# remote kernel debugging
 #options 	VERBOSE_INIT_ARM # verbose bootstraping messages
@@ -157,7 +158,7 @@ options UHUB_DEBUG
 #  verbose		Show aprint_normal and aprint_verbose output
 options		BOOT_ARGS=\\
 
-config		netbsd		root on ? type ?
+config		netbsd		root on ld0a type ?
 
 # The main bus device
 mainbus0	at root



CVS commit: src/usr.bin/vndcompress

2013-05-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May  6 22:53:24 UTC 2013

Modified Files:
src/usr.bin/vndcompress: vndcompress.c vnduncompress.c

Log Message:
Make partial read/write error messages more consistent in vndcompress.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/vndcompress/vndcompress.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/vndcompress/vnduncompress.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/vndcompress/vndcompress.c
diff -u src/usr.bin/vndcompress/vndcompress.c:1.12 src/usr.bin/vndcompress/vndcompress.c:1.13
--- src/usr.bin/vndcompress/vndcompress.c:1.12	Sat May  4 15:37:39 2013
+++ src/usr.bin/vndcompress/vndcompress.c	Mon May  6 22:53:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vndcompress.c,v 1.12 2013/05/04 15:37:39 riastradh Exp $	*/
+/*	$NetBSD: vndcompress.c,v 1.13 2013/05/06 22:53:24 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: vndcompress.c,v 1.12 2013/05/04 15:37:39 riastradh Exp $);
+__RCSID($NetBSD: vndcompress.c,v 1.13 2013/05/06 22:53:24 riastradh Exp $);
 
 #include sys/endian.h
 
@@ -241,8 +241,8 @@ vndcompress(int argc, char **argv, const
 		assert(n_written = 0);
 		if ((size_t)n_written != n_padding)
 			errx(1, partial write of final padding bytes
-			: %zd = %PRIu32,
-			n_written, n_padding);
+			: %zu != %PRIu32,
+			(size_t)n_written, n_padding);
 
 		/* Account for the extra bytes in the output file.  */
 		assert(n_padding = (MIN(UINT64_MAX, OFF_MAX) - S-offset));
@@ -565,8 +565,8 @@ compress_init(int argc, char **argv, con
 		err(1, write header);
 	assert(h_written = 0);
 	if ((size_t)h_written != sizeof(zero_header))
-		errx(1, partial write of header: %zd = %zu, h_written,
-		sizeof(zero_header));
+		errx(1, partial write of header: %zu != %zu,
+		(size_t)h_written, sizeof(zero_header));
 
 	/* Write the initial (empty) offset table.  */
 	const ssize_t ot_written = write(S-cloop2_fd, S-offset_table,
@@ -575,8 +575,9 @@ compress_init(int argc, char **argv, con
 		err(1, write initial offset table);
 	assert(ot_written = 0);
 	if ((size_t)ot_written != (S-n_offsets * sizeof(uint64_t)))
-		errx(1, partial write of initial offset bytes: %zd = %zu,
-		ot_written, (size_t)(S-n_offsets * sizeof(uint64_t)));
+		errx(1, partial write of initial offset bytes: %zu = %zu,
+		(size_t)ot_written,
+		(size_t)(S-n_offsets * sizeof(uint64_t)));
 
 	/* Start at the beginning of the image.  */
 	S-blkno = 0;
@@ -792,10 +793,9 @@ compress_block(int in_fd, int out_fd, ui
 	if (n_read == -1)
 		err(1, read block %PRIu32, blkno);
 	assert(n_read = 0);
-	assert((uintmax_t)n_read = (uintmax_t)readsize);
-	if ((uint32_t)n_read  readsize)
-		errx(1, partial read of block %PRIu32: %zd = %PRIu32,
-		blkno, n_read, readsize);
+	if ((size_t)n_read != readsize)
+		errx(1, partial read of block %PRIu32: %zu != %PRIu32,
+		blkno, (size_t)n_read, readsize);
 
 	/* Compress the block.  */
 	/* XXX compression ratio bound */
@@ -815,11 +815,11 @@ compress_block(int in_fd, int out_fd, ui
 	if (n_written == -1)
 		err(1, write block %PRIu32, blkno);
 	assert(n_written = 0);
-	if ((uint32_t)n_written != complen)
-		errx(1, partial write of block %PRIu32: %zd = %lu, blkno,
-		n_written, complen);
+	if ((size_t)n_written != complen)
+		errx(1, partial write of block %PRIu32: %zu != %lu,
+		blkno, (size_t)n_written, complen);
 
-	return n_written;
+	return (size_t)n_written;
 }
 
 /*
@@ -882,8 +882,9 @@ compress_checkpoint(struct compress_stat
 		err_ss(1, write partial offset table);
 	assert(n_written = 0);
 	if ((size_t)n_written != (n_offsets * sizeof(uint64_t)))
-		errx_ss(1, partial write of partial offset table: %zd = %zu,
-		n_written, (size_t)(n_offsets * sizeof(uint64_t)));
+		errx_ss(1, partial write of partial offset table: %zu != %zu,
+		(size_t)n_written,
+		(size_t)(n_offsets * sizeof(uint64_t)));
 
 	/*
 	 * If this is the first checkpoint, initialize the header.
@@ -919,8 +920,8 @@ compress_checkpoint(struct compress_stat
 			err_ss(1, write header);
 		assert(h_written = 0);
 		if ((size_t)h_written != sizeof(header))
-			errx_ss(1, partial write of header: %zd = %zu,
-			h_written, sizeof(header));
+			errx_ss(1, partial write of header: %zu != %zu,
+			(size_t)h_written, sizeof(header));
 	}
 
 	/* Record how many blocks we've checkpointed.  */

Index: src/usr.bin/vndcompress/vnduncompress.c
diff -u src/usr.bin/vndcompress/vnduncompress.c:1.1 src/usr.bin/vndcompress/vnduncompress.c:1.2
--- src/usr.bin/vndcompress/vnduncompress.c:1.1	Fri May  3 23:28:15 2013
+++ src/usr.bin/vndcompress/vnduncompress.c	Mon May  6 22:53:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnduncompress.c,v 1.1 2013/05/03 23:28:15 riastradh Exp $	*/
+/*	$NetBSD: vnduncompress.c,v 1.2 2013/05/06 

CVS commit: src/sys/arch/evbarm

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 22:56:55 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: N900 files.n900
Added Files:
src/sys/arch/evbarm/n900: n900_audjck.c n900_prxmty.c

Log Message:
Added two drivers for the Nokia N900 smartphone, n900_audjck(4) and
n900_prxmty(4), to detect the insertion of audio jacks and obstruction of
the front light sensor, respectively.

Tested on my own device.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/files.n900
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/n900/n900_audjck.c \
src/sys/arch/evbarm/n900/n900_prxmty.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/conf/N900
diff -u src/sys/arch/evbarm/conf/N900:1.12 src/sys/arch/evbarm/conf/N900:1.13
--- src/sys/arch/evbarm/conf/N900:1.12	Mon May  6 22:49:27 2013
+++ src/sys/arch/evbarm/conf/N900	Mon May  6 22:56:55 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: N900,v 1.12 2013/05/06 22:49:27 khorben Exp $
+#	$NetBSD: N900,v 1.13 2013/05/06 22:56:55 khorben Exp $
 #
 #	N900 -- Nokia N900 Kernel
 #
@@ -210,7 +210,7 @@ omapgpio1	at obio2 addr 0x4905 size 
 omapgpio2	at obio2 addr 0x49052000 size 0x0400 intrbase 160 intr 31
 omapgpio3	at obio2 addr 0x49054000 size 0x0400 intrbase 192 intr 32
 omapgpio4	at obio2 addr 0x49056000 size 0x0400 intrbase 224 intr 33
-#omapgpio5	at obio2 addr 0x49058000 size 0x0400 intrbase 256 intr 34
+omapgpio5	at obio2 addr 0x49058000 size 0x0400 intrbase 256 intr 34
 
 gpio*		at omapgpio?
 
@@ -224,12 +224,18 @@ n900cambtn0	at gpio2 offset 4 mask 0x3 #
 # Keyboard slide
 n900kbdsld0	at gpio2 offset 7 mask 0x1 #intr 167
 
+# Proximity sensor
+n900prxmty0	at gpio2 offset 25 mask 0x1 #intr 185
+
 # Camera cover
 n900camcvr0	at gpio3 offset 14 mask 0x1 #intr 206
 
 # Lock button
 n900lckbtn0	at gpio3 offset 17 mask 0x1 #intr 209
 
+# Audio jack
+n900audjck0	at gpio5 offset 17 mask 0x1 #intr 273
+
 # System Control Module
 omapscm0 	at obio0 addr 0x48002000 size 0x1000
 

Index: src/sys/arch/evbarm/conf/files.n900
diff -u src/sys/arch/evbarm/conf/files.n900:1.4 src/sys/arch/evbarm/conf/files.n900:1.5
--- src/sys/arch/evbarm/conf/files.n900:1.4	Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/conf/files.n900	Mon May  6 22:56:55 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.n900,v 1.4 2013/04/20 03:37:55 khorben Exp $
+#	$NetBSD: files.n900,v 1.5 2013/05/06 22:56:55 khorben Exp $
 #
 # Nokia N900 configuration info
 #
@@ -20,6 +20,11 @@ attach com at obio with obiouart
 file	arch/arm/omap/obio_com.c		obiouart
 defparam opt_com.hCONSADDR CONSPEED CONMODE
 
+# Audio jack
+device n900audjck: sysmon_envsys
+attach n900audjck at gpio with n900audjck
+file	arch/evbarm/n900/n900_audjck.c		n900audjck
+
 # Camera button
 device n900cambtn: sysmon_envsys
 attach n900cambtn at gpio with n900cambtn
@@ -44,3 +49,8 @@ file	arch/evbarm/n900/n900_kbdsld.c	n900
 device n900lckbtn: sysmon_envsys
 attach n900lckbtn at gpio with n900lckbtn
 file	arch/evbarm/n900/n900_lckbtn.c		n900lckbtn
+
+# Proximity sensor
+device n900prxmty: sysmon_envsys
+attach n900prxmty at gpio with n900prxmty
+file	arch/evbarm/n900/n900_prxmty.c		n900prxmty

Added files:

Index: src/sys/arch/evbarm/n900/n900_audjck.c
diff -u /dev/null src/sys/arch/evbarm/n900/n900_audjck.c:1.1
--- /dev/null	Mon May  6 22:56:55 2013
+++ src/sys/arch/evbarm/n900/n900_audjck.c	Mon May  6 22:56:54 2013
@@ -0,0 +1,197 @@
+/*	$NetBSD: n900_audjck.c,v 1.1 2013/05/06 22:56:54 khorben Exp $ */
+
+/*
+ * Audio jack driver for the Nokia N900.
+ *
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Pierre Pronchery (khor...@defora.org).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED 

CVS commit: src/sys/dev/marvell

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 23:09:34 UTC 2013

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

Log Message:
Removed an unused variable.

go ahead rkujawa@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/marvell/mvspi.c

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

Modified files:

Index: src/sys/dev/marvell/mvspi.c
diff -u src/sys/dev/marvell/mvspi.c:1.1 src/sys/dev/marvell/mvspi.c:1.2
--- src/sys/dev/marvell/mvspi.c:1.1	Wed May  1 12:17:17 2013
+++ src/sys/dev/marvell/mvspi.c	Mon May  6 23:09:34 2013
@@ -249,9 +249,7 @@ int
 mvspi_transfer(void *cookie, struct spi_transfer *st)
 {
 	struct mvspi_softc *sc = cookie;
-	int s, er;
-
-	er = 0;
+	int s;
 
 	s = splbio();
 	spi_transq_enqueue(sc-sc_transq, st);



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

2013-05-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May  6 23:12:53 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Fix probing error on BBONE due to wrong value being used in u-boot to
program the DDR controller.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/beagle/beagle_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/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.40 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.41
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.40	Tue Apr 30 05:39:44 2013
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Mon May  6 23:12:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.40 2013/04/30 05:39:44 matt Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.41 2013/05/06 23:12:53 matt Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.40 2013/04/30 05:39:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.41 2013/05/06 23:12:53 matt Exp $);
 
 #include opt_machdep.h
 #include opt_ddb.h
@@ -715,7 +715,14 @@ static psize_t 
 am335x_memprobe(void)
 {
 	const vaddr_t emif_base = OMAP_EMIF_VBASE;
-	const uint32_t sdram_config = *(const volatile uint32_t *)(emif_base + EMIF_SDRAM_CONFIG);
+	uint32_t sdram_config = *(const volatile uint32_t *)(emif_base + EMIF_SDRAM_CONFIG);
+	/*
+	 * The original bbone's u-boot misprograms the EMIF so correct it
+	 * if we detect if it has the wrong value.
+	 */
+	if (sdram_config == 0x41805332)
+		sdram_config -= __SHIFTOUT(1, SDRAM_CONFIG_RSIZE);
+
 	const u_int ibank = __SHIFTOUT(sdram_config, SDRAM_CONFIG_IBANK);
 	const u_int rsize = 9 + __SHIFTOUT(sdram_config, SDRAM_CONFIG_RSIZE);
 	const u_int pagesize = 8 + __SHIFTOUT(sdram_config, SDRAM_CONFIG_PAGESIZE);



CVS commit: src/doc

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 23:27:06 UTC 2013

Modified Files:
src/doc: BRANCHES

Log Message:
Announcing the khorben-n900 branch, aiming at fully supporting the Nokia
N900 smartphone. It is expected to affect the kernel (OMAP3 support, device
drivers), and little else (possibly input handling and power management).

Do not hesitate to communicate any change that would be welcome in HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/doc/BRANCHES

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

Modified files:

Index: src/doc/BRANCHES
diff -u src/doc/BRANCHES:1.328 src/doc/BRANCHES:1.329
--- src/doc/BRANCHES:1.328	Tue Mar 26 02:05:48 2013
+++ src/doc/BRANCHES	Mon May  6 23:27:06 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: BRANCHES,v 1.328 2013/03/26 02:05:48 agc Exp $
+#	$NetBSD: BRANCHES,v 1.329 2013/05/06 23:27:06 khorben Exp $
 #
 # This file contains a list of branches that exist in the NetBSD CVS
 # tree and their current state.
@@ -442,6 +442,15 @@ Notes:		http://mail-index.netbsd.org/tec
 		to this branch.
 		This branch is not expected to be compilable yet.
 
+Branch:		khorben-n900
+Description:	Supporting the Nokia N900 smartphone
+Status:		Active
+Start Date:	2013-05-07
+Maintainer:	Pierre Pronchery khor...@netbsd.org
+Scope:		kernel (OMAP3 support, device drivers)
+Notes:		Do not hesitate to communicate any change that would be welcome
+		in HEAD.
+
 Branch:		matt-timespec
 Description:	Convert the kernel to struct timespec as its primary time
 		storage mechanism.



CVS commit: src/sys/dev/i2c

2013-05-06 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May  7 01:16:26 UTC 2013

Modified Files:
src/sys/dev/i2c: tps65217pmicreg.h

Log Message:
Add WLED register defines.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/tps65217pmicreg.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/i2c/tps65217pmicreg.h
diff -u src/sys/dev/i2c/tps65217pmicreg.h:1.4 src/sys/dev/i2c/tps65217pmicreg.h:1.5
--- src/sys/dev/i2c/tps65217pmicreg.h:1.4	Sun Apr 28 00:47:20 2013
+++ src/sys/dev/i2c/tps65217pmicreg.h	Tue May  7 01:16:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tps65217pmicreg.h,v 1.4 2013/04/28 00:47:20 jakllsch Exp $ */
+/*	$NetBSD: tps65217pmicreg.h,v 1.5 2013/05/07 01:16:25 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -59,6 +59,18 @@
 #define TPS65217PMIC_PPATH_USB_EN		__BIT(4)
 #define TPS65217PMIC_PPATH_AC_EN		__BIT(5)
 
+#define TPS65217PMIC_WLEDCTRL1		0x07
+#define TPS65217PMIC_WLEDCTRL1_FDIM		__BITS(1,0)
+#define TPS65217PMIC_WLEDCTRL1_FDIM_100Hz		0
+#define TPS65217PMIC_WLEDCTRL1_FDIM_200Hz		1
+#define TPS65217PMIC_WLEDCTRL1_FDIM_500Hz		2
+#define TPS65217PMIC_WLEDCTRL1_FDIM_1000Hz		3
+#define TPS65217PMIC_WLEDCTRL1_ISEL		__BIT(2)
+#define TPS65217PMIC_WLEDCTRL1_ISINK_EN		__BIT(3)
+
+#define TPS65217PMIC_WLEDCTRL2		0x08
+#define TPS65217PMIC_WLEDCTRL2_DUTY		__BITS(6,0)
+
 #define TPS65217PMIC_STATUS		0x0A
 #define TPS65217PMIC_STATUS_USBPWR		__BIT(2)
 #define TPS65217PMIC_STATUS_ACPWR		__BIT(3)



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 07:54:04 UTC 2013

Modified Files:
src/libexec/ld.elf_so: headers.c

Log Message:
Add some DEBUG code.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/headers.c

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



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 07:58:43 UTC 2013

Modified Files:
src/libexec/ld.elf_so: rtld.c

Log Message:
Disalble a debug only where it causes problems.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/libexec/ld.elf_so/rtld.c

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



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 08:02:20 UTC 2013

Modified Files:
src/libexec/ld.elf_so: debug.h expand.c headers.c load.c map_object.c
paths.c rtld.c rtld.h rtldenv.h search.c sysident.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/libexec/ld.elf_so/debug.h \
src/libexec/ld.elf_so/expand.c
cvs rdiff -u -r1.49 -r1.50 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.42 -r1.43 src/libexec/ld.elf_so/load.c
cvs rdiff -u -r1.47 -r1.48 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.40 -r1.41 src/libexec/ld.elf_so/paths.c
cvs rdiff -u -r1.164 -r1.165 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.113 -r1.114 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.11 -r1.12 src/libexec/ld.elf_so/rtldenv.h
cvs rdiff -u -r1.23 -r1.24 src/libexec/ld.elf_so/search.c
cvs rdiff -u -r1.14 -r1.15 src/libexec/ld.elf_so/sysident.h

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



CVS commit: src/usr.bin/skeyinit

2013-05-06 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Mon May  6 11:00:16 UTC 2013

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

Log Message:
 * Remove OPTIONS section (uncommon) and put options to the DESCRIPTION.
 * Fix capitalisation.

Patch supplied by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/skeyinit/skeyinit.1

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



CVS commit: src/lib/libc/compat-43

2013-05-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon May  6 13:29:12 UTC 2013

Modified Files:
src/lib/libc/compat-43: sigsetmask.3

Log Message:
End sentence with a dot.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/compat-43/sigsetmask.3

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



CVS commit: src/usr.bin/skeyinit

2013-05-06 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Mon May  6 13:44:17 UTC 2013

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

Log Message:
Fix capitalisation (again, last time the wrong sentence).


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

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



CVS commit: src/sys/dev/ic

2013-05-06 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May  6 14:52:51 UTC 2013

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Put back AT_POLL hack in mvsata_bio_ready().  Without it 1.5Gbps
SATA WD800JD drives cause the kernel to stall during autoconf on
Orion.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ic/mvsata.c

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



CVS commit: src/sys/rump/librump/rumpkern

2013-05-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May  6 16:28:17 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern: locks_up.c

Log Message:
update for new hypercalls


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/locks_up.c

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



CVS commit: src/distrib/evbarm/instkernel/instkernel

2013-05-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  6 17:42:31 UTC 2013

Modified Files:
src/distrib/evbarm/instkernel/instkernel: Makefile

Log Message:
Fix up evbearm* release builds.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/evbarm/instkernel/instkernel/Makefile

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



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

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 18:53:41 UTC 2013

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

Log Message:
s/i2C2_SCL/I2C2_SCL/


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/am335x_cm_padconf.c

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



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May  6 19:59:30 UTC 2013

Modified Files:
src/libexec/ld.elf_so: headers.c load.c map_object.c rtld.c rtld.h
symver.c

Log Message:
Fixed handling of DT_SONAME:

- add function to add name aliases for shared libraries loaded
  XXX[1]: we don't add a name during load time, only when DT_SONAME
  is present.
- search already loaded objects in load_by_name for an already
  loaded object that matches our name and return it.
- add missing initialization and cleanup for obj-names
  XXX[2]: should we make them SIMPLEQ?
- Add XXX in rtld.c about getting the name of an object.

NB: This makes the jdk work again without resorting to a hack of putting
the build path of libjvm.so into the run path (which is a security
problem).
XXX: Pullup-6?


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.43 -r1.44 src/libexec/ld.elf_so/load.c
cvs rdiff -u -r1.48 -r1.49 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.165 -r1.166 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.114 -r1.115 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/symver.c

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



CVS commit: src/distrib/sets

2013-05-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May  6 20:38:43 UTC 2013

Modified Files:
src/distrib/sets: sets.subr

Log Message:
The gcc keyword in the set lists is used both as boolean and as list
filter. Skip the HAVE_GCC variables when adding it as boolean, so that
MKGCC=no actually skips the gcc entries.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/distrib/sets/sets.subr

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



CVS commit: src/distrib/notes/common

2013-05-06 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon May  6 21:21:15 UTC 2013

Modified Files:
src/distrib/notes/common: main

Log Message:
add a comment about keeping this in sync with other docs


To generate a diff of this commit:
cvs rdiff -u -r1.494 -r1.495 src/distrib/notes/common/main

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



CVS commit: src/sys/dev/i2c

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 22:04:12 UTC 2013

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: mcp980x.c mcp980xreg.h

Log Message:
Add driver for Microchip MCP9800/1/2/3 temperature sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/mcp980x.c src/sys/dev/i2c/mcp980xreg.h

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



CVS commit: src/doc

2013-05-06 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May  6 22:12:50 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Note mcp980x(4).


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

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



CVS commit: src/libexec/ld.elf_so

2013-05-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May  6 22:49:11 UTC 2013

Modified Files:
src/libexec/ld.elf_so: Makefile

Log Message:
don't overwrite COPTS


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/libexec/ld.elf_so/Makefile

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



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

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 22:49:27 UTC 2013

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

Log Message:
Boot on the MicroSD card slot by default.

Tested on my Nokia N900 smartphone. This is the only way currently
supported on this device at the moment anyway (that I know of).


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

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



CVS commit: src/usr.bin/vndcompress

2013-05-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May  6 22:53:24 UTC 2013

Modified Files:
src/usr.bin/vndcompress: vndcompress.c vnduncompress.c

Log Message:
Make partial read/write error messages more consistent in vndcompress.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/vndcompress/vndcompress.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/vndcompress/vnduncompress.c

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



CVS commit: src/sys/arch/evbarm

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 22:56:55 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: N900 files.n900
Added Files:
src/sys/arch/evbarm/n900: n900_audjck.c n900_prxmty.c

Log Message:
Added two drivers for the Nokia N900 smartphone, n900_audjck(4) and
n900_prxmty(4), to detect the insertion of audio jacks and obstruction of
the front light sensor, respectively.

Tested on my own device.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/files.n900
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/n900/n900_audjck.c \
src/sys/arch/evbarm/n900/n900_prxmty.c

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



CVS commit: src/sys/dev/marvell

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 23:09:34 UTC 2013

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

Log Message:
Removed an unused variable.

go ahead rkujawa@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/marvell/mvspi.c

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



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

2013-05-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May  6 23:12:53 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Fix probing error on BBONE due to wrong value being used in u-boot to
program the DDR controller.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/beagle/beagle_machdep.c

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



CVS commit: src/doc

2013-05-06 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Mon May  6 23:27:06 UTC 2013

Modified Files:
src/doc: BRANCHES

Log Message:
Announcing the khorben-n900 branch, aiming at fully supporting the Nokia
N900 smartphone. It is expected to affect the kernel (OMAP3 support, device
drivers), and little else (possibly input handling and power management).

Do not hesitate to communicate any change that would be welcome in HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/doc/BRANCHES

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



CVS commit: src/sys/dev/i2c

2013-05-06 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May  7 01:16:26 UTC 2013

Modified Files:
src/sys/dev/i2c: tps65217pmicreg.h

Log Message:
Add WLED register defines.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/tps65217pmicreg.h

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