Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Nov 2014 13:25:58 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r275210 - in projects/clang350-import: . contrib/elftoolchain/addr2line contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy contrib/elftoolchain/libelftc contrib/elftoolchain/nm c...
Message-ID:  <201411281325.sASDPw61014621@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Nov 28 13:25:57 2014
New Revision: 275210
URL: https://svnweb.freebsd.org/changeset/base/275210

Log:
  Merge ^/head r275118 through r275209.

Added:
  projects/clang350-import/contrib/elftoolchain/addr2line/
     - copied from r275209, head/contrib/elftoolchain/addr2line/
  projects/clang350-import/contrib/elftoolchain/cxxfilt/
     - copied from r275209, head/contrib/elftoolchain/cxxfilt/
  projects/clang350-import/contrib/elftoolchain/elfcopy/
     - copied from r275209, head/contrib/elftoolchain/elfcopy/
  projects/clang350-import/contrib/elftoolchain/libelftc/
     - copied from r275209, head/contrib/elftoolchain/libelftc/
  projects/clang350-import/contrib/elftoolchain/nm/
     - copied from r275209, head/contrib/elftoolchain/nm/
  projects/clang350-import/contrib/elftoolchain/size/
     - copied from r275209, head/contrib/elftoolchain/size/
  projects/clang350-import/contrib/elftoolchain/strings/
     - copied from r275209, head/contrib/elftoolchain/strings/
  projects/clang350-import/sbin/mdconfig/tests/mdconfig_test.sh
     - copied unchanged from r275209, head/sbin/mdconfig/tests/mdconfig_test.sh
Deleted:
  projects/clang350-import/sbin/mdconfig/tests/legacy_test.sh
  projects/clang350-import/sbin/mdconfig/tests/mdconfig.test
  projects/clang350-import/sbin/mdconfig/tests/run.pl
  projects/clang350-import/sys/netipsec/ipip_var.h
Modified:
  projects/clang350-import/ObsoleteFiles.inc
  projects/clang350-import/gnu/usr.bin/binutils/Makefile
  projects/clang350-import/lib/libc/net/base64.c
  projects/clang350-import/sbin/mdconfig/tests/Makefile
  projects/clang350-import/share/man/man5/src.conf.5
  projects/clang350-import/share/misc/bsd-family-tree
  projects/clang350-import/sys/arm/arm/generic_timer.c
  projects/clang350-import/sys/boot/i386/boot2/boot2.c
  projects/clang350-import/sys/compat/linux/linux_misc.c
  projects/clang350-import/sys/compat/svr4/svr4_misc.c
  projects/clang350-import/sys/contrib/ipfilter/netinet/fil.c
  projects/clang350-import/sys/contrib/ipfilter/netinet/ip_frag.c
  projects/clang350-import/sys/dev/drm2/drm_drv.c
  projects/clang350-import/sys/dev/e1000/if_igb.c
  projects/clang350-import/sys/dev/hwpmc/hwpmc_mpc7xxx.c
  projects/clang350-import/sys/dev/hwpmc/hwpmc_ppc970.c
  projects/clang350-import/sys/dev/isp/isp.c
  projects/clang350-import/sys/dev/isp/isp_freebsd.c
  projects/clang350-import/sys/dev/isp/isp_freebsd.h
  projects/clang350-import/sys/dev/ixgbe/ixgbe.c
  projects/clang350-import/sys/dev/usb/controller/ehci_pci.c
  projects/clang350-import/sys/fs/procfs/procfs_status.c
  projects/clang350-import/sys/kern/init_main.c
  projects/clang350-import/sys/kern/kern_clock.c
  projects/clang350-import/sys/kern/kern_exit.c
  projects/clang350-import/sys/kern/kern_mutex.c
  projects/clang350-import/sys/kern/kern_proc.c
  projects/clang350-import/sys/kern/kern_racct.c
  projects/clang350-import/sys/kern/kern_resource.c
  projects/clang350-import/sys/kern/kern_sig.c
  projects/clang350-import/sys/kern/kern_thread.c
  projects/clang350-import/sys/kern/kern_time.c
  projects/clang350-import/sys/kern/subr_bus.c
  projects/clang350-import/sys/kern/subr_prof.c
  projects/clang350-import/sys/kern/sys_generic.c
  projects/clang350-import/sys/net/if_arcsubr.c
  projects/clang350-import/sys/net/if_ethersubr.c
  projects/clang350-import/sys/net/if_fddisubr.c
  projects/clang350-import/sys/net/if_fwsubr.c
  projects/clang350-import/sys/net/if_iso88025subr.c
  projects/clang350-import/sys/netinet/if_ether.c
  projects/clang350-import/sys/netinet/if_ether.h
  projects/clang350-import/sys/netinet/toecore.c
  projects/clang350-import/sys/netinet6/nd6.c
  projects/clang350-import/sys/netinet6/nd6.h
  projects/clang350-import/sys/netipsec/xform.h
  projects/clang350-import/sys/netipsec/xform_ipip.c
  projects/clang350-import/sys/ofed/drivers/infiniband/core/addr.c
  projects/clang350-import/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  projects/clang350-import/sys/sys/bus.h
  projects/clang350-import/sys/sys/pmc.h
  projects/clang350-import/sys/sys/proc.h
  projects/clang350-import/sys/sys/resourcevar.h
  projects/clang350-import/tools/build/options/WITHOUT_CROSS_COMPILER
  projects/clang350-import/tools/build/options/WITHOUT_INCLUDES
  projects/clang350-import/tools/build/options/WITHOUT_RCS
  projects/clang350-import/tools/build/options/WITH_FMAKE
  projects/clang350-import/tools/tools/nanobsd/nanobsd.sh
  projects/clang350-import/usr.bin/dc/stack.c
