svn commit: r277945 - in projects/clang360-import: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline cddl/contrib/opensolaris/cmd/dtrac...

Dimitry Andric dim at FreeBSD.org
Fri Jan 30 18:35:08 UTC 2015


Author: dim
Date: Fri Jan 30 18:34:56 2015
New Revision: 277945
URL: https://svnweb.freebsd.org/changeset/base/277945

Log:
  Merge ^/head r277902 through r277944.

Modified:
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c
  projects/clang360-import/contrib/libcxxrt/stdexcept.cc
  projects/clang360-import/lib/libnv/Makefile
  projects/clang360-import/lib/libnv/nv.3
  projects/clang360-import/lib/libnv/nv.h
  projects/clang360-import/lib/libnv/nvlist.c
  projects/clang360-import/lib/libnv/nvpair.c
  projects/clang360-import/libexec/rtld-elf/rtld.c
  projects/clang360-import/share/man/man9/contigmalloc.9
  projects/clang360-import/share/misc/committers-src.dot
  projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
  projects/clang360-import/sys/boot/efi/libefi/efinet.c
  projects/clang360-import/sys/cam/ctl/ctl.c
  projects/clang360-import/sys/cam/scsi/scsi_all.h
  projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
  projects/clang360-import/sys/conf/files.amd64
  projects/clang360-import/sys/conf/kern.mk
  projects/clang360-import/sys/dev/alc/if_alc.c
  projects/clang360-import/sys/dev/ofw/openfirm.c
  projects/clang360-import/sys/libkern/strtoq.c
  projects/clang360-import/sys/libkern/strtoul.c
  projects/clang360-import/sys/libkern/strtouq.c
  projects/clang360-import/sys/modules/aesni/Makefile
  projects/clang360-import/sys/netinet/tcp_syncache.c
  projects/clang360-import/sys/ufs/ffs/ffs_softdep.c
  projects/clang360-import/sys/ufs/ffs/softdep.h
  projects/clang360-import/tools/tools/nanobsd/rescue/build.sh
  projects/clang360-import/tools/tools/nanobsd/rescue/common
  projects/clang360-import/usr.bin/grep/Makefile
  projects/clang360-import/usr.sbin/config/config.8
  projects/clang360-import/usr.sbin/config/main.c
Directory Properties:
  projects/clang360-import/   (props changed)
  projects/clang360-import/cddl/   (props changed)
  projects/clang360-import/cddl/contrib/opensolaris/   (props changed)
  projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/   (props changed)
  projects/clang360-import/contrib/libcxxrt/   (props changed)
  projects/clang360-import/share/   (props changed)
  projects/clang360-import/sys/   (props changed)
  projects/clang360-import/sys/boot/   (props changed)
  projects/clang360-import/sys/cddl/contrib/opensolaris/   (props changed)
  projects/clang360-import/sys/conf/   (props changed)

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl	Fri Jan 30 18:34:56 2015	(r277945)
@@ -273,7 +273,7 @@ sub run_tests {
 		}
 
 		$fullname = "$dir/$name";
-		$exe = "./$base.exe";
+		$exe = "$dir/$base.exe";
 		$exe_pid = -1;
 
 		if ($opt_a && ($status != 0 || $tag != 0 || $droptag != 0 ||

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -38,4 +38,4 @@
  *
  */
 
-inline cyc_func_t i = "i am a cyclic function";
+inline dtrace_trap_func_t i = "i am a dtrace trap function";

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -38,4 +38,4 @@
  *
  */
 
-inline vfs_t *invalid = xlate<psinfo_t>(curthread->t_procp);
+inline struct vnode *invalid = xlate<psinfo_t>(curthread->td_proc);

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -14,6 +14,8 @@
  */
 
 #include <sys/sdt.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include "usdt.h"
 
 #define	FMT	"{" \

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -36,8 +36,10 @@
 
 BEGIN
 {
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winvalid-pp-token"
 	h = '
 		';
+#pragma clang diagnostic pop
 	exit(0);
 }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -36,7 +36,9 @@
 
 BEGIN
 {
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winvalid-pp-token"
 	h = '';
 	exit(0);
+#pragma clang diagnostic pop
 }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -36,9 +36,11 @@
 
 BEGIN
 {
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winvalid-pp-token"
 	h = "hello
 
 		there";
 	exit(0);
+#pragma clang diagnostic pop
 }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -74,13 +74,13 @@ fbt:::return
 	    (long long)curthread, pid, tid, (int)arg1, (int)arg0);
 }
 
