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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar  4 08:25:11 UTC 2014

Modified Files:
src/sys/arch/powerpc/conf: files.powerpc

Log Message:
compat16 - compat_16


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/powerpc/conf/files.powerpc

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/powerpc/conf/files.powerpc
diff -u src/sys/arch/powerpc/conf/files.powerpc:1.88 src/sys/arch/powerpc/conf/files.powerpc:1.89
--- src/sys/arch/powerpc/conf/files.powerpc:1.88	Fri Feb 28 05:49:21 2014
+++ src/sys/arch/powerpc/conf/files.powerpc	Tue Mar  4 08:25:11 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.powerpc,v 1.88 2014/02/28 05:49:21 matt Exp $
+#	$NetBSD: files.powerpc,v 1.89 2014/03/04 08:25:11 matt Exp $
 
 defflag	opt_altivec.h	ALTIVEC K_ALTIVEC PPC_HAVE_SPE
 defflag	opt_openpic.h	OPENPIC_DISTRIBUTE
@@ -23,7 +23,7 @@ file	arch/powerpc/powerpc/powerpc_machde
 file	arch/powerpc/powerpc/process_machdep.c
 file	arch/powerpc/powerpc/setfault.S
 file	arch/powerpc/powerpc/sig_machdep.c
-file	arch/powerpc/powerpc/sigcode.S			compat16
+file	arch/powerpc/powerpc/sigcode.S			compat_16
 file	arch/powerpc/powerpc/softint_machdep.c
 file	arch/powerpc/powerpc/subyte.c
 file	arch/powerpc/powerpc/suword.c
@@ -68,6 +68,18 @@ file	arch/powerpc/booke/copyout.c			ppc_
 file	arch/powerpc/booke/kcopy.c			ppc_booke
 file	arch/powerpc/booke/spe.c			ppc_booke
 file	arch/powerpc/booke/trap.c			ppc_booke
+
+# MPC8xx (Power QUICC 1) Family files
+file	arch/powerpc/mpc8xx/mpc8xx_machdep.c		ppc_mpc8xx
+file	arch/powerpc/mpc8xx/mpc8xx_cache.c		ppc_mpc8xx
+file	arch/powerpc/mpc8xx/mpc8xx_pmap.c		ppc_mpc8xx
+file	arch/powerpc/mpc8xx/mpc8xx_stubs.c		ppc_mpc8xx
+file	arch/powerpc/mpc8xx/copyin.c			ppc_mpc8xx
+file	arch/powerpc/mpc8xx/copyout.c			ppc_mpc8xx
+file	arch/powerpc/mpc8xx/kcopy.c			ppc_mpc8xx
+file	arch/powerpc/mpc8xx/trap.c			ppc_mpc8xx
+
+# Common PMAP files
 file	uvm/pmap/pmap.c	ppc_booke
 file	uvm/pmap/pmap_segtab.cppc_booke
 file	uvm/pmap/pmap_tlb.cppc_booke



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar  4 08:32:23 UTC 2014

Modified Files:
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Add a different version vfp_fpscr_changable if FPU_VFP was not defined.
If no FPU was found, reinit vfp_fpscr_changeable/default to values appropriate
for softfloat.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.34 src/sys/arch/arm/vfp/vfp_init.c:1.35
--- src/sys/arch/arm/vfp/vfp_init.c:1.34	Mon Mar  3 08:45:18 2014
+++ src/sys/arch/arm/vfp/vfp_init.c	Tue Mar  4 08:32:23 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.34 2014/03/03 08:45:18 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.35 2014/03/04 08:32:23 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -44,9 +44,6 @@
 
 #include uvm/uvm_extern.h		/* for pmap.h */
 
-extern int cpu_media_and_vfp_features[];
-extern int cpu_neon_present;
-
 #ifdef FPU_VFP
 
 #ifdef CPU_CORTEX
@@ -171,6 +168,9 @@ vfp_test(u_int address, u_int insn, trap
 	return 0;
 }
 
+#else
+/* determine what bits can be changed */
+uint32_t vfp_fpscr_changable = VFP_FPSCR_CSUM|VFP_FPSCR_ESUM|VFP_FPSCR_RMODE;
 #endif /* FPU_VFP */
 
 struct evcnt vfp_fpscr_ev = 
@@ -201,8 +201,7 @@ vfp_fpscr_handler(u_int address, u_int i
 		return 1;
 
 	if (__predict_false(!vfp_used_p())) {
-		pcb-pcb_vfp.vfp_fpscr =
-		(VFP_FPSCR_DN | VFP_FPSCR_FZ | VFP_FPSCR_RN); /* Runfast */
+		pcb-pcb_vfp.vfp_fpscr = vfp_fpscr_default;
 	}
 #endif
 
@@ -341,6 +340,9 @@ vfp_attach(void)
 		aprint_normal_dev(ci-ci_dev, unrecognized VFP version %x\n,
 		fpsid);
 		install_coproc_handler(VFP_COPROC, vfp_fpscr_handler);
+		vfp_fpscr_changable = VFP_FPSCR_CSUM|VFP_FPSCR_ESUM
+		|VFP_FPSCR_RMODE;
+		vfp_fpscr_default = 0;
 		return;
 	}
 



CVS import: othersrc/external/bsd/merkletree

2014-03-04 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue Mar  4 08:38:06 UTC 2014

Update of /cvsroot/othersrc/external/bsd/merkletree
In directory ivanova.netbsd.org:/tmp/cvs-serv19403

Log Message:
Import merkletree, a program to compute Merkle trees, into othersrc.
For more information on Merkle trees, see:

http:/en.wikipedia.org/wiki/Merkle_tree

This library and utility uses the libmultigest(3) library to calculate
multiple digests over the data, for a given block size.

The libmerkletree(3) library implements Merkle tree calculation, and also
includes some higher-level functions to verify a file against a
previously-generated Merkle tree.

A Merkle tree is a hash tree calculated across blocks in data.  Any block
size can be specified in this implementation.  A digest is calculated
across each block in the data, and then a digest is calculated across
blocks of the checksums, and this continues until only one block of
digest exists.  The hierarchical nature of this allows individual blocks
of a file to be verified, even if other parts of the file have been
modified.  A degenerate case, in which the data is less than the
blocksize, will mean that a single digest value for the block is
calculated.  This will be the same as the digest algorithm applied to the
whole file.

Merkle trees are useful for seeing which part of a large file has been
changed or modified, and also acts as a guard against malevolent attacks
via second pre-images on data spanning more than 1 blocksize.

To view merkletree in action:

% merkletree -b 128 -a sha3-256,blake2,md5 -o m.sum Makefile
% merkletree -v m.sum Makefile
% cat m.sum
merkle sha3-256,blake2,md5 2 144 128 (Makefile) = 
6c803d85495efa93468142c80f0725e39531bf2935c17b96dafeb13a077a3b288a22372fdb707e1503090a2a065e7c1be5d0a7c7fd009ab77467780f5bd1a66cdcb4b813d12b13699aadb6188d5e48d9a2a693b1a1a6085bb10bc11aed8240720244d9265f789b657d908a8b896402f409fbc52cbfbca055cf9f6a606d5504113d798462e46d1bbc0e23e347928067ed34658c18f80a35fd1a39928aeb772b359a2011cbc8af0e356507a4bf057004cdeaa87adefe44b0f58573f10ff034858c85eb8fc3e99fbde9fb2189c7a10fea73bfab37c44aaf02640861d0211285893b598912b3fa76f5373b3b5d2f94813b1326d56e1f34fb4038bab5cbeafe8d5eee944f1527b4a433c030fa31900bd12e53168a4cd8916ded0dcd0d006c05bf82ce8bd7d3e6b516fdf6e1063555fa5d436d4e3cf95b609389001624e20e052266a6262dbb20bd934574b3fff295214fbc1e6123fa9f797a8930a42be919dcd2a4307f721c65827ff2b5a1451af9d821362c40480e0b9b95b6403d3be4b1fffc052f691242b03110b91f605b93c0c48740e373f3a06bcf523c54a1542f40a56020e044a230e973efb90fe5d3c22be00f359ab19319926f9d0c879df841227b518439b952b07bfde253825a2c69115c4ee709284f9f909501
0ed32384dbd83aebf51868fb2b8b00ffe01150115e84f4db223e02ada33fe3483d084d9368f46bcbef643d4a79f3bea19bea32977fe8907b94864cab89cc2cd47f2ddc1a7ea23f28dc7df47fef7d396f316397463463fa0d5ae9d8700a6c55f3b546910ebb0f91d9fcf551f8fdab4bd164944f77bf2622b307fbb96a826cbd84598e8153ce49dd048599db6844b3ef5905b39cfe4b66485755f593e7093439fc937c839686dd94bbdb2561e362437ecc84b6a415442a8dd2bba534f540da8f5e5568f077a946e3df74c0
%

and

% merkletree -b 128 -a sha3-256,blake2,md5 -o 1.sum 1.in
% echo Hello world  1.in
% merkletree -v 1.sum 1.in
[1] 128, 255
%

Status:

Vendor Tag: CROOKS
Release Tags:   merkletree-base

N othersrc/external/bsd/merkletree/Makefile
N othersrc/external/bsd/merkletree/bin/1.expected
N othersrc/external/bsd/merkletree/bin/1.in
N othersrc/external/bsd/merkletree/bin/1.sum
N othersrc/external/bsd/merkletree/bin/10.expected
N othersrc/external/bsd/merkletree/bin/11.expected
N othersrc/external/bsd/merkletree/bin/12.expected
N othersrc/external/bsd/merkletree/bin/13.expected
N othersrc/external/bsd/merkletree/bin/14.expected
N othersrc/external/bsd/merkletree/bin/2.expected
N othersrc/external/bsd/merkletree/bin/2.in
N othersrc/external/bsd/merkletree/bin/3.expected
N othersrc/external/bsd/merkletree/bin/4.expected
N othersrc/external/bsd/merkletree/bin/5.expected
N othersrc/external/bsd/merkletree/bin/6.expected
N othersrc/external/bsd/merkletree/bin/7.expected
N othersrc/external/bsd/merkletree/bin/8.expected
N othersrc/external/bsd/merkletree/bin/9.expected
N othersrc/external/bsd/merkletree/bin/Makefile
N othersrc/external/bsd/merkletree/bin/15.expected
N othersrc/external/bsd/merkletree/lib/Makefile
N othersrc/external/bsd/merkletree/lib/shlib_version
N othersrc/external/bsd/merkletree/dist/Makefile.in
N othersrc/external/bsd/merkletree/dist/Makefile
N othersrc/external/bsd/merkletree/dist/libmerkle.c
N othersrc/external/bsd/merkletree/dist/libmerkletree.3
N othersrc/external/bsd/merkletree/dist/main.c
N othersrc/external/bsd/merkletree/dist/merkletree.1
N othersrc/external/bsd/merkletree/dist/merkletree.h
N othersrc/external/bsd/merkletree/dist/configure

No conflicts created by this import



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

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Mar  4 08:43:13 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
include dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h netbsd.h
and netbsd-elf.h on powerpc64-netbsd.

port netbsd64.h forward from GCC changes.  (it's a pity that
a vast portion of linux64.h isn't in some common header that
netbsd64.h and freebsd64.h could also used.  there's 100s of
lines of copypasta here, oh well.)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.20 src/external/gpl3/gcc/dist/gcc/config.gcc:1.21
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.20	Sat Mar  1 09:04:12 2014
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Tue Mar  4 08:43:12 2014
@@ -2114,13 +2114,15 @@ powerpc*-*-freebsd*)
 	esac
 	;;
 powerpc*-*-netbsd*)
+	tm_file=${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h
+	tm_file=${tm_file} netbsd.h netbsd-elf.h
 	case ${target} in
 	  powerpc64*)
 	tm_file=rs6000/biarch64.h ${tm_file} rs6000/default64.h rs6000/netbsd64.h
 	tmake_file=${tmake_file} rs6000/t-netbsd64
 	;;
 	  *)
-tm_file=${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h
+	tm_file=${tm_file} rs6000/netbsd.h
 	tmake_file=${tmake_file} rs6000/t-netbsd
 	;;
 	esac

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.5 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.5	Sat Mar  1 09:44:50 2014
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Tue Mar  4 08:43:12 2014
@@ -59,6 +59,15 @@ extern int dot_symbols;
 
 #define TARGET_PROFILE_KERNEL profile_kernel
 
+#define TARGET_USES_LINUX64_OPT 1
+#ifdef HAVE_LD_LARGE_TOC
+#undef TARGET_CMODEL
+#define TARGET_CMODEL rs6000_current_cmodel
+#define SET_CMODEL(opt) rs6000_current_cmodel = opt
+#else
+#define SET_CMODEL(opt) do {} while (0)
+#endif
+
 #undef  PROCESSOR_DEFAULT
 #define PROCESSOR_DEFAULT PROCESSOR_POWER4
 #undef  PROCESSOR_DEFAULT64
@@ -80,7 +89,7 @@ extern int dot_symbols;
 #define	SUBSUBTARGET_OVERRIDE_OPTIONS\
   do\
 {\
-  if (!rs6000_explicit_options.alignment)			\
+  if (!global_options_set.x_rs6000_alignment_flags)		\
 	rs6000_alignment_flags = MASK_ALIGN_NATURAL;		\
   if (TARGET_64BIT)		\
 	{			\
@@ -90,14 +99,14 @@ extern int dot_symbols;
 	  error (INVALID_64BIT, call);			\
 	}			\
 	  dot_symbols = !strcmp (rs6000_abi_name, aixdesc);	\
-	  if (target_flags  MASK_RELOCATABLE)			\
+	  if (rs6000_isa_flags  OPTION_MASK_RELOCATABLE)	\
 	{			\
-	  target_flags = ~MASK_RELOCATABLE;		\
+	  rs6000_isa_flags = ~OPTION_MASK_RELOCATABLE;	\
 	  error (INVALID_64BIT, relocatable);		\
 	}			\
-	  if (target_flags  MASK_EABI)\
+	  if (rs6000_isa_flags  OPTION_MASK_EABI)		\
 	{			\
-	  target_flags = ~MASK_EABI;			\
+	  rs6000_isa_flags = ~OPTION_MASK_EABI;		\
 	  error (INVALID_64BIT, eabi);			\
 	}			\
 	  if (TARGET_PROTOTYPE)	\
@@ -105,11 +114,28 @@ extern int dot_symbols;
 	  target_prototype = 0;\
 	  error (INVALID_64BIT, prototype);		\
 	}			\
-	  if ((target_flags  MASK_POWERPC64) == 0)		\
+	  if ((rs6000_isa_flags  OPTION_MASK_POWERPC64) == 0)	\
 	{			\
-	  target_flags |= MASK_POWERPC64;			\
+	  rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
 	  error (-m64 requires a PowerPC64 cpu);		\
 	}			\
+	  if ((rs6000_isa_flags_explicit			\
+	OPTION_MASK_MINIMAL_TOC) != 0)			\
+	{			\
+	  if (global_options_set.x_rs6000_current_cmodel	\
+		   rs6000_current_cmodel != CMODEL_SMALL)	\
+		error (-mcmodel incompatible with other toc options); \
+	  SET_CMODEL (CMODEL_SMALL);			\
+	}			\
+	{			\
+	  if (!global_options_set.x_rs6000_current_cmodel)	\
+		SET_CMODEL (CMODEL_MEDIUM);			\
+	  if (rs6000_current_cmodel != CMODEL_SMALL)	\
+		{		\
+		  TARGET_NO_FP_IN_TOC = 0;			\
+		  TARGET_NO_SUM_IN_TOC = 0;			\
+		}		\
+	}			\
 	}			\
   else			\
 	{			\
@@ -120,16 +146,23 @@ extern int dot_symbols;
 	  TARGET_PROFILE_KERNEL = 0;			\
 	  error (INVALID_32BIT, profile-kernel);		\
 	}			\
+	  if (global_options_set.x_rs6000_current_cmodel)	\
+	{			\
+	  SET_CMODEL (CMODEL_SMALL);			\
+	  error (INVALID_32BIT, cmodel);			\
+	}			\
 	}			\
 }	

CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Mar  4 09:12:09 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3: acinclude.m4 configure

Log Message:
don't look for po/Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/libstdc++-v3/configure

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

Modified files:

Index: src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.1.1.2 src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4:1.1.1.2	Sat Mar  1 08:41:19 2014
+++ src/external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4	Tue Mar  4 09:12:09 2014
@@ -49,7 +49,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
   # Keep these sync'd with the list in Makefile.am.  The first provides an
   # expandable list at autoconf time; the second provides an expandable list
   # (i.e., shell variable) at configure time.
-  m4_define([glibcxx_SUBDIRS],[include libsupc++ python src src/c++98 src/c++11 doc po testsuite])
+  m4_define([glibcxx_SUBDIRS],[include libsupc++ python src src/c++98 src/c++11 doc testsuite])
   SUBDIRS='glibcxx_SUBDIRS'
 
   # These need to be absolute paths, yet at the same time need to

Index: src/external/gpl3/gcc/dist/libstdc++-v3/configure
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.2 src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.3
--- src/external/gpl3/gcc/dist/libstdc++-v3/configure:1.2	Sat Mar  1 09:44:51 2014
+++ src/external/gpl3/gcc/dist/libstdc++-v3/configure	Tue Mar  4 09:12:09 2014
@@ -73187,7 +73187,7 @@ ac_config_files=$ac_config_files doc/xs
 # append it here.  Only modify Makefiles that have just been created.
 #
 # Also, get rid of this simulated-VPATH thing that automake does.
-ac_config_files=$ac_config_files include/Makefile libsupc++/Makefile python/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile doc/Makefile po/Makefile
+ac_config_files=$ac_config_files include/Makefile libsupc++/Makefile python/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile doc/Makefile
 
 
 ac_config_commands=$ac_config_commands generate-headers



CVS commit: src/external/gpl3/gcc/usr.bin

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Mar  4 09:16:04 UTC 2014

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
bump local pkg version.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/usr.bin/Makefile.inc

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.19 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.20
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.19	Sat Mar  1 10:00:49 2014
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Tue Mar  4 09:16:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.19 2014/03/01 10:00:49 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.20 2014/03/04 09:16:04 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
@@ -66,7 +66,7 @@ DATESTAMPSTR=		\\
 # XXX pull this out of our configs
 G_BUGURL=http://www.NetBSD.org/Misc/send-pr.html
 G_BUGURL_s=\${G_BUG_URL}\