Directory Properties:
  projects/clang350-import/   (props changed)
  projects/clang350-import/gnu/usr.bin/binutils/   (props changed)
  projects/clang350-import/lib/libc/   (props changed)
  projects/clang350-import/sbin/   (props changed)
  projects/clang350-import/share/   (props changed)
  projects/clang350-import/sys/   (props changed)
  projects/clang350-import/sys/boot/   (props changed)
  projects/clang350-import/sys/contrib/ipfilter/   (props changed)

Modified: projects/clang350-import/ObsoleteFiles.inc
==============================================================================
--- projects/clang350-import/ObsoleteFiles.inc	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/ObsoleteFiles.inc	Fri Nov 28 13:25:57 2014	(r275210)
@@ -38,7 +38,7 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
-# 20141124: new clang import which bumps version from 3.4.1 to 3.5.0.
+# 20141128: new clang import which bumps version from 3.4.1 to 3.5.0.
 OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_aes.h
 OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_pclmul.h
 OLD_FILES+=usr/include/clang/3.4.1/altivec.h
@@ -74,6 +74,12 @@ OLD_FILES+=usr/include/clang/3.4.1/x86in
 OLD_FILES+=usr/include/clang/3.4.1/xmmintrin.h
 OLD_FILES+=usr/include/clang/3.4.1/xopintrin.h
 OLD_DIRS+=usr/include/clang/3.4.1
+# 20141126: convert sbin/mdconfig/tests to ATF format tests
+OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test
+OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test
+OLD_FILES+=usr/tests/sbin/mdconfig/run.pl
+# 20141126: remove xform_ipip decapsulation fallback
+OLD_FILES+=usr/include/netipsec/ipip_var.h
 # 20141109: faith/faithd removal
 OLD_FILES+=etc/rc.d/faith
 OLD_FILES+=usr/share/man/man4/faith.4.gz
@@ -170,10 +176,12 @@ OLD_FILES+=usr/include/readline/chardefs
 OLD_FILES+=usr/include/readline/history.h
 OLD_FILES+=usr/include/readline/keymaps.h
 OLD_FILES+=usr/include/readline/readline.h
+OLD_FILES+=usr/include/readline/tilde.h
 OLD_FILES+=usr/include/readline/rlconf.h
 OLD_FILES+=usr/include/readline/rlstdc.h
 OLD_FILES+=usr/include/readline/rltypedefs.h
 OLD_FILES+=usr/include/readline/rltypedefs.h
+OLD_DIRS+=usr/include/readline
 OLD_FILES+=usr/share/info/readline.info.gz
 OLD_FILES+=usr/share/man/man3/readline.3.gz
 # 20140625: csup removal

Modified: projects/clang350-import/gnu/usr.bin/binutils/Makefile
==============================================================================
--- projects/clang350-import/gnu/usr.bin/binutils/Makefile	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/gnu/usr.bin/binutils/Makefile	Fri Nov 28 13:25:57 2014	(r275210)
@@ -1,7 +1,19 @@
 # $FreeBSD$
 
-SUBDIR=		libiberty libbfd libopcodes libbinutils \
-		addr2line as ld nm objcopy objdump readelf \
-		size strings strip doc
+SUBDIR=	libiberty \
+	libbfd \
+	libopcodes \
+	libbinutils \
+	addr2line \
+	as \
+	ld \
+	nm \
+	objcopy \
+	objdump \
+	readelf \
+	size \
+	strings \
+	strip \
+	doc
 
 .include <bsd.subdir.mk>

