CVS commit: src/sys/arch

2016-08-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Aug 26 05:56:03 UTC 2016

Modified Files:
src/sys/arch/arm/include: param.h
src/sys/arch/i386/include: param.h

Log Message:
The 64MB was intended.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/param.h
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/i386/include/param.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/param.h
diff -u src/sys/arch/arm/include/param.h:1.19 src/sys/arch/arm/include/param.h:1.20
--- src/sys/arch/arm/include/param.h:1.19	Sat Oct 26 18:07:52 2013
+++ src/sys/arch/arm/include/param.h	Fri Aug 26 05:56:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.19 2013/10/26 18:07:52 matt Exp $	*/
+/*	$NetBSD: param.h,v 1.20 2016/08/26 05:56:03 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -180,7 +180,7 @@
 #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
 
 #ifndef NMBCLUSTERS_MAX
-#define	NMBCLUSTERS_MAX	(0x200 / MCLBYTES)	/* Limit to 64MB for clusters */
+#define	NMBCLUSTERS_MAX	(0x400 / MCLBYTES)	/* Limit to 64MB for clusters */
 #endif
 
 /*

Index: src/sys/arch/i386/include/param.h
diff -u src/sys/arch/i386/include/param.h:1.78 src/sys/arch/i386/include/param.h:1.79
--- src/sys/arch/i386/include/param.h:1.78	Tue Oct 27 22:28:56 2015
+++ src/sys/arch/i386/include/param.h	Fri Aug 26 05:56:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.78 2015/10/27 22:28:56 mrg Exp $	*/
+/*	$NetBSD: param.h,v 1.79 2016/08/26 05:56:03 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -121,7 +121,7 @@
 #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
 
 #ifndef NMBCLUSTERS_MAX
-#define	NMBCLUSTERS_MAX	(0x200 / MCLBYTES)	/* Limit to 64MB for clusters */
+#define	NMBCLUSTERS_MAX	(0x400 / MCLBYTES)	/* Limit to 64MB for clusters */
 #endif
 
 #ifndef NFS_RSIZE



CVS commit: src/tests/lib/libc

2016-08-25 Thread D'Arcy J.M. Cain
Module Name:src
Committed By:   darcy
Date:   Fri Aug 26 01:31:43 UTC 2016

Modified Files:
src/tests/lib/libc/net/getaddrinfo: Makefile
src/tests/lib/libc/regex: Makefile

Log Message:
Replace MKMAN with NOMAN as suggested by christos@.  Allows
userland to build when building man pages.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/net/getaddrinfo/Makefile
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/regex/Makefile

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

Modified files:

Index: src/tests/lib/libc/net/getaddrinfo/Makefile
diff -u src/tests/lib/libc/net/getaddrinfo/Makefile:1.1 src/tests/lib/libc/net/getaddrinfo/Makefile:1.2
--- src/tests/lib/libc/net/getaddrinfo/Makefile:1.1	Wed Jan 12 02:58:40 2011
+++ src/tests/lib/libc/net/getaddrinfo/Makefile	Fri Aug 26 01:31:43 2016
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2011/01/12 02:58:40 pgoyette Exp $
+# $NetBSD: Makefile,v 1.2 2016/08/26 01:31:43 darcy Exp $
 
-MKMAN=	no
+NOMAN=
 
 .include 
 

Index: src/tests/lib/libc/regex/Makefile
diff -u src/tests/lib/libc/regex/Makefile:1.9 src/tests/lib/libc/regex/Makefile:1.10
--- src/tests/lib/libc/regex/Makefile:1.9	Fri Aug 24 20:24:40 2012
+++ src/tests/lib/libc/regex/Makefile	Fri Aug 26 01:31:43 2016
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2012/08/24 20:24:40 jmmv Exp $
+# $NetBSD: Makefile,v 1.10 2016/08/26 01:31:43 darcy Exp $
 
-MKMAN=	no
+NOMAN=
 
 .include 
 



CVS commit: src/sys/dev/ic

2016-08-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Aug 25 20:14:02 UTC 2016

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

Log Message:
Fix scheduling of interrupt transfers.  I can now use a hub with my flxd
ISA USB adapter


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/ic/sl811hs.c

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

Modified files:

Index: src/sys/dev/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.93 src/sys/dev/ic/sl811hs.c:1.94
--- src/sys/dev/ic/sl811hs.c:1.93	Fri Jul  1 09:03:28 2016
+++ src/sys/dev/ic/sl811hs.c	Thu Aug 25 20:14:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.93 2016/07/01 09:03:28 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.94 2016/08/25 20:14:02 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.93 2016/07/01 09:03:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.94 2016/08/25 20:14:02 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_slhci.h"
@@ -920,6 +920,11 @@ slhci_start(struct usbd_xfer *xfer)
 		else
 			spipe->buffer = NULL;
 		spipe->lastframe = t->frame;