-G_PKGVERSION=(NetBSD nb1 20131213) 
+G_PKGVERSION=(NetBSD nb2 20140304) 
 G_PKGVERSION_s=\${G_PKGVERSION} \
 
 VER_CPPFLAGS=	-DBASEVER=\${BASEVER}\ \



CVS commit: src/external/cddl/osnet/sys/sys

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar  4 09:24:42 UTC 2014

Modified Files:
src/external/cddl/osnet/sys/sys: mount.h

Log Message:
Get rid of unused variable definition za from mount.h

There is no user for it. Even worse, it breaks dtrace build for arm.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/sys/sys/mount.h

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

Modified files:

Index: src/external/cddl/osnet/sys/sys/mount.h
diff -u src/external/cddl/osnet/sys/sys/mount.h:1.6 src/external/cddl/osnet/sys/sys/mount.h:1.7
--- src/external/cddl/osnet/sys/sys/mount.h:1.6	Sat Oct 20 22:11:38 2012
+++ src/external/cddl/osnet/sys/sys/mount.h	Tue Mar  4 09:24:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.h,v 1.6 2012/10/20 22:11:38 riastradh Exp $	*/
+/*	$NetBSD: mount.h,v 1.7 2014/03/04 09:24:42 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2007 Pawel Jakub Dawidek p...@freebsd.org
@@ -52,7 +52,7 @@ struct zfs_args {
 	int  datalen;
 	int  optlen;
 	int  flags;
-} za;
+};
 
 typedef struct zfs_args zfs_args_t;
 



CVS commit: src/external/cddl/osnet/dev/dtrace/arm

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar  4 11:07:40 UTC 2014

Modified Files:
src/external/cddl/osnet/dev/dtrace/arm: dtrace_asm.S

Log Message:
Add missing END for each function


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S
diff -u src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.1 src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.2
--- src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.1	Fri Jun 21 19:16:00 2013
+++ src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S	Tue Mar  4 11:07:40 2014
@@ -42,12 +42,14 @@ void dtrace_membar_producer(void)
 */
 ENTRY(dtrace_membar_producer)
 	RET
+END(dtrace_membar_producer)
 
 /*
 void dtrace_membar_consumer(void)
 */
 ENTRY(dtrace_membar_consumer)
 	RET
+END(dtrace_membar_consumer)
 
 /*
 dtrace_icookie_t dtrace_interrupt_disable(void)
@@ -58,6 +60,8 @@ ENTRY(dtrace_interrupt_disable)
 	orr	r1, r1, #(I32_bit|F32_bit)
 	msr	cpsr_c, r1
 	RET
+END(dtrace_interrupt_disable)
+
 /*
 void dtrace_interrupt_enable(dtrace_icookie_t cookie)
 */
@@ -68,6 +72,7 @@ ENTRY(dtrace_interrupt_enable)
 	orr	r1, r1, r0
 	msr	cpsr_c, r1
 	RET
+END(dtrace_interrupt_enable)
 
 /*
 uint32_t dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
@@ -95,6 +100,8 @@ ENTRY(dtrace_cas32)
 	msr	cpsr_c, r3
 	ldmfd	sp!, {r4, r5}
 	RET
+END(dtrace_cas32)
+END(dtrace_casptr)
 
 /*
 uint8_t
@@ -104,6 +111,7 @@ ENTRY(dtrace_fuword8_nocheck)
 	ldrb	r3, [r0]
 	mov 	r0, r3
 	RET
+END(dtrace_fuword8_nocheck)
 
 /*
 uint16_t
@@ -113,6 +121,7 @@ ENTRY(dtrace_fuword16_nocheck)
 	ldrh	r3, [r0]
 	mov 	r0, r3
 	RET
+END(dtrace_fuword16_nocheck)
 
 /*
 uint32_t
@@ -122,6 +131,7 @@ ENTRY(dtrace_fuword32_nocheck)
 	ldr	r3, [r0]
 	mov 	r0, r3
 	RET
+END(dtrace_fuword32_nocheck)
 
 /*
 uint64_t
@@ -142,6 +152,7 @@ ENTRY(dtrace_fuword64_nocheck)
 	mov	r1, r2
 #endif
 	RET
+END(dtrace_fuword64_nocheck)
 
 /*
 void
@@ -161,6 +172,7 @@ ENTRY(dtrace_copy)
 
 2:	ldmfd   sp!, {r4-r5}			/* stack is 8 byte aligned */
 	RET
+END(dtrace_copy)
 
 
 /*
@@ -184,6 +196,7 @@ ENTRY(dtrace_copystr)
 
 2:	ldmfd   sp!, {r4-r5}			/* stack is 8 byte aligned */
 	RET
+END(dtrace_copystr)
 
 
 /*
@@ -191,12 +204,14 @@ void dtrace_invop_init(void)
 */
 ENTRY(dtrace_invop_init)
 	RET
+END(dtrace_invop_init)
 
 /*
 void dtrace_invop_uninit(void)
 */
 ENTRY(dtrace_invop_uninit)
 	RET
+END(dtrace_invop_uninit)
 
 /*
 void
@@ -205,6 +220,7 @@ vpanic(const char *format, va_list alist
 ENTRY(vpanic)/* Initial stack layout: */
 vpanic_common:
 	RET
+END(vpanic)
 
 /*
 void
@@ -212,6 +228,7 @@ dtrace_vpanic(const char *format, va_lis
 */
 ENTRY(dtrace_vpanic)			/* Initial stack layout: */
 	RET