Modified: projects/clang350-import/lib/libc/net/base64.c
==============================================================================
--- projects/clang350-import/lib/libc/net/base64.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/lib/libc/net/base64.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -193,10 +193,7 @@ b64_ntop(u_char const *src, size_t srcle
  */
 
 int
-b64_pton(src, target, targsize)
-	char const *src;
-	u_char *target;
-	size_t targsize;
+b64_pton(const char *src, u_char *target, size_t targsize)
 {
 	int tarindex, state, ch;
 	u_char nextbyte;

Modified: projects/clang350-import/sbin/mdconfig/tests/Makefile
==============================================================================
--- projects/clang350-import/sbin/mdconfig/tests/Makefile	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sbin/mdconfig/tests/Makefile	Fri Nov 28 13:25:57 2014	(r275210)
@@ -2,12 +2,9 @@
 
 TESTSDIR=	${TESTSBASE}/sbin/mdconfig
 
-TAP_TESTS_SH=			legacy_test
-TAP_TESTS_SH_SED_legacy_test=   's,__PERL__,${TAP_PERL_INTERPRETER},g'
-TEST_METADATA.legacy_test+=	required_programs="${TAP_PERL_INTERPRETER}"
+ATF_TESTS_SH=	mdconfig_test
 
-FILESDIR=	${TESTSDIR}
-FILES=		mdconfig.test
-FILES+=		run.pl
+
+TEST_METADATA.mdconfig_test+=	required_user="root"
 
 .include <bsd.test.mk>

Copied: projects/clang350-import/sbin/mdconfig/tests/mdconfig_test.sh (from r275209, head/sbin/mdconfig/tests/mdconfig_test.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/clang350-import/sbin/mdconfig/tests/mdconfig_test.sh	Fri Nov 28 13:25:57 2014	(r275210, copy of r275209, head/sbin/mdconfig/tests/mdconfig_test.sh)
@@ -0,0 +1,281 @@
+# Copyright (c) 2012 Edward Tomasz NapieraƂa <trasz@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+check_diskinfo()
+{
+	local md=$1
+	local mediasize_in_bytes=$2
+	local mediasize_in_sectors=$3
+	local sectorsize=${4:-512}
+	local stripesize=${5:-0}
+	local stripeoffset=${6:-0}
+
+	atf_check -s exit:0 \
+	    -o match:"/dev/$md *$sectorsize *$mediasize_in_bytes *$mediasize_in_sectors *$stripesize *$stripeoffset" \
+	    -x "diskinfo /dev/$md | expand"
+}
+
+cleanup_common()
+{
+	if [ -f mdconfig.out ]; then
+		mdconfig -d -u $(sed -e 's/md//' mdconfig.out)
+	fi
+}
+
+atf_test_case attach_vnode_non_explicit_type cleanup
+attach_vnode_non_explicit_type_head()
+{
+	atf_set "descr" "Tests out -a / -f without -t"
+}
+attach_vnode_non_explicit_type_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig -af xxx'
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "2097152"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_non_explicit_type_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_vnode_implicit_a_f cleanup
+attach_vnode_implicit_a_f_head()
+{
+	atf_set "descr" "Tests out implied -a / -f without -t"
+}
+attach_vnode_implicit_a_f_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig xxx'
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "2097152"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_implicit_a_f_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_vnode_explicit_type cleanup
+attach_vnode_explicit_type_head()
+{
+	atf_set "descr" "Tests out implied -a / -f with -t vnode"
+}
+attach_vnode_explicit_type_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out -x 'mdconfig -af xxx -t vnode'
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "2097152"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_explicit_type_cleanup()
+{
+	[ -f mdconfig.out ] && mdconfig -d -u $(sed -e 's/md//' mdconfig.out)
+	rm -f mdconfig.out xxx
+}
+
+atf_test_case attach_vnode_smaller_than_file cleanup
+attach_vnode_smaller_than_file_head()
+{
+	atf_set "descr" "Tests mdconfig -s with size less than the file size"
+}
+attach_vnode_smaller_than_file_body()
+{
+	local md
+	local size_in_mb=128
+
+	atf_check -s exit:0 -x "truncate -s 1024m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out \
+	    -x "mdconfig -af xxx -s ${size_in_mb}m"
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "134217728" "262144"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_smaller_than_file_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_vnode_larger_than_file cleanup
+attach_vnode_larger_than_file_head()
+{
+	atf_set "descr" "Tests mdconfig -s with size greater than the file size"
+}
+attach_vnode_larger_than_file_body()
+{
+	local md
+	local size_in_gb=128
+
+	atf_check -s exit:0 -x "truncate -s 1024m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out \
+	    -x "mdconfig -af xxx -s ${size_in_gb}g"
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "137438953472" "268435456"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_gb}G$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_larger_than_file_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_vnode_sector_size cleanup
+attach_vnode_sector_size_head()
+{
+	atf_set "descr" "Tests mdconfig -s with size greater than the file size"
+}
+attach_vnode_sector_size_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -x "truncate -s ${size_in_mb}m xxx"
+	atf_check -s exit:0 -o save:mdconfig.out \
+	    -x "mdconfig -af xxx -S 2048"
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "524288" "2048"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md vnode ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_vnode_sector_size_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_malloc cleanup
+attach_malloc_head()
+{
+	atf_set "descr" "Tests mdconfig with -t malloc"
+}
+attach_malloc_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -o save:mdconfig.out \
+	    -x 'mdconfig -a -t malloc -s 1g'
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "2097152"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md malloc ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_malloc_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_swap cleanup
+attach_swap_head()
+{
+	atf_set "descr" "Tests mdconfig with -t swap"
+}
+attach_swap_body()
+{
+	local md
+	local size_in_mb=1024
+
+	atf_check -s exit:0 -o save:mdconfig.out \
+	    -x 'mdconfig -a -t swap -s 1g'
+	md=$(cat mdconfig.out)
+	atf_check -s exit:0 -o match:'^md[0-9]+$' -x "echo $md"
+	check_diskinfo "$md" "1073741824" "2097152"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md swap ${size_in_mb}M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_swap_cleanup()
+{
+	cleanup_common
+}
+
+atf_test_case attach_with_specific_unit_number cleanup
+attach_with_specific_unit_number_head()
+{
+	atf_set "descr" "Tests mdconfig with a unit specified by -u"
+}
+attach_with_specific_unit_number_body()
+{
+	local md_unit=99
+	local size_in_mb=10
+
+	local md="md${md_unit}"
+
+	echo "$md" > mdconfig.out
+
+	atf_check -s exit:0 -o empty \
+	    -x "mdconfig -a -t malloc -s ${size_in_mb}m -u $md_unit"
+	check_diskinfo "$md" "10485760" "20480"
+	# This awk strips the file path.
+	atf_check -s exit:0 -o match:"^$md malloc "$size_in_mb"M$" \
+	    -x "mdconfig -lv | awk '\$1 == \"$md\" { print \$1, \$2, \$3 }'"
+}
+attach_with_specific_unit_number_cleanup()
+{
+	cleanup_common
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case attach_vnode_non_explicit_type
+	atf_add_test_case attach_vnode_explicit_type
+	atf_add_test_case attach_vnode_smaller_than_file
+	atf_add_test_case attach_vnode_larger_than_file
+	atf_add_test_case attach_vnode_sector_size
+	atf_add_test_case attach_malloc
+	atf_add_test_case attach_swap
+	atf_add_test_case attach_with_specific_unit_number
+}

Modified: projects/clang350-import/share/man/man5/src.conf.5
==============================================================================
--- projects/clang350-import/share/man/man5/src.conf.5	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/share/man/man5/src.conf.5	Fri Nov 28 13:25:57 2014	(r275210)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des
 .\" $FreeBSD$
-.Dd October 21, 2014
+.Dd November 26, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -267,17 +267,17 @@ amd64/amd64, arm/arm, arm/armv6, arm/arm
 Set to not build
 .Xr cpp 1 .
 .It Va WITHOUT_CROSS_COMPILER
-.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 264660 2014-04-18 17:03:58Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb
 Set to not build any cross compiler in the cross-tools stage of buildworld.
 If you are compiling a different version of
-.Fx 
+.Fx
 than what is installed on the system, you will need to provide an alternate
 compiler with XCC to ensure success.
 If you are compiling with an identical version of
-.Fx 
+.Fx
 to the host, this option may be safely used.
 This option may also be safe when the host version of
-.Fx 
+.Fx
 is close to the sources being built, but all bets are off if there have
 been any changes to the toolchain between the versions.
 When set, it also enforces the following options:
@@ -396,8 +396,8 @@ This includes the device tree compiler (
 Set to not build or install programs
 for operating floppy disk driver.
 .It Va WITH_FMAKE
-.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 266752 2014-05-27 15:52:27Z gjb
-Causes the old FreeBSD 
+.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 275138 2014-11-26 20:43:09Z gjb
+Causes the old FreeBSD
 .Xr make 1
 program to be built and installed as fmake.
 .It Va WITHOUT_FMTREE
@@ -490,8 +490,8 @@ This is the default on platforms where g
 It is a default setting on
 arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
 .It Va WITHOUT_GNU_GREP_COMPAT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 266752 2014-05-27 15:52:27Z gjb
-Set this option to omit the gnu extentions to grep from being included in 
+.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste
+Set this option to omit the gnu extensions to grep from being included in
 BSD grep.
 .It Va WITHOUT_GNU_SUPPORT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru
@@ -531,6 +531,14 @@ Set to not build or install HyperV utili
 .It Va WITHOUT_ICONV
 .\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine
 Set to not build iconv as part of libc.
+.It Va WITHOUT_INCLUDES
+.\" from FreeBSD: head/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb
+Set to not install header files.
+This option used to be spelled
+.Va NO_INCS .
+.Bf -symbolic
+The option does not work for build targets.
+.Ef
 .It Va WITHOUT_INET
 .\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz
 Set to not build programs and libraries related to IPv4 networking.
@@ -668,8 +676,8 @@ Set to not build programs that support a
 and
 .Xr vidcontrol 8 .
 .It Va WITHOUT_LIB32
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 156932 2006-03-21 07:50:50Z ru
-On amd64, set to not build 32-bit library set and a
+.\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp
+On 64-bit platforms, set to not build 32-bit library set and a
 .Nm ld-elf32.so.1
 runtime linker.
 .It Va WITHOUT_LIBCPLUSPLUS
@@ -938,12 +946,11 @@ This includes
 .Xr rsh 1 ,
 etc.
 .It Va WITHOUT_RCS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 271401 2014-09-10 19:00:17Z asomers
+.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb
 Set to not build
-.Xr rcs 1
-,
-.Xr etcupdate 8
-, and related utilities.
+.Xr rcs 1 ,
+.Xr etcupdate 8 ,
+and related utilities.
 .It Va WITHOUT_RESCUE
 .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru
 Set to not build
@@ -1047,6 +1054,15 @@ See
 .Xr tests 7
 for more details.
 This also disables the build of all test-related dependencies, including ATF.
+When set, it also enforces the following options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_TESTS_SUPPORT
+.El
+.It Va WITHOUT_TESTS_SUPPORT
+.\" from FreeBSD: head/tools/build/options/WITHOUT_TESTS_SUPPORT 274665 2014-11-18 17:06:50Z imp
+Set to disables the build of all test-related dependencies, including ATF.
 .It Va WITHOUT_TEXTPROC
 .\" from FreeBSD: head/tools/build/options/WITHOUT_TEXTPROC 183242 2008-09-21 22:02:26Z sam
 Set to not build
@@ -1080,6 +1096,8 @@ When set, it also enforces the following
 .Va WITHOUT_GCC
 .It
 .Va WITHOUT_GDB
+.It
+.Va WITHOUT_INCLUDES
 .El
 .It Va WITHOUT_UNBOUND
 .\" from FreeBSD: head/tools/build/options/WITHOUT_UNBOUND 255597 2013-09-15 14:51:23Z des
@@ -1089,6 +1107,9 @@ and related programs.
 .It Va WITHOUT_USB
 .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru
 Set to not build USB-related programs and libraries.
+.It Va WITHOUT_USB_GADGET_EXAMPLES
+.\" from FreeBSD: head/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES 274665 2014-11-18 17:06:50Z imp
+Set to build USB gadget kernel modules.
 .It Va WITHOUT_UTMPX
 .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed
 Set to not build user accounting tools such as

Modified: projects/clang350-import/share/misc/bsd-family-tree
==============================================================================
--- projects/clang350-import/share/misc/bsd-family-tree	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/share/misc/bsd-family-tree	Fri Nov 28 13:25:57 2014	(r275210)
@@ -296,30 +296,30 @@ FreeBSD 5.2           |      |          
  |            \       |      |       |         |                       |
  *--FreeBSD    |      |      |    NetBSD 6.1.3 |                       |
  |   10.0      |      |      |       |         |                       |
- |             |      |      |       |         |               DragonFly 3.6.1
- |             |      |      |       |         |                       |
- |             |      |      |       |         |                       |
- |             |      |      |       |         |               DragonFly 3.6.2
- |             |      |      |    NetBSD 6.1.4 |                       |
- |             |      |      |                 |                       |
- |             |      |      |            OpenBSD 5.5                  |
- |             |      |      |                 |                       |
- |             |      |      |                 |               DragonFly 3.8.0
- |             |      |      |                 |                       |
- |             |      |      |                 |                       |
- |             |      |      |                 |               DragonFly 3.8.1
- |             |      |      |                 |                       |
- |             |      |      |                 |                       |
- |             |      |      |                 |               DragonFly 3.6.3
- |             |      |      |                 |                       |
- |          FreeBSD   |      |                 |                       |
- |            9.3     |      |                 |                       |
- |                    |      |                 |               DragonFly 3.8.2
- |                 Mac OS X  |                 |                       |
- |                   10.10   |                 |                       |
- |                    |      |                 |                       |
- |                    |      |                 |                       |
- |                    |      |                 |                       |
+ |     |       |      |      |       |         |               DragonFly 3.6.1
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |               DragonFly 3.6.2
+ |     |       |      |      |    NetBSD 6.1.4 |                       |
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |    OpenBSD 5.5                  |
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |               DragonFly 3.8.0
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |               DragonFly 3.8.1
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |                       |
+ |     |       |      |      |       |         |               DragonFly 3.6.3
+ |     |       |      |      |       |         |                       |
+ |     |    FreeBSD   |      |       |         |                       |
+ |     |      9.3     |      |       |         |                       |
+ |     |              |      |    NetBSD 6.1.5 |               DragonFly 3.8.2
+ |     |           Mac OS X  |                 |                       |
+ |     |             10.10   |                 |                       |
+ |     |              |      |            OpenBSD 5.6                  |
+ |  FreeBSD           |      |                 |                       |
+ |   10.1             |      |                 |               DragonFly 4.0.1
  |                    |      |                 |                       |
  |                    |      |                 |                       |
  |                    |      |                 |                       |
@@ -655,7 +655,11 @@ DragonFly 3.8.1		2014-06-16 [DFB]
 DragonFly 3.6.3		2014-06-17 [DFB]
 FreeBSD 9.3		2014-07-05 [FBD]
 DragonFly 3.8.2		2014-08-08 [DFB]
+NetBSD 6.1.5		2014-09-22 [NDB]
 Mac OS X 10.10		2014-10-16 [APL]
+OpenBSD 5.6		2014-11-01 [OBD]
+FreeBSD 10.1		2014-11-14 [FBD]
+DragonFly 4.0.1		2014-11-25 [DFB]
 
 Bibliography
 ------------------------

Modified: projects/clang350-import/sys/arm/arm/generic_timer.c
==============================================================================
--- projects/clang350-import/sys/arm/arm/generic_timer.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/arm/arm/generic_timer.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -87,7 +87,7 @@ static struct resource_spec timer_spec[]
 	{ SYS_RES_IRQ,		0,	RF_ACTIVE },	/* Secure */
 	{ SYS_RES_IRQ,		1,	RF_ACTIVE },	/* Non-secure */
 	{ SYS_RES_IRQ,		2,	RF_ACTIVE },	/* Virt */
-	{ SYS_RES_IRQ,		3,	RF_ACTIVE },	/* Hyp */
+	{ SYS_RES_IRQ,		3,	RF_ACTIVE | RF_OPTIONAL	}, /* Hyp */
 	{ -1, 0 }
 };
 
@@ -353,6 +353,8 @@ static devclass_t arm_tmr_devclass;
 
 EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0,
     BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE);
+EARLY_DRIVER_MODULE(timer, ofwbus, arm_tmr_driver, arm_tmr_devclass, 0, 0,
+    BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE);
 
 void
 DELAY(int usec)

Modified: projects/clang350-import/sys/boot/i386/boot2/boot2.c
==============================================================================
--- projects/clang350-import/sys/boot/i386/boot2/boot2.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/boot/i386/boot2/boot2.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -394,9 +394,8 @@ parse()
     char *ep, *p, *q;
     const char *cp;
     unsigned int drv;
-    int c, j;
+    int c, i, j;
     size_t k;
-    uint8_t i;
 
     while ((c = *arg++)) {
 	if (c == ' ' || c == '\t' || c == '\n')

Modified: projects/clang350-import/sys/compat/linux/linux_misc.c
==============================================================================
--- projects/clang350-import/sys/compat/linux/linux_misc.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/compat/linux/linux_misc.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -690,9 +690,9 @@ linux_times(struct thread *td, struct li
 	if (args->buf != NULL) {
 		p = td->td_proc;
 		PROC_LOCK(p);
-		PROC_SLOCK(p);
+		PROC_STATLOCK(p);
 		calcru(p, &utime, &stime);
-		PROC_SUNLOCK(p);
+		PROC_STATUNLOCK(p);
 		calccru(p, &cutime, &cstime);
 		PROC_UNLOCK(p);
 

Modified: projects/clang350-import/sys/compat/svr4/svr4_misc.c
==============================================================================
--- projects/clang350-import/sys/compat/svr4/svr4_misc.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/compat/svr4/svr4_misc.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -864,9 +864,9 @@ svr4_sys_times(td, uap)
 
 	p = td->td_proc;
 	PROC_LOCK(p);
-	PROC_SLOCK(p);
+	PROC_STATLOCK(p);
 	calcru(p, &utime, &stime);
-	PROC_SUNLOCK(p);
+	PROC_STATUNLOCK(p);
 	calccru(p, &cutime, &cstime);
 	PROC_UNLOCK(p);
 
@@ -1277,9 +1277,9 @@ loop:
 			pid = p->p_pid;
 			status = p->p_xstat;
 			ru = p->p_ru;
-			PROC_SLOCK(p);
+			PROC_STATLOCK(p);
 			calcru(p, &ru.ru_utime, &ru.ru_stime);
-			PROC_SUNLOCK(p);
+			PROC_STATUNLOCK(p);
 			PROC_UNLOCK(p);
 			sx_sunlock(&proctree_lock);
 
@@ -1304,9 +1304,9 @@ loop:
 			pid = p->p_pid;
 			status = W_STOPCODE(p->p_xstat);
 			ru = p->p_ru;
-			PROC_SLOCK(p);
+			PROC_STATLOCK(p);
 			calcru(p, &ru.ru_utime, &ru.ru_stime);
-			PROC_SUNLOCK(p);
+			PROC_STATUNLOCK(p);
 			PROC_UNLOCK(p);
 
 		        if (((uap->options & SVR4_WNOWAIT)) == 0) {
@@ -1328,9 +1328,9 @@ loop:
 			pid = p->p_pid;
 			ru = p->p_ru;
 			status = SIGCONT;
-			PROC_SLOCK(p);
+			PROC_STATLOCK(p);
 			calcru(p, &ru.ru_utime, &ru.ru_stime);
-			PROC_SUNLOCK(p);
+			PROC_STATUNLOCK(p);
 			PROC_UNLOCK(p);
 
 		        if (((uap->options & SVR4_WNOWAIT)) == 0) {

Modified: projects/clang350-import/sys/contrib/ipfilter/netinet/fil.c
==============================================================================
--- projects/clang350-import/sys/contrib/ipfilter/netinet/fil.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/contrib/ipfilter/netinet/fil.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -252,7 +252,7 @@ static const	struct	optlist	ipopts[20] =
 };
 
 #ifdef USE_INET6
-static struct optlist ip6exthdr[] = {
+static const struct optlist ip6exthdr[] = {
 	{ IPPROTO_HOPOPTS,		0x000001 },
 	{ IPPROTO_IPV6,			0x000002 },
 	{ IPPROTO_ROUTING,		0x000004 },

Modified: projects/clang350-import/sys/contrib/ipfilter/netinet/ip_frag.c
==============================================================================
--- projects/clang350-import/sys/contrib/ipfilter/netinet/ip_frag.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/contrib/ipfilter/netinet/ip_frag.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -112,7 +112,7 @@ static void ipf_frag_free __P((ipf_frag_
 
 static frentry_t ipfr_block;
 
-ipftuneable_t ipf_tuneables[] = {
+const ipftuneable_t ipf_tuneables[] = {
 	{ { (void *)offsetof(ipf_frag_softc_t, ipfr_size) },
 		"frag_size",		1,	0x7fffffff,
 		stsizeof(ipf_frag_softc_t, ipfr_size),

Modified: projects/clang350-import/sys/dev/drm2/drm_drv.c
==============================================================================
--- projects/clang350-import/sys/dev/drm2/drm_drv.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/drm2/drm_drv.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -905,7 +905,7 @@ int drm_ioctl(struct cdev *kdev, u_long 
 	if (ioctl->func == NULL && nr >= DRM_COMMAND_BASE) {
 		/* The array entries begin at DRM_COMMAND_BASE ioctl nr */
 		nr -= DRM_COMMAND_BASE;
-		if (nr > dev->driver->max_ioctl) {
+		if (nr >= dev->driver->max_ioctl) {
 			DRM_DEBUG("Bad driver ioctl number, 0x%x (of 0x%x)\n",
 			    nr, dev->driver->max_ioctl);
 			return EINVAL;

Modified: projects/clang350-import/sys/dev/e1000/if_igb.c
==============================================================================
--- projects/clang350-import/sys/dev/e1000/if_igb.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/e1000/if_igb.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -188,6 +188,7 @@ static char *igb_strings[] = {
 /*********************************************************************
  *  Function prototypes
  *********************************************************************/
+static int	igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS);
 static int	igb_probe(device_t);
 static int	igb_attach(device_t);
 static int	igb_detach(device_t);
@@ -493,6 +494,11 @@ igb_attach(device_t dev)
 	    OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 	    igb_sysctl_nvm_info, "I", "NVM Information");
 
+        SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+                        SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+			OID_AUTO, "num_queues", CTLTYPE_INT | CTLFLAG_RD,
+			adapter, 0, igb_per_unit_num_queues, "I", "Number of Queues");
+
 	igb_set_sysctl_value(adapter, "enable_aim",
 	    "Interrupt Moderation", &adapter->enable_aim,
 	    igb_enable_aim);
@@ -2831,6 +2837,7 @@ igb_setup_msix(struct adapter *adapter)
 {
 	device_t	dev = adapter->dev;
 	int		bar, want, queues, msgs, maxqueues;
+	int		n_queues;
 
 	/* tuneable override */
 	if (igb_enable_msix == 0)
@@ -2858,8 +2865,18 @@ igb_setup_msix(struct adapter *adapter)
 		goto msi;
 	}
 
-	/* Figure out a reasonable auto config value */
-	queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus;
+	n_queues = 0;
+	/* try more specific tunable, then global, then finally default to boot time tunable if set. */
+	if (device_getenv_int(dev, "num_queues", &n_queues) != 0) {
+		device_printf(dev, "using specific tunable num_queues=%d", n_queues);
+	} else if (TUNABLE_INT_FETCH("hw.igb.num_queues", &n_queues) != 0) {
+		if (igb_num_queues != n_queues) {
+			device_printf(dev, "using global tunable hw.igb.num_queues=%d", n_queues);
+			igb_num_queues = n_queues;
+		}
+	} else {
+		n_queues = igb_num_queues;
+	}
 
 #ifdef	RSS
 	/* If we're doing RSS, clamp at the number of RSS buckets */
@@ -2867,10 +2884,12 @@ igb_setup_msix(struct adapter *adapter)
 		queues = rss_getnumbuckets();
 #endif
 
-
-	/* Manual override */
-	if (igb_num_queues != 0)
-		queues = igb_num_queues;
+	if (n_queues != 0) {
+		queues = n_queues;
+	} else {
+		/* Figure out a reasonable auto config value */
+		queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus;
+	}
 
 	/* Sanity check based on HW */
 	switch (adapter->hw.mac.type) {
@@ -2893,12 +2912,17 @@ igb_setup_msix(struct adapter *adapter)
 			maxqueues = 1;
 			break;
 	}
-	if (queues > maxqueues)
+	if (queues > maxqueues) {
+		device_printf(adapter->dev, "requested %d queues, but max for this adapter is %d\n",
+		    queues, maxqueues);
 		queues = maxqueues;
-
-	/* Manual override */
-	if (igb_num_queues != 0)
-		queues = igb_num_queues;
+	} else if (queues == 0) {
+		queues = 1;
+	} else if (queues < 0) {
+		device_printf(adapter->dev, "requested %d queues, but min for this adapter is %d\n",
+		    queues, 1);
+		queues = 1;
+	}
 
 	/*
 	** One vector (RX/TX pair) per queue
@@ -6384,3 +6408,14 @@ igb_sysctl_eee(SYSCTL_HANDLER_ARGS)
 	IGB_CORE_UNLOCK(adapter);
 	return (0);
 }
+
+static int
+igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS)
+{
+	struct adapter          *adapter;
+
+	adapter = (struct adapter *) arg1;
+
+	return sysctl_handle_int(oidp, &adapter->num_queues, 0, req);
+}
+

Modified: projects/clang350-import/sys/dev/hwpmc/hwpmc_mpc7xxx.c
==============================================================================
--- projects/clang350-import/sys/dev/hwpmc/hwpmc_mpc7xxx.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/hwpmc/hwpmc_mpc7xxx.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -578,9 +578,9 @@ mpc7xxx_pcpu_init(struct pmc_mdep *md, i
 	}
 
 	/* Clear the MMCRs, and set FC, to disable all PMCs. */
-	mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE);
+	mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE |
+	    SPR_MMCR0_FCECE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE);
 	mtspr(SPR_MMCR1, 0);
-	mtmsr(mfmsr() | PSL_PMM);
 
 	return 0;
 }
@@ -667,7 +667,6 @@ mpc7xxx_intr(int cpu, struct trapframe *
 	uint32_t config;
 	struct pmc *pm;
 	struct powerpc_cpu *pac;
-	pmc_value_t v;
 
 	KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
 	    ("[powerpc,%d] out of range CPU %d", __LINE__, cpu));
@@ -679,8 +678,7 @@ mpc7xxx_intr(int cpu, struct trapframe *
 
 	pac = powerpc_pcpu[cpu];
 
-	config  = mfspr(SPR_MMCR0);
-	mtspr(SPR_MMCR0, config | SPR_MMCR0_FC);
+	config  = mfspr(SPR_MMCR0) & ~SPR_MMCR0_FC;
 
 	/*
 	 * look for all PMCs that have interrupted:
@@ -704,22 +702,22 @@ mpc7xxx_intr(int cpu, struct trapframe *
 		if (pm->pm_state != PMC_STATE_RUNNING)
 			continue;
 
-		/* Stop the PMC, reload count. */
-		v       = pm->pm_sc.pm_reloadcount;
-		mpc7xxx_pmcn_write(i, v);
-
-		/* Restart the counter if logging succeeded. */
+		/* Stop the counter if logging fails. */
 		error = pmc_process_interrupt(cpu, PMC_HR, pm, tf,
 		    TRAPF_USERMODE(tf));
 		if (error != 0)
 			mpc7xxx_stop_pmc(cpu, i);
-		atomic_add_int(retval ? &pmc_stats.pm_intr_processed :
-				&pmc_stats.pm_intr_ignored, 1);
 
+		/* reload count. */
+		mpc7xxx_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount);
 	}
 
+	atomic_add_int(retval ? &pmc_stats.pm_intr_processed :
+	    &pmc_stats.pm_intr_ignored, 1);
+
 	/* Re-enable PERF exceptions. */
-	mtspr(SPR_MMCR0, config | SPR_MMCR0_PMXE);
+	if (retval)
+		mtspr(SPR_MMCR0, config | SPR_MMCR0_PMXE);
 
 	return (retval);
 }

Modified: projects/clang350-import/sys/dev/hwpmc/hwpmc_ppc970.c
==============================================================================
--- projects/clang350-import/sys/dev/hwpmc/hwpmc_ppc970.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/hwpmc/hwpmc_ppc970.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -481,7 +481,6 @@ ppc970_intr(int cpu, struct trapframe *t
 {
 	struct pmc *pm;
 	struct powerpc_cpu *pac;
-	pmc_value_t v;
 	uint32_t config;
 	int i, error, retval;
 
@@ -503,8 +502,7 @@ ppc970_intr(int cpu, struct trapframe *t
 	 * If found, we call a helper to process the interrupt.
 	 */
 
-	config  = mfspr(SPR_970MMCR0);
-	mtspr(SPR_970MMCR0, config | SPR_MMCR0_FC);
+	config  = mfspr(SPR_970MMCR0) & ~SPR_MMCR0_FC;
 	for (i = 0; i < PPC970_MAX_PMCS; i++) {
 		if ((pm = pac->pc_ppcpmcs[i].phw_pmc) == NULL ||
 		    !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) {
@@ -519,24 +517,21 @@ ppc970_intr(int cpu, struct trapframe *t
 		if (pm->pm_state != PMC_STATE_RUNNING)
 			continue;
 
-		/* Stop the PMC, reload count. */
-		v       = pm->pm_sc.pm_reloadcount;
-
-		ppc970_pmcn_write(i, v);
-
-		/* Restart the counter if logging succeeded. */
 		error = pmc_process_interrupt(cpu, PMC_HR, pm, tf,
 		    TRAPF_USERMODE(tf));
-		mtspr(SPR_970MMCR0, config);
 		if (error != 0)
 			ppc970_stop_pmc(cpu, i);
-		atomic_add_int(retval ? &pmc_stats.pm_intr_processed :
-				&pmc_stats.pm_intr_ignored, 1);
 
+		/* reload sampling count. */
+		ppc970_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount);
 	}
 
+	atomic_add_int(retval ? &pmc_stats.pm_intr_processed :
+	    &pmc_stats.pm_intr_ignored, 1);
+
 	/* Re-enable PERF exceptions. */
-	mtspr(SPR_970MMCR0, mfspr(SPR_970MMCR0) | SPR_MMCR0_PMXE);
+	if (retval)
+		mtspr(SPR_970MMCR0, config | SPR_MMCR0_PMXE);
 
 	return (retval);
 }
@@ -572,10 +567,10 @@ ppc970_pcpu_init(struct pmc_mdep *md, in
 
 	/* Clear the MMCRs, and set FC, to disable all PMCs. */
 	/* 970 PMC is not counted when set to 0x08 */
-	mtspr(SPR_970MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE |
-	    SPR_MMCR0_PMCNCE | SPR_970MMCR0_PMC1SEL(0x8) | SPR_970MMCR0_PMC2SEL(0x8));
+	mtspr(SPR_970MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE |
+	    SPR_MMCR0_FCECE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE |
+	    SPR_970MMCR0_PMC1SEL(0x8) | SPR_970MMCR0_PMC2SEL(0x8));
 	mtspr(SPR_970MMCR1, 0x4218420);
-	mtmsr(mfmsr() | PSL_PMM);
 
 	return 0;
 }
@@ -585,7 +580,6 @@ ppc970_pcpu_fini(struct pmc_mdep *md, in
 {
 	register_t mmcr0 = mfspr(SPR_MMCR0);
 
-	mtmsr(mfmsr() & ~PSL_PMM);
 	mmcr0 |= SPR_MMCR0_FC;
 	mmcr0 &= ~SPR_MMCR0_PMXE;
 	mtspr(SPR_MMCR0, mmcr0);

Modified: projects/clang350-import/sys/dev/isp/isp.c
==============================================================================
--- projects/clang350-import/sys/dev/isp/isp.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/isp/isp.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -1219,7 +1219,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d
 	 * work for them).
 	 */
 	if (IS_FC(isp) && isp->isp_nchan > 1) {
-		if (!IS_24XX(isp) || (fwt & ISP2400_FW_ATTR_MULTIID) == 0) {
+		if (!ISP_CAP_MULTI_ID(isp)) {
 			isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan);
 			isp->isp_nchan = 1;
 		}

Modified: projects/clang350-import/sys/dev/isp/isp_freebsd.c
==============================================================================
--- projects/clang350-import/sys/dev/isp/isp_freebsd.c	Fri Nov 28 12:14:59 2014	(r275209)
+++ projects/clang350-import/sys/dev/isp/isp_freebsd.c	Fri Nov 28 13:25:57 2014	(r275210)
@@ -894,7 +894,7 @@ is_lun_enabled(ispsoftc_t *isp, int bus,
 
 	ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp);
 	SLIST_FOREACH(tptr, lhp, next) {
-		if (xpt_path_lun_id(tptr->owner) == lun) {
+		if (tptr->ts_lun == lun) {
 			return (1);
 		}
 	}
@@ -926,16 +926,13 @@ get_lun_statep(ispsoftc_t *isp, int bus,
 {
 	tstate_t *tptr = NULL;
 	struct tslist *lhp;
-	int i;
 
 	if (bus < isp->isp_nchan) {
-		for (i = 0; i < LUN_HASH_SIZE; i++) {
-			ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp);
-			SLIST_FOREACH(tptr, lhp, next) {
-				if (xpt_path_lun_id(tptr->owner) == lun) {
-					tptr->hold++;
-					return (tptr);
-				}
+		ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp);
+		SLIST_FOREACH(tptr, lhp, next) {
+			if (tptr->ts_lun == lun) {
+				tptr->hold++;
+				return (tptr);
 			}
 		}
 	}
@@ -1149,6 +1146,7 @@ create_lun_state(ispsoftc_t *isp, int bu
 	if (tptr == NULL) {
 		return (CAM_RESRC_UNAVAIL);

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411281325.sASDPw61014621>