+		if (spipe->ptype == PT_INTR) {
+			spipe->frame = spipe->lastframe +
+			spipe->pipe.up_interval;
+		}
+
 #if defined(DEBUG) || defined(SLHCI_DEBUG)
 		if (__predict_false(spipe->ptype == PT_INTR &&
 		xfer->ux_length > spipe->tregs[LEN])) {



CVS commit: src/bin/chio

2016-08-25 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Aug 25 18:16:10 UTC 2016

Modified Files:
src/bin/chio: chio.1

Log Message:
Move the description of CHANGER variable to ENVIRONMENT section
Bump date.
>From OpenBSD src/bin/chio/chio.1 r1.23


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/bin/chio/chio.1

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

Modified files:

Index: src/bin/chio/chio.1
diff -u src/bin/chio/chio.1:1.18 src/bin/chio/chio.1:1.19
--- src/bin/chio/chio.1:1.18	Wed Aug 10 23:58:16 2016
+++ src/bin/chio/chio.1	Thu Aug 25 18:16:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: chio.1,v 1.18 2016/08/10 23:58:16 sevan Exp $
+.\"	$NetBSD: chio.1,v 1.19 2016/08/25 18:16:10 sevan Exp $
 .\"
 .\" Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 11, 2016
+.Dd August 25, 2016
 .Dt CHIO 1
 .Os
 .Sh NAME
@@ -58,10 +58,6 @@ rather than the default device
 .Pa /dev/ch0 .
 .El
 .Pp
-The default changer may be overridden by setting the environment variable
-.Ev CHANGER
-to the desired changer device.
-.Pp
 A medium changer apparatus is made up of
 .Pa elements .
 There are four element types:
@@ -225,6 +221,12 @@ Unloads the media from the CD-ROM drive 
 .It Nm abort
 Aborts any pending load or unload operation.
 .El
+.Sh ENVIRONMENT
+.Bl -tag -width CHANGER
+.It Ev CHANGER
+The default changer may be overridden by setting this environmental
+variable to the desired changer device.
+.El
 .Sh FILES
 /dev/ch0 - default changer device
 .Sh EXAMPLES



CVS commit: src/sys/arch/xen/x86

2016-08-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Aug 25 17:03:57 UTC 2016

Modified Files:
src/sys/arch/xen/x86: x86_xpmap.c

Log Message:
Revert to 1.59 (adding back the W^X kernel mapings), and move the data+bss
mapping late so that mappings that should be RO (such as page tables) won't
be made RW by accident.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/xen/x86/x86_xpmap.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/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.60 src/sys/arch/xen/x86/x86_xpmap.c:1.61
--- src/sys/arch/xen/x86/x86_xpmap.c:1.60	Tue Aug 23 11:03:52 2016
+++ src/sys/arch/xen/x86/x86_xpmap.c	Thu Aug 25 17:03:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_xpmap.c,v 1.60 2016/08/23 11:03:52 bouyer Exp $	*/
+/*	$NetBSD: x86_xpmap.c,v 1.61 2016/08/25 17:03:57 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2006 Mathieu Ropert 
@@ -69,7 +69,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.60 2016/08/23 11:03:52 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.61 2016/08/25 17:03:57 bouyer Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -730,15 +730,24 @@ xen_bootstrap_tables(vaddr_t old_pgd, va
 	pd_entry_t *pdtpe, *pde, *pte;
 	pd_entry_t *bt_pgd;
 	paddr_t addr;
-	vaddr_t page, avail, text_end, map_end;
+	vaddr_t page, avail, map_end;
 	int i;
+	extern char __rodata_start;
 	extern char __data_start;
+	extern char __kernel_end;
 	extern char *early_zerop; /* from pmap.c */
+	pt_entry_t pg_nx;
+	u_int descs[4];
 
 	__PRINTK(("xen_bootstrap_tables(%#" PRIxVADDR ", %#" PRIxVADDR ","
 	" %d, %d)\n",
 	old_pgd, new_pgd, old_count, new_count));
-	text_end = ((vaddr_t)&__data_start) & ~PAGE_MASK;
+
+	/*
+	 * Set the NX/XD bit, if available. descs[3] = %edx.
+	 */
+	x86_cpuid(0x8001, descs);
+	pg_nx = (descs[3] & CPUID_NOX) ? PG_NX : 0;
 
 	/*
 	 * size of R/W area after kernel text:
@@ -776,8 +785,7 @@ xen_bootstrap_tables(vaddr_t old_pgd, va
 	}
 #endif /* DOM0OPS */
 
-	__PRINTK(("xen_bootstrap_tables text_end 0x%lx map_end 0x%lx\n",
-	text_end, map_end));
+	__PRINTK(("xen_bootstrap_tables map_end 0x%lx\n", map_end));
 	__PRINTK(("console %#lx ", xen_start_info.console_mfn));
 	__PRINTK(("xenstore %#" PRIx32 "\n", xen_start_info.store_mfn));
 
@@ -905,20 +913,26 @@ xen_bootstrap_tables(vaddr_t old_pgd, va
 			page < (vaddr_t)atdevbase + IOM_SIZE) {
 pte[pl1_pi(page)] =
 IOM_BEGIN + (page - (vaddr_t)atdevbase);
+pte[pl1_pi(page)] |= pg_nx;
 			}
 #endif
+
 			pte[pl1_pi(page)] |= PG_k | PG_V;
-			if (page < text_end) {
-/* map kernel text RO */
+			if (page < (vaddr_t)&__rodata_start) {
+/* Map the kernel text RX. */
 pte[pl1_pi(page)] |= PG_RO;
+			} else if (page >= (vaddr_t)&__rodata_start &&
+			page < (vaddr_t)&__data_start) {
+/* Map the kernel rodata R. */
+pte[pl1_pi(page)] |= PG_RO | pg_nx;
 			} else if (page >= old_pgd &&
 			page < old_pgd + (old_count * PAGE_SIZE)) {
-/* map old page tables RO */
-pte[pl1_pi(page)] |= PG_RO;
+/* Map the old page tables R. */
+pte[pl1_pi(page)] |= PG_RO | pg_nx;
 			} else if (page >= new_pgd &&
 			page < new_pgd + ((new_count + l2_4_count) * PAGE_SIZE)) {
-/* map new page tables RO */
-pte[pl1_pi(page)] |= PG_RO;
+/* Map the new page tables R. */
+pte[pl1_pi(page)] |= PG_RO | pg_nx;
 #ifdef i386
 			} else if (page == (vaddr_t)tmpgdt) {
 /*
@@ -931,6 +945,10 @@ xen_bootstrap_tables(vaddr_t old_pgd, va
 page += PAGE_SIZE;
 continue;
 #endif /* i386 */
+			} else if (page >= (vaddr_t)&__data_start &&
+			page < (vaddr_t)&__kernel_end) {
+/* Map the kernel data+bss RW. */
+pte[pl1_pi(page)] |= PG_RW | pg_nx;
 			} else {
 /* map page RW */
 pte[pl1_pi(page)] |= PG_RW;
@@ -1011,15 +1029,19 @@ xen_bootstrap_tables(vaddr_t old_pgd, va
 	xpq_queue_pin_l2_table(xpmap_ptom_masked(addr));
 #endif
 #else /* PAE */
-	/* recursive entry in higher-level per-cpu PD and pmap_kernel() */
-	bt_pgd[PDIR_SLOT_PTE] = xpmap_ptom_masked((paddr_t)bt_pgd - KERNBASE) | PG_k | PG_V;
+
+	/* Recursive entry in pmap_kernel(). */
+	bt_pgd[PDIR_SLOT_PTE] = xpmap_ptom_masked((paddr_t)bt_pgd - KERNBASE)
+	| PG_k | PG_RO | PG_V | pg_nx;
 #ifdef __x86_64__
-	   bt_cpu_pgd[PDIR_SLOT_PTE] =
-		   xpmap_ptom_masked((paddr_t)bt_cpu_pgd - KERNBASE) | PG_k | PG_V;
-#endif /* __x86_64__ */
+	/* Recursive entry in higher-level per-cpu PD. */
+	bt_cpu_pgd[PDIR_SLOT_PTE] = xpmap_ptom_masked((paddr_t)bt_cpu_pgd - KERNBASE)
+	| PG_k | PG_RO | PG_V | pg_nx;
+#endif
 	__PRINTK(("bt_pgd[PDIR_SLOT_PTE] va %#" PRIxVADDR " pa %#" PRIxPADDR
 	" entry %#" PRIxPADDR "\n", new_pgd, (paddr_t)new_pgd - KERNBASE,
 	bt_pgd[PDIR_SLOT_PTE]));
+
 	/* Mark tables RO */
 	xen_bt_set_readonly((vaddr_t) pde);
 #endif
@@ -1029,6 +1051,7 @@ 

CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 13:17:09 UTC 2016

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb: defs.mk

Log Message:
XXX stop gap fix for atomicity.
U __gnu_cxx::__atomic_add(int volatile*, int)
U __gnu_cxx::__exchange_and_add(int volatile*, int)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk

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/sh3eb/defs.mk
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk:1.5 src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk:1.6
--- src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk:1.5	Tue Jun  7 14:53:11 2016
+++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk	Thu Aug 25 09:17:09 2016
@@ -10,7 +10,7 @@ G_SRC_SOURCES=compatibility.cc compatibi
 G_CPP11_SOURCES=chrono.cc c11-codecvt.cc condition_variable.cc cow-stdexcept.cc ctype.cc debug.cc functexcept.cc functional.cc futex.cc future.cc hash_c++0x.cc hashtable_c++0x.cc ios.cc limits.cc mutex.cc placeholders.cc random.cc regex.cc shared_ptr.cc snprintf_lite.cc system_error.cc thread.cc cow-locale_init.cc cow-shim_facets.cc cxx11-hash_tr1.cc cxx11-ios_failure.cc cxx11-shim_facets.cc cxx11-stdexcept.cc ctype_configure_char.cc ctype_members.cc  cow-fstream-inst.cc cow-sstream-inst.cc cow-string-inst.cc cow-wstring-inst.cc cxx11-locale-inst.cc cxx11-wlocale-inst.cc ext11-inst.cc fstream-inst.cc ios-inst.cc iostream-inst.cc istream-inst.cc locale-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc string-inst.cc wlocale-inst.cc wstring-inst.cc
 G_GLIBCXX_ABI_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
 G_CPP98_SOURCES=bitmap_allocator.cc pool_allocator.cc mt_allocator.cc c98-codecvt.cc complex_io.cc globals_io.cc hash_tr1.cc hashtable_tr1.cc ios_failure.cc ios_init.cc ios_locale.cc list.cc list-aux.cc list-aux-2.cc list_associated.cc list_associated-2.cc locale.cc locale_init.cc locale_facets.cc localename.cc math_stubs_float.cc math_stubs_long_double.cc stdexcept.cc strstream.cc tree.cc istream.cc istream-string.cc streambuf.cc valarray.cc cow-istream-string.cc collate_members_cow.cc messages_members_cow.cc monetary_members_cow.cc numeric_members_cow.cc atomicity.cc codecvt_members.cc collate_members.cc messages_members.cc monetary_members.cc numeric_members.cc time_members.cc basic_file.cc c++locale.cc allocator-inst.cc concept-inst.cc ext-inst.cc misc-inst.cc parallel_settings.cc
-G_ATOMICITY_SRCDIR=config/cpu/sh
+G_ATOMICITY_SRCDIR=config/cpu/generic/atomicity_mutex
 G_BASIC_FILE_CC=config/io/basic_file_stdio.cc
 G_CLOCALE_CC=config/locale/generic/c_locale.cc
 G_CCODECVT_CC=config/locale/generic/codecvt_members.cc



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:47:45 UTC 2016

Modified Files:
src/sys/arch/landisk/include: Makefile
Added Files:
src/sys/arch/landisk/include: fenv.h

Log Message:
more fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/landisk/include/fenv.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/landisk/include/Makefile
diff -u src/sys/arch/landisk/include/Makefile:1.4 src/sys/arch/landisk/include/Makefile:1.5
--- src/sys/arch/landisk/include/Makefile:1.4	Sun Jul 17 19:53:41 2011
+++ src/sys/arch/landisk/include/Makefile	Thu Aug 25 08:47:45 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/07/17 23:53:41 dyoung Exp $
+#	$NetBSD: Makefile,v 1.5 2016/08/25 12:47:45 christos Exp $
 
 INCSDIR= /usr/include/landisk
 
@@ -8,7 +8,7 @@ INCS=	ansi.h aout_machdep.h asm.h \
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	db_machdep.h disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	fenv.h float.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Added files:

Index: src/sys/arch/landisk/include/fenv.h
diff -u /dev/null src/sys/arch/landisk/include/fenv.h:1.1
--- /dev/null	Thu Aug 25 08:47:45 2016
+++ src/sys/arch/landisk/include/fenv.h	Thu Aug 25 08:47:45 2016
@@ -0,0 +1,3 @@
+/*	$NetBSD: fenv.h,v 1.1 2016/08/25 12:47:45 christos Exp $	*/
+
+#include 



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:47:12 UTC 2016

Modified Files:
src/sys/arch/evbsh3/include: Makefile
Added Files:
src/sys/arch/evbsh3/include: fenv.h

Log Message:
more fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbsh3/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbsh3/include/fenv.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/evbsh3/include/Makefile
diff -u src/sys/arch/evbsh3/include/Makefile:1.26 src/sys/arch/evbsh3/include/Makefile:1.27
--- src/sys/arch/evbsh3/include/Makefile:1.26	Tue Jul 19 11:44:52 2011
+++ src/sys/arch/evbsh3/include/Makefile	Thu Aug 25 08:47:12 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2011/07/19 15:44:52 dyoung Exp $
+#	$NetBSD: Makefile,v 1.27 2016/08/25 12:47:12 christos Exp $
 
 INCSDIR= /usr/include/evbsh3
 
@@ -7,7 +7,7 @@ INCS=	ansi.h aout_machdep.h asm.h \
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	fenv.h float.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Added files:

Index: src/sys/arch/evbsh3/include/fenv.h
diff -u /dev/null src/sys/arch/evbsh3/include/fenv.h:1.1
--- /dev/null	Thu Aug 25 08:47:12 2016
+++ src/sys/arch/evbsh3/include/fenv.h	Thu Aug 25 08:47:12 2016
@@ -0,0 +1,3 @@
+/*	$NetBSD: fenv.h,v 1.1 2016/08/25 12:47:12 christos Exp $	*/
+
+#include 



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:45:52 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: md.evbsh3 md.landisk

Log Message:
more fenv


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/comp/md.evbsh3
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/comp/md.landisk

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

Modified files:

Index: src/distrib/sets/lists/comp/md.evbsh3
diff -u src/distrib/sets/lists/comp/md.evbsh3:1.28 src/distrib/sets/lists/comp/md.evbsh3:1.29
--- src/distrib/sets/lists/comp/md.evbsh3:1.28	Tue Jul 19 11:44:52 2011
+++ src/distrib/sets/lists/comp/md.evbsh3	Thu Aug 25 08:45:52 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbsh3,v 1.28 2011/07/19 15:44:52 dyoung Exp $
+# $NetBSD: md.evbsh3,v 1.29 2016/08/25 12:45:52 christos Exp $
 ./usr/include/evbsh3comp-c-include
 ./usr/include/evbsh3/_G_config.h		comp-obsolete		obsolete
 ./usr/include/evbsh3/ansi.h			comp-c-include
@@ -18,6 +18,7 @@
 ./usr/include/evbsh3/elf_machdep.h		comp-c-include
 ./usr/include/evbsh3/endian.h			comp-c-include
 ./usr/include/evbsh3/endian_machdep.h		comp-c-include
+./usr/include/evbsh3/fenv.h			comp-c-include
 ./usr/include/evbsh3/float.h			comp-c-include
 ./usr/include/evbsh3/frame.h			comp-c-include
 ./usr/include/evbsh3/ieee.h			comp-c-include

Index: src/distrib/sets/lists/comp/md.landisk
diff -u src/distrib/sets/lists/comp/md.landisk:1.5 src/distrib/sets/lists/comp/md.landisk:1.6
--- src/distrib/sets/lists/comp/md.landisk:1.5	Sun Aug 11 18:29:02 2013
+++ src/distrib/sets/lists/comp/md.landisk	Thu Aug 25 08:45:52 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.landisk,v 1.5 2013/08/11 22:29:02 joerg Exp $
+# $NetBSD: md.landisk,v 1.6 2016/08/25 12:45:52 christos Exp $
 ./usr/include/ieeefp.hcomp-c-include
 ./usr/include/landiskcomp-c-include
 ./usr/include/landisk/ansi.h			comp-c-include
@@ -17,6 +17,7 @@
 ./usr/include/landisk/elf_machdep.h		comp-c-include
 ./usr/include/landisk/endian.h			comp-c-include
 ./usr/include/landisk/endian_machdep.h		comp-c-include
+./usr/include/landisk/fenv.h			comp-c-include
 ./usr/include/landisk/float.h			comp-c-include
 ./usr/include/landisk/frame.h			comp-c-include
 ./usr/include/landisk/ieee.h			comp-c-include



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:29:15 UTC 2016

Modified Files:
src/sys/arch/sh3/include: fenv.h ieeefp.h

Log Message:
fake some stuff for softfloat.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sh3/include/fenv.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/include/ieeefp.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/sh3/include/fenv.h
diff -u src/sys/arch/sh3/include/fenv.h:1.1 src/sys/arch/sh3/include/fenv.h:1.2
--- src/sys/arch/sh3/include/fenv.h:1.1	Thu Aug 25 08:14:10 2016
+++ src/sys/arch/sh3/include/fenv.h	Thu Aug 25 08:29:14 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.1 2016/08/25 12:14:10 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.2 2016/08/25 12:29:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -53,8 +53,9 @@
 /* Rounding modes, from FPSCR */
 #define FE_TONEAREST	FPSCR_ROUND_NEAREST
 #define	FE_TOWARDZERO	FPSCR_ROUND_ZERO
-/* 	FE_DOWNWARD	*/
-/*	FE_UPWARD	*/
+/* These two don't exist and are only defined for the benefit of softfloat */
+#define	FE_DOWNWARD	(FPSCR_ROUND_ZERO + 1)
+#define	FE_UPWARD	(FPSCR_ROUND_ZERO + 2)
 
 #define _ROUND_MASK	\
 (FE_TONEAREST | FE_TOWARDZERO)

Index: src/sys/arch/sh3/include/ieeefp.h
diff -u src/sys/arch/sh3/include/ieeefp.h:1.5 src/sys/arch/sh3/include/ieeefp.h:1.6
--- src/sys/arch/sh3/include/ieeefp.h:1.5	Thu Aug 25 08:19:42 2016
+++ src/sys/arch/sh3/include/ieeefp.h	Thu Aug 25 08:29:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.5 2016/08/25 12:19:42 christos Exp $ */
+/* $NetBSD: ieeefp.h,v 1.6 2016/08/25 12:29:14 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -16,6 +16,8 @@
 
 #if defined(_NETBSD_SOURCE)
 
+typedef int fp_except;
+
 #define	FP_X_INV	FE_INVALID	/* invalid operation exception */
 #define	FP_X_DZ		FE_DIVBYZERO	/* divide-by-zero exception */
 #define	FP_X_OFL	FE_OVERFLOW	/* overflow exception */
@@ -24,6 +26,8 @@
 
 typedef enum {
 	FP_RN=FE_TONEAREST,	/* round to nearest representable number */
+	FP_RM=FE_DOWNWARD,  /* round toward negative infinity */
+	FP_RP=FE_UPWARD,/* round toward positive infinity */
 	FP_RZ=FE_TOWARDZERO	/* round to zero (truncate) */
 } fp_rnd;
 



CVS commit: src/sys/arch/x86/pci

2016-08-25 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Aug 25 12:21:22 UTC 2016

Modified Files:
src/sys/arch/x86/pci: pci_machdep.c

Log Message:
more fix line break position in verbose message.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/x86/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.75 src/sys/arch/x86/pci/pci_machdep.c:1.76
--- src/sys/arch/x86/pci/pci_machdep.c:1.75	Thu Aug 25 11:06:50 2016
+++ src/sys/arch/x86/pci/pci_machdep.c	Thu Aug 25 12:21:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.75 2016/08/25 11:06:50 knakahara Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.76 2016/08/25 12:21:21 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.75 2016/08/25 11:06:50 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.76 2016/08/25 12:21:21 nonaka Exp $");
 
 #include 
 #include 
@@ -486,11 +486,15 @@ pci_attach_hook(device_t parent, device_
 	if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) {
 		pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
-		aprint_verbose_dev(self, "\nThis pci host supports neither MSI nor MSI-X.");
+		aprint_verbose("\n");
+		aprint_verbose_dev(self,
+		"This pci host supports neither MSI nor MSI-X.");
 	} else if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSIX)) {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
-		aprint_verbose_dev(self, "\nThis pci host does not support MSI-X.");
+		aprint_verbose("\n");
+		aprint_verbose_dev(self,
+		"This pci host does not support MSI-X.");
 	} else {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:19:42 UTC 2016

Modified Files:
src/sys/arch/sh3/include: ieeefp.h

Log Message:
use fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sh3/include/ieeefp.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/sh3/include/ieeefp.h
diff -u src/sys/arch/sh3/include/ieeefp.h:1.4 src/sys/arch/sh3/include/ieeefp.h:1.5
--- src/sys/arch/sh3/include/ieeefp.h:1.4	Tue Aug  5 12:47:42 2008
+++ src/sys/arch/sh3/include/ieeefp.h	Thu Aug 25 08:19:42 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.4 2008/08/05 16:47:42 matt Exp $ */
+/* $NetBSD: ieeefp.h,v 1.5 2016/08/25 12:19:42 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -12,28 +12,11 @@
 
 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
 
-typedef int fenv_t;
-typedef int fexcept_t;
-
-#define	FE_INVALID	0x01	/* invalid operation exception */
-#define	FE_DENORMAL	0x02	/* denormalization exception */
-#define	FE_DIVBYZERO	0x04	/* divide-by-zero exception */
-#define	FE_OVERFLOW	0x08	/* overflow exception */
-#define	FE_UNDERFLOW	0x10	/* underflow exception */
-#define	FE_INEXACT	0x20	/* imprecise (loss of precision) */
-
-#define	FE_ALL_EXCEPT	0x3f
-
-#define	FE_TONEAREST	0	/* round to nearest representable number */
-#define	FE_DOWNWARD	1	/* round toward negative infinity */
-#define	FE_UPWARD	2	/* round toward positive infinity */
-#define	FE_TOWARDZERO	3	/* round to zero (truncate) */
+#include 
 
 #if defined(_NETBSD_SOURCE)
 
-typedef int fp_except;
 #define	FP_X_INV	FE_INVALID	/* invalid operation exception */
-#define	FP_X_DNML	FE_DENORMAL	/* denormalization exception */
 #define	FP_X_DZ		FE_DIVBYZERO	/* divide-by-zero exception */
 #define	FP_X_OFL	FE_OVERFLOW	/* overflow exception */
 #define	FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
@@ -41,8 +24,6 @@ typedef int fp_except;
 
 typedef enum {
 	FP_RN=FE_TONEAREST,	/* round to nearest representable number */
-	FP_RM=FE_DOWNWARD,	/* round toward negative infinity */
-	FP_RP=FE_UPWARD,	/* round toward positive infinity */
 	FP_RZ=FE_TOWARDZERO	/* round to zero (truncate) */
 } fp_rnd;
 



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:17:26 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: ad.sh3 md.dreamcast md.hpcsh md.mmeye

Log Message:
add fenv for sh


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/sets/lists/comp/ad.sh3
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/comp/md.dreamcast
cvs rdiff -u -r1.27 -r1.28 src/distrib/sets/lists/comp/md.hpcsh
cvs rdiff -u -r1.31 -r1.32 src/distrib/sets/lists/comp/md.mmeye

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.sh3
diff -u src/distrib/sets/lists/comp/ad.sh3:1.32 src/distrib/sets/lists/comp/ad.sh3:1.33
--- src/distrib/sets/lists/comp/ad.sh3:1.32	Thu Mar 17 23:08:25 2016
+++ src/distrib/sets/lists/comp/ad.sh3	Thu Aug 25 08:17:26 2016
@@ -1,4 +1,4 @@
-# $NetBSD: ad.sh3,v 1.32 2016/03/18 03:08:25 mrg Exp $
+# $NetBSD: ad.sh3,v 1.33 2016/08/25 12:17:26 christos Exp $
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		obsolete
 ./usr/include/gcc-4.8/tgmath.h			comp-c-include		gcccmds,gcc=48
 ./usr/include/gcc-5/tgmath.h			comp-c-include		gcccmds,gcc=53
@@ -19,6 +19,8 @@
 ./usr/include/sh3/elf_machdep.h			comp-c-include
 ./usr/include/sh3/endian.h			comp-c-include
 ./usr/include/sh3/endian_machdep.h		comp-c-include
+./usr/include/sh3/fenv.h			comp-c-include
+./usr/include/sh3/fpreg.h			comp-c-include
 ./usr/include/sh3/float.h			comp-c-include
 ./usr/include/sh3/frame.h			comp-c-include
 ./usr/include/sh3/ieee.h			comp-c-include

Index: src/distrib/sets/lists/comp/md.dreamcast
diff -u src/distrib/sets/lists/comp/md.dreamcast:1.17 src/distrib/sets/lists/comp/md.dreamcast:1.18
--- src/distrib/sets/lists/comp/md.dreamcast:1.17	Tue Jul 19 11:52:29 2011
+++ src/distrib/sets/lists/comp/md.dreamcast	Thu Aug 25 08:17:26 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.dreamcast,v 1.17 2011/07/19 15:52:29 dyoung Exp $
+# $NetBSD: md.dreamcast,v 1.18 2016/08/25 12:17:26 christos Exp $
 ./usr/include/dreamcastcomp-c-include
 ./usr/include/dreamcast/_G_config.h		comp-obsolete		obsolete
 ./usr/include/dreamcast/ansi.h			comp-c-include
@@ -16,6 +16,7 @@
 ./usr/include/dreamcast/elf_machdep.h		comp-c-include
 ./usr/include/dreamcast/endian.h		comp-c-include
 ./usr/include/dreamcast/endian_machdep.h	comp-c-include
+./usr/include/dreamcast/fenv.h			comp-c-include
 ./usr/include/dreamcast/float.h			comp-c-include
 ./usr/include/dreamcast/frame.h			comp-c-include
 ./usr/include/dreamcast/ieee.h			comp-c-include

Index: src/distrib/sets/lists/comp/md.hpcsh
diff -u src/distrib/sets/lists/comp/md.hpcsh:1.27 src/distrib/sets/lists/comp/md.hpcsh:1.28
--- src/distrib/sets/lists/comp/md.hpcsh:1.27	Wed Jan 16 11:01:06 2013
+++ src/distrib/sets/lists/comp/md.hpcsh	Thu Aug 25 08:17:26 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.hpcsh,v 1.27 2013/01/16 16:01:06 christos Exp $
+# $NetBSD: md.hpcsh,v 1.28 2016/08/25 12:17:26 christos Exp $
 ./usr/include/hpcshcomp-c-include
 ./usr/include/hpcsh/_G_config.h			comp-obsolete		obsolete
 ./usr/include/hpcsh/ansi.h			comp-c-include
@@ -19,6 +19,7 @@
 ./usr/include/hpcsh/elf_machdep.h		comp-c-include
 ./usr/include/hpcsh/endian.h			comp-c-include
 ./usr/include/hpcsh/endian_machdep.h		comp-c-include
+./usr/include/hpcsh/fenv.h			comp-c-include
 ./usr/include/hpcsh/float.h			comp-c-include
 ./usr/include/hpcsh/frame.h			comp-c-include
 ./usr/include/hpcsh/ieee.h			comp-c-include

Index: src/distrib/sets/lists/comp/md.mmeye
diff -u src/distrib/sets/lists/comp/md.mmeye:1.31 src/distrib/sets/lists/comp/md.mmeye:1.32
--- src/distrib/sets/lists/comp/md.mmeye:1.31	Wed Jan 16 11:01:06 2013
+++ src/distrib/sets/lists/comp/md.mmeye	Thu Aug 25 08:17:26 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.mmeye,v 1.31 2013/01/16 16:01:06 christos Exp $
+# $NetBSD: md.mmeye,v 1.32 2016/08/25 12:17:26 christos Exp $
 ./usr/include/ieeefp.hcomp-c-include
 ./usr/include/mmeyecomp-c-include
 ./usr/include/mmeye/_G_config.h			comp-obsolete		obsolete
@@ -19,6 +19,7 @@
 ./usr/include/mmeye/elf_machdep.h		comp-c-include
 ./usr/include/mmeye/endian.h			comp-c-include
 ./usr/include/mmeye/endian_machdep.h		comp-c-include
+./usr/include/mmeye/fenv.h			comp-c-include
 ./usr/include/mmeye/float.h			comp-c-include
 ./usr/include/mmeye/frame.h			comp-c-include
 ./usr/include/mmeye/ieee.h			comp-c-include



CVS commit: src/lib/libm

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:15:28 UTC 2016

Modified Files:
src/lib/libm: Makefile
Added Files:
src/lib/libm/arch/sh3: fenv.c

Log Message:
more fenv for sh


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libm/arch/sh3/fenv.c

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.180 src/lib/libm/Makefile:1.181
--- src/lib/libm/Makefile:1.180	Wed Aug 24 06:03:32 2016
+++ src/lib/libm/Makefile	Thu Aug 25 08:15:28 2016
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.180 2016/08/24 10:03:32 christos Exp $
+#  $NetBSD: Makefile,v 1.181 2016/08/25 12:15:28 christos Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -179,6 +179,10 @@ COMMON_SRCS += fenv.c
 .PATH:	${.CURDIR}/arch/mips
 COPTS.e_sqrtl.c += -DHAVE_FENV_H
 COMMON_SRCS += fenv.c
+.elif (${LIBC_MACHINE_CPU} == "sh3")
+.PATH:	${.CURDIR}/arch/sh3
+COPTS.e_sqrtl.c += -DHAVE_FENV_H
+COMMON_SRCS += fenv.c
 .endif
 
 WARNS?=5

Added files:

Index: src/lib/libm/arch/sh3/fenv.c
diff -u /dev/null src/lib/libm/arch/sh3/fenv.c:1.1
--- /dev/null	Thu Aug 25 08:15:28 2016
+++ src/lib/libm/arch/sh3/fenv.c	Thu Aug 25 08:15:28 2016
@@ -0,0 +1,51 @@
+/*	$NetBSD: fenv.c,v 1.1 2016/08/25 12:15:28 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2015 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include 
+__RCSID("$NetBSD: fenv.c,v 1.1 2016/08/25 12:15:28 christos Exp $");
+
+#define	__fenv_static
+#include "fenv.h"
+
+#if defined(__GNUC_GNU_INLINE__) && !defined(__lint__)
+#error "This file must be compiled with C99 'inline' semantics"
+#endif
+
+extern inline int feclearexcept(int __excepts);
+extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts);
+extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
+extern inline int feraiseexcept(int __excepts);
+extern inline int fetestexcept(int __excepts);
+extern inline int fegetround(void);
+extern inline int fesetround(int __round);
+extern inline int fegetenv(fenv_t *__envp);
+extern inline int feholdexcept(fenv_t *__envp);
+extern inline int fesetenv(const fenv_t *__envp);
+extern inline int feupdateenv(const fenv_t *__envp);



CVS commit: src/sys/arch

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:14:10 UTC 2016

Modified Files:
src/sys/arch/dreamcast/include: Makefile
src/sys/arch/hpcsh/include: Makefile
src/sys/arch/mmeye/include: Makefile
src/sys/arch/sh3/include: Makefile
Added Files:
src/sys/arch/dreamcast/include: fenv.h
src/sys/arch/hpcsh/include: fenv.h
src/sys/arch/mmeye/include: fenv.h
src/sys/arch/sh3/include: fenv.h fpreg.h

Log Message:
fenv.h for sh


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/dreamcast/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/dreamcast/include/fenv.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcsh/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/hpcsh/include/fenv.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mmeye/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/mmeye/include/fenv.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sh3/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/sh3/include/fenv.h \
src/sys/arch/sh3/include/fpreg.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/dreamcast/include/Makefile
diff -u src/sys/arch/dreamcast/include/Makefile:1.18 src/sys/arch/dreamcast/include/Makefile:1.19
--- src/sys/arch/dreamcast/include/Makefile:1.18	Tue Jul 19 11:52:30 2011
+++ src/sys/arch/dreamcast/include/Makefile	Thu Aug 25 08:14:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2011/07/19 15:52:30 dyoung Exp $
+#	$NetBSD: Makefile,v 1.19 2016/08/25 12:14:10 christos Exp $
 
 INCSDIR= /usr/include/dreamcast
 
@@ -7,7 +7,7 @@ INCS=	ansi.h aout_machdep.h asm.h \
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	fenv.h float.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Index: src/sys/arch/hpcsh/include/Makefile
diff -u src/sys/arch/hpcsh/include/Makefile:1.19 src/sys/arch/hpcsh/include/Makefile:1.20
--- src/sys/arch/hpcsh/include/Makefile:1.19	Tue Jul 19 11:30:53 2011
+++ src/sys/arch/hpcsh/include/Makefile	Thu Aug 25 08:14:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2011/07/19 15:30:53 dyoung Exp $
+#	$NetBSD: Makefile,v 1.20 2016/08/25 12:14:10 christos Exp $
 
 INCSDIR= /usr/include/hpcsh
 
@@ -7,7 +7,7 @@ INCS=	ansi.h aout_machdep.h apmvar.h asm
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	fenv.h float.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Index: src/sys/arch/mmeye/include/Makefile
diff -u src/sys/arch/mmeye/include/Makefile:1.25 src/sys/arch/mmeye/include/Makefile:1.26
--- src/sys/arch/mmeye/include/Makefile:1.25	Tue Jul 19 11:17:20 2011
+++ src/sys/arch/mmeye/include/Makefile	Thu Aug 25 08:14:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.25 2011/07/19 15:17:20 dyoung Exp $
+#	$NetBSD: Makefile,v 1.26 2016/08/25 12:14:10 christos Exp $
 
 INCSDIR= /usr/include/mmeye
 
@@ -7,7 +7,7 @@ INCS=	ansi.h aout_machdep.h asm.h \
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	fenv.h float.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Index: src/sys/arch/sh3/include/Makefile
diff -u src/sys/arch/sh3/include/Makefile:1.26 src/sys/arch/sh3/include/Makefile:1.27
--- src/sys/arch/sh3/include/Makefile:1.26	Sun Jul 17 19:52:12 2011
+++ src/sys/arch/sh3/include/Makefile	Thu Aug 25 08:14:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2011/07/17 23:52:12 dyoung Exp $
+#	$NetBSD: Makefile,v 1.27 2016/08/25 12:14:10 christos Exp $
 
 INCSDIR= /usr/include/sh3
 
@@ -7,7 +7,7 @@ INCS=	ansi.h aout_machdep.h asm.h \
 	cdefs.h coff_machdep.h cpu.h cputypes.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
-	float.h frame.h \
+	float.h fenv.h fpreg.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Added files:

Index: src/sys/arch/dreamcast/include/fenv.h
diff -u /dev/null src/sys/arch/dreamcast/include/fenv.h:1.1
--- /dev/null	Thu Aug 25 08:14:10 2016
+++ src/sys/arch/dreamcast/include/fenv.h	Thu Aug 25 08:14:10 2016
@@ -0,0 +1,3 @@
+/*	$NetBSD: fenv.h,v 1.1 2016/08/25 12:14:10 christos Exp $	*/
+
+#include 

Index: src/sys/arch/hpcsh/include/fenv.h
diff -u /dev/null src/sys/arch/hpcsh/include/fenv.h:1.1
--- /dev/null	Thu Aug 25 08:14:10 2016
+++ src/sys/arch/hpcsh/include/fenv.h	Thu Aug 25 08:14:10 2016
@@ -0,0 +1,3 @@
+/*	$NetBSD: fenv.h,v 1.1 2016/08/25 12:14:10 christos Exp $	*/
+
+#include 

Index: src/sys/arch/mmeye/include/fenv.h
diff -u /dev/null src/sys/arch/mmeye/include/fenv.h:1.1
--- /dev/null	Thu Aug 25 08:14:10 2016
+++ src/sys/arch/mmeye/include/fenv.h	Thu 

CVS commit: src/include

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 12:12:59 UTC 2016

Modified Files:
src/include: fenv.h

Log Message:
add sh


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/include/fenv.h

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

Modified files:

Index: src/include/fenv.h
diff -u src/include/fenv.h:1.22 src/include/fenv.h:1.23
--- src/include/fenv.h:1.22	Tue Aug 23 05:59:46 2016
+++ src/include/fenv.h	Thu Aug 25 08:12:59 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.22 2016/08/23 09:59:46 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.23 2016/08/25 12:12:59 christos Exp $	*/
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
 #if !defined(__aarch64__) && !defined(__arm__) && !defined(__i386__) \
 && !defined(__hppa__) && !defined(__powerpc__) && !defined(__mips__) \
 && !defined(__or1k__) && !defined(__riscv__) && !defined(__sparc__) \
-&& !defined(__x86_64__) && !defined(__alpha__) \
+&& !defined(__x86_64__) && !defined(__alpha__) && !defined(__sh__) \
 && !(defined(__m68k__) && !(defined(__mc68010__) || defined(__mcoldfire__)))
 # ifndef __TEST_FENV
 #  error	"fenv.h is currently not supported for this architecture"



CVS commit: src/sys/arch/x86/pci

2016-08-25 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Aug 25 11:06:50 UTC 2016

Modified Files:
src/sys/arch/x86/pci: pci_machdep.c

Log Message:
fix line break position in verbose message.

pointed out by nonaka@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/x86/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.74 src/sys/arch/x86/pci/pci_machdep.c:1.75
--- src/sys/arch/x86/pci/pci_machdep.c:1.74	Fri Jun 10 23:07:52 2016
+++ src/sys/arch/x86/pci/pci_machdep.c	Thu Aug 25 11:06:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.75 2016/08/25 11:06:50 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.75 2016/08/25 11:06:50 knakahara Exp $");
 
 #include 
 #include 
@@ -486,11 +486,11 @@ pci_attach_hook(device_t parent, device_
 	if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) {
 		pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
-		aprint_verbose_dev(self, "This pci host supports neither MSI nor MSI-X.\n");
+		aprint_verbose_dev(self, "\nThis pci host supports neither MSI nor MSI-X.");
 	} else if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSIX)) {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
-		aprint_verbose_dev(self, "This pci host does not support MSI-X.\n");
+		aprint_verbose_dev(self, "\nThis pci host does not support MSI-X.");
 	} else {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;



CVS commit: src/sbin/fsck_lfs

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:43:18 UTC 2016

Modified Files:
src/sbin/fsck_lfs: bufcache.c

Log Message:
PR/51440: Jose Luis Rodriguez Garcia: Use the standard queue.h macro instead
of playing with the TAILQ's entrails.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/fsck_lfs/bufcache.c

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_lfs/bufcache.c
diff -u src/sbin/fsck_lfs/bufcache.c:1.18 src/sbin/fsck_lfs/bufcache.c:1.19
--- src/sbin/fsck_lfs/bufcache.c:1.18	Thu Aug 18 04:08:02 2016
+++ src/sbin/fsck_lfs/bufcache.c	Thu Aug 25 03:43:18 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.18 2016/08/18 08:08:02 christos Exp $ */
+/* $NetBSD: bufcache.c,v 1.19 2016/08/25 07:43:18 christos Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -173,8 +173,6 @@ bremfree(struct ubuf * bp)
 	 * We only calculate the head of the freelist when removing
 	 * the last element of the list as that is the only time that
 	 * it is needed (e.g. to reset the tail pointer).
-	 *
-	 * NB: This makes an assumption about how tailq's are implemented.
 	 */
 	if (bp->b_flags & B_LOCKED) {
 		locked_queue_bytes -= bp->b_bcount;
@@ -182,7 +180,7 @@ bremfree(struct ubuf * bp)
 	}
 	if (TAILQ_NEXT(bp, b_freelist) == NULL) {
 		for (dp = bufqueues; dp < [BQUEUES]; dp++)
-			if (dp->tqh_last == >b_freelist.tqe_next)
+			if (TAILQ_LAST(dp, bqueues) == bp)
 break;
 		if (dp == [BQUEUES])
 			errx(1, "bremfree: lost tail");



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:39:55 UTC 2016

Modified Files:
src/sys/arch/alpha/include: ieeefp.h

Log Message:
match the name with the FE_ constant from fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ieeefp.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/alpha/include/ieeefp.h
diff -u src/sys/arch/alpha/include/ieeefp.h:1.9 src/sys/arch/alpha/include/ieeefp.h:1.10
--- src/sys/arch/alpha/include/ieeefp.h:1.9	Tue Aug 23 05:59:26 2016
+++ src/sys/arch/alpha/include/ieeefp.h	Thu Aug 25 03:39:55 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.9 2016/08/23 09:59:26 christos Exp $ */
+/* $NetBSD: ieeefp.h,v 1.10 2016/08/25 07:39:55 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 28, 1995
@@ -44,7 +44,7 @@ typedef int fp_except;
 #define	FP_X_OFL	FE_OVERFLOW	/* overflow exception */
 #define	FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
 #define	FP_X_IMP	FE_INEXACT	/* imprecise (prec. loss; "inexact") */
-#define	FP_X_IOV	FE_IOVERFLOW	/* integer overflow */
+#define	FP_X_IOV	FE_INTOVF	/* integer overflow */
 
 /*
  * fp_rnd bits match the fpcr, below, as well as bits 12:11



CVS commit: src/sys/ufs/ext2fs

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:18:35 UTC 2016

Modified Files:
src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
put back second strlcpy; pointed out by dholland.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/sys/ufs/ext2fs/ext2fs_vfsops.c

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

Modified files:

Index: src/sys/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.203 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.204
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.203	Tue Aug 23 02:24:30 2016
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Thu Aug 25 03:18:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.203 2016/08/23 06:24:30 christos Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.204 2016/08/25 07:18:35 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.203 2016/08/23 06:24:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.204 2016/08/25 07:18:35 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -245,6 +245,9 @@ ext2fs_sb_setmountinfo(struct m_ext2fs *
 	(void)strlcpy(fs->e2fs_fsmnt, mp->mnt_stat.f_mntonname,
 sizeof(fs->e2fs_fsmnt));
 	if (fs->e2fs_ronly == 0 && fs->e2fs.e2fs_rev > E2FS_REV0) {
+		(void)strlcpy(fs->e2fs.e2fs_fsmnt, mp->mnt_stat.f_mntonname,
+		sizeof(fs->e2fs.e2fs_fsmnt));
+
 		fs->e2fs.e2fs_mtime = time_second;
 		fs->e2fs.e2fs_mnt_count++;
 



CVS commit: src/external/bsd/unbound

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:13:39 UTC 2016

Modified Files:
src/external/bsd/unbound/bin: Makefile.inc
src/external/bsd/unbound/sbin: Makefile.inc

Log Message:
fix sun2; no need for worker_cb.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/unbound/bin/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/unbound/sbin/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/bsd/unbound/bin/Makefile.inc
diff -u src/external/bsd/unbound/bin/Makefile.inc:1.1 src/external/bsd/unbound/bin/Makefile.inc:1.2
--- src/external/bsd/unbound/bin/Makefile.inc:1.1	Sat Aug 20 07:20:31 2016
+++ src/external/bsd/unbound/bin/Makefile.inc	Thu Aug 25 03:13:39 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2016/08/20 11:20:31 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2016/08/25 07:13:39 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -11,7 +11,7 @@ PROGDPLIBS+= ${DPLIBS}
 
 .if defined(PROG)
 .PATH: ${UNBOUND}/smallapp
-SRCS+=${PROG}.c worker_cb.c
+SRCS+=${PROG}.c
 CLEANFILES+=${PROG}.1
 MAN+=${PROG}.1
 ${PROG}.1: ${PROG}.1.in __subst

Index: src/external/bsd/unbound/sbin/Makefile.inc
diff -u src/external/bsd/unbound/sbin/Makefile.inc:1.1 src/external/bsd/unbound/sbin/Makefile.inc:1.2
--- src/external/bsd/unbound/sbin/Makefile.inc:1.1	Sat Aug 20 07:20:32 2016
+++ src/external/bsd/unbound/sbin/Makefile.inc	Thu Aug 25 03:13:39 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2016/08/20 11:20:32 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2016/08/25 07:13:39 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -12,7 +12,7 @@ PROGDPLIBS+= ${DPLIBS}
 .if defined(PROG)
 .if ${PROG} != "unbound"
 .PATH: ${UNBOUND}/smallapp
-SRCS+=${PROG}.c worker_cb.c
+SRCS+=${PROG}.c
 .else
 MAN+=${PROG}.conf.5
 ${PROG}.conf.5: ${PROG}.conf.5.in __subst