+END(dtrace_vpanic)
 
 /*
 uintptr_t
@@ -220,3 +237,4 @@ dtrace_caller(int aframes)
 ENTRY(dtrace_caller)
 	mov	r0, #-1
 	RET
+END(dtrace_caller)



CVS commit: src/distrib/sets/lists/modules

2014-03-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar  4 11:53:48 UTC 2014

Added Files:
src/distrib/sets/lists/modules: md.evbppc-powerpc
Removed Files:
src/distrib/sets/lists/modules: md.evbppc

Log Message:
Rename md.evbppc to md.evbppc-powerpc, to separate it from the evbppc64
one (which is nonexistant for now).


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r0 src/distrib/sets/lists/modules/md.evbppc
cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/modules/md.evbppc-powerpc

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

Added files:

Index: src/distrib/sets/lists/modules/md.evbppc-powerpc
diff -u /dev/null src/distrib/sets/lists/modules/md.evbppc-powerpc:1.1
--- /dev/null	Tue Mar  4 11:53:48 2014
+++ src/distrib/sets/lists/modules/md.evbppc-powerpc	Tue Mar  4 11:53:48 2014
@@ -0,0 +1,467 @@
+# $NetBSD: md.evbppc-powerpc,v 1.1 2014/03/04 11:53:48 martin Exp $
+./stand/powerpc-4xx			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/accf_dataready			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/accf_dataready/accf_dataready.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/accf_httpready			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/accf_httpready/accf_httpready.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/adosfsbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/adosfs/adosfs.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/aiobase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/aio/aio.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/blowfish			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/blowfish/blowfish.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/bpfbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/bpf/bpf.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/ccdbase-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/ccd/ccd.kmod			base-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/camellia			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/camellia/camellia.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cast128base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cast128/cast128.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cd9660base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cd9660/cd9660.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cgdbase-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/cgd/cgd.kmod			base-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/chfsbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/chfs/chfs.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/codabase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/coda/coda.kmod			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/coda5base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/coda5/coda5.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/compatbase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/compat/compat.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/compat_ossaudio			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/compat_ossaudio/compat_ossaudio.kmod	base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/coredump			base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/coredump/coredump.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/cryptobase-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/crypto/crypto.kmod		base-kernel-modules	kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/dbcoolbase-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/dbcool/dbcool.kmod		base-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/desbase-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/des/des.kmod			base-kernel-modules kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/dirhash

CVS commit: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k

2014-03-04 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Tue Mar  4 12:11:59 UTC 2014

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kConfig.c
x68kGraph.c

Log Message:
Replace xalloc(), xrealloc() and xfree() with malloc(), realloc() and free().

Per following Xorg changes:
 Replace X-allocation functions with their C89 counterparts
http://cgit.freedesktop.org/xorg/xserver/commit/?id=3f3ff971ecff9936cebafc813af9193b97bba89c


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.2 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.3
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.2	Sun Mar  2 05:52:45 2014
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c	Tue Mar  4 12:11:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kConfig.c,v 1.2 2014/03/02 05:52:45 tsutsui Exp $ */
+/* $NetBSD: x68kConfig.c,v 1.3 2014/03/04 12:11:59 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -181,7 +181,7 @@ getToken(void)
 static int line = 1;
 Token *ret;
 
-ret = (Token *)xalloc(sizeof(Token));
+ret = (Token *)malloc(sizeof(Token));
 if (ret == NULL)
 FatalError(Out of memory);
 while (TRUE) {
@@ -207,7 +207,7 @@ getToken(void)
 /* is a symbol? */
 if (isalpha(c)) {
 int i = 0;
-ret-content.symbol = (char *)xalloc(32 * sizeof(char));
+ret-content.symbol = (char *)malloc(32 * sizeof(char));
 if (ret-content.symbol == NULL)
 FatalError(Out of memory);
 do {
@@ -288,7 +288,7 @@ parseCommand(void)
 return FALSE;
 if (token-type != TOKEN_OPEN_PARENTHESIS)
 parseError(token-line, missing parenthesis);
-xfree(token);
+free(token);
 
 /* get command name and arguments */
 while (TRUE) {
@@ -296,11 +296,11 @@ parseCommand(void)
 if (token-type == TOKEN_EOF)
 parseError(token-line, reached EOF);
 if (token-type == TOKEN_CLOSE_PARENTHESIS) {
-xfree(token);
+free(token);
 break;
 }
 argc++;
-argv = (Token **)xrealloc(argv, sizeof(Token *) * argc);
+argv = (Token **)realloc(argv, sizeof(Token *) * argc);
 if (argv == NULL)
 FatalError(Out of memory);
 argv[argc-1] = token;
@@ -325,10 +325,10 @@ parseCommand(void)
 /* free arguments */
 for (i = 0; i  argc; i++) {
 if (argv[i]-type == TOKEN_SYMBOL)
-xfree(argv[i]-content.symbol);
-xfree(argv[i]);
+free(argv[i]-content.symbol);
+free(argv[i]);
 }
-xfree(argv);
+free(argv);
 return TRUE;
 }
 
@@ -400,7 +400,7 @@ parseModeDef(int argc, Token **argv)
 
 checkArguments(18, argtype, argc-1, argv);
 
-mode = (Mode *)xalloc(sizeof(Mode));
+mode = (Mode *)malloc(sizeof(Mode));
 if (mode == NULL)
 FatalError(Out of memory);
 mode-name = strdup(argv[1]-content.symbol);
@@ -550,7 +550,7 @@ parseMode(int argc, Token **argv)
 x68kFbProc[0].open = x68kGraphOpen;
 x68kFbProc[0].init = x68kGraphInit;
 x68kFbProc[0].close = x68kGraphClose;
-	x68kFormat = (PixmapFormatRec*) xalloc (sizeof(PixmapFormatRec));
+	x68kFormat = (PixmapFormatRec*) malloc (sizeof(PixmapFormatRec));
 	x68kFormat-scanlinePad = BITMAP_SCANLINE_PAD;
 x68kFormat-bitsPerPixel = 16;
 switch (mode-depth) {

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.1 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.1	Sat Mar  1 19:34:47 2014
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c	Tue Mar  4 12:11:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kGraph.c,v 1.1 2014/03/01 19:34:47 tsutsui Exp $ */
+/* $NetBSD: x68kGraph.c,v 1.2 2014/03/04 12:11:59 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -270,13 +270,13 @@ x68kCfbFinishScreenInit(
 
 ndepths = 1;
 nvisuals = 1;
-depths = (DepthPtr)xalloc( sizeof(DepthRec) );
-visuals = (VisualPtr)xalloc( sizeof(VisualRec) );
-vid = (VisualID *)xalloc( sizeof(VisualID) );
+depths = (DepthPtr)malloc( 

CVS commit: src/external/gpl3/gcc

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Mar  4 13:47:32 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el: c++config.h
config.h gstdint.h
src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el: auto-host.h
configargs.h plugin-version.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/mips64el: config.h

Log Message:
forgotten mknative-gcc 4.8 for mips64el.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gstdint.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/plugin-version.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/mips64el/config.h

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

Modified files:

Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h:1.7 src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h:1.8
--- src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h:1.7	Sat Mar  1 10:00:46 2014
+++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h	Tue Mar  4 13:47:32 2014
@@ -1,6 +1,6 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.70 2013/05/05 07:11:34 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
 
 // Predefined symbols and macros -*- C++ -*-
 
@@ -35,7 +35,7 @@
 #define _GLIBCXX_CXX_CONFIG_H 1
 
 // The current version of the C++ library in compressed ISO date format.
-#define __GLIBCXX__ 20140116
+#define __GLIBCXX__ 20140302
 
 // Macros for various attributes.
 //   _GLIBCXX_PURE
@@ -765,7 +765,7 @@ namespace std
 /* #undef _GLIBCXX_HAVE_NAN_H */
 
 /* Define if poll is available in poll.h. */
-#define _GLIBCXX_HAVE_POLL 1
+/* #undef _GLIBCXX_HAVE_POLL */
 
 /* Define to 1 if you have the `powf' function. */
 /* #undef _GLIBCXX_HAVE_POWF */
@@ -895,7 +895,7 @@ namespace std
 /* #undef _GLIBCXX_HAVE_S_IFREG */
 
 /* Define if S_IFREG is available in sys/stat.h. */
-#define _GLIBCXX_HAVE_S_ISREG 1
+/* #undef _GLIBCXX_HAVE_S_ISREG */
 
 /* Define to 1 if you have the `tanf' function. */
 /* #undef _GLIBCXX_HAVE_TANF */
@@ -910,7 +910,7 @@ namespace std
 /* #undef _GLIBCXX_HAVE_TANL */
 
 /* Define to 1 if you have the tgmath.h header file. */
-#define _GLIBCXX_HAVE_TGMATH_H 1
+/* #undef _GLIBCXX_HAVE_TGMATH_H */
 
 /* Define to 1 if the target supports thread-local storage. */
 /* #undef _GLIBCXX_HAVE_TLS */
@@ -943,7 +943,7 @@ namespace std
 /* #undef _GLIBCXX_HAVE_WIN32_SLEEP */
 
 /* Define if writev is available in sys/uio.h. */
-#define _GLIBCXX_HAVE_WRITEV 1
+/* #undef _GLIBCXX_HAVE_WRITEV */
 
 /* Define to 1 if you have the `_acosf' function. */
 /* #undef _GLIBCXX_HAVE__ACOSF */
@@ -1239,12 +1239,12 @@ namespace std
 
 /* Define if C99 functions or macros from wchar.h, math.h, complex.h,
stdio.h, and stdlib.h can be used or exposed. */
-/* #undef _GLIBCXX_USE_C99 */
+#define _GLIBCXX_USE_C99 1
 
 /* Define if C99 functions in complex.h should be used in complex. Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
-/* #undef _GLIBCXX_USE_C99_COMPLEX */
+#define _GLIBCXX_USE_C99_COMPLEX 1
 
 /* Define if C99 functions in complex.h should be used in tr1/complex.
Using compiler builtins for these functions requires corresponding C99
@@ -1296,7 +1296,7 @@ namespace std
 /* #undef _GLIBCXX_USE_FLOAT128 */
 
 /* Defined if gettimeofday is available. */
-#define _GLIBCXX_USE_GETTIMEOFDAY 1
+/* #undef _GLIBCXX_USE_GETTIMEOFDAY */
 
 /* Define if get_nprocs is available in sys/sysinfo.h. */
 /* #undef _GLIBCXX_USE_GET_NPROCS */
@@ -1327,13 +1327,13 @@ namespace std
 /* #undef _GLIBCXX_USE_SCHED_YIELD */
 
 /* Define if _SC_NPROCESSORS_ONLN is available in unistd.h. */
-#define _GLIBCXX_USE_SC_NPROCESSORS_ONLN 1
+/* #undef _GLIBCXX_USE_SC_NPROCESSORS_ONLN */
 
 /* Define if _SC_NPROC_ONLN is available in unistd.h. */
 /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */
 
 /* Define if sysctl(), CTL_HW and HW_NCPU are available in sys/sysctl.h. */
-#define _GLIBCXX_USE_SYSCTL_HW_NCPU 1
+/* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */
 
 /* Define if code specialized for wchar_t should be used. */
 #define _GLIBCXX_USE_WCHAR_T 1


CVS commit: src

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 14:58:15 UTC 2014

Modified Files:
src/lib/libc: Makefile
src/lib/libpthread_dbg: Makefile
src/sys/arch/i386/bioscall: Makefile
src/sys/conf: Makefile.kern.inc
src/sys/dev/arcbios: Makefile.inc
src/sys/modules: Makefile.assym

Log Message:
Introduce GENASSYM_CPPFLAGS for options during genassym processing.
Consistently drop assembler flags.


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/lib/libc/Makefile
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread_dbg/Makefile
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/bioscall/Makefile
cvs rdiff -u -r1.164 -r1.165 src/sys/conf/Makefile.kern.inc
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/arcbios/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/Makefile.assym

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/Makefile
diff -u src/lib/libc/Makefile:1.164 src/lib/libc/Makefile:1.165
--- src/lib/libc/Makefile:1.164	Wed Jan 29 23:37:18 2014
+++ src/lib/libc/Makefile	Tue Mar  4 14:58:14 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.164 2014/01/29 23:37:18 joerg Exp $
+#	$NetBSD: Makefile,v 1.165 2014/03/04 14:58:14 joerg Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -37,9 +37,9 @@ CLEANFILES+=	assym.h assym.h.tmp
 
 assym.h: ${ARCHDIR}/genassym.cf
 	${_MKTARGET_CREATE}
-	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,--fatal-warnings} \
+	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} \
 		${CPPFLAGS} ${CPPFLAGS.assym.h} ${PROF} \
-		 ${ARCHDIR}/genassym.cf  assym.h.tmp  \
+		${GENASSYM_CPPFLAGS}  ${ARCHDIR}/genassym.cf  assym.h.tmp  \
 	mv -f assym.h.tmp assym.h
 .endif
 

Index: src/lib/libpthread_dbg/Makefile
diff -u src/lib/libpthread_dbg/Makefile:1.10 src/lib/libpthread_dbg/Makefile:1.11
--- src/lib/libpthread_dbg/Makefile:1.10	Thu Jul 19 06:33:48 2012
+++ src/lib/libpthread_dbg/Makefile	Tue Mar  4 14:58:14 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2012/07/19 06:33:48 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2014/03/04 14:58:14 joerg Exp $
 #
 
 WARNS?=		5
@@ -29,8 +29,8 @@ ARCHDIR=	${LIBPDIR}/arch/${ARCHSUBDIR}
 CPPFLAGS+=	-I${ARCHDIR} -I${LIBPDIR} -I${.CURDIR}
 
 assym.h: genassym.sh ${ARCHDIR}/genassym.cf
-	${HOST_SH} ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
-		 ${ARCHDIR}/genassym.cf  assym.h.tmp  \
+	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
+		${GENASSYM_CPPFLAGS}  ${ARCHDIR}/genassym.cf  assym.h.tmp  \
 	mv -f assym.h.tmp assym.h
 
 SRCS=	pthread_dbg.c 

Index: src/sys/arch/i386/bioscall/Makefile
diff -u src/sys/arch/i386/bioscall/Makefile:1.19 src/sys/arch/i386/bioscall/Makefile:1.20
--- src/sys/arch/i386/bioscall/Makefile:1.19	Tue Jul  6 05:59:59 2010
+++ src/sys/arch/i386/bioscall/Makefile	Tue Mar  4 14:58:14 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2010/07/06 05:59:59 mrg Exp $
+#	$NetBSD: Makefile,v 1.20 2014/03/04 14:58:14 joerg Exp $
 
 CPPFLAGS=	${APMCPPFLAGS}
 KSRC=${.CURDIR}/../../..
@@ -34,8 +34,8 @@ biostramp.obj: ${OBJS} ${DEPS}
 	${LD} -Bstatic -N -Ttext 0 -e do_bios_call -o $@ $(OBJS)
 
 assym.h: machine x86 genassym.cf
-	${TOOL_GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
-	 ${.CURDIR}/genassym.cf  assym.h.tmp  \
+	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
+	${GENASSYM_CPPFLAGS}  ${.CURDIR}/genassym.cf  assym.h.tmp  \
 	mv -f assym.h.tmp assym.h
 
 biostramp.S: assym.h

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.164 src/sys/conf/Makefile.kern.inc:1.165
--- src/sys/conf/Makefile.kern.inc:1.164	Fri Oct 18 08:06:06 2013
+++ src/sys/conf/Makefile.kern.inc	Tue Mar  4 14:58:14 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.164 2013/10/18 08:06:06 mbalmer Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.165 2014/03/04 14:58:14 joerg Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -334,7 +334,7 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT
 	${_MKTARGET_CREATE}
 	cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
 	${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
-	 assym.h.tmp  \
+	${GENASSYM_CPPFLAGS}  assym.h.tmp  \
 	mv -f assym.h.tmp assym.h
 ${MD_SFILES:C/\.[Ss]/.o/} ${SFILES:C/\.[Ss]/.o/}: assym.h
 .endif
@@ -440,7 +440,7 @@ assym.d: assym.h
 	${_MKTARGET_CREATE}
 	cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
 	${GENASSYM} -- ${MKDEP} -f assym.dep -- \
-	${CFLAGS:N-Wa,*} ${CPPFLAGS}
+	${CFLAGS:N-Wa,*} ${CPPFLAGS} ${GENASSYM_CPPFLAGS}
 	${TOOL_SED} -e 's/.*\.o:.*\.c/assym.h:/'  assym.dep ${.TARGET}
 	rm -f assym.dep
 

Index: src/sys/dev/arcbios/Makefile.inc
diff -u src/sys/dev/arcbios/Makefile.inc:1.1 src/sys/dev/arcbios/Makefile.inc:1.2
--- src/sys/dev/arcbios/Makefile.inc:1.1	Sun Feb 20 

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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar  4 15:24:38 UTC 2014

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Don't byte swap the data, assume the bus_space will do it.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.5 src/sys/arch/arm/cortex/gic.c:1.6
--- src/sys/arch/arm/cortex/gic.c:1.5	Tue Dec 17 13:12:45 2013
+++ src/sys/arch/arm/cortex/gic.c	Tue Mar  4 15:24:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.5 2013/12/17 13:12:45 joerg Exp $	*/
+/*	$NetBSD: gic.c,v 1.6 2014/03/04 15:24:38 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,7 +31,7 @@
 #define _INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.5 2013/12/17 13:12:45 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: gic.c,v 1.6 2014/03/04 15:24:38 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -104,33 +104,30 @@ static struct intrsource armgic_dummy_so
 __CTASSERT(NIPL == 8);
 
 /*
- * GIC register are always in little-endian.
+ * GIC register are always in little-endian.  It is assumed the bus_space
+ * will do any endian conversion required.
  */
 static inline uint32_t
 gicc_read(struct armgic_softc *sc, bus_size_t o)
 {
-	uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicch, o);
-	return le32toh(v);
+	return bus_space_read_4(sc-sc_memt, sc-sc_gicch, o);
 }
 
 static inline void
 gicc_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
 {
-	v = htole32(v);
 	bus_space_write_4(sc-sc_memt, sc-sc_gicch, o, v);
 }
 
 static inline uint32_t
 gicd_read(struct armgic_softc *sc, bus_size_t o)
 {
-	uint32_t v = bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o);
-	return le32toh(v);
+	return bus_space_read_4(sc-sc_memt, sc-sc_gicdh, o);
 }
 
 static inline void
 gicd_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
 {
-	v = htole32(v);
 	bus_space_write_4(sc-sc_memt, sc-sc_gicdh, o, v);
 }
 



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar  4 15:27:58 UTC 2014

Modified Files:
src/sys/arch/arm/include: asm.h

Log Message:
Remove duplicate END(y) macro


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/asm.h

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

Modified files:

Index: src/sys/arch/arm/include/asm.h
diff -u src/sys/arch/arm/include/asm.h:1.26 src/sys/arch/arm/include/asm.h:1.27
--- src/sys/arch/arm/include/asm.h:1.26	Wed Jan 29 00:42:15 2014
+++ src/sys/arch/arm/include/asm.h	Tue Mar  4 15:27:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.26 2014/01/29 00:42:15 matt Exp $	*/
+/*	$NetBSD: asm.h,v 1.27 2014/03/04 15:27:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -103,7 +103,6 @@
 #define	ARM_ENTRY_NP(y)		_ARM_ENTRY(_C_LABEL(y))
 #define	THUMB_ENTRY(y)		_THUMB_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
 #define	THUMB_ENTRY_NP(y)	_THUMB_ENTRY(_C_LABEL(y))
-#define	END(y)			_END(_C_LABEL(y))
 #define	ASENTRY(y)		_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
 #define	ASENTRY_NP(y)		_ENTRY(_ASM_LABEL(y))
 #define	ASEND(y)		_END(_ASM_LABEL(y))



CVS commit: src/common/lib/libc/arch/arm/atomic

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Mar  4 16:15:28 UTC 2014

Modified Files:
src/common/lib/libc/arch/arm/atomic: Makefile.inc atomic_add_16.S
atomic_add_64.S atomic_add_8.S atomic_and_16.S atomic_and_64.S
atomic_and_8.S atomic_cas_16.S atomic_cas_32.S atomic_cas_64.S
atomic_cas_8.S atomic_nand_16.S atomic_nand_32.S atomic_nand_64.S
atomic_nand_8.S atomic_op_asm.h atomic_or_16.S atomic_or_64.S
atomic_or_8.S atomic_sub_64.S atomic_swap.S atomic_swap_16.S
atomic_swap_64.S atomic_xor_16.S atomic_xor_32.S atomic_xor_64.S
atomic_xor_8.S membar_ops.S

Log Message:
Don't export __sync* if _KERNEL || _STANDALONE are defined.
(except if _RUMPKERNEL is defined)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/common/lib/libc/arch/arm/atomic/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/atomic/atomic_add_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_add_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_sub_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_swap_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_8.S
cvs rdiff -u -r1.10 -r1.11 \
src/common/lib/libc/arch/arm/atomic/atomic_add_64.S
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/atomic/atomic_and_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_swap.S
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S
cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_nand_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_64.S
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/atomic/membar_ops.S

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

Modified files:

Index: src/common/lib/libc/arch/arm/atomic/Makefile.inc
diff -u src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.21 src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.22
--- src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.21	Tue Mar  4 06:36:41 2014
+++ src/common/lib/libc/arch/arm/atomic/Makefile.inc	Tue Mar  4 16:15:28 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.21 2014/03/04 06:36:41 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.22 2014/03/04 16:15:28 matt Exp $
 
 .ifnmake obj
 .include ${NETBSDSRCDIR}/common/lib/libc/arch/arm/features.mk
@@ -37,6 +37,7 @@ SRCS.atomic+=	atomic_inc_32.S atomic_inc
 SRCS.atomic+=	atomic_sub_64.S
 SRCS.atomic+=	atomic_swap.S atomic_swap_16.S atomic_swap_64.S
 SRCS.atomic+=	membar_ops.S
+.if defined(LIB)  ${LIB} != kern
 .for op in add and nand or sub xor
 SRCS.atomic+=	sync_fetch_and_${op}_8.S
 .endfor
@@ -44,6 +45,7 @@ SRCS.atomic+=	sync_fetch_and_${op}_8.S
 SRCS.atomic+=	sync_bool_compare_and_swap_${sz}.S
 .endfor
 .endif
+.endif
 
 .endif
 

Index: src/common/lib/libc/arch/arm/atomic/atomic_add_16.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_add_16.S:1.1 src/common/lib/libc/arch/arm/atomic/atomic_add_16.S:1.2
--- src/common/lib/libc/arch/arm/atomic/atomic_add_16.S:1.1	Fri Nov  8 22:42:52 2013
+++ src/common/lib/libc/arch/arm/atomic/atomic_add_16.S	Tue Mar  4 16:15:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_add_16.S,v 1.1 2013/11/08 22:42:52 matt Exp $	*/
+/*	$NetBSD: atomic_add_16.S,v 1.2 2014/03/04 16:15:28 matt Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -55,14 +55,14 @@ END(_atomic_sub_16)
 ATOMIC_OP_ALIAS(atomic_add_16,_atomic_add_16)
 ATOMIC_OP_ALIAS(atomic_add_short,_atomic_add_16)
 ATOMIC_OP_ALIAS(atomic_add_ushort,_atomic_add_16)
-STRONG_ALIAS(__sync_fetch_and_add_2,_atomic_add_16)
+CRT_ALIAS(__sync_fetch_and_add_2,_atomic_add_16)
 STRONG_ALIAS(_atomic_add_short,_atomic_add_16)
 STRONG_ALIAS(_atomic_add_ushort,_atomic_add_16)
 
 ATOMIC_OP_ALIAS(atomic_sub_16,_atomic_sub_16)
 ATOMIC_OP_ALIAS(atomic_sub_short,_atomic_sub_16)
 ATOMIC_OP_ALIAS(atomic_sub_ushort,_atomic_sub_16)
-STRONG_ALIAS(__sync_fetch_and_sub_2,_atomic_sub_16)
+CRT_ALIAS(__sync_fetch_and_sub_2,_atomic_sub_16)
 

CVS commit: src/common/lib/libc/arch/powerpc/string

2014-03-04 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Mar  4 17:05:14 UTC 2014

Modified Files:
src/common/lib/libc/arch/powerpc/string: memcpy.S

Log Message:
on 601 CPUs skip to normal memcpy if both source and destination are 32bit
aligned


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/powerpc/string/memcpy.S

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

Modified files:

Index: src/common/lib/libc/arch/powerpc/string/memcpy.S
diff -u src/common/lib/libc/arch/powerpc/string/memcpy.S:1.5 src/common/lib/libc/arch/powerpc/string/memcpy.S:1.6
--- src/common/lib/libc/arch/powerpc/string/memcpy.S:1.5	Mon Mar  3 18:55:02 2014
+++ src/common/lib/libc/arch/powerpc/string/memcpy.S	Tue Mar  4 17:05:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: memcpy.S,v 1.5 2014/03/03 18:55:02 matt Exp $ */
+/* $NetBSD: memcpy.S,v 1.6 2014/03/04 17:05:14 macallan Exp $ */
 
 /* stropt/memcpy_440.S, pl_string_common, pl_linux 10/11/04 11:45:36
  * ==
@@ -73,11 +73,14 @@ ENTRY(memcpy)
 	 * not available.  Maybe want to have a different memcpy for 601
 	 * that checks for page boundaries/word alignment...
 	 */
-	mfspr   %r6, 287		/* mfpvbr %r6 PVR = 287   */
-	srwi%r6, %r6, 0x10		/* get version field from PVR */
-	cmpwi   %r6, 0x1		/* 601 CPU = 0x0001   */
-	bne bnorm			/* skip byte-only unless 601  */
-
+	mfspr   %r6, 287		/* mfpvbr %r6 PVR = 287*/
+	srwi%r6, %r6, 0x10		/* get version field from PVR  */
+	cmpwi   %r6, 0x1		/* 601 CPU = 0x0001*/
+	bne bnorm			/* skip byte-only unless 601   */
+
+	or	%r6, %r3, %r4		/* see if both source and dest */
+	andi.	%r6, %r6, 3		/* are 32bit aligned   */
+	beq	bnorm			/* skip byte-only if they are  */
 bcpy:
 	mtctr   %r5			/* byte copy everything */
 	li  %r6, 0



CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify

2014-03-04 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Mar  4 17:29:06 UTC 2014

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c

Log Message:
check the correct field in the structure in dsa_verify - pointed out by
joerg - thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c
diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.8 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.9
--- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.8	Fri Feb 21 01:55:10 2014
+++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c	Tue Mar  4 17:29:06 2014
@@ -1609,7 +1609,9 @@ verify_dsa_sig(uint8_t *calculated, unsi
 	BIGNUM		 *t1;
 	int		  ret;
 
-	if (pubkey[DSA_P].bn == NULL || pubkey[DSA_Q].bn == NULL || pubkey[DSA_G].bn == NULL) {
+	if (pubkey-bn[DSA_P].bn == NULL ||
+	pubkey-bn[DSA_Q].bn == NULL ||
+	pubkey-bn[DSA_G].bn == NULL) {
 		return 0;
 	}
 	M = W = t1 = NULL;



CVS commit: src

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 17:57:56 UTC 2014

Modified Files:
src/lib/csu/common: Makefile.inc
src/sys/arch/sparc/stand/bootblk: Makefile

Log Message:
Add GENASSYM_CPPFLAGS in two more places.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/csu/common/Makefile.inc
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc/stand/bootblk/Makefile

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

Modified files:

Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.24 src/lib/csu/common/Makefile.inc:1.25
--- src/lib/csu/common/Makefile.inc:1.24	Sat Jan 11 00:18:15 2014
+++ src/lib/csu/common/Makefile.inc	Tue Mar  4 17:57:56 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.24 2014/01/11 00:18:15 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.25 2014/03/04 17:57:56 joerg Exp $
 
 .include bsd.own.mk
 
@@ -114,7 +114,7 @@ sysident_assym.h: ${GENASSYM_CONF} ${GEN
 	${_MKTARGET_CREATE}
 	cat ${COMMON_DIR}/sysident_assym.cf | \
 	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
-	 sysident_assym.h.tmp  \
+	${GENASSYM_CPPFLAGS}  sysident_assym.h.tmp  \
 	mv -f sysident_assym.h.tmp sysident_assym.h
 
 CLEANFILES+=	sysident_assym.h

Index: src/sys/arch/sparc/stand/bootblk/Makefile
diff -u src/sys/arch/sparc/stand/bootblk/Makefile:1.14 src/sys/arch/sparc/stand/bootblk/Makefile:1.15
--- src/sys/arch/sparc/stand/bootblk/Makefile:1.14	Wed Aug 21 06:41:52 2013
+++ src/sys/arch/sparc/stand/bootblk/Makefile	Tue Mar  4 17:57:56 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2013/08/21 06:41:52 matt Exp $
+#	$NetBSD: Makefile,v 1.15 2014/03/04 17:57:56 joerg Exp $
 
 CURDIR=	${.CURDIR}
 S=	${CURDIR}/../../../..
@@ -23,12 +23,12 @@ CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} 
 
 ffs.fth.h: genfth.cf machine sparc
 	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
-	${.CURDIR}/genfth.cf ffs.fth.h.tmp  \
+	${GENASSYM_CPPFLAGS}  ${.CURDIR}/genfth.cf ffs.fth.h.tmp  \
 	mv -f ffs.fth.h.tmp ffs.fth.h
 
 lfs.fth.h: genlfs.cf machine sparc
 	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
-	${.CURDIR}/genlfs.cf lfs.fth.h.tmp  \
+	${GENASSYM_CPPFLAGS}  ${.CURDIR}/genlfs.cf lfs.fth.h.tmp  \
 	mv -f lfs.fth.h.tmp lfs.fth.h
 
 bootblk.text: bootblk.fth ffs.fth.h lfs.fth.h



CVS commit: [riastradh-drm2] src/sys/modules

2014-03-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  4 20:46:14 UTC 2014

Removed Files:
src/sys/modules/drm2 [riastradh-drm2]: Makefile Makefile.inc drm.ioconf
src/sys/modules/i915drm2 [riastradh-drm2]: Makefile i915drm.ioconf

Log Message:
Remove drm2 and i915drm2 modules.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r0 src/sys/modules/drm2/Makefile
cvs rdiff -u -r1.1.2.4 -r0 src/sys/modules/drm2/Makefile.inc
cvs rdiff -u -r1.1.2.2 -r0 src/sys/modules/drm2/drm.ioconf
cvs rdiff -u -r1.1.2.12 -r0 src/sys/modules/i915drm2/Makefile
cvs rdiff -u -r1.1.2.2 -r0 src/sys/modules/i915drm2/i915drm.ioconf

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



CVS commit: [riastradh-drm2] src/sys

2014-03-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Mar  4 20:45:17 UTC 2014

Modified Files:
src/sys/conf [riastradh-drm2]: files majors
src/sys/dev/pci [riastradh-drm2]: files.pci
src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h
src/sys/external/bsd/drm2/drm [riastradh-drm2]: drm_drv.c drm_fops.c
drm_module.c drm_vm.c
src/sys/external/bsd/drm2/i915drm [riastradh-drm2]: i915_module.c
src/sys/external/bsd/drm2/include/drm [riastradh-drm2]: drm_os_netbsd.h
src/sys/external/bsd/drm2/linux [riastradh-drm2]: linux_work.c
src/sys/external/bsd/drm2/pci [riastradh-drm2]: drm_pci_module.c
Added Files:
src/sys/external/bsd/drm2/drm [riastradh-drm2]: files.drmkms
src/sys/external/bsd/drm2/i915drm [riastradh-drm2]: files.i915drmkms
src/sys/external/bsd/drm2/linux [riastradh-drm2]: files.drmkms_linux
linux_module.c
src/sys/external/bsd/drm2/pci [riastradh-drm2]: files.drmkms_pci
src/sys/modules/drmkms [riastradh-drm2]: Makefile Makefile.inc
drmkms.ioconf
src/sys/modules/drmkms_linux [riastradh-drm2]: Makefile
src/sys/modules/drmkms_pci [riastradh-drm2]: Makefile
src/sys/modules/i915drmkms [riastradh-drm2]: Makefile i915drmkms.ioconf
Removed Files:
src/sys/external/bsd/drm2/conf [riastradh-drm2]: files.drm2

Log Message:
Rework drm2 configuration and modularization.

- Split drm2.kmod into drmkms_linux, drmkms, drmkms_pci.
- Split up drmkms-related files.* similarly.
- Make drm_agp_* routines hooks that the drmkms_pci module installs.
- Reuse drm device major 180 for (old) drm and drmkms.

Now old drm and new drmkms can coexist happily in the same tree, with
or without PCI, and require no changes to userland.


To generate a diff of this commit:
cvs rdiff -u -r1.1077.2.3 -r1.1077.2.4 src/sys/conf/files
cvs rdiff -u -r1.66.6.1 -r1.66.6.2 src/sys/conf/majors
cvs rdiff -u -r1.364.6.2 -r1.364.6.3 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.1.2.7 -r0 src/sys/external/bsd/drm2/conf/files.drm2
cvs rdiff -u -r1.1.1.1.2.56 -r1.1.1.1.2.57 \
src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/sys/external/bsd/drm2/drm/drm_drv.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/external/bsd/drm2/drm/drm_fops.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/external/bsd/drm2/drm/drm_module.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/external/bsd/drm2/drm/drm_vm.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/external/bsd/drm2/drm/files.drmkms
cvs rdiff -u -r0 -r1.1.2.1 src/sys/external/bsd/drm2/i915drm/files.i915drmkms
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 \
src/sys/external/bsd/drm2/i915drm/i915_module.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 \
src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/external/bsd/drm2/linux/files.drmkms_linux \
src/sys/external/bsd/drm2/linux/linux_module.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 \
src/sys/external/bsd/drm2/linux/linux_work.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/external/bsd/drm2/pci/drm_pci_module.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/external/bsd/drm2/pci/files.drmkms_pci
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/drmkms/Makefile \
src/sys/modules/drmkms/Makefile.inc src/sys/modules/drmkms/drmkms.ioconf
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/drmkms_linux/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/drmkms_pci/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/sys/modules/i915drmkms/Makefile \
src/sys/modules/i915drmkms/i915drmkms.ioconf

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1077.2.3 src/sys/conf/files:1.1077.2.4
--- src/sys/conf/files:1.1077.2.3	Wed Jan 29 19:47:38 2014
+++ src/sys/conf/files	Tue Mar  4 20:45:16 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1077.2.3 2014/01/29 19:47:38 riastradh Exp $
+#	$NetBSD: files,v 1.1077.2.4 2014/03/04 20:45:16 riastradh Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1093,11 +1093,13 @@ device	smsh: arp, ether, ifnet, mii
 file	dev/ic/lan9118.c		smsh
 
 # DRM - Direct Rendering Infrastructure: dev/drm
-# This is the old DRM; new DRM is in dev/pci/files.pci (XXX for now).
 define drm {}
 include external/bsd/drm/conf/files.drm
 include dev/drm/files.drm
 
+# DRM/KMS - Newer direct rendering manager with kernel mode-switching
+include external/bsd/drm2/drm/files.drmkms
+
 
 # Definitions for wscons
 # device attributes: display, display with emulator, keyboard, and mouse

Index: src/sys/conf/majors
diff -u src/sys/conf/majors:1.66.6.1 src/sys/conf/majors:1.66.6.2
--- src/sys/conf/majors:1.66.6.1	Wed Jan 29 19:47:54 2014
+++ src/sys/conf/majors	Tue Mar  4 20:45:16 2014
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.66.6.1 2014/01/29 19:47:54 riastradh Exp $
+# $NetBSD: majors,v 1.66.6.2 2014/03/04 20:45:16 riastradh 

CVS commit: src/external/bsd/llvm

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 21:05:06 UTC 2014

Modified Files:
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/bin: Makefile
src/external/bsd/llvm/bin/opt: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64CodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMMC: Makefile
src/external/bsd/llvm/lib/libLLVMMipsCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMMipsMCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMObject: Makefile
src/external/bsd/llvm/lib/libLLVMScalarOpts: Makefile
src/external/bsd/llvm/lib/libLLVMSupport: Makefile
src/external/bsd/llvm/lib/libclangBasic: Makefile
src/external/bsd/llvm/lib/libclangDriver: Makefile
src/external/bsd/llvm/lib/liblldReaderWriterPECOFF: Makefile
Added Files:
src/external/bsd/llvm/bin/llvm-profdata: Makefile

Log Message:
Update build glue for LLVM/Clang r202566. News:
- match ARM CPU default of GCC
- better support for SPARC64
- type checkings for abs/fabs
- null pointer checks against struct member
- various other improvements


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/llvm/bin/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/llvm/bin/llvm-profdata/Makefile
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/llvm/bin/opt/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile
cvs rdiff -u -r1.26 -r1.27 src/external/bsd/llvm/lib/libLLVMCodeGen/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/llvm/lib/libLLVMMC/Makefile
cvs rdiff -u -r1.21 -r1.22 \
src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/bsd/llvm/lib/libLLVMMipsMCTargetDesc/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/llvm/lib/libLLVMObject/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
cvs rdiff -u -r1.25 -r1.26 src/external/bsd/llvm/lib/libLLVMSupport/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/llvm/lib/libclangBasic/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/llvm/lib/libclangDriver/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/llvm/lib/liblldReaderWriterPECOFF/Makefile

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

Modified files:

Index: src/external/bsd/llvm/Makefile.inc
diff -u src/external/bsd/llvm/Makefile.inc:1.71 src/external/bsd/llvm/Makefile.inc:1.72
--- src/external/bsd/llvm/Makefile.inc:1.71	Fri Feb 14 20:23:56 2014
+++ src/external/bsd/llvm/Makefile.inc	Tue Mar  4 21:05:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.71 2014/02/14 20:23:56 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.72 2014/03/04 21:05:05 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -8,7 +8,7 @@ LLVM_TOPLEVEL_MK=
 SVN_ROOT=		http://llvm.org/svn/llvm-project
 SVN_BRANCH=		trunk
 
-COMMON_REVISION=	201163
+COMMON_REVISION=	202566
 CLANG_REVISION=		${COMMON_REVISION}
 LLD_REVISION=		${COMMON_REVISION}
 LLDB_REVISION=		${COMMON_REVISION}

Index: src/external/bsd/llvm/bin/Makefile
diff -u src/external/bsd/llvm/bin/Makefile:1.13 src/external/bsd/llvm/bin/Makefile:1.14
--- src/external/bsd/llvm/bin/Makefile:1.13	Mon Oct 14 01:37:39 2013
+++ src/external/bsd/llvm/bin/Makefile	Tue Mar  4 21:05:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2013/10/14 01:37:39 joerg Exp $
+#	$NetBSD: Makefile,v 1.14 2014/03/04 21:05:05 joerg Exp $
 
 .include bsd.own.mk
 
@@ -39,6 +39,7 @@ SUBDIR+= \
 	llvm-mc \
 	llvm-nm \
 	llvm-objdump \
+	llvm-profdata \
 	llvm-readobj \
 	llvm-size \
 	llvm-symbolizer \

Index: src/external/bsd/llvm/bin/opt/Makefile
diff -u src/external/bsd/llvm/bin/opt/Makefile:1.12 src/external/bsd/llvm/bin/opt/Makefile:1.13
--- src/external/bsd/llvm/bin/opt/Makefile:1.12	Fri Feb 14 20:23:56 2014
+++ src/external/bsd/llvm/bin/opt/Makefile	Tue Mar  4 21:05:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2014/02/14 20:23:56 joerg Exp $
+#	$NetBSD: Makefile,v 1.13 2014/03/04 21:05:05 joerg Exp $
 
 PROG_CXX=	opt
 NOMAN=		yes
@@ -8,6 +8,7 @@ NOMAN=		yes
 .PATH: ${LLVM_SRCDIR}/tools/opt
 
 SRCS=	AnalysisWrappers.cpp \
+	BreakpointPrinter.cpp \
 	GraphPrinters.cpp \
 	NewPMDriver.cpp \
 	PassPrinters.cpp \

Index: src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile
diff -u src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile:1.2 src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile:1.3
--- src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile:1.2	Tue Feb 19 12:35:42 2013
+++ src/external/bsd/llvm/lib/libLLVMAArch64CodeGen/Makefile	Tue Mar  4 21:05:05 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2013/02/19 12:35:42 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2014/03/04 21:05:05 joerg Exp $
 
 LIB=	LLVMAArch64CodeGen
 
@@ -20,7 +20,8 

CVS commit: src

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 21:06:47 UTC 2014

Modified Files:
src/libexec/lfs_cleanerd: Makefile
src/tests/fs/common: Makefile
src/usr.sbin/puffs/rump_lfs: Makefile

Log Message:
Make the abs() use check non-fatal for a bogus use in the LFS cleanerd.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/libexec/lfs_cleanerd/Makefile
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/common/Makefile
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/rump_lfs/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/lfs_cleanerd/Makefile
diff -u src/libexec/lfs_cleanerd/Makefile:1.17 src/libexec/lfs_cleanerd/Makefile:1.18
--- src/libexec/lfs_cleanerd/Makefile:1.17	Sat Jun  8 02:16:03 2013
+++ src/libexec/lfs_cleanerd/Makefile	Tue Mar  4 21:06:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2013/06/08 02:16:03 dholland Exp $
+#	$NetBSD: Makefile,v 1.18 2014/03/04 21:06:47 joerg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 .include Makefile.inc
@@ -11,4 +11,6 @@ BINDIR=		/libexec
 LDSTATIC?=  -static
 .endif
 
+CWARNFLAGS.clang+=	-Wno-error=absolute-value
+
 .include bsd.prog.mk

Index: src/tests/fs/common/Makefile
diff -u src/tests/fs/common/Makefile:1.11 src/tests/fs/common/Makefile:1.12
--- src/tests/fs/common/Makefile:1.11	Wed Jun 26 19:29:24 2013
+++ src/tests/fs/common/Makefile	Tue Mar  4 21:06:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2013/06/26 19:29:24 reinoud Exp $
+#	$NetBSD: Makefile,v 1.12 2014/03/04 21:06:47 joerg Exp $
 #
 
 .include bsd.own.mk
@@ -39,4 +39,6 @@ CPPFLAGS+=	-DMOUNT_NOMAIN -DMOUNTNFS_RET
 .include ../../../libexec/lfs_cleanerd/Makefile.inc
 CPPFLAGS+=	-DUSE_RUMP -DLFS_CLEANER_AS_LIB
 
+CWARNFLAGS.clang+=	-Wno-error=absolute-value
+
 .include bsd.lib.mk

Index: src/usr.sbin/puffs/rump_lfs/Makefile
diff -u src/usr.sbin/puffs/rump_lfs/Makefile:1.9 src/usr.sbin/puffs/rump_lfs/Makefile:1.10
--- src/usr.sbin/puffs/rump_lfs/Makefile:1.9	Thu Sep  6 16:39:08 2012
+++ src/usr.sbin/puffs/rump_lfs/Makefile	Tue Mar  4 21:06:47 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2012/09/06 16:39:08 riz Exp $
+#	$NetBSD: Makefile,v 1.10 2014/03/04 21:06:47 joerg Exp $
 #
 
 .include bsd.own.mk
@@ -13,6 +13,8 @@ RUMP_DISKFS=
 
 CPPFLAGS+=	-DUSE_RUMP -DLFS_CLEANER_AS_LIB
 
+CWARNFLAGS.clang+=	-Wno-error=absolute-value
+
 .include ../../../libexec/lfs_cleanerd/Makefile.inc
 
 #DBG=-g



CVS commit: src/share/mk

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 21:06:02 UTC 2014

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

Log Message:
When using Clang, disable integrated assembler for genassym. It creates
syntactically invalid assembler, which is normally not a problem as it
is also using -S.


To generate a diff of this commit:
cvs rdiff -u -r1.775 -r1.776 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.775 src/share/mk/bsd.own.mk:1.776
--- src/share/mk/bsd.own.mk:1.775	Sun Mar  2 03:33:29 2014
+++ src/share/mk/bsd.own.mk	Tue Mar  4 21:06:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.775 2014/03/02 03:33:29 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.776 2014/03/04 21:06:02 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -780,6 +780,8 @@ ARM_APCS_FLAGS=	-mabi=apcs-gnu -mfloat-a
 ARM_APCS_FLAGS+=${${ACTIVE_CC} == clang:? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
 .endif
 
+GENASSYM_CPPFLAGS+=	${${ACTIVE_CC} == clang:? -no-integrated-as :}
+
 #
 # Determine if arch uses native kernel modules with rump
 #



CVS commit: src/sbin/fsck_ext2fs

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 21:07:22 UTC 2014

Modified Files:
src/sbin/fsck_ext2fs: Makefile

Log Message:
Make pointer NULL check non-fatal for a bogus condition.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/fsck_ext2fs/Makefile

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

Modified files:

Index: src/sbin/fsck_ext2fs/Makefile
diff -u src/sbin/fsck_ext2fs/Makefile:1.16 src/sbin/fsck_ext2fs/Makefile:1.17
--- src/sbin/fsck_ext2fs/Makefile:1.16	Sat Aug  6 16:42:41 2011
+++ src/sbin/fsck_ext2fs/Makefile	Tue Mar  4 21:07:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2011/08/06 16:42:41 dholland Exp $
+#	$NetBSD: Makefile,v 1.17 2014/03/04 21:07:22 joerg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include bsd.own.mk
@@ -11,6 +11,8 @@ FSCK=	${NETBSDSRCDIR}/sbin/fsck
 CPPFLAGS+= -I${FSCK}
 .PATH:	${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK}
 
+CWARNFLAGS.clang+=	-Wno-error=tautological-pointer-compare
+
 .include bsd.prog.mk
 
 LDADD+=-lutil



CVS commit: src/external/gpl3/gcc

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Mar  4 21:07:39 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/crtstuff/arch: powerpc64.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h tm.h
Added Files:
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: auto-target.h defs.mk

Log Message:
partial mknative-gcc for gcc 4.8 and ppc64.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/tm.h

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

Modified files:

Index: src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk
diff -u src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk:1.1 src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk:1.2
--- src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk:1.1	Sat Oct 29 09:21:31 2011
+++ src/external/gpl3/gcc/lib/crtstuff/arch/powerpc64.mk	Tue Mar  4 21:07:38 2014
@@ -1,10 +1,11 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: 	NetBSD: mknative-gcc,v 1.65 2011/10/13 19:52:33 matt Exp 
-# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp 
+# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
-G_INCLUDES=-I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I./../intl -I${GNUHOSTDIST}/gcc/../libcpp/include -I${GNUHOSTDIST}/gcc/../libdecnumber -I${GNUHOSTDIST}/gcc/../libdecnumber/dpd -I../libdecnumber   -I/usr/include/libelf
-G_CRTSTUFF_CFLAGS=-O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I./../intl -I${GNUHOSTDIST}/gcc/../libcpp/include -I${GNUHOSTDIST}/gcc/../libdecnumber -I${GNUHOSTDIST}/gcc/../libdecnumber/dpd -I../libdecnumber   -I/usr/include/libelf  -g0 -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize 
+G_INCLUDES=-I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I${GNUHOSTDIST}/gcc/../libcpp/include -I${GNUHOSTDIST}/gcc/../libdecnumber -I${GNUHOSTDIST}/gcc/../libdecnumber/dpd -I../libdecnumber -I${GNUHOSTDIST}/gcc/../libbacktrace  
+G_CRTSTUFF_CFLAGS=
 G_CRTSTUFF_T_CFLAGS=
-G_tm_defines=NETBSD_ENABLE_PTHREADS
+G_CRTSTUFF_T_CFLAGS_S=
+G_tm_defines=LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 NETBSD_ENABLE_PTHREADS
 G_xm_file=
 G_xm_defines=

Index: src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk
diff -u src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk:1.1 src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk:1.2
--- src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk:1.1	Sat Oct 29 09:21:31 2011
+++ src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk	Tue Mar  4 21:07:39 2014
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: 	NetBSD: mknative-gcc,v 1.65 2011/10/13 19:52:33 matt Exp 
-# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp 
+# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
-G_LIBGCOV=_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_fork _gcov_execl _gcov_execlp _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler _gcov_merge_ior
+G_LIBGCOV=_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_fork _gcov_execl _gcov_execlp _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_reset _gcov_dump _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler _gcov_merge_ior
Index: src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h
diff -u src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h:1.1 src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h:1.2
--- src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h:1.1	Sat Oct 29 

CVS commit: src/crypto/external/bsd/heimdal

2014-03-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar  4 21:08:08 UTC 2014

Modified Files:
src/crypto/external/bsd/heimdal: Makefile.inc

Log Message:
Disable abs() checking, a lot of computations get implicit truncations
or use unsigned values.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/heimdal/Makefile.inc

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

Modified files:

Index: src/crypto/external/bsd/heimdal/Makefile.inc
diff -u src/crypto/external/bsd/heimdal/Makefile.inc:1.2 src/crypto/external/bsd/heimdal/Makefile.inc:1.3
--- src/crypto/external/bsd/heimdal/Makefile.inc:1.2	Sat Apr 16 18:41:58 2011
+++ src/crypto/external/bsd/heimdal/Makefile.inc	Tue Mar  4 21:08:08 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.2 2011/04/16 18:41:58 he Exp $
+# $NetBSD: Makefile.inc,v 1.3 2014/03/04 21:08:08 joerg Exp $
 
 HEIMBASE?=	${NETBSDSRCDIR}/crypto/external/bsd/heimdal
 HEIMDIST=	${HEIMBASE}/dist
@@ -45,3 +45,4 @@ HOST_CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+= ${.PATH:S/^/-I/}
 CPPFLAGS+= -I${HEIMBASE}/include
 CPPFLAGS+= -I${HEIMDIST}/include
+CWARNFLAGS.clang+=	-Wno-error=absolute-value



CVS commit: [riastradh-drm2] src/sys/external/bsd/drm2/i915drm

2014-03-04 Thread Aymeric Vincent
Module Name:src
Committed By:   aymeric
Date:   Tue Mar  4 22:14:12 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/i915drm [riastradh-drm2]: i915_gem_gtt.c

Log Message:
do not KASSERT out on Sandy Bridge


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 \
src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c

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

Modified files:

Index: src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c
diff -u src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.1.2.6 src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.1.2.7
--- src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.1.2.6	Sun Sep  8 16:28:27 2013
+++ src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c	Tue Mar  4 22:14:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_gem_gtt.c,v 1.1.2.6 2013/09/08 16:28:27 riastradh Exp $	*/
+/*	$NetBSD: i915_gem_gtt.c,v 1.1.2.7 2014/03/04 22:14:12 aymeric Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i915_gem_gtt.c,v 1.1.2.6 2013/09/08 16:28:27 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: i915_gem_gtt.c,v 1.1.2.7 2014/03/04 22:14:12 aymeric Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -330,7 +330,7 @@ i915_gem_gtt_bind_object(struct drm_i915
 enum i915_cache_level cache_level)
 {
 
-	KASSERT(6  INTEL_INFO(obj-base.dev)-gen); /* XXX gen6 */
+	KASSERT(6 = INTEL_INFO(obj-base.dev)-gen); /* XXX gen6 */
 	gen6_ggtt_bind_object(obj, cache_level);
 	obj-has_global_gtt_mapping = 1;
 }



CVS commit: src/external/gpl3/gcc/dist/libgcc

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar  5 00:13:41 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/libgcc: config.host

Log Message:
coldfire does not want m68k/t-floatlib.
enable powerpc*-netbsd* -- ie, match ppc64.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/libgcc/config.host

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

Modified files:

Index: src/external/gpl3/gcc/dist/libgcc/config.host
diff -u src/external/gpl3/gcc/dist/libgcc/config.host:1.5 src/external/gpl3/gcc/dist/libgcc/config.host:1.6
--- src/external/gpl3/gcc/dist/libgcc/config.host:1.5	Mon Mar  3 03:28:56 2014
+++ src/external/gpl3/gcc/dist/libgcc/config.host	Wed Mar  5 00:13:41 2014
@@ -696,7 +696,9 @@ m32rle-*-linux*)
 m68k-*-elf* | fido-*-elf)
 	tmake_file=$tmake_file m68k/t-floatlib
 	;;
-m68k*-*-netbsdelf* | m5407-*-netbsdelf* | m68010-*-netbsdelf*)
+m5407-*-netbsdelf*)
+	;;
+m68k*-*-netbsdelf* | m68010-*-netbsdelf*)
 	tmake_file=$tmake_file m68k/t-floatlib
 	;;
 m68k*-*-openbsd*)