-mutex_enter:adaptive-acquire
+mtx_lock:adaptive-acquire
 {
 	printf(" %u 0x%llX %d %d lock:0x%llX", timestamp,
 	    (long long)curthread, pid, tid, arg0);
 }
 
-mutex_exit:adaptive-release
+mtx_unlock:adaptive-release
 {
 	printf(" %u 0x%llX %d %d lock:0x%llX", timestamp,
 	    (long long) curthread, pid, tid, arg0);

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -28,6 +28,7 @@
 
 #include <strings.h>
 #include <rpc/rpc.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <sys/param.h>
 #include <rpcsvc/mount.h>

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -40,5 +40,5 @@
 
 BEGIN
 {
-	trace(offsetof(vnode_t, v_no_such_member));
+	trace(offsetof(struct vnode, v_no_such_member));
 }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 int

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry
 proc:::create
 /pid == $1/
 {
-	child = args[0]->pr_pid;
+	child = args[0]->p_pid;
 	trace(pid);
 }
 

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -26,6 +26,8 @@
 
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
+#include <sys/types.h>
+#include <sys/wait.h>
 #include <spawn.h>
 #include <signal.h>
 #include <stdio.h>

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /*

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /*

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry
 proc:::create
 /pid == $1/
 {
-	child = args[0]->pr_pid;
+	child = args[0]->p_pid;
 }
 
 pid$1:a.out:go:

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /*

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include <signal.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /*

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -25,7 +25,7 @@
 
 BEGIN
 {
-	print((void)`p0);
+	print((void)`proc0);
 }
 
 BEGIN

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -22,13 +22,13 @@
 typedef struct pancakes {
 	int i;
 	string s;
-	timespec_t t;
+	struct timespec t;
 } pancakes_t;
 
 translator pancakes_t < void *V > {
 	i = 2 * 10;
 	s = strjoin("I like ", "pancakes");
-	t = *(timespec_t *)`dtrace_zero;
+	t = *(struct timespec *)`dtrace_zero;
 };
 
 BEGIN

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out	Fri Jan 30 18:34:56 2015	(r277945)
@@ -1,7 +1,7 @@
 pancakes_t {
     int i = 0x14
     string s = [ "I like pancakes" ]
-    timespec_t t = {
+    struct timespec t = {
         time_t tv_sec = 0
         long tv_nsec = 0
     }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -44,7 +44,7 @@ BEGIN
 	i = 0;
 }
 
-syscall::*lwp*:entry
+syscall::*wait*:entry
 {
 	exit(0);
 }

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -36,7 +36,7 @@ script()
 {
 	$dtrace -s /dev/stdin <<EOF
 	proc:::signal-discard
-	/args[1]->pr_pid == $child &&
+	/args[1]->p_pid == $child &&
 	    args[1]->pr_psargs == "$longsleep" && args[2] == SIGHUP/
 	{
 		exit(0);

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -42,7 +42,7 @@ script()
 		/*
 		 * This is guaranteed to not race with signal-handle.
 		 */
-		target = args[1]->pr_pid;
+		target = args[1]->p_pid;
 	}
 
 	proc:::signal-handle

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -60,14 +60,14 @@ spinny &
 child=$!
 
 #
-# This is gutsy -- we're assuming that mutex_enter(9F) will show up in the
+# This is gutsy -- we're assuming that mtx_lock(9) will show up in the
 # output.  This is most likely _not_ to show up in the output if the 
 # platform does not support arbitrary resolution interval timers -- but
 # the above script was stress-tested down to 100 hertz and still ran
 # successfully on all platforms, so one is hopeful that this test will pass
 # even in that case.
 #
-script | tee /dev/fd/2 | grep mutex_enter > /dev/null
+script | tee /dev/fd/2 | grep mtx_lock > /dev/null
 status=$?
 
 kill $child

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -63,7 +63,7 @@ child=$!
 # The only thing we can be sure of is that some module named "unix" (or
 # "genunix") did some work -- so that's all we'll check.
 #
-script | tee /dev/fd/2 | grep unix > /dev/null
+script | tee /dev/fd/2 | grep kernel > /dev/null
 status=$? 
 
 kill $child

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -63,7 +63,7 @@ child=$!
 # This is the same gutsy test as that found in the func() test; see that
 # test for the rationale.
 #