@@ -847,8 +849,8 @@ powerpc*-*-freebsd*)
 	  ;;
 	esac
 	;;
-powerpc-*-netbsd*)
-	tmake_file=$tmake_file rs6000/t-netbsd rs6000/t-crtstuff
+powerpc*-*-netbsd*)
+	tmake_file=${tmake_file} rs6000/t-netbsd rs6000/t-crtstuff
 	;;
 powerpc-*-eabispe*)
 	tmake_file=${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit



CVS commit: src/external/gpl3/gcc

2014-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar  5 00:14:50 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/coldfire: defs.mk
src/external/gpl3/gcc/lib/libgomp/arch/coldfire: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire: c++config.h
config.h gstdint.h
src/external/gpl3/gcc/usr.bin/gcc/arch/coldfire: auto-host.h
configargs.h plugin-version.h

Log Message:
mknative-gcc for GCC 4.8 and coldfire.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h \
src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/lib/libgomp/arch/coldfire/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/c++config.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/config.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/coldfire/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/coldfire/configargs.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/coldfire/plugin-version.h

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

Modified files:

Index: src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h
diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h:1.1 src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h:1.2
--- src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h:1.1	Sat Mar  1 10:00:31 2014
+++ src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h	Wed Mar  5 00:14:50 2014
@@ -1,6 +1,6 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.70 2013/05/05 07:11:34 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
 
 /* backtrace-supported.h.in -- Whether stack backtrace is supported.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
@@ -62,4 +62,4 @@ POSSIBILITY OF SUCH DAMAGE.  */
0, the threaded parameter to backtrace_create_state must be passed
as 0.  */
 
-#define BACKTRACE_SUPPORTS_THREADS 0
+#define BACKTRACE_SUPPORTS_THREADS 1
Index: src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h
diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h:1.1 src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h:1.2
--- src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h:1.1	Sat Mar  1 10:00:31 2014
+++ src/external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h	Wed Mar  5 00:14:50 2014
@@ -1,6 +1,6 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.70 2013/05/05 07:11:34 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
 
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
@@ -49,7 +49,7 @@
 #define HAVE_STRING_H 1
 
 /* Define to 1 if you have the __sync functions */
-/* #undef HAVE_SYNC_FUNCTIONS */
+#define HAVE_SYNC_FUNCTIONS 1
 
 /* Define to 1 if you have the sys/mman.h header file. */
 #define HAVE_SYS_MMAN_H 1

Index: src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk
diff -u src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk:1.1 src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk:1.2
--- src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk:1.1	Sat Mar  1 10:00:34 2014
+++ src/external/gpl3/gcc/lib/libgcc/arch/coldfire/defs.mk	Wed Mar  5 00:14:50 2014
@@ -1,13 +1,13 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.70 2013/05/05 07:11:34 skrll Exp 
-# Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp 
+# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
 G_INCLUDES=-I. -I. -I../.././gcc -I${GNUHOSTDIST}/libgcc -I${GNUHOSTDIST}/libgcc/. -I${GNUHOSTDIST}/libgcc/../gcc -I${GNUHOSTDIST}/libgcc/../include 
-G_LIB2ADD=${GNUHOSTDIST}/libgcc/config/m68k/fpgnulib.c xfgnulib.c enable-execute-stack.c
+G_LIB2ADD= 

CVS commit: src/external/cddl/osnet/dev/dtrace/arm

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 02:00:24 UTC 2014

Modified Files:
src/external/cddl/osnet/dev/dtrace/arm: dtrace_isa.c

Log Message:
Use uint32_t instead of u_int32_t


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c
diff -u src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c:1.1 src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c:1.2
--- src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c:1.1	Fri Jun 21 19:16:00 2013
+++ src/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c	Wed Mar  5 02:00:24 2014
@@ -68,7 +68,7 @@ void
 dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
 uint32_t *intrpc)
 {
-	u_int32_t	*frame, *lastframe;
+	uint32_t	*frame, *lastframe;
 	int	scp_offset;
 	int	depth = 0;
 	pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller;
@@ -78,16 +78,16 @@ dtrace_getpcstack(pc_t *pcstack, int pcs
 
 	aframes++;
 
-	frame = (u_int32_t *)__builtin_frame_address(0);;
+	frame = (uint32_t *)__builtin_frame_address(0);;
 	lastframe = NULL;
 	scp_offset = -(get_pc_str_offset()  2);
 
 	while ((frame != NULL)  (depth  pcstack_limit)) {
 		db_addr_t	scp;
 #if 0 
-		u_int32_t	savecode;
+		uint32_t	savecode;
 		int		r;
-		u_int32_t	*rp;
+		uint32_t	*rp;
 #endif
 
 		/*
@@ -109,7 +109,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs
 		}
 
 #if 0
-		savecode = ((u_int32_t *)scp)[scp_offset];
+		savecode = ((uint32_t *)scp)[scp_offset];
 		if ((savecode  0x0e10) == 0x0800) {
 			/* Looks like an STM */
 			rp = frame - 4;
@@ -128,7 +128,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs
 			break; /* Top of stack */
 
 		lastframe = frame;
-		frame = (u_int32_t *)(frame[FR_RFP]);
+		frame = (uint32_t *)(frame[FR_RFP]);
 
 		if (INKERNEL((int)frame)) {
 			/* staying in kernel */
@@ -177,20 +177,20 @@ dtrace_getarg(int arg, int aframes)
 int
 dtrace_getstackdepth(int aframes)
 {
-	u_int32_t	*frame, *lastframe;
+	uint32_t	*frame, *lastframe;
 	int	scp_offset;
 	int	depth = 1;
 
-	frame = (u_int32_t *)__builtin_frame_address(0);;
+	frame = (uint32_t *)__builtin_frame_address(0);;
 	lastframe = NULL;
 	scp_offset = -(get_pc_str_offset()  2);
 
 	while (frame != NULL) {
 		db_addr_t	scp;
 #if 0 
-		u_int32_t	savecode;
+		uint32_t	savecode;
 		int		r;
-		u_int32_t	*rp;
+		uint32_t	*rp;
 #endif
 
 		/*
@@ -208,7 +208,7 @@ dtrace_getstackdepth(int aframes)
 			break; /* Top of stack */
 
 		lastframe = frame;
-		frame = (u_int32_t *)(frame[FR_RFP]);
+		frame = (uint32_t *)(frame[FR_RFP]);
 
 		if (INKERNEL((int)frame)) {
 			/* staying in kernel */



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 02:10:39 UTC 2014

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

Log Message:
Only do UVMHIST_LOG is maphist have its entry buffer initialized


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/arm/arm32/fault.c

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

Modified files:

Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.96 src/sys/arch/arm/arm32/fault.c:1.97
--- src/sys/arch/arm/arm32/fault.c:1.96	Wed Feb 26 07:48:29 2014
+++ src/sys/arch/arm/arm32/fault.c	Wed Mar  5 02:10:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.96 2014/02/26 07:48:29 skrll Exp $	*/
+/*	$NetBSD: fault.c,v 1.97 2014/03/05 02:10:39 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include opt_kgdb.h
 
 #include sys/types.h
-__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.96 2014/02/26 07:48:29 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.97 2014/03/05 02:10:39 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -242,7 +242,12 @@ data_abort_handler(trapframe_t *tf)
 	int error;
 	ksiginfo_t ksi;
 
-	UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist);
+	UVMHIST_FUNC(__func__);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_CALLED(maphist);
+	}
+#endif
 
 	/* Grab FAR/FSR before enabling interrupts */
 	far = cpu_faultaddress();
@@ -258,10 +263,14 @@ data_abort_handler(trapframe_t *tf)
 
 	/* Get the current lwp structure */
 
-	UVMHIST_LOG(maphist,  (l=%#x, far=%#x, fsr=%#x,
-	l, far, fsr, 0);
-	UVMHIST_LOG(maphist,   tf=%#x, pc=%#x),
-	tf, tf-tf_pc, 0, 0);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_LOG(maphist,  (l=%#x, far=%#x, fsr=%#x,
+		l, far, fsr, 0);
+		UVMHIST_LOG(maphist,   tf=%#x, pc=%#x),
+		tf, tf-tf_pc, 0, 0);
+	}
+#endif
 
 	/* Data abort came from user mode? */
 	bool user = (TRAP_USERMODE(tf) != 0);
@@ -461,7 +470,11 @@ data_abort_handler(trapframe_t *tf)
 	last_fault_code = fsr;
 #endif
 	if (pmap_fault_fixup(map-pmap, va, ftype, user)) {
-		UVMHIST_LOG(maphist,  - ref/mod emul, 0, 0, 0, 0);
+#ifdef UVMHIST
+		if (__predict_true(maphist.e)) {
+			UVMHIST_LOG(maphist,  - ref/mod emul, 0, 0, 0, 0);
+		}
+#endif
 		goto out;
 	}
 
@@ -485,7 +498,11 @@ data_abort_handler(trapframe_t *tf)
 			uvm_grow(l-l_proc, va); /* Record any stack growth */
 		else
 			ucas_ras_check(tf);
-		UVMHIST_LOG(maphist,  - uvm, 0, 0, 0, 0);
+#ifdef UVMHIST
+		if (__predict_true(maphist.e)) {
+			UVMHIST_LOG(maphist,  - uvm, 0, 0, 0, 0);
+		}
+#endif
 		goto out;
 	}
 
@@ -514,7 +531,11 @@ data_abort_handler(trapframe_t *tf)
 	ksi.ksi_code = (error == EACCES) ? SEGV_ACCERR : SEGV_MAPERR;
 	ksi.ksi_addr = (uint32_t *)(intptr_t) far;
 	ksi.ksi_trap = fsr;
-	UVMHIST_LOG(maphist,  - error (%d), error, 0, 0, 0);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_LOG(maphist,  - error (%d), error, 0, 0, 0);
+	}
+#endif
 
 do_trapsignal:
 	call_trapsignal(l, tf, ksi);
@@ -782,7 +803,12 @@ prefetch_abort_handler(trapframe_t *tf)
 	ksiginfo_t ksi;
 	int error, user;
 
-	UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist);
+	UVMHIST_FUNC(__func__);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_CALLED(maphist);
+	}
+#endif
 
 	/* Update vmmeter statistics */
 	curcpu()-ci_data.cpu_ntrap++;
@@ -826,8 +852,12 @@ prefetch_abort_handler(trapframe_t *tf)
 	/* Get fault address */
 	fault_pc = tf-tf_pc;
 	lwp_settrapframe(l, tf);
-	UVMHIST_LOG(maphist,  (pc=0x%x, l=0x%x, tf=0x%x), fault_pc, l, tf,
-	0);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_LOG(maphist,  (pc=0x%x, l=0x%x, tf=0x%x),
+		fault_pc, l, tf, 0);
+	}
+#endif
 
 	/* Ok validate the address, can only execute in USER space */
 	if (__predict_false(fault_pc = VM_MAXUSER_ADDRESS ||
@@ -850,7 +880,11 @@ prefetch_abort_handler(trapframe_t *tf)
 	last_fault_code = -1;
 #endif
 	if (pmap_fault_fixup(map-pmap, va, VM_PROT_READ|VM_PROT_EXECUTE, 1)) {
-		UVMHIST_LOG (maphist,  - emulated, 0, 0, 0, 0);
+#ifdef UVMHIST
+		if (__predict_true(maphist.e)) {
+			UVMHIST_LOG (maphist,  - emulated, 0, 0, 0, 0);
+		}
+#endif
 		goto out;
 	}
 
@@ -865,12 +899,20 @@ prefetch_abort_handler(trapframe_t *tf)
 	error = uvm_fault(map, va, VM_PROT_READ);
 
 	if (__predict_true(error == 0)) {
-		UVMHIST_LOG (maphist,  - uvm, 0, 0, 0, 0);
+#ifdef UVMHIST
+		if (__predict_true(maphist.e)) {
+			UVMHIST_LOG (maphist,  - uvm, 0, 0, 0, 0);
+		}
+#endif
 		goto out;
 	}
 	KSI_INIT_TRAP(ksi);
 
-	UVMHIST_LOG (maphist,  - fatal (%d), error, 0, 0, 0);
+#ifdef UVMHIST
+	if (__predict_true(maphist.e)) {
+		UVMHIST_LOG (maphist,  - fatal (%d), error, 0, 0, 0);
+	}
+#endif
 	if (error == ENOMEM) {
 		printf(UVM: pid %d (%s), uid %d killed: 
 		out of swap\n, l-l_proc-p_pid, l-l_proc-p_comm,



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 02:12:24 UTC 2014

Modified Files:
src/sys/arch/arm/arm32: exception.S

Log Message:
push/pop unsaved registers before using printf.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/arm32/exception.S

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

Modified files:

Index: src/sys/arch/arm/arm32/exception.S
diff -u src/sys/arch/arm/arm32/exception.S:1.20 src/sys/arch/arm/arm32/exception.S:1.21
--- src/sys/arch/arm/arm32/exception.S:1.20	Mon Dec  2 18:36:10 2013
+++ src/sys/arch/arm/arm32/exception.S	Wed Mar  5 02:12:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.S,v 1.20 2013/12/02 18:36:10 joerg Exp $	*/
+/*	$NetBSD: exception.S,v 1.21 2014/03/05 02:12:24 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -51,7 +51,7 @@
 
 #include arm/locore.h
 
-	RCSID($NetBSD: exception.S,v 1.20 2013/12/02 18:36:10 joerg Exp $)
+	RCSID($NetBSD: exception.S,v 1.21 2014/03/05 02:12:24 matt Exp $)
 
 	.text	
 	.align	0
@@ -178,11 +178,13 @@ ASEND(data_abort_entry)
  *	it like a Data Abort.
  */
 ASENTRY_NP(address_exception_entry)
+	push	{r0-r3,ip,lr}
 	mrs	r1, cpsr
 	mrs	r2, spsr
 	mov	r3, lr
 	adr	r0, .Laddress_exception_msg
 	bl	_C_LABEL(printf)	/* XXX CLOBBERS LR!! */
+	pop	{r0-r3,ip,lr}
 	b	_ASM_LABEL(data_abort_entry)
 .Laddress_exception_msg:
 	.asciz	Address Exception CPSR=0x%08x SPSR=0x%08x LR=0x%08x\n



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 02:17:22 UTC 2014

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

Log Message:
rearrange some printfs.
when using the extended mmu, make sure to disable ttbr0 until there is an
activated pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/arm32/arm32_kvminit.c

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

Modified files:

Index: src/sys/arch/arm/arm32/arm32_kvminit.c
diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.23 src/sys/arch/arm/arm32/arm32_kvminit.c:1.24
--- src/sys/arch/arm/arm32/arm32_kvminit.c:1.23	Mon Mar  3 14:03:14 2014
+++ src/sys/arch/arm/arm32/arm32_kvminit.c	Wed Mar  5 02:17:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_kvminit.c,v 1.23 2014/03/03 14:03:14 matt Exp $	*/
+/*	$NetBSD: arm32_kvminit.c,v 1.24 2014/03/05 02:17:21 matt Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.23 2014/03/03 14:03:14 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: arm32_kvminit.c,v 1.24 2014/03/05 02:17:21 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -134,6 +134,7 @@ __KERNEL_RCSID(0, $NetBSD: arm32_kvmini
 
 #include uvm/uvm_extern.h
 
+#include arm/locore.h
 #include arm/db_machdep.h
 #include arm/undefined.h
 #include arm/bootconfig.h
@@ -931,7 +932,12 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b
 	 * TTBCR should have been initialized by the MD start code.
 	 */
 	KASSERT(armreg_ttbcr_read() == __SHIFTIN(1, TTBCR_S_N));
+	/*
+	 * Disable lookups via TTBR0 until there is an activated pmap.
+	 */
+	armreg_ttbcr_write(armreg_ttbcr_read() | TTBCR_S_PD0);
 	cpu_setttb(l1pt_pa, KERNEL_PID);
+	arm_isb();
 #else
 	cpu_setttb(l1pt_pa, true);
 	cpu_domains(DOMAIN_CLIENT  (PMAP_DOMAIN_KERNEL*2));
@@ -940,12 +946,11 @@ arm32_kernel_vm_init(vaddr_t kernel_vm_b
 
 #ifdef VERBOSE_INIT_ARM
 #ifdef ARM_MMU_EXTENDED
-	printf(TTBCR=%#x TTBR0=%#x TTBR1=%#x OK\n,
-	armreg_ttbcr_read(),
-	armreg_ttbr_read(),
-	armreg_ttbr1_read());
+	printf( (TTBCR=%#x TTBR0=%#x TTBR1=%#x),
+	armreg_ttbcr_read(), armreg_ttbr_read(), armreg_ttbr1_read());
 #else
-	printf(TTBR0=%#x OK\n, armreg_ttbr_read());
+	printf( (TTBR0=%#x), armreg_ttbr_read());
 #endif
+	printf( OK\n);
 #endif
 }



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 02:18:30 UTC 2014

Modified Files:
src/sys/arch/arm/arm: undefined.c

Log Message:
frame - tf
printf out the insn, faulting pc, lr, sp when we get an undefined insn
int the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/arm/undefined.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/arm/undefined.c
diff -u src/sys/arch/arm/arm/undefined.c:1.51 src/sys/arch/arm/arm/undefined.c:1.52
--- src/sys/arch/arm/arm/undefined.c:1.51	Wed Jan 29 18:45:21 2014
+++ src/sys/arch/arm/arm/undefined.c	Wed Mar  5 02:18:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: undefined.c,v 1.51 2014/01/29 18:45:21 matt Exp $	*/
+/*	$NetBSD: undefined.c,v 1.52 2014/03/05 02:18:30 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -54,7 +54,7 @@
 #include sys/kgdb.h
 #endif
 
-__KERNEL_RCSID(0, $NetBSD: undefined.c,v 1.51 2014/01/29 18:45:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: undefined.c,v 1.52 2014/03/05 02:18:30 matt Exp $);
 
 #include sys/kmem.h
 #include sys/queue.h
@@ -128,12 +128,12 @@ static struct evcnt cp15_ev =
 EVCNT_ATTACH_STATIC(cp15_ev);
 
 static int
-cp15_trapper(u_int addr, u_int insn, struct trapframe *frame, int code)
+cp15_trapper(u_int addr, u_int insn, struct trapframe *tf, int code)
 {
 	struct lwp * const l = curlwp;
 
 #if defined(THUMB_CODE)  !defined(CPU_ARMV7)
-	if (frame-tf_spsr  PSR_T_bit)
+	if (tf-tf_spsr  PSR_T_bit)
 		return 1;
 #endif
 	if (code != FAULT_USER)
@@ -149,14 +149,14 @@ cp15_trapper(u_int addr, u_int insn, str
 	/*
 	 * Get a pointer to the register used in the instruction to be emulated.
 	 */
-	register_t * const regp = frame-tf_r0 + regno;
+	register_t * const regp = tf-tf_r0 + regno;
 
 	/*
 	 * Handle MRC p15, 0, Rd, c13, c0, 3 (Read User read-only thread id)
 	 */
 	if ((insn  0x0fff) == 0xee1d0f70) {
 		*regp = (uintptr_t)l-l_private;
-		frame-tf_pc += INSN_SIZE;
+		tf-tf_pc += INSN_SIZE;
 		cp15_ev.ev_count++;
 		return 0;
 	}
@@ -170,7 +170,7 @@ cp15_trapper(u_int addr, u_int insn, str
 			*regp = pcb-pcb_user_pid_rw;
 		else
 			pcb-pcb_user_pid_rw = *regp;
-		frame-tf_pc += INSN_SIZE;
+		tf-tf_pc += INSN_SIZE;
 		cp15_ev.ev_count++;
 		return 0;
 	}
@@ -179,12 +179,12 @@ cp15_trapper(u_int addr, u_int insn, str
 }
 
 static int
-gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code)
+gdb_trapper(u_int addr, u_int insn, struct trapframe *tf, int code)
 {
 	struct lwp * const l = curlwp;
 
 #ifdef THUMB_CODE
-	if (frame-tf_spsr  PSR_T_bit) {
+	if (tf-tf_spsr  PSR_T_bit) {
 		if (insn == GDB_THUMB_BREAKPOINT)
 			goto bkpt;
 	}
@@ -207,7 +207,7 @@ gdb_trapper(u_int addr, u_int insn, stru
 return 0;
 			}
 #ifdef KGDB
-			return !kgdb_trap(T_BREAKPOINT, frame);
+			return !kgdb_trap(T_BREAKPOINT, tf);
 #endif
 		}
 	}
@@ -247,10 +247,10 @@ static struct evcnt und_ev =
 EVCNT_ATTACH_STATIC(und_ev);
 
 void
-undefinedinstruction(trapframe_t *frame)
+undefinedinstruction(trapframe_t *tf)
 {
 	struct lwp *l;
-	u_int fault_pc;
+	vaddr_t fault_pc;
 	int fault_instruction;
 	int fault_code;
 	int coprocessor;
@@ -264,36 +264,36 @@ undefinedinstruction(trapframe_t *frame)
 
 	/* Enable interrupts if they were enabled before the exception. */
 #ifdef acorn26
-	if ((frame-tf_r15  R15_IRQ_DISABLE) == 0)
+	if ((tf-tf_r15  R15_IRQ_DISABLE) == 0)
 		int_on();
 #else
-	restore_interrupts(frame-tf_spsr  IF32_bits);
+	restore_interrupts(tf-tf_spsr  IF32_bits);
 #endif
 
 #ifndef acorn26
 #ifdef THUMB_CODE
-	if (frame-tf_spsr  PSR_T_bit)
-		frame-tf_pc -= THUMB_INSN_SIZE;
+	if (tf-tf_spsr  PSR_T_bit)
+		tf-tf_pc -= THUMB_INSN_SIZE;
 	else
 #endif
 	{
-		frame-tf_pc -= INSN_SIZE;
+		tf-tf_pc -= INSN_SIZE;
 	}
 #endif
 
 #ifdef __PROG26
-	fault_pc = frame-tf_r15  R15_PC;
+	fault_pc = tf-tf_r15  R15_PC;
 #else
-	fault_pc = frame-tf_pc;
+	fault_pc = tf-tf_pc;
 #endif
 
 	/* Get the current lwp/proc structure or lwp0/proc0 if there is none. */
 	l = curlwp;
 
 #ifdef __PROG26
-	if ((frame-tf_r15  R15_MODE) == R15_MODE_USR) {
+	if ((tf-tf_r15  R15_MODE) == R15_MODE_USR) {
 #else
-	if ((frame-tf_spsr  PSR_MODE) == PSR_USR32_MODE) {
+	if ((tf-tf_spsr  PSR_MODE) == PSR_USR32_MODE) {
 #endif
 		user = 1;
 		LWP_CACHE_CREDS(l, l-l_proc);
@@ -302,7 +302,7 @@ undefinedinstruction(trapframe_t *frame)
 
 
 #ifdef THUMB_CODE
-	if (frame-tf_spsr  PSR_T_bit) {
+	if (tf-tf_spsr  PSR_T_bit) {
 		fault_instruction = read_thumb_insn(fault_pc, user);
 		if (fault_instruction = 0xe000) {
 			fault_instruction = (fault_instruction  16)
@@ -342,7 +342,7 @@ undefinedinstruction(trapframe_t *frame)
 	curcpu()-ci_data.cpu_ntrap++;
 
 #ifdef THUMB_CODE
-	if ((frame-tf_spsr  PSR_T_bit)  !CPU_IS_ARMV7_P()) {
+	if ((tf-tf_spsr  PSR_T_bit)  !CPU_IS_ARMV7_P()) {
 		coprocessor = THUMB_UNKNOWN_HANDLER;
 	}
 	else
@@ -364,7 +364,7 @@ undefinedinstruction(trapframe_t *frame)
 		 

CVS commit: src/external/cddl/osnet/dev/dtrace/arm

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 03:09:17 UTC 2014

Modified Files:
src/external/cddl/osnet/dev/dtrace/arm: dtrace_asm.S

Log Message:
Fix dtrace_cas32 logic

- compare with cmp, not new
- return old value


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S
diff -u src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.2 src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.3
--- src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S:1.2	Tue Mar  4 11:07:40 2014
+++ src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S	Wed Mar  5 03:09:17 2014
@@ -89,12 +89,12 @@ ENTRY(dtrace_cas32)
 	msr	cpsr_c, r4
 
 	ldr	r5, [r0]
-	cmp	r5, r2
-	movne	r0, #0
+	cmp	r5, r1
+	movne	r0, r5
 	bne	2f
 
 	str	r2, [r0]
-	mov	r0, #1
+	mov	r0, r5
 
 2:
 	msr	cpsr_c, r3



CVS commit: src/sys/conf

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 03:16:43 UTC 2014

Modified Files:
src/sys/conf: files

Log Message:
Build net/zlib.c for DTrace

This is needed for building DTrace on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.1084 -r1.1085 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1084 src/sys/conf/files:1.1085
--- src/sys/conf/files:1.1084	Thu Feb 27 13:00:06 2014
+++ src/sys/conf/files	Wed Mar  5 03:16:43 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1084 2014/02/27 13:00:06 hannken Exp $
+#	$NetBSD: files,v 1.1085 2014/03/05 03:16:43 ozaki-r Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1707,7 +1707,7 @@ file	net/route.c
 file	net/rtbl.c
 file	net/rtsock.c
 file	net/slcompress.c		sl | ppp | strip | (irip  irip_vj)
-file	net/zlib.c			(ppp  ppp_deflate) | opencrypto | vnd_compression
+file	net/zlib.c			(ppp  ppp_deflate) | opencrypto | vnd_compression | kdtrace_hooks
 file	netinet/accf_data.c		accf_data
 file	netinet/accf_http.c		accf_http
 file	netinet/cpu_in_cksum.c		(inet | inet6)  !cpu_in_cksum



CVS commit: src/share/misc

2014-03-04 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Wed Mar  5 03:51:25 UTC 2014

Modified Files:
src/share/misc: acronyms

Log Message:
Add yet another TLA.


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.221 src/share/misc/acronyms:1.222
--- src/share/misc/acronyms:1.221	Sat Sep 28 17:58:53 2013
+++ src/share/misc/acronyms	Wed Mar  5 03:51:25 2014
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.221 2013/09/28 17:58:53 dholland Exp $
+$NetBSD: acronyms,v 1.222 2014/03/05 03:51:25 ginsbach Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -93,6 +93,7 @@ CNP	continued [in my] next post
 COB	close of business [day]
 COTS	commercial off-the-shelf
 CPC	cost per click
+CPE	customer premises equipment
 CTN	can't talk now
 CU	see you
 CUL	see you later



CVS commit: othersrc/external/bsd/multigest/dist

2014-03-04 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Mar  5 04:56:00 UTC 2014

Modified Files:
othersrc/external/bsd/multigest/dist: multigest.c multigest.h

Log Message:
multigest - minor cosmetic changes

bump version number to 20140304


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 othersrc/external/bsd/multigest/dist/multigest.c
cvs rdiff -u -r1.7 -r1.8 othersrc/external/bsd/multigest/dist/multigest.h

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

Modified files:

Index: othersrc/external/bsd/multigest/dist/multigest.c
diff -u othersrc/external/bsd/multigest/dist/multigest.c:1.8 othersrc/external/bsd/multigest/dist/multigest.c:1.9
--- othersrc/external/bsd/multigest/dist/multigest.c:1.8	Tue Mar  4 02:12:58 2014
+++ othersrc/external/bsd/multigest/dist/multigest.c	Wed Mar  5 04:56:00 2014
@@ -436,12 +436,17 @@ multigest_init(multigest_t *multigest, c
 		memset(multigest, 0x0, sizeof(*multigest));
 		multigest-type = strdup(algname);
 		for (i = 0, d = multigest-digs, ctxoff = 0 ;  *algname ; d++, i++) {
-			if (i = __arraycount(multigest-digs) ||
-			(alg = findalg(algname)) == NULL) {
+			if (i = __arraycount(multigest-digs)) {
+fprintf(stderr, too many digest types %u\n, i);
+break;
+			}
+			if ((alg = findalg(algname)) == NULL) {
+fprintf(stderr, no such algorithm '%.10s'\n, algname);
 break;
 			}
 			if (ctxoff + alg-ctxsize = multigest-ctxsize) {
 if ((newv = realloc(multigest-ctx, multigest-ctxsize + 4096)) == NULL) {
+	fprintf(stderr, multigest_init: allocation issues\n);
 	return 0;
 }
 multigest-ctx = newv;
@@ -463,6 +468,7 @@ multigest_init(multigest_t *multigest, c
 		}
 		return 1;
 	}
+	fprintf(stderr, !multigest || !algname\n);
 	return 0;
 }
 
@@ -599,6 +605,7 @@ multigest_algs_rawsize(const char *alg)
 
 	memset(m, 0x0, sizeof(m));
 	if (!multigest_init(m, alg)) {
+		fprintf(stderr, multigest_init: failed\n);
 		return 0;
 	}
 	size = multigest_get_rawsize(m);

Index: othersrc/external/bsd/multigest/dist/multigest.h
diff -u othersrc/external/bsd/multigest/dist/multigest.h:1.7 othersrc/external/bsd/multigest/dist/multigest.h:1.8
--- othersrc/external/bsd/multigest/dist/multigest.h:1.7	Tue Mar  4 02:12:58 2014
+++ othersrc/external/bsd/multigest/dist/multigest.h	Wed Mar  5 04:56:00 2014
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013 Alistair Crooks a...@netbsd.org
+ * Copyright (c) 2014 Alistair Crooks a...@netbsd.org
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef MULTIGEST_H_
-#define MULTIGEST_H_	20130813
+#define MULTIGEST_H_	20140304
 
 #include sys/types.h
 



CVS commit: othersrc/external/bsd/merkletree/dist

2014-03-04 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Mar  5 04:57:34 UTC 2014

Modified Files:
othersrc/external/bsd/merkletree/dist: Makefile.in
Added Files:
othersrc/external/bsd/merkletree/dist: Makefile.lib.in
Makefile.libtool.in

Log Message:
merkletree - minor changes for packaging infrastructure

no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
othersrc/external/bsd/merkletree/dist/Makefile.in
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/merkletree/dist/Makefile.lib.in \
othersrc/external/bsd/merkletree/dist/Makefile.libtool.in

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

Modified files:

Index: othersrc/external/bsd/merkletree/dist/Makefile.in
diff -u othersrc/external/bsd/merkletree/dist/Makefile.in:1.1.1.1 othersrc/external/bsd/merkletree/dist/Makefile.in:1.2
--- othersrc/external/bsd/merkletree/dist/Makefile.in:1.1.1.1	Tue Mar  4 08:38:06 2014
+++ othersrc/external/bsd/merkletree/dist/Makefile.in	Wed Mar  5 04:57:34 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.1.1.1 2014/03/04 08:38:06 agc Exp $
+# $NetBSD: Makefile.in,v 1.2 2014/03/05 04:57:34 agc Exp $
 
 PROG=merkletree
 
@@ -10,7 +10,7 @@ MANDIR=@MANDIR@
 all: ${PROG}
 
 ${PROG}: ${OBJS}
-	${CC} ${OBJS} -o ${PROG}
+	${CC} ${OBJS} -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -o ${PROG} -lmultigest
 
 install:
 	install -c -s ${PROG} ${DESTDIR}${PREFIX}/bin

Added files:

Index: othersrc/external/bsd/merkletree/dist/Makefile.lib.in
diff -u /dev/null othersrc/external/bsd/merkletree/dist/Makefile.lib.in:1.1
--- /dev/null	Wed Mar  5 04:57:34 2014
+++ othersrc/external/bsd/merkletree/dist/Makefile.lib.in	Wed Mar  5 04:57:34 2014
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile.lib.in,v 1.1 2014/03/05 04:57:34 agc Exp $
+
+LIB=	libmerkletree.a
+
+OBJS+= libmerkle.o
+
+PREFIX=@PREFIX@
+MANDIR=@MANDIR@
+
+all: ${LIB}
+
+${LIB}: ${OBJS}
+	ar crv ${LIB} ${OBJS}
+
+install:
+	${BSD_INSTALL_LIB} ${LIB} ${DESTDIR}${PREFIX}/lib
+	${BSD_INSTALL_DATA} merkletree.h ${DESTDIR}${PREFIX}/include
+	${BSD_INSTALL_DATA} libmerkletree.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
+
+clean:
+	rm -rf *.core ${OBJS} ${LIB}
+cleandist:
+	rm -rf *.core ${OBJS} ${LIB} Makefile
Index: othersrc/external/bsd/merkletree/dist/Makefile.libtool.in
diff -u /dev/null othersrc/external/bsd/merkletree/dist/Makefile.libtool.in:1.1
--- /dev/null	Wed Mar  5 04:57:34 2014
+++ othersrc/external/bsd/merkletree/dist/Makefile.libtool.in	Wed Mar  5 04:57:34 2014
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile.libtool.in,v 1.1 2014/03/05 04:57:34 agc Exp $
+
+LIB=	libmerkletree.a
+
+OBJS+= libmerkle.o
+
+PREFIX=@PREFIX@
+MANDIR=@MANDIR@
+
+all: ${LIB}
+
+${LIB}: ${OBJS}
+	${LIBTOOL} --mode=link --tag=CC cc -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:0
+
+.c.o:
+	${LIBTOOL} --mode=compile --tag=CC ${CC} ${CFLAGS} -c $
+
+install:
+	libtool --mode=install ${BSD_INSTALL_LIB} libmerkletree.la ${DESTDIR}${PREFIX}/lib
+	${BSD_INSTALL_DATA} merkletree.h ${DESTDIR}${PREFIX}/include
+	${BSD_INSTALL_DATA} libmerkletree.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
+
+clean:
+	rm -rf *.core ${OBJS} ${LIB}
+cleandist:
+	rm -rf *.core ${OBJS} ${LIB} Makefile



CVS commit: othersrc/external/bsd/transit

2014-03-04 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Wed Mar  5 04:58:51 UTC 2014

Modified Files:
othersrc/external/bsd/transit/bin: Makefile
othersrc/external/bsd/transit/dist: libtransit.3 transit.c transit.h
Added Files:
othersrc/external/bsd/transit/bin: 16.expected

Log Message:
Changes to transit-20140304

+ add 2 accessor functions for lists/dicts, one to get a field by its index,
  and the other for dicts to get the field value by name

+ bump version number to 20140304


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/transit/bin/16.expected
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/transit/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/dist/libtransit.3
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/transit/dist/transit.c \
othersrc/external/bsd/transit/dist/transit.h

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

Modified files:

Index: othersrc/external/bsd/transit/bin/Makefile
diff -u othersrc/external/bsd/transit/bin/Makefile:1.3 othersrc/external/bsd/transit/bin/Makefile:1.4
--- othersrc/external/bsd/transit/bin/Makefile:1.3	Tue Feb 25 08:54:43 2014
+++ othersrc/external/bsd/transit/bin/Makefile	Wed Mar  5 04:58:51 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2014/02/25 08:54:43 agc Exp $
+# $NetBSD: Makefile,v 1.4 2014/03/05 04:58:51 agc Exp $
 
 .include bsd.own.mk
 
@@ -93,3 +93,8 @@ t: ${PROG}
 	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d -j 15.enc  15.out
 	diff 15.expected 15.out
 	rm -f 15.enc 15.out
+	@echo 16. json structured data as output
+	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{array:{field1:1,field2:val2,field3:string value 3,field4:val4},array2:[1,2,3,4,5,6,7,8]}'  16.enc
+	env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d -j 16.enc  16.out
+	diff 16.expected 16.out
+	rm -f 16.enc 16.out

Index: othersrc/external/bsd/transit/dist/libtransit.3
diff -u othersrc/external/bsd/transit/dist/libtransit.3:1.1.1.1 othersrc/external/bsd/transit/dist/libtransit.3:1.2
--- othersrc/external/bsd/transit/dist/libtransit.3:1.1.1.1	Mon Feb 24 05:59:13 2014
+++ othersrc/external/bsd/transit/dist/libtransit.3	Wed Mar  5 04:58:51 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: libtransit.3,v 1.1.1.1 2014/02/24 05:59:13 agc Exp $
+.\ $NetBSD: libtransit.3,v 1.2 2014/03/05 04:58:51 agc Exp $
 .\
 .\ Copyright (c) 2014 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -23,7 +23,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 22, 2014
+.Dd March 4, 2014
 .Dt LIBTRANSIT 3
 .Os
 .Sh NAME
@@ -89,6 +89,16 @@ atoms, or fields of atoms.
 .Fo transit_size
 .Fa transit_t *transit
 .Fc
+.Pp
+Some dictionary and list access functions are also defined.
+.Ft int
+.Fo transit_field_by_index
+.Fa transit_t *transit uint32_t dictnum uint32_t fieldnum transit_atom_t *result
+.Fc
+.Ft int
+.Fo transit_field_by_name
+.Fa transit_t *transit uint32_t dictnum const char *fieldname transit_atom_t *result
+.Fc
 .Sh DESCRIPTION
 The
 .Nm

Index: othersrc/external/bsd/transit/dist/transit.c
diff -u othersrc/external/bsd/transit/dist/transit.c:1.3 othersrc/external/bsd/transit/dist/transit.c:1.4
--- othersrc/external/bsd/transit/dist/transit.c:1.3	Tue Feb 25 08:54:43 2014
+++ othersrc/external/bsd/transit/dist/transit.c	Wed Mar  5 04:58:51 2014
@@ -421,3 +421,45 @@ transit_size(transit_t *trans)
 {
 	return (trans) ? trans-c : 0;
 }
+
+/*/
+
+/* dictionary/list accessors */
+
+/* return the contents of the list/dict field, accessed by number */
+int
+transit_field_by_index(transit_t *t, uint32_t dict, uint32_t field, transit_atom_t *ret)
+{
+	transit_atom_t	*atom;
+	transit_atom_t	*el;
+	uint64_t	*indices;
+
+	atom = transit_atom(t, dict);
+	indices = transit_atom_ptr(atom);
+	el = transit_atom(t, indices[field]);
+	memcpy(ret, el, sizeof(*ret));
+	return 1;
+}
+
+/* return the contents of the dict value, accessed by name */
+int
+transit_field_by_name(transit_t *t, uint32_t dict, const char *name, transit_atom_t *ret)
+{
+	transit_atom_t	*atom;
+	transit_atom_t	*el;
+	uint64_t	*indices;
+	uint64_t	 i;
+
+	atom = transit_atom(t, dict);
+	indices = transit_atom_ptr(atom);
+	for (i = 2 ; i  transit_atom_size(atom) ; i += 2) {
+		el = transit_atom(t, indices[i]);
+		if (el-type == TRANSIT_STRING  memcmp(name, el-v, el-n) == 0) {
+			el = transit_atom(t, indices[i + 1]);
+			memcpy(ret, el, sizeof(*ret));
+			return 1;
+		}
+	}
+	return 0;
+}
+
Index: othersrc/external/bsd/transit/dist/transit.h
diff -u othersrc/external/bsd/transit/dist/transit.h:1.3 othersrc/external/bsd/transit/dist/transit.h:1.4
--- othersrc/external/bsd/transit/dist/transit.h:1.3	Tue Mar  4 02:14:15 2014
+++ othersrc/external/bsd/transit/dist/transit.h	Wed Mar  5 04:58:51 2014
@@ -23,7 +23,7

CVS commit: src/sys/sys

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 05:32:41 UTC 2014

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

Log Message:
Add KERNHIST_INITIALIZER(NAME,BUF) macro to be used with KERNHIST_DEFINE to
static initialize a kern_history.  After boot, it still needs to linked
to list of kern_history's and a KERNHIST_LINK_STATIC(NAME) macro was added
to do that.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/sys/kernhist.h

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

Modified files:

Index: src/sys/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.7 src/sys/sys/kernhist.h:1.8
--- src/sys/sys/kernhist.h:1.7	Tue Feb 19 22:54:03 2013
+++ src/sys/sys/kernhist.h	Wed Mar  5 05:32:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernhist.h,v 1.7 2013/02/19 22:54:03 skrll Exp $	*/
+/*	$NetBSD: kernhist.h,v 1.8 2014/03/05 05:32:41 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -122,6 +122,19 @@ do { \
 	LIST_INSERT_HEAD(kern_histories, (NAME), list); \
 } while (/*CONSTCOND*/ 0)
 
+#define KERNHIST_INITIALIZER(NAME,BUF) \
+{ \
+	.name = __STRING(NAME), \
+	.namelen = sizeof(__STRING(NAME)) - 1, \
+	.n = sizeof(BUF) / sizeof(struct kern_history_ent), \
+	.f = 0, \
+	.e = (struct kern_history_ent *) (BUF), \
+	/* BUF will inititalized to zeroes by being in .bss */ \
+}
+
+#define KERNHIST_LINK_STATIC(NAME) \
+	LIST_INSERT_HEAD(kern_histories, (NAME), list)
+
 #define KERNHIST_INIT_STATIC(NAME,BUF) \
 do { \
 	(NAME).name = __STRING(NAME); \
@@ -130,7 +143,7 @@ do { \
 	(NAME).f = 0; \
 	(NAME).e = (struct kern_history_ent *) (BUF); \
 	memset((NAME).e, 0, sizeof(struct kern_history_ent) * (NAME).n); \
-	LIST_INSERT_HEAD(kern_histories, (NAME), list); \
+	KERNHIST_LINK_STATIC(NAME); \
 } while (/*CONSTCOND*/ 0)
 
 #ifndef KERNHIST_DELAY



CVS commit: src/sys/uvm

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 05:35:55 UTC 2014

Modified Files:
src/sys/uvm: uvm_map.c uvm_stat.h

Log Message:
Use UVMHIST_INITIALIZER (KERNHIST_INITIALIZER) to statically initialize
maphist.  This allows maphist to used very very early in boot well before
uvm has been initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.327 -r1.328 src/sys/uvm/uvm_map.c
cvs rdiff -u -r1.51 -r1.52 src/sys/uvm/uvm_stat.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/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.327 src/sys/uvm/uvm_map.c:1.328
--- src/sys/uvm/uvm_map.c:1.327	Thu Nov 14 12:07:11 2013
+++ src/sys/uvm/uvm_map.c	Wed Mar  5 05:35:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.327 2013/11/14 12:07:11 martin Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.327 2013/11/14 12:07:11 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -101,7 +101,8 @@ __KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 
 #endif
 
 #ifdef UVMHIST
-UVMHIST_DEFINE(maphist);
+static struct kern_history_ent maphistbuf[100];
+UVMHIST_DEFINE(maphist) = UVMHIST_INITIALIZER(maphist, maphistbuf);
 #endif
 
 #if !defined(UVMMAP_COUNTERS)
@@ -875,7 +876,6 @@ void
 uvm_map_init(void)
 {
 #if defined(UVMHIST)
-	static struct kern_history_ent maphistbuf[100];
 	static struct kern_history_ent pdhistbuf[100];
 #endif
 
@@ -884,7 +884,7 @@ uvm_map_init(void)
 	 */
 
 	UVMHIST_FUNC(uvm_map_init);
-	UVMHIST_INIT_STATIC(maphist, maphistbuf);
+	UVMHIST_LINK_STATIC(maphist);
 	UVMHIST_INIT_STATIC(pdhist, pdhistbuf);
 	UVMHIST_CALLED(maphist);
 	UVMHIST_LOG(maphist,starting uvm map system, 0, 0, 0, 0);

Index: src/sys/uvm/uvm_stat.h
diff -u src/sys/uvm/uvm_stat.h:1.51 src/sys/uvm/uvm_stat.h:1.52
--- src/sys/uvm/uvm_stat.h:1.51	Mon Jul 30 23:56:48 2012
+++ src/sys/uvm/uvm_stat.h	Wed Mar  5 05:35:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_stat.h,v 1.51 2012/07/30 23:56:48 matt Exp $	*/
+/*	$NetBSD: uvm_stat.h,v 1.52 2014/03/05 05:35:55 matt Exp $	*/
 
 /*
  * Copyright (c) 2011 Matthew R. Green
@@ -55,6 +55,8 @@
 #define UVMHIST_DEFINE(NAME)		KERNHIST_DEFINE(NAME)
 #define UVMHIST_INIT(NAME,N)		KERNHIST_INIT(NAME,N)
 #define UVMHIST_INIT_STATIC(NAME,BUF)	KERNHIST_INIT_STATIC(NAME,BUF)
+#define UVMHIST_INITIALIZER(NAME,BUF)	KERNHIST_INITIALIZER(NAME,BUF)
+#define UVMHIST_LINK_STATIC(NAME)	KERNHIST_LINK_STATIC(NAME)
 #define UVMHIST_LOG(NAME,FMT,A,B,C,D)	KERNHIST_LOG(NAME,FMT,A,B,C,D)
 #define UVMHIST_CALLED(NAME)		KERNHIST_CALLED(NAME)
 #define UVMHIST_FUNC(FNAME)		KERNHIST_FUNC(FNAME)
@@ -65,6 +67,8 @@
 #define UVMHIST_DEFINE(NAME)
 #define UVMHIST_INIT(NAME,N)
 #define UVMHIST_INIT_STATIC(NAME,BUF)
+#define UVMHIST_INITIALIZER(NAME,BUF)
+#define UVMHIST_LINK_STATIC(NAME)
 #define UVMHIST_LOG(NAME,FMT,A,B,C,D)
 #define UVMHIST_CALLED(NAME)
 #define UVMHIST_FUNC(FNAME)



CVS commit: src/sys/dev/pci

2014-03-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar  5 05:56:04 UTC 2014

Modified Files:
src/sys/dev/pci: puccn.c puccn.h

Log Message:
No functional change:
 - Rename function for consistency.
 - Add prototypes.
 - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/puccn.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/puccn.h

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

Modified files:

Index: src/sys/dev/pci/puccn.c
diff -u src/sys/dev/pci/puccn.c:1.13 src/sys/dev/pci/puccn.c:1.14
--- src/sys/dev/pci/puccn.c:1.13	Sun Jan 26 10:54:24 2014
+++ src/sys/dev/pci/puccn.c	Wed Mar  5 05:56:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puccn.c,v 1.13 2014/01/26 10:54:24 msaitoh Exp $ */
+/*	$NetBSD: puccn.c,v 1.14 2014/03/05 05:56:04 msaitoh Exp $ */
 
 /*
  * Derived from  pci.c
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puccn.c,v 1.13 2014/01/26 10:54:24 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: puccn.c,v 1.14 2014/03/05 05:56:04 msaitoh Exp $);
 
 #include opt_kgdb.h
 
@@ -122,11 +122,13 @@ pucprobe_doit(struct consdev *cn)
 resume_scan:
 		for (; func  nfunctions; func++)  {
 			pa.pa_tag = pci_make_tag(pa.pa_pc, bus, dev, func);
-			reg = pci_conf_read(pa.pa_pc, pa.pa_tag, PCI_CLASS_REG);
+			reg = pci_conf_read(pa.pa_pc, pa.pa_tag,
+			PCI_CLASS_REG);
 			if (PCI_CLASS(reg)  == PCI_CLASS_COMMUNICATIONS
 			 PCI_SUBCLASS(reg)
 			   == PCI_SUBCLASS_COMMUNICATIONS_SERIAL) {
-pa.pa_id = pci_conf_read(pa.pa_pc, pa.pa_tag, PCI_ID_REG);
+pa.pa_id = pci_conf_read(pa.pa_pc, pa.pa_tag,
+PCI_ID_REG);
 subsys = pci_conf_read(pa.pa_pc, pa.pa_tag,
 PCI_SUBSYS_ID_REG);
 foundport = 1;
@@ -164,8 +166,7 @@ resume_scan:
 	 * We found a device and it's on the puc table. Set the tag and
 	 * the base address.
 	 */
-	for (i = 0; PUC_PORT_VALID(desc, i); i++)
-	{
+	for (i = 0; PUC_PORT_VALID(desc, i); i++) {
 		if (desc-ports[i].type != PUC_PORT_TYPE_COM)
 			continue;
 		puccnflags = desc-ports[i].flags;
@@ -204,18 +205,15 @@ resume_scan:
 }
 
 #ifdef KGDB
-void comgdbprobe(struct consdev *);
-void comgdbinit(struct consdev *);
-
 void
-comgdbprobe(struct consdev *cn)
+puc_gdbprobe(struct consdev *cn)
 {
 
 	pucgdbbase = pucprobe_doit(cn);
 }
 
 void
-comgdbinit(struct consdev *cn)
+puc_gdbinit(struct consdev *cn)
 {
 
 	if (pucgdbbase == 0)

Index: src/sys/dev/pci/puccn.h
diff -u src/sys/dev/pci/puccn.h:1.6 src/sys/dev/pci/puccn.h:1.7
--- src/sys/dev/pci/puccn.h:1.6	Sun Jan 26 10:54:24 2014
+++ src/sys/dev/pci/puccn.h	Wed Mar  5 05:56:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puccn.h,v 1.6 2014/01/26 10:54:24 msaitoh Exp $ */
+/*	$NetBSD: puccn.h,v 1.7 2014/03/05 05:56:04 msaitoh Exp $ */
 
 /*
  * Derived from  pci.c
@@ -48,3 +48,5 @@
 void puc_cnprobe(struct consdev *);
 int puc_cninit(struct consdev *);
 int cpu_puc_cnprobe(struct consdev *, struct pci_attach_args *);
+void puc_gdbprobe(struct consdev *);
+void puc_gdbinit(struct consdev *);



CVS commit: src/external/cddl/osnet/dev/dtrace

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 06:06:42 UTC 2014

Modified Files:
src/external/cddl/osnet/dev/dtrace: dtrace_debug.c

Log Message:
Use native atomic function instead of DTrace's own one

So we don't need to implement it for each architecture.

This change is from FreeBSD (not as-is though).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/dev/dtrace/dtrace_debug.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/dtrace_debug.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.7 src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.8
--- src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.7	Tue Mar  4 03:20:49 2014
+++ src/external/cddl/osnet/dev/dtrace/dtrace_debug.c	Wed Mar  5 06:06:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_debug.c,v 1.7 2014/03/04 03:20:49 ozaki-r Exp $	*/
+/*	$NetBSD: dtrace_debug.c,v 1.8 2014/03/05 06:06:42 ozaki-r Exp $	*/
 
 /*-
  * Copyright (C) 2008 John Birrell j...@freebsd.org.
@@ -36,62 +36,6 @@ static char const hex2ascii_data[] = 01
 
 #ifdef DEBUG
 
-#if defined(__amd64__)
-static __inline int
-dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src)
-{
-	u_char res;
-
-	__asm __volatile(
-		 lock ; 		
-		cmpxchgq %2,%1 ;	
-	   sete	%0 ;		
-	1:
-	# dtrace_cmpset_long
-	: =a (res),			/* 0 */
-	  =m (*dst)			/* 1 */
-	: r (src),			/* 2 */
-	  a (exp),			/* 3 */
-	  m (*dst)			/* 4 */
-	: memory);
-
-	return (res);
-}
-#elif defined(__i386__)
-static __inline int
-dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src)
-{
-	u_char res;
-
-	__asm __volatile(
-	lock ;	
-	   cmpxchgl %2,%1 ;
-	   sete%0 ;
-	1: 
-	# dtrace_cmpset_long
-	: =a (res),   /* 0 */
-	  =m (*dst)   /* 1 */
-	: r (src),/* 2 */
-	  a (exp),/* 3 */
-	  m (*dst)/* 4 */
-	: memory);
-
-	return (res);
-}
-#elif defined(__arm__)
-static __inline int
-dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src)
-{
-	u_char res;
-	if (*dst == src) {
-		res = *dst;
-		*dst = src;
-		return res;
-	}
-	return exp;
-}
-#endif
-
 #define DTRACE_DEBUG_BUFR_SIZE	(32 * 1024)
 
 struct dtrace_debug_data {
@@ -108,7 +52,8 @@ static volatile u_long	dtrace_debug_flag
 static void
 dtrace_debug_lock(int cpu)
 {
-	while (dtrace_cmpset_long(dtrace_debug_flag[cpu], 0, 1) == 0)
+	/* FIXME: use atomic_cmpset_ulong once we have it  */
+	while (atomic_cas_ulong(dtrace_debug_flag[cpu], 0, 1) == 0)
 		/* Loop until the lock is obtained. */
 		;
 }



CVS commit: src/external/cddl/osnet/dist/uts/common

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 06:12:00 UTC 2014

Modified Files:
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
src/external/cddl/osnet/dist/uts/common/sys: dtrace.h

Log Message:
Add defined(__arm__)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/dist/uts/common/sys/dtrace.h

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.23 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.24
--- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.23	Fri Jun 21 16:22:46 2013
+++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c	Wed Mar  5 06:12:00 2014
@@ -16603,7 +16603,7 @@ static int		dtrace_unload(void);
 #include dtrace_unload.c
 #include dtrace_vtime.c
 #include dtrace_hacks.c
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
 #include dtrace_isa.c
 #endif
 

Index: src/external/cddl/osnet/dist/uts/common/sys/dtrace.h
diff -u src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.8 src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.9
--- src/external/cddl/osnet/dist/uts/common/sys/dtrace.h:1.8	Sun Jul 17 20:54:33 2011
+++ src/external/cddl/osnet/dist/uts/common/sys/dtrace.h	Wed Mar  5 06:12:00 2014
@@ -2286,7 +2286,7 @@ extern void dtrace_safe_synchronous_sign
 
 extern int dtrace_mach_aframes(void);
 
-#if defined(__i386) || defined(__amd64)
+#if defined(__i386) || defined(__amd64) || defined(__arm__)
 extern int dtrace_instr_size(uchar_t *instr);
 extern int dtrace_instr_size_isa(uchar_t *, model_t, int *);
 extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t));



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

2014-03-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar  5 06:27:41 UTC 2014

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

Log Message:
Now that maphist is statically initialized, remove initialize tests


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/arm/arm32/fault.c

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

Modified files:

Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.97 src/sys/arch/arm/arm32/fault.c:1.98
--- src/sys/arch/arm/arm32/fault.c:1.97	Wed Mar  5 02:10:39 2014
+++ src/sys/arch/arm/arm32/fault.c	Wed Mar  5 06:27:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.97 2014/03/05 02:10:39 matt Exp $	*/
+/*	$NetBSD: fault.c,v 1.98 2014/03/05 06:27:41 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include opt_kgdb.h
 
 #include sys/types.h
-__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.97 2014/03/05 02:10:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.98 2014/03/05 06:27:41 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -243,11 +243,7 @@ data_abort_handler(trapframe_t *tf)
 	ksiginfo_t ksi;
 
 	UVMHIST_FUNC(__func__);
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_CALLED(maphist);
-	}
-#endif
+	UVMHIST_CALLED(maphist);
 
 	/* Grab FAR/FSR before enabling interrupts */
 	far = cpu_faultaddress();
@@ -263,14 +259,10 @@ data_abort_handler(trapframe_t *tf)
 
 	/* Get the current lwp structure */
 
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_LOG(maphist,  (l=%#x, far=%#x, fsr=%#x,
-		l, far, fsr, 0);
-		UVMHIST_LOG(maphist,   tf=%#x, pc=%#x),
-		tf, tf-tf_pc, 0, 0);
-	}
-#endif
+	UVMHIST_LOG(maphist,  (l=%#x, far=%#x, fsr=%#x,
+	l, far, fsr, 0);
+	UVMHIST_LOG(maphist,   tf=%#x, pc=%#x),
+	tf, tf-tf_pc, 0, 0);
 
 	/* Data abort came from user mode? */
 	bool user = (TRAP_USERMODE(tf) != 0);
@@ -470,11 +462,7 @@ data_abort_handler(trapframe_t *tf)
 	last_fault_code = fsr;
 #endif
 	if (pmap_fault_fixup(map-pmap, va, ftype, user)) {
-#ifdef UVMHIST
-		if (__predict_true(maphist.e)) {
-			UVMHIST_LOG(maphist,  - ref/mod emul, 0, 0, 0, 0);
-		}
-#endif
+		UVMHIST_LOG(maphist,  - ref/mod emul, 0, 0, 0, 0);
 		goto out;
 	}
 
@@ -498,11 +486,7 @@ data_abort_handler(trapframe_t *tf)
 			uvm_grow(l-l_proc, va); /* Record any stack growth */
 		else
 			ucas_ras_check(tf);
-#ifdef UVMHIST
-		if (__predict_true(maphist.e)) {
-			UVMHIST_LOG(maphist,  - uvm, 0, 0, 0, 0);
-		}
-#endif
+		UVMHIST_LOG(maphist,  - uvm, 0, 0, 0, 0);
 		goto out;
 	}
 
@@ -531,11 +515,7 @@ data_abort_handler(trapframe_t *tf)
 	ksi.ksi_code = (error == EACCES) ? SEGV_ACCERR : SEGV_MAPERR;
 	ksi.ksi_addr = (uint32_t *)(intptr_t) far;
 	ksi.ksi_trap = fsr;
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_LOG(maphist,  - error (%d), error, 0, 0, 0);
-	}
-#endif
+	UVMHIST_LOG(maphist,  - error (%d), error, 0, 0, 0);
 
 do_trapsignal:
 	call_trapsignal(l, tf, ksi);
@@ -804,11 +784,7 @@ prefetch_abort_handler(trapframe_t *tf)
 	int error, user;
 
 	UVMHIST_FUNC(__func__);
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_CALLED(maphist);
-	}
-#endif
+	UVMHIST_CALLED(maphist);
 
 	/* Update vmmeter statistics */
 	curcpu()-ci_data.cpu_ntrap++;
@@ -852,12 +828,8 @@ prefetch_abort_handler(trapframe_t *tf)
 	/* Get fault address */
 	fault_pc = tf-tf_pc;
 	lwp_settrapframe(l, tf);
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_LOG(maphist,  (pc=0x%x, l=0x%x, tf=0x%x),
-		fault_pc, l, tf, 0);
-	}
-#endif
+	UVMHIST_LOG(maphist,  (pc=0x%x, l=0x%x, tf=0x%x),
+	fault_pc, l, tf, 0);
 
 	/* Ok validate the address, can only execute in USER space */
 	if (__predict_false(fault_pc = VM_MAXUSER_ADDRESS ||
@@ -880,11 +852,7 @@ prefetch_abort_handler(trapframe_t *tf)
 	last_fault_code = -1;
 #endif
 	if (pmap_fault_fixup(map-pmap, va, VM_PROT_READ|VM_PROT_EXECUTE, 1)) {
-#ifdef UVMHIST
-		if (__predict_true(maphist.e)) {
-			UVMHIST_LOG (maphist,  - emulated, 0, 0, 0, 0);
-		}
-#endif
+		UVMHIST_LOG (maphist,  - emulated, 0, 0, 0, 0);
 		goto out;
 	}
 
@@ -899,20 +867,13 @@ prefetch_abort_handler(trapframe_t *tf)
 	error = uvm_fault(map, va, VM_PROT_READ);
 
 	if (__predict_true(error == 0)) {
-#ifdef UVMHIST
-		if (__predict_true(maphist.e)) {
-			UVMHIST_LOG (maphist,  - uvm, 0, 0, 0, 0);
-		}
-#endif
+		UVMHIST_LOG (maphist,  - uvm, 0, 0, 0, 0);
 		goto out;
 	}
 	KSI_INIT_TRAP(ksi);
 
-#ifdef UVMHIST
-	if (__predict_true(maphist.e)) {
-		UVMHIST_LOG (maphist,  - fatal (%d), error, 0, 0, 0);
-	}
-#endif
+	UVMHIST_LOG (maphist,  - fatal (%d), error, 0, 0, 0);
+
 	if (error == ENOMEM) {
 		printf(UVM: pid %d (%s), uid %d killed: 
 		out of swap\n, l-l_proc-p_pid, l-l_proc-p_comm,



CVS commit: src/external/cddl/osnet/dev/cyclic/arm

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 06:35:44 UTC 2014

Added Files:
src/external/cddl/osnet/dev/cyclic/arm: cyclic_machdep.c

Log Message:
Add cyclic_machdep.c for ARM

The code is still almost same as i386's one.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/cddl/osnet/dev/cyclic/arm/cyclic_machdep.c

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

Added files:

Index: src/external/cddl/osnet/dev/cyclic/arm/cyclic_machdep.c
diff -u /dev/null src/external/cddl/osnet/dev/cyclic/arm/cyclic_machdep.c:1.1
--- /dev/null	Wed Mar  5 06:35:44 2014
+++ src/external/cddl/osnet/dev/cyclic/arm/cyclic_machdep.c	Wed Mar  5 06:35:44 2014
@@ -0,0 +1,150 @@
+/*	$NetBSD: cyclic_machdep.c,v 1.1 2014/03/05 06:35:44 ozaki-r Exp $	*/
+
+/*
+ * Copyright 2006-2008 John Birrell j...@freebsd.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 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 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$
+ *
+ */
+
+#include arm/armreg.h
+
+static void enable(cyb_arg_t);
+static void disable(cyb_arg_t);
+static void reprogram(cyb_arg_t, hrtime_t);
+static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *);
+
+static cyc_backend_t	be	= {
+	NULL,		/* cyb_configure */
+	NULL,		/* cyb_unconfigure */
+	enable,
+	disable,
+	reprogram,
+	xcall,
+	NULL		/* cyb_arg_t cyb_arg */
+};
+
+static void
+cyclic_ap_start(void *dummy)
+{
+	/* Initialise the rest of the CPUs. */
+	cyclic_mp_init();
+}
+
+SYSINIT(cyclic_ap_start, SI_SUB_SMP, SI_ORDER_ANY, cyclic_ap_start, NULL);
+
+/*
+ *  Machine dependent cyclic subsystem initialisation.
+ */
+static void
+cyclic_machdep_init(void)
+{
+	/* Register the cyclic backend. */
+	cyclic_init(be);
+#ifdef __NetBSD__
+	cyclic_ap_start(NULL);
+#endif
+}
+
+static void
+cyclic_machdep_uninit(void)
+{
+	int i;
+
+	for (i = 0; i = mp_maxid; i++)
+		/* Reset the cyclic clock callback hook. */
+		cyclic_clock_func[i] = NULL;
+
+	/* De-register the cyclic backend. */
+	cyclic_uninit();
+}
+
+static hrtime_t exp_due[MAXCPU];
+
+/*
+ * This function is the one registered by the machine dependent
+ * initialiser as the callback for high speed timer events.
+ */
+static void
+cyclic_clock(struct clockframe *frame)
+{
+	cpu_t *c = solaris_cpu[cpu_number()];
+
+	if (c-cpu_cyclic != NULL  gethrtime() = exp_due[cpu_number()]) {
+		if (TRAPF_USERMODE(frame)) {
+			c-cpu_profile_pc = 0;
+			c-cpu_profile_upc = TRAPF_PC(frame);
+		} else {
+			c-cpu_profile_pc = TRAPF_PC(frame);
+			c-cpu_profile_upc = 0;
+		}
+
+		c-cpu_intr_actv = 1;
+
+		/* Fire any timers that are due. */
+		cyclic_fire(c);
+
+		c-cpu_intr_actv = 0;
+	}
+}
+
+static void enable(cyb_arg_t arg)
+{
+	/* Register the cyclic clock callback function. */
+	cyclic_clock_func[cpu_number()] = cyclic_clock;
+}
+
+static void disable(cyb_arg_t arg)
+{
+	/* Reset the cyclic clock callback function. */
+	cyclic_clock_func[cpu_number()] = NULL;
+}
+
+static void reprogram(cyb_arg_t arg, hrtime_t exp)
+{
+	exp_due[cpu_number()] = exp;
+}
+
+#ifdef __NetBSD__
+static void xcall_func(void *arg0, void *arg1)
+{
+	cyc_func_t func;
+
+	func = arg0;
+	(*func)(arg1);
+}
+#endif
+
+static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
+{
+#ifdef __NetBSD__
+	uint64_t xc;
+
+	xc = xc_unicast(XC_HIGHPRI, xcall_func, func, param, cpu_lookup(c-cpuid));
+	xc_wait(xc);
+#else
+	smp_rendezvous_cpus((cpumask_t) (1  c-cpuid),
+	smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param);
+#endif
+}



CVS commit: src/sys/modules

2014-03-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  5 06:40:45 UTC 2014

Modified Files:
src/sys/modules/cyclic: Makefile
src/sys/modules/dtrace/dtrace: Makefile

Log Message:
Tidy up Makefile of cyclic and dtrace modules to support ARM


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/cyclic/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/dtrace/Makefile

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

Modified files:

Index: src/sys/modules/cyclic/Makefile
diff -u src/sys/modules/cyclic/Makefile:1.2 src/sys/modules/cyclic/Makefile:1.3
--- src/sys/modules/cyclic/Makefile:1.2	Fri Dec 14 15:46:51 2012
+++ src/sys/modules/cyclic/Makefile	Wed Mar  5 06:40:45 2014
@@ -2,14 +2,26 @@
 
 .include ../Makefile.inc
 
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/cyclic
+.include bsd.own.mk
+
+OSNETDIR=${NETBSDSRCDIR}/external/cddl/osnet
+
+.if exists(${OSNETDIR}/dev/cyclic/${MACHINE:S/amd64/i386/})
+ARCH=${MACHINE:S/amd64/i386/}
+.elif exists(${OSNETDIR}/dev/cyclic/${MACHINE_CPU})
+ARCH=${MACHINE_CPU}
+.else
+.error ${MACHINE} or ${MACHINE_CPU} not supported.
+.endif
+
+.PATH: ${OSNETDIR}/dev/cyclic
 
 KMOD=		cyclic
 SRCS=		cyclic.c
 
-CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dev/cyclic/${MACHINE:S/amd64/i386/} \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
+CPPFLAGS+=	-I${OSNETDIR}/sys \
+		-I${OSNETDIR}/dev/cyclic/${ARCH} \
+		-I${OSNETDIR}/dist/uts/common
 
 CPPFLAGS+=	-Wno-unknown-pragmas -Wno-cast-qual
 

Index: src/sys/modules/dtrace/dtrace/Makefile
diff -u src/sys/modules/dtrace/dtrace/Makefile:1.3 src/sys/modules/dtrace/dtrace/Makefile:1.4
--- src/sys/modules/dtrace/dtrace/Makefile:1.3	Tue Dec 14 23:27:47 2010
+++ src/sys/modules/dtrace/dtrace/Makefile	Wed Mar  5 06:40:45 2014
@@ -3,11 +3,21 @@
 .include ../../Makefile.inc
 .include ../../Makefile.assym
 
-ARCHDIR=	${MACHINE}
+.include bsd.own.mk
 
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common/dtrace
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace
-.PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace/${ARCHDIR}
+OSNETDIR=${NETBSDSRCDIR}/external/cddl/osnet
+
+.if exists(${OSNETDIR}/dev/dtrace/${MACHINE})
+ARCH=${MACHINE}
+.elif exists(${OSNETDIR}/dev/dtrace/${MACHINE_CPU})
+ARCH=${MACHINE_CPU}
+.else
+.error ${MACHINE} or ${MACHINE_CPU} not supported.
+.endif
+
+.PATH: ${OSNETDIR}/dist/uts/common/dtrace
+.PATH: ${OSNETDIR}/dev/dtrace
+.PATH: ${OSNETDIR}/dev/dtrace/${ARCH}
 
 KMOD=		dtrace
 SRCS=		dtrace.c \
@@ -19,10 +29,10 @@ SRCS+=		dis_tables.c \
 		instr_size.c
 .endif
 
-CPPFLAGS+=	-I${NETBSDSRCDIR}/external/cddl/osnet/sys \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dev/dtrace/${ARCHDIR} \
-		-I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common \
+CPPFLAGS+=	-I${OSNETDIR}/sys \
+		-I${OSNETDIR}/dev/dtrace \
+		-I${OSNETDIR}/dev/dtrace/${ARCH} \
+		-I${OSNETDIR}/dist/uts/common \
 		-DDIS_MEM
 
 CPPFLAGS+=	-DSMP -DDEBUG