-script | tee /dev/fd/2 | grep mutex_enter > /dev/null
+script | tee /dev/fd/2 | grep mtx_lock > /dev/null
 status=$?
 
 kill $child

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d	Fri Jan 30 18:34:56 2015	(r277945)
@@ -31,8 +31,8 @@
 #pragma D option dynvarsize=1m
 
 struct bar {
-	int pid;
-	kthread_t *curthread;
+	pid_t pid;
+	struct thread *curthread;
 };
 
 self struct bar foo[int];

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -28,6 +28,7 @@
 
 #include <stdio.h>
 #include <sys/syscall.h>
+#include <unistd.h>
 
 /*ARGSUSED*/
 int

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh	Fri Jan 30 18:34:56 2015	(r277945)
@@ -106,11 +106,13 @@ cat > main.c <<EOF
 #include <dlfcn.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <signal.h>
 
 int
 main(int argc, char **argv)
 {
 	void *live;
+	sigset_t mask;
 
 	if ((live = dlopen("./livelib.so", RTLD_LAZY | RTLD_LOCAL)) == NULL) {
 		printf("dlopen of livelib.so failed: %s\n", dlerror());
@@ -119,7 +121,8 @@ main(int argc, char **argv)
 
 	(void) dlclose(live);
 
-	pause();
+	(void) sigemptyset(&mask);
+	(void) sigsuspend(&mask);
 
 	return (0);
 }
@@ -133,7 +136,7 @@ fi
 
 script() {
 	$dtrace -w -x bufsize=1k -c ./main -qs /dev/stdin <<EOF
-	syscall::pause:entry
+	syscall::sigsuspend:entry
 	/pid == \$target/
 	{
 		system("$dtrace -l -P test_prov*");

Modified: projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c
==============================================================================
--- projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -26,6 +26,10 @@
 
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include <stdlib.h>
 #include <unistd.h>
 
 #include "forker.h"

Modified: projects/clang360-import/contrib/libcxxrt/stdexcept.cc
==============================================================================
--- projects/clang360-import/contrib/libcxxrt/stdexcept.cc	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/contrib/libcxxrt/stdexcept.cc	Fri Jan 30 18:34:56 2015	(r277945)
@@ -82,19 +82,14 @@ const char* bad_typeid::what() const thr
 	return "std::bad_typeid";
 }
 
-__attribute__((weak))
 bad_array_new_length::bad_array_new_length() throw() {}
-__attribute__((weak))
 bad_array_new_length::~bad_array_new_length() {}
-__attribute__((weak))
 bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {}
-__attribute__((weak))
 bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw()
 {
 	return *this;
 }
 
-__attribute__((weak))
 const char* bad_array_new_length::what() const throw()
 {
 	return "std::bad_array_new_length";

Modified: projects/clang360-import/lib/libnv/Makefile
==============================================================================
--- projects/clang360-import/lib/libnv/Makefile	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/lib/libnv/Makefile	Fri Jan 30 18:34:56 2015	(r277945)
@@ -61,6 +61,7 @@ MLINKS+=nv.3 nvlist_create.3 \
 	nv.3 nvlist_get_nvlist.3 \
 	nv.3 nvlist_get_descriptor.3 \
 	nv.3 nvlist_get_binary.3 \
+	nv.3 nvlist_get_parent.3 \
 	nv.3 nvlist_take_bool.3 \
 	nv.3 nvlist_take_number.3 \
 	nv.3 nvlist_take_string.3 \

Modified: projects/clang360-import/lib/libnv/nv.3
==============================================================================
--- projects/clang360-import/lib/libnv/nv.3	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/lib/libnv/nv.3	Fri Jan 30 18:34:56 2015	(r277945)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 25, 2014
+.Dd January 30, 2015
 .Dt NV 3
 .Os
 .Sh NAME
@@ -151,7 +151,7 @@
 .Ft "const void *"
 .Fn nvlist_get_binary "const nvlist_t *nvl" "const char *name" "size_t *sizep"
 .Ft "const nvlist_t *"
-.Fn nvlist_get_parent "const nvlist_t *nvl"
+.Fn nvlist_get_parent "const nvlist_t *nvl" "void **cookiep"
 .\"
 .Ft bool
 .Fn nvlist_take_bool "nvlist_t *nvl" "const char *name"
@@ -588,6 +588,28 @@ while ((name = nvlist_next(nvl, &type, &
 	printf("\\n");
 }
 .Ed
+.Pp
+Iterating over every nested nvlist:
+.Bd -literal
+nvlist_t *nvl;
+const char *name;
+void *cookie;
+int type;
+
+nvl = nvlist_recv(sock);
+if (nvl == NULL)
+	err(1, "nvlist_recv() failed");
+
+cookie = NULL;
+do {
+	while ((name = nvlist_next(nvl, &type, &cookie)) != NULL) {
+		if (type == NV_TYPE_NVLIST) {
+			nvl = nvlist_get_nvlist(nvl, name);
+			cookie = NULL;
+		}
+	}
+} while ((nvl = nvlist_get_parent(nvl, &cookie)) != NULL);
+.Ed
 .Sh SEE ALSO
 .Xr close 2 ,
 .Xr dup 2 ,

Modified: projects/clang360-import/lib/libnv/nv.h
==============================================================================
--- projects/clang360-import/lib/libnv/nv.h	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/lib/libnv/nv.h	Fri Jan 30 18:34:56 2015	(r277945)
@@ -83,7 +83,7 @@ nvlist_t *nvlist_xfer(int sock, nvlist_t
 
 const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep);
 
-const nvlist_t *nvlist_get_parent(const nvlist_t *nvl);
+const nvlist_t *nvlist_get_parent(const nvlist_t *nvl, void **cookiep);
 
 /*
  * The nvlist_exists functions check if the given name (optionally of the given

Modified: projects/clang360-import/lib/libnv/nvlist.c
==============================================================================
--- projects/clang360-import/lib/libnv/nvlist.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/lib/libnv/nvlist.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -159,15 +159,19 @@ nvlist_get_nvpair_parent(const nvlist_t 
 }
 
 const nvlist_t *
-nvlist_get_parent(const nvlist_t *nvl)
+nvlist_get_parent(const nvlist_t *nvl, void **cookiep)
 {
+	nvpair_t *nvp;
 
 	NVLIST_ASSERT(nvl);
 
-	if (nvl->nvl_parent == NULL)
+	nvp = nvl->nvl_parent;
+	if (cookiep != NULL)
+		*cookiep = nvp;
+	if (nvp == NULL)
 		return (NULL);
 
-	return (nvpair_nvlist(nvl->nvl_parent));
+	return (nvpair_nvlist(nvp));
 }
 
 void
@@ -352,7 +356,9 @@ nvlist_dump_error_check(const nvlist_t *
 void
 nvlist_dump(const nvlist_t *nvl, int fd)
 {
-	nvpair_t *nvp;
+	const nvlist_t *tmpnvl;
+	nvpair_t *nvp, *tmpnvp;
+	void *cookie;
 	int level;
 
 	level = 0;
@@ -382,14 +388,17 @@ nvlist_dump(const nvlist_t *nvl, int fd)
 			break;
 		case NV_TYPE_NVLIST:
 			dprintf(fd, "\n");
-			nvl = nvpair_get_nvlist(nvp);
-			if (nvlist_dump_error_check(nvl, fd, level + 1)) {
-				nvl = nvlist_get_parent(nvl);
+			tmpnvl = nvpair_get_nvlist(nvp);
+			if (nvlist_dump_error_check(tmpnvl, fd, level + 1))
 				break;
+			tmpnvp = nvlist_first_nvpair(tmpnvl);
+			if (tmpnvp != NULL) {
+				nvl = tmpnvl;
+				nvp = tmpnvp;
+				level++;
+				continue;
 			}
-			level += 1;
-			nvp = nvlist_first_nvpair(nvl);
-			continue;
+			break;
 		case NV_TYPE_DESCRIPTOR:
 			dprintf(fd, " %d\n", nvpair_get_descriptor(nvp));
 			break;
@@ -411,11 +420,12 @@ nvlist_dump(const nvlist_t *nvl, int fd)
 		}
 
 		while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) {
-			nvp = nvlist_get_nvpair_parent(nvl);
-			if (nvp == NULL)
+			cookie = NULL;
+			nvl = nvlist_get_parent(nvl, &cookie);
+			if (nvl == NULL)
 				return;
-			nvl = nvlist_get_parent(nvl);
-			level --;
+			nvp = cookie;
+			level--;
 		}
 	}
 }
@@ -434,7 +444,9 @@ nvlist_fdump(const nvlist_t *nvl, FILE *
 size_t
 nvlist_size(const nvlist_t *nvl)
 {
-	const nvpair_t *nvp;
+	const nvlist_t *tmpnvl;
+	const nvpair_t *nvp, *tmpnvp;
+	void *cookie;
 	size_t size;
 
 	NVLIST_ASSERT(nvl);
@@ -448,19 +460,24 @@ nvlist_size(const nvlist_t *nvl)
 		if (nvpair_type(nvp) == NV_TYPE_NVLIST) {
 			size += sizeof(struct nvlist_header);
 			size += nvpair_header_size() + 1;
-			nvl = nvpair_get_nvlist(nvp);
-			PJDLOG_ASSERT(nvl->nvl_error == 0);
-			nvp = nvlist_first_nvpair(nvl);
-			continue;
+			tmpnvl = nvpair_get_nvlist(nvp);
+			PJDLOG_ASSERT(tmpnvl->nvl_error == 0);
+			tmpnvp = nvlist_first_nvpair(tmpnvl);
+			if (tmpnvp != NULL) {
+				nvl = tmpnvl;
+				nvp = tmpnvp;
+				continue;
+			}
 		} else {
 			size += nvpair_size(nvp);
 		}
 
 		while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) {
-			nvp = nvlist_get_nvpair_parent(nvl);
-			if (nvp == NULL)
+			cookie = NULL;
+			nvl = nvlist_get_parent(nvl, &cookie);
+			if (nvl == NULL)
 				goto out;
-			nvl = nvlist_get_parent(nvl);
+			nvp = cookie;
 		}
 	}
 
@@ -574,7 +591,9 @@ nvlist_xpack(const nvlist_t *nvl, int64_
 {
 	unsigned char *buf, *ptr;
 	size_t left, size;
-	nvpair_t *nvp;
+	const nvlist_t *tmpnvl;
+	nvpair_t *nvp, *tmpnvp;
+	void *cookie;
 
 	NVLIST_ASSERT(nvl);
 
@@ -617,10 +636,18 @@ nvlist_xpack(const nvlist_t *nvl, int64_
 			ptr = nvpair_pack_string(nvp, ptr, &left);
 			break;
 		case NV_TYPE_NVLIST:
-			nvl = nvpair_get_nvlist(nvp);
-			nvp = nvlist_first_nvpair(nvl);
-			ptr = nvlist_pack_header(nvl, ptr, &left);
-			continue;
+			tmpnvl = nvpair_get_nvlist(nvp);
+			ptr = nvlist_pack_header(tmpnvl, ptr, &left);
+			if (ptr == NULL)
+				goto out;
+			tmpnvp = nvlist_first_nvpair(tmpnvl);
+			if (tmpnvp != NULL) {
+				nvl = tmpnvl;
+				nvp = tmpnvp;
+				continue;
+			}
+			ptr = nvpair_pack_nvlist_up(ptr, &left);
+			break;
 		case NV_TYPE_DESCRIPTOR:
 			ptr = nvpair_pack_descriptor(nvp, ptr, fdidxp, &left);
 			break;
@@ -635,13 +662,14 @@ nvlist_xpack(const nvlist_t *nvl, int64_
 			return (NULL);
 		}
 		while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) {
-			nvp = nvlist_get_nvpair_parent(nvl);
-			if (nvp == NULL)
+			cookie = NULL;
+			nvl = nvlist_get_parent(nvl, &cookie);
+			if (nvl == NULL)
 				goto out;
+			nvp = cookie;
 			ptr = nvpair_pack_nvlist_up(ptr, &left);
 			if (ptr == NULL)
 				goto out;
-			nvl = nvlist_get_parent(nvl);
 		}
 	}
 

Modified: projects/clang360-import/lib/libnv/nvpair.c
==============================================================================
--- projects/clang360-import/lib/libnv/nvpair.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/lib/libnv/nvpair.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -1100,6 +1100,7 @@ nvpair_t *
 nvpair_movev_string(char *value, const char *namefmt, va_list nameap)
 {
 	nvpair_t *nvp;
+	int serrno;
 
 	if (value == NULL) {
 		errno = EINVAL;
@@ -1108,8 +1109,11 @@ nvpair_movev_string(char *value, const c
 
 	nvp = nvpair_allocv(NV_TYPE_STRING, (uint64_t)(uintptr_t)value,
 	    strlen(value) + 1, namefmt, nameap);
-	if (nvp == NULL)
+	if (nvp == NULL) {
+		serrno = errno;
 		free(value);
+		errno = serrno;
+	}
 
 	return (nvp);
 }
@@ -1137,28 +1141,46 @@ nvpair_movev_nvlist(nvlist_t *value, con
 nvpair_t *
 nvpair_movev_descriptor(int value, const char *namefmt, va_list nameap)
 {
+	nvpair_t *nvp;
+	int serrno;
 
 	if (value < 0 || !fd_is_valid(value)) {
 		errno = EBADF;
 		return (NULL);
 	}
 
-	return (nvpair_allocv(NV_TYPE_DESCRIPTOR, (uint64_t)value,
-	    sizeof(int64_t), namefmt, nameap));
+	nvp = nvpair_allocv(NV_TYPE_DESCRIPTOR, (uint64_t)value,
+	    sizeof(int64_t), namefmt, nameap);
+	if (nvp == NULL) {
+		serrno = errno;
+		close(value);
+		errno = serrno;
+	}
+
+	return (nvp);
 }
 
 nvpair_t *
 nvpair_movev_binary(void *value, size_t size, const char *namefmt,
     va_list nameap)
 {
+	nvpair_t *nvp;
+	int serrno;
 
 	if (value == NULL || size == 0) {
 		errno = EINVAL;
 		return (NULL);
 	}
 
-	return (nvpair_allocv(NV_TYPE_BINARY, (uint64_t)(uintptr_t)value, size,
-	    namefmt, nameap));
+	nvp = nvpair_allocv(NV_TYPE_BINARY, (uint64_t)(uintptr_t)value, size,
+	    namefmt, nameap);
+	if (nvp == NULL) {
+		serrno = errno;
+		free(value);
+		errno = serrno;
+	}
+
+	return (nvp);
 }
 
 bool

Modified: projects/clang360-import/libexec/rtld-elf/rtld.c
==============================================================================
--- projects/clang360-import/libexec/rtld-elf/rtld.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/libexec/rtld-elf/rtld.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -876,7 +876,6 @@ digest_dynamic1(Obj_Entry *obj, int earl
     const Elf32_Word *hashval;
     Elf32_Word bkt, nmaskwords;
     int bloom_size32;
-    bool nmw_power2;
     int plttype = DT_REL;
 
     *dyn_rpath = NULL;
@@ -986,16 +985,15 @@ digest_dynamic1(Obj_Entry *obj, int earl
 		obj->symndx_gnu = hashtab[1];
 		nmaskwords = hashtab[2];
 		bloom_size32 = (__ELF_WORD_SIZE / 32) * nmaskwords;
-		/* Number of bitmask words is required to be power of 2 */
-		nmw_power2 = ((nmaskwords & (nmaskwords - 1)) == 0);
 		obj->maskwords_bm_gnu = nmaskwords - 1;
 		obj->shift2_gnu = hashtab[3];
 		obj->bloom_gnu = (Elf_Addr *) (hashtab + 4);
 		obj->buckets_gnu = hashtab + 4 + bloom_size32;
 		obj->chain_zero_gnu = obj->buckets_gnu + obj->nbuckets_gnu -
 		  obj->symndx_gnu;
-		obj->valid_hash_gnu = nmw_power2 && obj->nbuckets_gnu > 0 &&
-		  obj->buckets_gnu != NULL;
+		/* Number of bitmask words is required to be power of 2 */
+		obj->valid_hash_gnu = powerof2(nmaskwords) &&
+		    obj->nbuckets_gnu > 0 && obj->buckets_gnu != NULL;
 	    }
 	    break;
 

Modified: projects/clang360-import/share/man/man9/contigmalloc.9
==============================================================================
--- projects/clang360-import/share/man/man9/contigmalloc.9	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/share/man/man9/contigmalloc.9	Fri Jan 30 18:34:56 2015	(r277945)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 19, 2007
+.Dd January 29, 2015
 .Dt CONTIGMALLOC 9
 .Os
 .Sh NAME
@@ -100,6 +100,13 @@ However, unless
 .Dv M_NOWAIT
 is specified, it may select a page for reclamation that must first be
 written to backing storage, causing it to sleep.
+.Pp
+The
+.Fn contigfree
+function does not accept
+.Dv NULL
+as an address input, unlike
+.Xr free 9 .
 .Sh RETURN VALUES
 The
 .Fn contigmalloc

Modified: projects/clang360-import/share/misc/committers-src.dot
==============================================================================
--- projects/clang360-import/share/misc/committers-src.dot	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/share/misc/committers-src.dot	Fri Jan 30 18:34:56 2015	(r277945)
@@ -153,6 +153,7 @@ eivind [label="Eivind Eklund\neivind at Fre
 emaste [label="Ed Maste\nemaste at FreeBSD.org\n2005/10/04"]
 emax [label="Maksim Yevmenkin\nemax at FreeBSD.org\n2003/10/12"]
 eri [label="Ermal Luci\neri at FreeBSD.org\n2008/06/11"]
+erj [label="Eric Joyner\nerj at FreeBSD.org\n2014/12/14"]
 fabient [label="Fabien Thomas\nfabient at FreeBSD.org\n2009/03/16"]
 fanf [label="Tony Finch\nfanf at FreeBSD.org\n2002/05/05"]
 fjoe [label="Max Khon\nfjoe at FreeBSD.org\n2001/08/06"]
@@ -440,6 +441,7 @@ gnn -> lstewart
 gnn -> np
 gnn -> davide
 gnn -> arybchik
+gnn -> erj
 
 grehan -> bryanv
 
@@ -485,6 +487,8 @@ jb -> sson
 
 jdp -> fjoe
 
+jfv -> erj
+
 jhb -> arr
 jhb -> avg
 jhb -> jch

Modified: projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
==============================================================================
--- projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_gpio.c	Fri Jan 30 18:26:38 2015	(r277944)
+++ projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_gpio.c	Fri Jan 30 18:34:56 2015	(r277945)
@@ -62,10 +62,20 @@ __FBSDID("$FreeBSD$");
 #define dprintf(fmt, args...)
 #endif
 
+#define	BCM_GPIO_IRQS		4
 #define	BCM_GPIO_PINS		54
 #define	BCM_GPIO_DEFAULT_CAPS	(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |	\
     GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)
 
+static struct resource_spec bcm_gpio_res_spec[] = {
+	{ SYS_RES_MEMORY, 0, RF_ACTIVE },
+	{ SYS_RES_IRQ, 0, RF_ACTIVE },
+	{ SYS_RES_IRQ, 1, RF_ACTIVE },
+	{ SYS_RES_IRQ, 2, RF_ACTIVE },
+	{ SYS_RES_IRQ, 3, RF_ACTIVE },
+	{ -1, 0, 0 }
+};
+
 struct bcm_gpio_sysctl {
 	struct bcm_gpio_softc	*sc;
 	uint32_t		pin;
@@ -74,8 +84,7 @@ struct bcm_gpio_sysctl {
 struct bcm_gpio_softc {
 	device_t		sc_dev;
 	struct mtx		sc_mtx;
-	struct resource *	sc_mem_res;
-	struct resource *	sc_irq_res;
+	struct resource *	sc_res[BCM_GPIO_IRQS + 1];
 	bus_space_tag_t		sc_bst;
 	bus_space_handle_t	sc_bsh;
 	void *			sc_intrhand;
@@ -494,39 +503,6 @@ bcm_gpio_pin_toggle(device_t dev, uint32
 }
 
 static int
-bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc)
-{
-	int i, len;
-	pcell_t pins[BCM_GPIO_PINS];
-	phandle_t gpio;
-
-	/* Find the gpio node to start. */
-	gpio = ofw_bus_get_node(sc->sc_dev);
-
-	len = OF_getproplen(gpio, "broadcom,read-only");
-	if (len < 0 || len > sizeof(pins))
-		return (-1);
-
-	if (OF_getprop(gpio, "broadcom,read-only", &pins, len) < 0)
-		return (-1);
-
-	sc->sc_ro_npins = len / sizeof(pcell_t);
-
-	device_printf(sc->sc_dev, "read-only pins: ");
-	for (i = 0; i < sc->sc_ro_npins; i++) {
-		sc->sc_ro_pins[i] = fdt32_to_cpu(pins[i]);
-		if (i > 0)
-			printf(",");
-		printf("%d", sc->sc_ro_pins[i]);
-	}
-	if (i > 0)
-		printf(".");
-	printf("\n");
-
-	return (0);
-}
-
-static int
 bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS)
 {
 	char buf[16];
@@ -545,7 +521,9 @@ bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS)
 	error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
 	if (error != 0 || req->newptr == NULL)
 		return (error);
-
+	/* Ignore changes on read-only pins. */
+	if (bcm_gpio_pin_is_ro(sc, sc_sysctl->pin))
+		return (0);
 	/* Parse the user supplied string and check for a valid pin function. */
 	if (bcm_gpio_str_func(buf, &nfunc) != 0)
 		return (EINVAL);
@@ -595,63 +573,82 @@ bcm_gpio_sysctl_init(struct bcm_gpio_sof
 }
 
 static int
+bcm_gpio_get_ro_pins(struct bcm_gpio_softc *sc, phandle_t node,
+	const char *propname, const char *label)
+{
+	int i, need_comma, npins, range_start, range_stop;
+	pcell_t *pins;
+
+	/* Get the property data. */
+	npins = OF_getencprop_alloc(node, propname, sizeof(*pins),
+	    (void **)&pins);
+	if (npins < 0)
+		return (-1);
+	if (npins == 0) {
+		free(pins, M_OFWPROP);
+		return (0);
+	}
+	for (i = 0; i < npins; i++)
+		sc->sc_ro_pins[i + sc->sc_ro_npins] = pins[i];
+	sc->sc_ro_npins += npins;
+	need_comma = 0;
+	device_printf(sc->sc_dev, "%s pins: ", label);
+	range_start = range_stop = pins[0];
+	for (i = 1; i < npins; i++) {
+		if (pins[i] != range_stop + 1) {
+			if (need_comma)
+				printf(",");
+			if (range_start != range_stop)
+				printf("%d-%d", range_start, range_stop);
+			else
+				printf("%d", range_start);
+			range_start = range_stop = pins[i];
+			need_comma = 1;
+		} else
+			range_stop++;
+	}
+	if (need_comma)
+		printf(",");
+	if (range_start != range_stop)
+		printf("%d-%d.\n", range_start, range_stop);
+	else
+		printf("%d.\n", range_start);
+	free(pins, M_OFWPROP);
+
+	return (0);
+}
+
+static int
 bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc)
 {
-	int i, j, len, npins;
-	pcell_t pins[BCM_GPIO_PINS];
+	char *name;
 	phandle_t gpio, node, reserved;
-	char name[32];
+	ssize_t len;
 
 	/* Get read-only pins. */
-	if (bcm_gpio_get_ro_pins(sc) != 0)
-		return (-1);
-
-	/* Find the gpio/reserved pins node to start. */
 	gpio = ofw_bus_get_node(sc->sc_dev);
-	node = OF_child(gpio);
-	
-	/*
-	 * Find reserved node
-	 */
+	if (bcm_gpio_get_ro_pins(sc, gpio, "broadcom,read-only",
+	    "read-only") != 0)
+		return (-1);
+	/* Traverse the GPIO subnodes to find the reserved pins node. */
 	reserved = 0;
+	node = OF_child(gpio);
 	while ((node != 0) && (reserved == 0)) {
-		len = OF_getprop(node, "name", name,
-		    sizeof(name) - 1);
-		name[len] = 0;
+		len = OF_getprop_alloc(node, "name", 1, (void **)&name);
+		if (len == -1)
+			return (-1);
 		if (strcmp(name, "reserved") == 0)
 			reserved = node;
+		free(name, M_OFWPROP);
 		node = OF_peer(node);
 	}
-
 	if (reserved == 0)
 		return (-1);
-
 	/* Get the reserved pins. */
-	len = OF_getproplen(reserved, "broadcom,pins");
-	if (len < 0 || len > sizeof(pins))
-		return (-1);
-
-	if (OF_getprop(reserved, "broadcom,pins", &pins, len) < 0)
+	if (bcm_gpio_get_ro_pins(sc, reserved, "broadcom,pins",
+	    "reserved") != 0)
 		return (-1);
 
-	npins = len / sizeof(pcell_t);
-
-	j = 0;
-	device_printf(sc->sc_dev, "reserved pins: ");
-	for (i = 0; i < npins; i++) {
-		if (i > 0)
-			printf(",");
-		printf("%d", fdt32_to_cpu(pins[i]));
-		/* Some pins maybe already on the list of read-only pins. */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list