CVS commit: src/external/gpl3/gcc

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 10 07:57:22 UTC 2019

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

Log Message:
partial mknative-gcc for gcc7 and riscv.  only libgcc-bootstrap works so
far as libgcc-bootstrap actually doesn't work so building real libs fails.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libgcc/arch/riscv64/auto-target.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv64/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv64/gcov-iov.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/auto-host.h
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/insn-modes.h
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/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/libgcc/arch/riscv64/auto-target.h
diff -u src/external/gpl3/gcc/lib/libgcc/arch/riscv64/auto-target.h:1.1 src/external/gpl3/gcc/lib/libgcc/arch/riscv64/auto-target.h:1.2
--- src/external/gpl3/gcc/lib/libgcc/arch/riscv64/auto-target.h:1.1	Fri Sep 19 17:23:23 2014
+++ src/external/gpl3/gcc/lib/libgcc/arch/riscv64/auto-target.h	Sun Feb 10 07:57:22 2019
@@ -1,12 +1,15 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.79 2014/05/29 16:27:50 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.100 2019/02/09 03:57:00 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* auto-target.h.  Generated from config.in by configure.  */
 /* config.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to 1 if the target assembler supports thread-local storage. */
-/* #undef HAVE_CC_TLS */
+#define HAVE_CC_TLS 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_FTW_H 1
 
 /* Define if _Unwind_GetIPInfo is available. */
 #define HAVE_GETIPINFO 1
@@ -15,34 +18,34 @@
 #define HAVE_INIT_PRIORITY 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_INTTYPES_H */
+#define HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_MEMORY_H */
+#define HAVE_MEMORY_H 1
+
+/* Define if the system-provided CRTs are present on Solaris. */
+/* #undef HAVE_SOLARIS_CRTS */
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_STDINT_H */
+#define HAVE_STDINT_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_STDLIB_H */
+#define HAVE_STDLIB_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_STRINGS_H */
+#define HAVE_STRINGS_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_STRING_H */
+#define HAVE_STRING_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_SYS_STAT_H */
+#define HAVE_SYS_STAT_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_SYS_TYPES_H */
+#define HAVE_SYS_TYPES_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_UNISTD_H */
-
-/* Define if the C compiler is configured for setjmp/longjmp exceptions. */
-/* #undef LIBGCC_SJLJ_EXCEPTIONS */
+#define HAVE_UNISTD_H 1
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT ""
@@ -66,10 +69,16 @@
 #define SIZEOF_DOUBLE 8
 
 /* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 8
+#define SIZEOF_LONG_DOUBLE 16
 
 /* Define to 1 if you have the ANSI C header files. */
-/* #undef STDC_HEADERS */
+#define STDC_HEADERS 1
 
 /* Define to 1 if the target use emutls for thread-local storage. */
 /* #undef USE_EMUTLS */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */

Index: src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk
diff -u src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk:1.2 src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk:1.3
--- src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk:1.2	Sat Jan 19 17:11:55 2019
+++ src/external/gpl3/gcc/lib/libgcc/arch/riscv64/defs.mk	Sun Feb 10 07:57:22 2019
@@ -1,21 +1,21 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.79 2014/05/29 16:27:50 skrll Exp 
-# Generated from: 

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

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 10 07:56:21 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/riscv: netbsd.h

Log Message:
remove stuff provided by netbsd-stdint.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.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/riscv/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.5 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.5	Sat Feb  9 21:00:41 2019
+++ src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h	Sun Feb 10 07:56:21 2019
@@ -63,38 +63,6 @@ Boston, MA 02111-1307, USA.  */
 #undef NETBSD_ENTRY_POINT
 #define NETBSD_ENTRY_POINT	"_start"
 
-#define SIG_ATOMIC_TYPE   "int"
-
-#define INT8_TYPE "signed char"
-#define INT16_TYPE "short int"
-#define INT32_TYPE "int"
-#define INT64_TYPE "long long int"
-#define UINT8_TYPE "unsigned char"
-#define UINT16_TYPE "short unsigned int"
-#define UINT32_TYPE "unsigned int"
-#define UINT64_TYPE "long long unsigned int"
-
-#define INT_LEAST8_TYPE "signed char"
-#define INT_LEAST16_TYPE "short int"
-#define INT_LEAST32_TYPE "int"
-#define INT_LEAST64_TYPE "long long int"
-#define UINT_LEAST8_TYPE "unsigned char"
-#define UINT_LEAST16_TYPE "short unsigned int"
-#define UINT_LEAST32_TYPE "unsigned int"
-#define UINT_LEAST64_TYPE "long long unsigned int"
-
-#define INT_FAST8_TYPE "signed char"
-#define INT_FAST16_TYPE "short int"
-#define INT_FAST32_TYPE "int"
-#define INT_FAST64_TYPE "long long int"
-#define UINT_FAST8_TYPE "unsigned char"
-#define UINT_FAST16_TYPE "short unsigned int"
-#define UINT_FAST32_TYPE "unsigned int"
-#define UINT_FAST64_TYPE "long long unsigned int"
-
-#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "long int"
-
 #undef SIZE_TYPE
 #define SIZE_TYPE "long unsigned int"
 



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

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 10 07:55:57 UTC 2019

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

Log Message:
riscv wants netbsd-stdint.h's CHAR_FAST8=1 and SHORT_FAST16=1.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/external/gpl3/gcc/dist/gcc/config.gcc

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.50 src/external/gpl3/gcc/dist/gcc/config.gcc:1.51
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.50	Sat Feb  9 20:57:17 2019
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Feb 10 07:55:57 2019
@@ -2157,8 +2157,8 @@ riscv*-*-elf* | riscv*-*-rtems*)
 	gcc_cv_initfini_array=yes
 	;;
 riscv*-*-netbsd*)# NetBSD RISC-V
-	# XXXMRG not ported yet, copied from old config
 	tm_file="elfos.h ${tm_file} ${nbsd_tm_file} riscv/netbsd.h"
+	tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
 	case ${target} in
 	  riscv32*) tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=0" ;;
 	  *) tmake_file="${tmake_file} riscv/t-netbsd64" ;;



CVS commit: src/lib/csu/arch/riscv

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Feb 10 07:28:06 UTC 2019

Modified Files:
src/lib/csu/arch/riscv: crti.S crtn.S

Log Message:
Update comment (copied from or1k)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/riscv/crti.S \
src/lib/csu/arch/riscv/crtn.S

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/arch/riscv/crti.S
diff -u src/lib/csu/arch/riscv/crti.S:1.1 src/lib/csu/arch/riscv/crti.S:1.2
--- src/lib/csu/arch/riscv/crti.S:1.1	Fri Sep 19 17:36:25 2014
+++ src/lib/csu/arch/riscv/crti.S	Sun Feb 10 07:28:06 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: crti.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
+/* $NetBSD: crti.S,v 1.2 2019/02/10 07:28:06 maya Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,11 +31,11 @@
 
 #include 
 
-RCSID("$NetBSD: crti.S,v 1.1 2014/09/19 17:36:25 matt Exp $")
+RCSID("$NetBSD: crti.S,v 1.2 2019/02/10 07:28:06 maya Exp $")
 
 #include "sysident.S"
 
 /*
- * Since OR1K for NetBSD uses .init_array/.fini_array,
+ * Since RISC-V for NetBSD uses .init_array/.fini_array,
  * there is no need for .init/.fini
  */
Index: src/lib/csu/arch/riscv/crtn.S
diff -u src/lib/csu/arch/riscv/crtn.S:1.1 src/lib/csu/arch/riscv/crtn.S:1.2
--- src/lib/csu/arch/riscv/crtn.S:1.1	Fri Sep 19 17:36:25 2014
+++ src/lib/csu/arch/riscv/crtn.S	Sun Feb 10 07:28:06 2019
@@ -1,3 +1,3 @@
-/* $NetBSD: crtn.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */
+/* $NetBSD: crtn.S,v 1.2 2019/02/10 07:28:06 maya Exp $ */
 
-/* no need for anything here since OR1K for NetBSD uses .init_array/.fini_array */
+/* no need for anything here since RISC-V for NetBSD uses .init_array/.fini_array */



CVS commit: src/sys/conf

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 10 05:01:59 UTC 2019

Modified Files:
src/sys/conf: copts.mk

Log Message:
mark pf.c, radeon_cs.c and via_dmablit.c for no fall thru error.

this was already done in the various modules, but not in the main
kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/conf/copts.mk

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/copts.mk
diff -u src/sys/conf/copts.mk:1.2 src/sys/conf/copts.mk:1.3
--- src/sys/conf/copts.mk:1.2	Tue Feb  5 09:29:19 2019
+++ src/sys/conf/copts.mk	Sun Feb 10 05:01:59 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: copts.mk,v 1.2 2019/02/05 09:29:19 mrg Exp $
+#	$NetBSD: copts.mk,v 1.3 2019/02/10 05:01:59 mrg Exp $
 
 # MI per-file compiler options required.
 
@@ -6,7 +6,10 @@
 _SYS_CONF_COPTS_MK_=1
 
 .if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
-COPTS.zlib.c+=	-Wno-error=implicit-fallthrough
+COPTS.zlib.c+=		-Wno-error=implicit-fallthrough
+COPTS.pf.c+=		-Wno-error=implicit-fallthrough
+COPTS.radeon_cs.c+=	-Wno-error=implicit-fallthrough
+COPTS.via_dmablit.c+=	-Wno-error=implicit-fallthrough
 .endif
 
 .endif



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

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 10 04:03:03 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
openssl/store.h is installed by openssl 1.1, don't obsolete it every build.


To generate a diff of this commit:
cvs rdiff -u -r1.2257 -r1.2258 src/distrib/sets/lists/comp/mi

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/mi
diff -u src/distrib/sets/lists/comp/mi:1.2257 src/distrib/sets/lists/comp/mi:1.2258
--- src/distrib/sets/lists/comp/mi:1.2257	Sat Feb  9 23:26:35 2019
+++ src/distrib/sets/lists/comp/mi	Sun Feb 10 04:03:03 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2257 2019/02/09 23:26:35 mrg Exp $
+#	$NetBSD: mi,v 1.2258 2019/02/10 04:03:03 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -2726,8 +2726,7 @@
 ./usr/include/openssl/ssl3.h			comp-c-include
 ./usr/include/openssl/sslerr.h			comp-c-include	openssl=11
 ./usr/include/openssl/stack.h			comp-c-include
-./usr/include/openssl/store.h			comp-c-include	openssl=10
-./usr/include/openssl/store.h			comp-obsolete	openssl=11,obsolete
+./usr/include/openssl/store.h			comp-c-include
 ./usr/include/openssl/storeerr.h		comp-c-include	openssl=11
 ./usr/include/openssl/symhacks.h		comp-c-include
 ./usr/include/openssl/tls1.h			comp-c-include



CVS commit: src/tests/lib/libc/sys

2019-02-09 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Feb 10 02:13:45 UTC 2019

Modified Files:
src/tests/lib/libc/sys: Makefile t_ptrace_amd64_wait.h
t_ptrace_i386_wait.h t_ptrace_wait.c t_ptrace_wait.h
t_ptrace_wait3.c t_ptrace_wait4.c t_ptrace_wait6.c
t_ptrace_waitid.c t_ptrace_waitpid.c t_ptrace_x86_wait.h

Log Message:
Link t_ptrace_wait* tests with -pthread

While there, bump (c) for ATF ptrace(2) tests.

Add __used in infinite_thread() for consistency with other functions in
the file.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_i386_wait.h
cvs rdiff -u -r1.77 -r1.78 src/tests/lib/libc/sys/t_ptrace_wait.c
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libc/sys/t_ptrace_wait.h
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_ptrace_wait3.c \
src/tests/lib/libc/sys/t_ptrace_wait4.c \
src/tests/lib/libc/sys/t_ptrace_wait6.c \
src/tests/lib/libc/sys/t_ptrace_waitid.c \
src/tests/lib/libc/sys/t_ptrace_waitpid.c
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_ptrace_x86_wait.h

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/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.53 src/tests/lib/libc/sys/Makefile:1.54
--- src/tests/lib/libc/sys/Makefile:1.53	Tue Aug 21 10:38:09 2018
+++ src/tests/lib/libc/sys/Makefile	Sun Feb 10 02:13:45 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2018/08/21 10:38:09 christos Exp $
+# $NetBSD: Makefile,v 1.54 2019/02/10 02:13:45 kamil Exp $
 
 MKMAN=	no
 
@@ -88,6 +88,13 @@ SRCS.t_mprotect=	t_mprotect.c ${SRCS_EXE
 
 LDADD.t_getpid+=-lpthread
 
+LDFLAGS.t_ptrace_wait+=		-pthread
+LDFLAGS.t_ptrace_wait3+=	-pthread
+LDFLAGS.t_ptrace_wait4+=	-pthread
+LDFLAGS.t_ptrace_wait6+=	-pthread
+LDFLAGS.t_ptrace_waitid+=	-pthread
+LDFLAGS.t_ptrace_waitpid+=	-pthread
+
 .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE)
 CPPFLAGS.t_posix_fadvise.c += -D_KERNTYPES
 TESTS_C+=		t_posix_fadvise

Index: src/tests/lib/libc/sys/t_ptrace_amd64_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.5 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.6
--- src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.5	Sat May 26 20:27:48 2018
+++ src/tests/lib/libc/sys/t_ptrace_amd64_wait.h	Sun Feb 10 02:13:45 2019
@@ -1,7 +1,7 @@
-/*	$NetBSD: t_ptrace_amd64_wait.h,v 1.5 2018/05/26 20:27:48 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_amd64_wait.h,v 1.6 2019/02/10 02:13:45 kamil Exp $	*/
 
 /*-
- * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Index: src/tests/lib/libc/sys/t_ptrace_i386_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.2 src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.3
--- src/tests/lib/libc/sys/t_ptrace_i386_wait.h:1.2	Thu Dec 14 22:06:54 2017
+++ src/tests/lib/libc/sys/t_ptrace_i386_wait.h	Sun Feb 10 02:13:45 2019
@@ -1,7 +1,7 @@
-/*	$NetBSD: t_ptrace_i386_wait.h,v 1.2 2017/12/14 22:06:54 christos Exp $	*/
+/*	$NetBSD: t_ptrace_i386_wait.h,v 1.3 2019/02/10 02:13:45 kamil Exp $	*/
 
 /*-
- * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.77 src/tests/lib/libc/sys/t_ptrace_wait.c:1.78
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.77	Sun Feb 10 02:04:06 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Sun Feb 10 02:13:45 2019
@@ -1,7 +1,7 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.77 2019/02/10 02:04:06 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.78 2019/02/10 02:13:45 kamil Exp $	*/
 
 /*-
- * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.77 2019/02/10 02:04:06 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.78 2019/02/10 02:13:45 kamil Exp $");
 
 #include 
 #include 

Index: src/tests/lib/libc/sys/t_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.13 src/tests/lib/libc/sys/t_ptrace_wait.h:1.14
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.13	Sat Feb  9 23:10:42 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.h	Sun Feb 10 02:13:45 2019
@@ -1,7 +1,7 @@
-/*	$NetBSD: t_ptrace_wait.h,v 1.13 2019/02/09 23:10:42 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.h,v 1.14 2019/02/10 02:13:45 kamil Exp $	*/
 
 /*-
- * Copyright (c) 2016 The NetBSD Foundation, 

CVS commit: src/tests/lib/libc/sys

2019-02-09 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Feb 10 02:04:06 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Add initial pthread(3) tests in ATF t_prace_wait* tests

There were tested few scenarios with native _lwp_create(2) functions, using
this interface is not needed and it's easier to manage tests with
high-level pthread(3) API.

Rewrite original lwpinfo1 and lwpinfo2 tests into 8 new tests:
 - traceme_lwpinfo0 (0 spawned additional threads)
 - traceme_lwpinfo1 (1 spawned additional thread)
 - traceme_lwpinfo2 (2 spawned additional threads)
 - traceme_lwpinfo3 (3 spawned additional threads)
 - attach_lwpinfo0 (0 spawned additional threads)
 - attach_lwpinfo1 (1 spawned additional thread)
 - attach_lwpinfo2 (2 spawned additional threads)
 - attach_lwpinfo3 (3 spawned additional threads)

These tests verify primarily the PT_LWPINFO interface.

Build the t_ptrace_wait* tests with -pthread.

All tests pass.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/tests/lib/libc/sys/t_ptrace_wait.c

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/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.76 src/tests/lib/libc/sys/t_ptrace_wait.c:1.77
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.76	Sat Feb  9 23:03:01 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Sun Feb 10 02:04:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.76 2019/02/09 23:03:01 scole Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.77 2019/02/10 02:04:06 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.76 2019/02/09 23:03:01 scole Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.77 2019/02/10 02:04:06 kamil Exp $");
 
 #include 
 #include 
@@ -43,6 +43,7 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.76
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2920,22 +2921,23 @@ PTRACE_KILL(kill3, "killpg(SIGKILL)")
 
 /// 
 
-ATF_TC(lwpinfo1);
-ATF_TC_HEAD(lwpinfo1, tc)
-{
-	atf_tc_set_md_var(tc, "descr",
-	"Verify basic LWPINFO call for single thread (PT_TRACE_ME)");
-}
-
-ATF_TC_BODY(lwpinfo1, tc)
+static void
+traceme_lwpinfo(const int threads)
 {
-	const int exitval = 5;
 	const int sigval = SIGSTOP;
+	const int sigval2 = SIGINT;
 	pid_t child, wpid;
 #if defined(TWAIT_HAVE_STATUS)
 	int status;
 #endif
-	struct ptrace_lwpinfo info = {0, 0};
+	struct ptrace_lwpinfo lwp = {0, 0};
+	struct ptrace_siginfo info;
+
+	/* Maximum number of supported threads in this test */
+	pthread_t t[3];
+	int n, rv;
+
+	ATF_REQUIRE((int)__arraycount(t) >= threads);
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
 	SYSCALL_REQUIRE((child = fork()) != -1);
@@ -2946,8 +2948,16 @@ ATF_TC_BODY(lwpinfo1, tc)
 		DPRINTF("Before raising %s from child\n", strsignal(sigval));
 		FORKEE_ASSERT(raise(sigval) == 0);
 
-		DPRINTF("Before exiting of the child process\n");
-		_exit(exitval);
+		for (n = 0; n < threads; n++) {
+			rv = pthread_create([n], NULL, infinite_thread, NULL);
+			FORKEE_ASSERT(rv == 0);
+		}
+
+		DPRINTF("Before raising %s from child\n", strsignal(sigval2));
+		FORKEE_ASSERT(raise(sigval2) == 0);
+
+		/* NOTREACHED */
+		FORKEE_ASSERTX(0 && "Not reached");
 	}
 	DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
 
@@ -2956,23 +2966,33 @@ ATF_TC_BODY(lwpinfo1, tc)
 
 	validate_status_stopped(status, sigval);
 
+	DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child");
+	SYSCALL_REQUIRE(
+	ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1);
+
+	DPRINTF("Signal traced to lwpid=%d\n", info.psi_lwpid);
+	DPRINTF("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+	info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+	info.psi_siginfo.si_errno);
+
+	ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval);
+	ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP);
+
 	DPRINTF("Before calling ptrace(2) with PT_LWPINFO for child\n");
-	SYSCALL_REQUIRE(ptrace(PT_LWPINFO, child, , sizeof(info)) != -1);
+	SYSCALL_REQUIRE(ptrace(PT_LWPINFO, child, , sizeof(lwp)) != -1);
 
-	DPRINTF("Assert that there exists a thread\n");
-	ATF_REQUIRE(info.pl_lwpid > 0);
+	DPRINTF("Assert that there exists a single thread only\n");
+	ATF_REQUIRE(lwp.pl_lwpid > 0);
 
 	DPRINTF("Assert that lwp thread %d received event PL_EVENT_SIGNAL\n",
-	info.pl_lwpid);
-	ATF_REQUIRE_EQ_MSG(info.pl_event, PL_EVENT_SIGNAL,
-	"Received event %d != expected event %d",
-	info.pl_event, PL_EVENT_SIGNAL);
+	lwp.pl_lwpid);
+	FORKEE_ASSERT_EQ(lwp.pl_event, PL_EVENT_SIGNAL);
 
 	DPRINTF("Before calling ptrace(2) with PT_LWPINFO for child\n");
-	SYSCALL_REQUIRE(ptrace(PT_LWPINFO, child, , sizeof(info)) != -1);
+	SYSCALL_REQUIRE(ptrace(PT_LWPINFO, child, 

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

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb  9 23:26:35 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
run this through sort -u.  removes a few duplicates and fixes order.


To generate a diff of this commit:
cvs rdiff -u -r1.2256 -r1.2257 src/distrib/sets/lists/comp/mi

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/mi
diff -u src/distrib/sets/lists/comp/mi:1.2256 src/distrib/sets/lists/comp/mi:1.2257
--- src/distrib/sets/lists/comp/mi:1.2256	Mon Feb  4 03:26:27 2019
+++ src/distrib/sets/lists/comp/mi	Sat Feb  9 23:26:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2256 2019/02/04 03:26:27 mrg Exp $
+#	$NetBSD: mi,v 1.2257 2019/02/09 23:26:35 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -2056,8 +2056,6 @@
 ./usr/include/gcc-5/mwaitxintrin.h		comp-obsolete		obsolete
 ./usr/include/gcc-5/nmmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/omp.h			comp-obsolete		obsolete
-./usr/include/gcc-5/omp.h			comp-obsolete		obsolete
-./usr/include/gcc-5/openacc.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/openacc.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/pmmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/popcntintrin.h		comp-obsolete		obsolete
@@ -2071,7 +2069,6 @@
 ./usr/include/gcc-5/shaintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/smmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/stdatomic.h			comp-obsolete		obsolete
-./usr/include/gcc-5/stdatomic.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/tbmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/tgmath.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/tmmintrin.h			comp-obsolete		obsolete
@@ -11845,18 +11842,18 @@
 ./usr/share/man/cat9/tc_wmb.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/tcp_congctl.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool.0		comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_cancel_job.0	comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_cancel_job_async.0 comp-sys-catman	.cat
 ./usr/share/man/cat9/threadpool_get.0		comp-sys-catman		.cat
-./usr/share/man/cat9/threadpool_put.0		comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_job_destroy.0	comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_job_done.0	comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_job_init.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool_percpu_get.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool_percpu_put.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool_percpu_ref.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool_percpu_ref_remote.0 comp-sys-catman	.cat
-./usr/share/man/cat9/threadpool_job_init.0	comp-sys-catman		.cat
-./usr/share/man/cat9/threadpool_job_destroy.0	comp-sys-catman		.cat
-./usr/share/man/cat9/threadpool_job_done.0	comp-sys-catman		.cat
+./usr/share/man/cat9/threadpool_put.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/threadpool_schedule_job.0	comp-sys-catman		.cat
-./usr/share/man/cat9/threadpool_cancel_job.0	comp-sys-catman		.cat
-./usr/share/man/cat9/threadpool_cancel_job_async.0 comp-sys-catman	.cat
 ./usr/share/man/cat9/tick.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/tickadj.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/time.0			comp-obsolete		obsolete
@@ -19678,18 +19675,18 @@
 ./usr/share/man/html9/tc_wmb.html		comp-sys-htmlman	html
 ./usr/share/man/html9/tcp_congctl.html		comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool.html		comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_cancel_job.html comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_cancel_job_async.html comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_get.html	comp-sys-htmlman	html
-./usr/share/man/html9/threadpool_put.html	comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_job_destroy.html comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_job_done.html	comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_job_init.html	comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_percpu_get.html comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_percpu_put.html comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_percpu_ref.html comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_percpu_ref_remote.html comp-sys-htmlman html
-./usr/share/man/html9/threadpool_job_init.html	comp-sys-htmlman	html
-./usr/share/man/html9/threadpool_job_destroy.html comp-sys-htmlman	html
-./usr/share/man/html9/threadpool_job_done.html	comp-sys-htmlman	html
+./usr/share/man/html9/threadpool_put.html	comp-sys-htmlman	html
 ./usr/share/man/html9/threadpool_schedule_job.html comp-sys-htmlman	html
-./usr/share/man/html9/threadpool_cancel_job.html comp-sys-htmlman	html
-./usr/share/man/html9/threadpool_cancel_job_async.html comp-sys-htmlman	html
 ./usr/share/man/html9/tick.html			comp-sys-htmlman	html
 

CVS commit: src/tests/lib/libc/sys

2019-02-09 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Feb  9 23:10:42 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.h

Log Message:
Add infinite_thread() for ptrace(2) ATF tests

infinite_thread() is designed to be spawned as a pthread(3) function.

It will be used soon in new tests.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libc/sys/t_ptrace_wait.h

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/sys/t_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.12 src/tests/lib/libc/sys/t_ptrace_wait.h:1.13
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.12	Mon Aug 13 21:49:37 2018
+++ src/tests/lib/libc/sys/t_ptrace_wait.h	Sat Feb  9 23:10:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.h,v 1.12 2018/08/13 21:49:37 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.h,v 1.13 2019/02/09 23:10:42 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -503,6 +503,16 @@ check_happy(unsigned n)
 	}
 }
 
+static void *
+infinite_thread(void *arg __unused)
+{
+
+while (true)
+continue;
+
+__unreachable();
+}
+
 #if defined(HAVE_DBREGS)
 static bool __used
 can_we_set_dbregs(void)



CVS commit: src/tests/lib/libc/sys

2019-02-09 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sat Feb  9 23:03:01 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
use HAVE_FPREGS not HAVE_FPGPREGS and move some register_t inside proper 
#define.  fixes ia64 build. ok 


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/tests/lib/libc/sys/t_ptrace_wait.c

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/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.75 src/tests/lib/libc/sys/t_ptrace_wait.c:1.76
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.75	Fri Feb  8 03:08:00 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Sat Feb  9 23:03:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.75 2019/02/08 03:08:00 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.76 2019/02/09 23:03:01 scole Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.75 2019/02/08 03:08:00 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.76 2019/02/09 23:03:01 scole Exp $");
 
 #include 
 #include 
@@ -2613,7 +2613,7 @@ BYTES_TRANSFER(bytes_transfer_piod_read_
 
 /// 
 
-#if defined(HAVE_GPREGS) || defined(HAVE_FPGPREGS)
+#if defined(HAVE_GPREGS) || defined(HAVE_FPREGS)
 static void
 access_regs(const char *regset, const char *aux)
 {
@@ -2625,12 +2625,12 @@ access_regs(const char *regset, const ch
 #endif
 #if defined(HAVE_GPREGS)
 	struct reg gpr;
+	register_t rgstr;
 #endif
 #if defined(HAVE_FPREGS)
 	struct fpreg fpr;
 #endif
-	register_t rgstr;
-
+	
 #if !defined(HAVE_GPREGS)
 	if (strcmp(regset, "regs") == 0)
 		atf_tc_fail("Impossible test scenario!");



CVS commit: src/etc/mtree

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb  9 21:43:23 UTC 2019

Modified Files:
src/etc/mtree: Makefile NetBSD.dist.x86_64
Added Files:
src/etc/mtree: NetBSD.compat.aarch64 NetBSD.compat.mips64eb
NetBSD.compat.mips64el NetBSD.compat.powerpc64
NetBSD.compat.riscv64 NetBSD.compat.sparc64 NetBSD.compat.x86_64
NetBSD.dist.m68k
Removed Files:
src/etc/mtree: NetBSD.dist.aarch64 NetBSD.dist.earm
NetBSD.dist.mips64eb NetBSD.dist.mips64el NetBSD.dist.powerpc64
NetBSD.dist.riscv64 NetBSD.dist.sparc64

Log Message:
separate out the arch-specific and compat-specific subdirs.
put compat stuff in NetBSD.compat.$MACHINE_ARCH, and normal
stuff in NetBSD.dist.$MACHINE/MACHINE_ARCH, etc.

probably need at at more files for sh3, mips, ppc, sparc,
m68k, arm, ia64, etc., as every port has port- or arch-
specific header subdirectory.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/etc/mtree/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/mtree/NetBSD.compat.aarch64 \
src/etc/mtree/NetBSD.compat.mips64eb src/etc/mtree/NetBSD.compat.mips64el \
src/etc/mtree/NetBSD.compat.powerpc64 src/etc/mtree/NetBSD.compat.riscv64 \
src/etc/mtree/NetBSD.compat.sparc64 src/etc/mtree/NetBSD.compat.x86_64 \
src/etc/mtree/NetBSD.dist.m68k
cvs rdiff -u -r1.4 -r0 src/etc/mtree/NetBSD.dist.aarch64
cvs rdiff -u -r1.3 -r0 src/etc/mtree/NetBSD.dist.earm \
src/etc/mtree/NetBSD.dist.powerpc64
cvs rdiff -u -r1.9 -r0 src/etc/mtree/NetBSD.dist.mips64eb
cvs rdiff -u -r1.10 -r0 src/etc/mtree/NetBSD.dist.mips64el \
src/etc/mtree/NetBSD.dist.sparc64
cvs rdiff -u -r1.2 -r0 src/etc/mtree/NetBSD.dist.riscv64
cvs rdiff -u -r1.12 -r1.13 src/etc/mtree/NetBSD.dist.x86_64

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

Modified files:

Index: src/etc/mtree/Makefile
diff -u src/etc/mtree/Makefile:1.38 src/etc/mtree/Makefile:1.39
--- src/etc/mtree/Makefile:1.38	Sat Feb  9 02:04:19 2019
+++ src/etc/mtree/Makefile	Sat Feb  9 21:43:23 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.38 2019/02/09 02:04:19 mrg Exp $
+#	$NetBSD: Makefile,v 1.39 2019/02/09 21:43:23 mrg Exp $
 
 .include 
 
@@ -10,10 +10,8 @@ EXTRA_DIST_FILES=	NetBSD.dist.Xorg
 # by something else; this may need to be fixed properly in the future.
 .if defined(MKCOMPAT) && ${MKCOMPAT} != "no"
 .include "${NETBSDSRCDIR}/compat/archdirs.mk"
-.if exists(NetBSD.dist.${MACHINE_ARCH})
-EXTRA_DIST_FILES+=	NetBSD.dist.${MACHINE_ARCH}
-.elif !empty(MACHINE_ARCH:Mearm*)
-EXTRA_DIST_FILES+=	NetBSD.dist.earm
+.if exists(NetBSD.compat.${MACHINE_ARCH})
+EXTRA_DIST_FILES+=	NetBSD.compat.${MACHINE_ARCH}
 .endif
 EXTRA_DIST_FILES+=	NetBSD.dist.compat	# autogenerated
 .if defined(MKCOMPATX11) && ${MKCOMPATX11} != "no" && ${MKX11} != "no"
@@ -21,6 +19,10 @@ EXTRA_DIST_FILES+=	NetBSD.dist.xcompat	#
 .endif
 .endif
 
+.if exists(NetBSD.dist.${MACHINE_ARCH})
+EXTRA_DIST_FILES+=	NetBSD.dist.${MACHINE_ARCH}
+.endif
+
 .if exists(NetBSD.dist.${MACHINE})
 EXTRA_DIST_FILES+=	NetBSD.dist.${MACHINE}
 .endif

Index: src/etc/mtree/NetBSD.dist.x86_64
diff -u src/etc/mtree/NetBSD.dist.x86_64:1.12 src/etc/mtree/NetBSD.dist.x86_64:1.13
--- src/etc/mtree/NetBSD.dist.x86_64:1.12	Fri Feb  8 23:27:14 2019
+++ src/etc/mtree/NetBSD.dist.x86_64	Sat Feb  9 21:43:23 2019
@@ -1,10 +1,8 @@
-#	$NetBSD: NetBSD.dist.x86_64,v 1.12 2019/02/08 23:27:14 mrg Exp $
+#	$NetBSD: NetBSD.dist.x86_64,v 1.13 2019/02/09 21:43:23 mrg Exp $
 
 ./usr/include/amd64
 ./usr/include/dev/nvmm
 ./usr/include/dev/nvmm/x86
-./usr/include/g++/bits/i386
-./usr/include/g++/bits/x86_64
 ./usr/include/i386
 ./usr/include/x86
 ./usr/include/xen

Added files:

Index: src/etc/mtree/NetBSD.compat.aarch64
diff -u /dev/null src/etc/mtree/NetBSD.compat.aarch64:1.1
--- /dev/null	Sat Feb  9 21:43:23 2019
+++ src/etc/mtree/NetBSD.compat.aarch64	Sat Feb  9 21:43:23 2019
@@ -0,0 +1,4 @@
+# $NetBSD: NetBSD.compat.aarch64,v 1.1 2019/02/09 21:43:23 mrg Exp $
+
+./usr/include/g++/bits/arm
+./usr/include/g++/bits/aarch64
Index: src/etc/mtree/NetBSD.compat.mips64eb
diff -u /dev/null src/etc/mtree/NetBSD.compat.mips64eb:1.1
--- /dev/null	Sat Feb  9 21:43:23 2019
+++ src/etc/mtree/NetBSD.compat.mips64eb	Sat Feb  9 21:43:23 2019
@@ -0,0 +1,5 @@
+#	$NetBSD: NetBSD.compat.mips64eb,v 1.1 2019/02/09 21:43:23 mrg Exp $
+
+./usr/include/g++/bits/mips64
+./usr/include/g++/bits/mips32
+./usr/include/g++/bits/mipso32
Index: src/etc/mtree/NetBSD.compat.mips64el
diff -u /dev/null src/etc/mtree/NetBSD.compat.mips64el:1.1
--- /dev/null	Sat Feb  9 21:43:23 2019
+++ src/etc/mtree/NetBSD.compat.mips64el	Sat Feb  9 21:43:23 2019
@@ -0,0 +1,5 @@
+#	$NetBSD: NetBSD.compat.mips64el,v 1.1 2019/02/09 21:43:23 mrg Exp $
+
+./usr/include/g++/bits/mips64
+./usr/include/g++/bits/mips32
+./usr/include/g++/bits/mipso32
Index: src/etc/mtree/NetBSD.compat.powerpc64
diff -u /dev/null src/etc/mtree/NetBSD.compat.powerpc64:1.1
--- /dev/null	

CVS commit: src/share/mk

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Feb  9 21:05:49 UTC 2019

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

Log Message:
Use GCC 7 on riscv, it is not supported on 6.


To generate a diff of this commit:
cvs rdiff -u -r1.1103 -r1.1104 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.1103 src/share/mk/bsd.own.mk:1.1104
--- src/share/mk/bsd.own.mk:1.1103	Sat Feb  9 00:59:30 2019
+++ src/share/mk/bsd.own.mk	Sat Feb  9 21:05:48 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1103 2019/02/09 00:59:30 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1104 2019/02/09 21:05:48 maya Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -64,6 +64,7 @@ TOOLCHAIN_MISSING?=	no
 ${MACHINE_CPU} == "i386"	|| \
 ${MACHINE_CPU} == "mips"	|| \
 ${MACHINE_ARCH} == "powerpc"	|| \
+${MACHINE_CPU} == "riscv"	|| \
 ${MACHINE_CPU} == "sparc"	|| \
 ${MACHINE_CPU} == "sparc64"	|| \
 ${MACHINE_CPU} == "x86_64"



CVS commit: src/external/gpl3/gcc

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Feb  9 21:03:24 UTC 2019

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64: defs.mk gtyp-input.list
Added Files:
src/external/gpl3/gcc/lib/libgcc/arch/riscv64: gthr-defs.mk

Log Message:
Fake mknative for riscv64, enough to complete a tools build.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libgcc/arch/riscv64/gthr-defs.mk
cvs rdiff -u -r1.54 -r1.55 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/gtyp-input.list

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/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.54 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.55
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.54	Fri Feb  8 03:59:34 2019
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Sat Feb  9 21:03:24 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.54 2019/02/08 03:59:34 mrg Exp $
+#	$NetBSD: Makefile,v 1.55 2019/02/09 21:03:24 maya Exp $
 
 LIBISPRIVATE=	yes
 
@@ -443,7 +443,8 @@ cfn-operators.pd: gencfn-macros
 CLEANFILES+=	case-cfn-macros.h.tmp case-cfn-macros.h \
 		cfn-operators.pd.tmp cfn-operators.pd
 
-CASECFNDEPS=	aarch64-builtins.c arm-builtins.c i386.c rs6000.c builtins.c \
+CASECFNDEPS=	aarch64-builtins.c arm-builtins.c i386.c rs6000.c \
+		riscv-builtins.c builtins.c \
 		fold-const.c tree-ssa-math-opts.c tree-ssa-reassoc.c \
 		tree-vect-patterns.c tree-vrp.c generic-match-head.c \
 		gimple-match-head.c ChangeLog-2015 fold-const-call.c \

Index: src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk
diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk:1.2 src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk:1.3
--- src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk:1.2	Sun Oct 12 19:55:29 2014
+++ src/external/gpl3/gcc/usr.bin/gcc/arch/riscv64/defs.mk	Sat Feb  9 21:03:24 2019
@@ -22,7 +22,7 @@ G_PROTO_OBJS=
 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${GNUHOSTDIST}/gcc/../libbacktrace  
 G_md_file=${GNUHOSTDIST}/gcc/config/riscv/riscv.md
 G_OBJC_OBJS=objc/objc-lang.o objc/objc-act.o hash-table.o objc/objc-runtime-shared-support.o objc/objc-gnu-runtime-abi-01.o objc/objc-next-runtime-abi-01.o objc/objc-next-runtime-abi-02.o objc/objc-encoding.o objc/objc-map.o
-G_OBJS=insn-attrtab.o insn-automata.o insn-dfatab.o insn-emit.o insn-extract.o insn-latencytab.o insn-modes.o insn-opinit.o insn-output.o insn-peep.o insn-preds.o insn-recog.o insn-enums.o ggc-page.o alias.o alloc-pool.o auto-inc-dec.o bb-reorder.o bitmap.o bt-load.o builtins.o caller-save.o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfgexpand.o cfghooks.o cfgloop.o cfgloopanal.o cfgloopmanip.o cfgrtl.o symtab.o cgraph.o cgraphbuild.o cgraphunit.o cgraphclones.o combine.o combine-stack-adj.o compare-elim.o convert.o coverage.o cppbuiltin.o cppdefault.o cprop.o cse.o cselib.o data-streamer.o data-streamer-in.o data-streamer-out.o dbxout.o dbgcnt.o dce.o ddg.o debug.o df-core.o df-problems.o df-scan.o dfp.o dojump.o dominance.o domwalk.o double-int.o dse.o dumpfile.o dwarf2asm.o dwarf2cfi.o dwarf2out.o emit-rtl.o et-forest.o except.o explow.o expmed.o expr.o final.o fixed-value.o fold-const.o function.o fwprop.o gcse.o ggc-common.o gimple.o gimple-iterator.o gimple-fold.o gimple-
 low.o gimple-pretty-print.o gimple-ssa-strength-reduction.o gimple-streamer-in.o gimple-streamer-out.o gimplify.o godump.o graph.o graphds.o graphite.o graphite-blocking.o graphite-clast-to-gimple.o graphite-dependences.o graphite-interchange.o graphite-optimize-isl.o graphite-poly.o graphite-scop-detection.o graphite-sese-to-poly.o gtype-desc.o haifa-sched.o hw-doloop.o hwint.o ifcvt.o ree.o incpath.o init-regs.o internal-fn.o ipa-cp.o ipa-split.o ipa-inline.o ipa-inline-analysis.o ipa-inline-transform.o ipa-prop.o ipa-pure-const.o ipa-reference.o ipa-ref.o ipa-utils.o ipa.o ira.o ira-build.o ira-costs.o ira-conflicts.o ira-color.o ira-emit.o ira-lives.o jump.o langhooks.o lcm.o lists.o loop-doloop.o loop-init.o loop-invariant.o loop-iv.o loop-unroll.o loop-unswitch.o lower-subreg.o lra.o lra-assigns.o lra-coalesce.o lra-constraints.o lra-eliminations.o lra-lives.o lra-spills.o lto-cgraph.o lto-streamer.o lto-streamer-in.o lto-streamer-out.o lto-section-in.o lto-section-out.o lto-s
 ymtab.o lto-opts.o lto-compress.o mcf.o mode-switching.o modulo-sched.o omega.o omp-low.o optabs.o options-save.o opts-global.o passes.o plugin.o 

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

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Feb  9 21:00:41 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/riscv: netbsd.h

Log Message:
s/TARGET_HARD_FLOAT_ABI/TARGET_HARD_FLOAT, the latter has the
benefit of existing. Inspired by mips/netbsd.h.

remove some redefinitions. There are still a few left, but these ones
seem to match.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.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/riscv/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.4 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.5
--- src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.4	Fri Aug 19 05:11:10 2016
+++ src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h	Sat Feb  9 21:00:41 2019
@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA.  */
 /* The GNU C++ standard library requires this.  */		\
 if (c_dialect_cxx ())	\
   builtin_define ("_GNU_SOURCE");\
-if (!TARGET_HARD_FLOAT_ABI)	\
+if (!TARGET_HARD_FLOAT)	\
   builtin_define ("_SOFT_FLOAT");\
   } while (0)
 
@@ -98,9 +98,6 @@ Boston, MA 02111-1307, USA.  */
 #undef SIZE_TYPE
 #define SIZE_TYPE "long unsigned int"
 
-#define INTPTR_TYPE PTRDIFF_TYPE
-#define UINTPTR_TYPE SIZE_TYPE
-
 #undef INTMAX_TYPE
 #define INTMAX_TYPE "long long int"
 



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

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Feb  9 20:57:17 UTC 2019

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

Log Message:
We also need t-riscv (for riscv-builtins.o)


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/external/gpl3/gcc/dist/gcc/config.gcc

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.49 src/external/gpl3/gcc/dist/gcc/config.gcc:1.50
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.49	Fri Feb  8 01:29:11 2019
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sat Feb  9 20:57:17 2019
@@ -2164,6 +2164,7 @@ riscv*-*-netbsd*)# NetBSD RISC-V
 	  *) tmake_file="${tmake_file} riscv/t-netbsd64" ;;
 	esac
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+	tmake_file="${tmake_file} riscv/t-riscv"
 	gnu_ld=yes
 	gas=yes
 	gcc_cv_initfini_array=yes



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

2019-02-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Feb  9 19:40:32 UTC 2019

Modified Files:
src/external/gpl3/binutils/dist/bfd: elfnn-riscv.c libbfd.h targets.c
src/external/gpl3/binutils/dist/ld/emultempl: riscvelf.em
src/external/gpl3/binutils/dist/opcodes: riscv-dis.c

Log Message:
Revert all riscv-related local patches.

As for the libbfd.h change: the definitions seem to mostly exist, but we
had duplicated them.

Fixes riscv64 binutils build.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/bfd/elfnn-riscv.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/binutils/dist/bfd/libbfd.h
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/bfd/targets.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/opcodes/riscv-dis.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/gpl3/binutils/dist/bfd/elfnn-riscv.c
diff -u src/external/gpl3/binutils/dist/bfd/elfnn-riscv.c:1.5 src/external/gpl3/binutils/dist/bfd/elfnn-riscv.c:1.6
--- src/external/gpl3/binutils/dist/bfd/elfnn-riscv.c:1.5	Wed Nov  7 01:13:52 2018
+++ src/external/gpl3/binutils/dist/bfd/elfnn-riscv.c	Sat Feb  9 19:40:32 2019
@@ -24,12 +24,10 @@
 
 #include "sysdep.h"
 #include "bfd.h"
-#include "libiberty.h"
 #include "libbfd.h"
-#include "bfd_stdint.h"
-#include "elf-bfd.h"
 #include "bfdlink.h"
-#include "objalloc.h"
+#include "genlink.h"
+#include "elf-bfd.h"
 #include "elfxx-riscv.h"
 #include "elf/riscv.h"
 #include "opcode/riscv.h"
@@ -351,7 +349,6 @@ riscv_elf_create_dynamic_sections (bfd *
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
 return FALSE;
 
-  htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
   if (!bfd_link_pic (info))
 {
   htab->sdyntdata =

Index: src/external/gpl3/binutils/dist/bfd/libbfd.h
diff -u src/external/gpl3/binutils/dist/bfd/libbfd.h:1.10 src/external/gpl3/binutils/dist/bfd/libbfd.h:1.11
--- src/external/gpl3/binutils/dist/bfd/libbfd.h:1.10	Wed Nov  7 01:13:52 2018
+++ src/external/gpl3/binutils/dist/bfd/libbfd.h	Sat Feb  9 19:40:32 2019
@@ -2663,41 +2663,6 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_OR1K_TLS_TPOFF",
   "BFD_RELOC_OR1K_TLS_DTPOFF",
   "BFD_RELOC_OR1K_TLS_DTPMOD",
-  "BFD_RELOC_RISCV_ADD32",
-  "BFD_RELOC_RISCV_ADD64",
-  "BFD_RELOC_RISCV_SUB32",
-  "BFD_RELOC_RISCV_SUB64",
-  "BFD_RELOC_RISCV_HI20",
-  "BFD_RELOC_RISCV_LO12_I",
-  "BFD_RELOC_RISCV_LO12_S",
-  "BFD_RELOC_RISCV_PCREL_LO12_I",
-  "BFD_RELOC_RISCV_PCREL_LO12_S",
-  "BFD_RELOC_RISCV_CALL",
-  "BFD_RELOC_RISCV_CALL_PLT",
-  "BFD_RELOC_RISCV_PCREL_HI20",
-  "BFD_RELOC_RISCV_JMP",
-  "BFD_RELOC_RISCV_GOT_HI20",
-  "BFD_RELOC_RISCV_GOT_LO12",
-  "BFD_RELOC_RISCV_TLS_DTPMOD32",
-  "BFD_RELOC_RISCV_TLS_DTPREL32",
-  "BFD_RELOC_RISCV_TLS_DTPMOD64",
-  "BFD_RELOC_RISCV_TLS_DTPREL64",
-  "BFD_RELOC_RISCV_TLS_TPREL32",
-  "BFD_RELOC_RISCV_TLS_TPREL64",
-  "BFD_RELOC_RISCV_TPREL_HI20",
-  "BFD_RELOC_RISCV_TPREL_ADD",
-  "BFD_RELOC_RISCV_TPREL_LO12_S",
-  "BFD_RELOC_RISCV_TPREL_LO12_I",
-  "BFD_RELOC_RISCV_TLS_IE_HI20",
-  "BFD_RELOC_RISCV_TLS_IE_LO12",
-  "BFD_RELOC_RISCV_TLS_IE_ADD",
-  "BFD_RELOC_RISCV_TLS_IE_LO12_S",
-  "BFD_RELOC_RISCV_TLS_IE_LO12_I",
-  "BFD_RELOC_RISCV_TLS_GOT_HI20",
-  "BFD_RELOC_RISCV_TLS_GOT_LO12",
-  "BFD_RELOC_RISCV_TLS_GD_HI20",
-  "BFD_RELOC_RISCV_TLS_GD_LO12",
-  "BFD_RELOC_RISCV_TLS_PCREL_LO12",
   "BFD_RELOC_H8_DIR16A8",
   "BFD_RELOC_H8_DIR16R8",
   "BFD_RELOC_H8_DIR24A8",

Index: src/external/gpl3/binutils/dist/bfd/targets.c
diff -u src/external/gpl3/binutils/dist/bfd/targets.c:1.9 src/external/gpl3/binutils/dist/bfd/targets.c:1.10
--- src/external/gpl3/binutils/dist/bfd/targets.c:1.9	Wed Nov  7 01:13:52 2018
+++ src/external/gpl3/binutils/dist/bfd/targets.c	Sat Feb  9 19:40:32 2019
@@ -1168,7 +1168,6 @@ static const bfd_target * const _bfd_tar
 	_elf32_vec,
 
 #ifdef BFD64
-_elf64_vec,
 	_xcoff64_vec,
 	_xcoff64_aix_vec,
 #endif

Index: src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em
diff -u src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em:1.5 src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em:1.6
--- src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em:1.5	Wed Nov  7 01:13:55 2018
+++ src/external/gpl3/binutils/dist/ld/emultempl/riscvelf.em	Sat Feb  9 19:40:32 2019
@@ -20,18 +20,7 @@
 
 fragment <
-
 #include 
 
 struct riscv_private_data



CVS commit: src/usr.sbin/acpitools/acpidump

2019-02-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Feb  9 16:00:42 UTC 2019

Modified Files:
src/usr.sbin/acpitools/acpidump: acpi.c

Log Message:
 Add missing newline.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/acpitools/acpidump/acpi.c

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

Modified files:

Index: src/usr.sbin/acpitools/acpidump/acpi.c
diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.43 src/usr.sbin/acpitools/acpidump/acpi.c:1.44
--- src/usr.sbin/acpitools/acpidump/acpi.c:1.43	Sun Dec 30 05:05:21 2018
+++ src/usr.sbin/acpitools/acpidump/acpi.c	Sat Feb  9 16:00:41 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.43 2018/12/30 05:05:21 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.44 2019/02/09 16:00:41 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: acpi.c,v 1.43 2018/12/30 05:05:21 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.44 2019/02/09 16:00:41 msaitoh Exp $");
 
 #include 
 #include 
@@ -717,7 +717,7 @@ acpi_print_hest_generic_v2(ACPI_HEST_GEN
 
 	printf("\tError Status Address");
 	acpi_print_gas(>ReadAckRegister);
-	printf("\tRead Ack Preserve=0x%016jx\n",
+	printf("\n\tRead Ack Preserve=0x%016jx\n",
 	(uintmax_t)data->ReadAckPreserve);
 	printf("\tRead Ack Write=0x%016jx\n",
 	(uintmax_t)data->ReadAckWrite);
@@ -2050,7 +2050,7 @@ acpi_handle_hpet(ACPI_TABLE_HEADER *sdp)
 	printf("\tHPET Number=%d\n", hpet->Sequence);
 	printf("\tADDR=");
 	acpi_print_gas(>Address);
-	printf("\tHW Rev=0x%x\n", hpet->Id & ACPI_HPET_ID_HARDWARE_REV_ID);
+	printf("\n\tHW Rev=0x%x\n", hpet->Id & ACPI_HPET_ID_HARDWARE_REV_ID);
 	printf("\tComparators=%d\n", (hpet->Id & ACPI_HPET_ID_COMPARATORS) >>
 	8);
 	printf("\tCounter Size=%d\n", hpet->Id & ACPI_HPET_ID_COUNT_SIZE_CAP ?
@@ -2385,13 +2385,14 @@ acpi_print_native_lpit(ACPI_LPIT_NATIVE 
 {
 	printf("\tEntryTrigger=");
 	acpi_print_gas(>EntryTrigger);
-	printf("\tResidency=%u\n", nl->Residency);
+	printf("\n\tResidency=%u\n", nl->Residency);
 	printf("\tLatency=%u\n", nl->Latency);
 	if (nl->Header.Flags & ACPI_LPIT_NO_COUNTER)
 		printf("\tResidencyCounter=Not Present");
 	else {
 		printf("\tResidencyCounter=");
 		acpi_print_gas(>ResidencyCounter);
+		printf("\n");
 	}
 	if (nl->CounterFrequency)
 		printf("\tCounterFrequency=%ju\n", nl->CounterFrequency);
@@ -3818,8 +3819,9 @@ acpi_handle_wdrt(ACPI_TABLE_HEADER *sdp)
 
 	printf("\tControl Register=");
 	acpi_print_gas(>ControlRegister);
-	printf("\tCount Register=");
+	printf("\n\tCount Register=");
 	acpi_print_gas(>CountRegister);
+	printf("\n");
 	acpi_print_pci(wdrt->PciVendorId, wdrt->PciDeviceId,
 	wdrt->PciSegment, wdrt->PciBus, wdrt->PciDevice, wdrt->PciFunction);
 



CVS commit: [netbsd-8] src

2019-02-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb  9 14:43:08 UTC 2019

Modified Files:
src/lib/libossaudio [netbsd-8]: ossaudio.c
src/sys/compat/ossaudio [netbsd-8]: ossaudio.c

Log Message:
Pull up following revision(s) (requested by isaki in ticket #1185):

lib/libossaudio/ossaudio.c: revision 1.35
sys/compat/ossaudio/ossaudio.c: revision 1.71

Revert a wrong SNDCTL_DSP_GETOSPACE part of rev1.33.
- 'fragments' is the number of full free blocks and should not be
  negative value.
- 'bytes' should not be rounded down.

It makes mpv work correctly (fixes a second half of kern/53028).
Reviewed by mlelstv@

 -

Revert a wrong OSS_SNDCTL_DSP_GETOSPACE part of rev1.70.
- 'fragments' is the number of full free blocks and should not be
  negative value.
- 'bytes' should not be rounded down.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.4.1 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.70 -r1.70.6.1 src/sys/compat/ossaudio/ossaudio.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/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.33 src/lib/libossaudio/ossaudio.c:1.33.4.1
--- src/lib/libossaudio/ossaudio.c:1.33	Thu Mar 23 15:50:48 2017
+++ src/lib/libossaudio/ossaudio.c	Sat Feb  9 14:43:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.33.4.1 2019/02/09 14:43:07 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.33.4.1 2019/02/09 14:43:07 martin Exp $");
 
 /*
  * This is an OSS (Linux) sound API emulator.
@@ -411,11 +411,11 @@ audio_ioctl(int fd, unsigned long com, v
 			return retval;
 		setblocksize(fd, );
 		bufinfo.fragsize = tmpinfo.blocksize;
-		bufinfo.fragments = (tmpinfo.hiwat * tmpinfo.blocksize -
-		(tmpinfo.play.seek + tmpinfo.blocksize -1)) /
-		tmpinfo.blocksize;
+		bufinfo.fragments = tmpinfo.hiwat - (tmpinfo.play.seek
+		+ tmpinfo.blocksize - 1) / tmpinfo.blocksize;
 		bufinfo.fragstotal = tmpinfo.hiwat;
-		bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
+		bufinfo.bytes = tmpinfo.hiwat * tmpinfo.blocksize
+		- tmpinfo.play.seek;
 		*(struct audio_buf_info *)argp = bufinfo;
 		break;
 	case SNDCTL_DSP_GETISPACE:

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.70 src/sys/compat/ossaudio/ossaudio.c:1.70.6.1
--- src/sys/compat/ossaudio/ossaudio.c:1.70	Fri Mar 24 14:32:29 2017
+++ src/sys/compat/ossaudio/ossaudio.c	Sat Feb  9 14:43:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.70 2017/03/24 14:32:29 nat Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.70.6.1 2019/02/09 14:43:08 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.70 2017/03/24 14:32:29 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.70.6.1 2019/02/09 14:43:08 martin Exp $");
 
 #include 
 #include 
@@ -619,11 +619,12 @@ oss_ioctl_audio(struct lwp *l, const str
 		}
 		setblocksize(fp, );
 		bufinfo.fragsize = tmpinfo.blocksize;
-		bufinfo.fragments = (tmpinfo.hiwat * tmpinfo.blocksize -
-		(tmpinfo.play.seek + tmpinfo.blocksize -1)) /
+		bufinfo.fragments = tmpinfo.hiwat -
+		(tmpinfo.play.seek + tmpinfo.blocksize - 1) /
 		tmpinfo.blocksize;
 		bufinfo.fragstotal = tmpinfo.hiwat;
-		bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
+		bufinfo.bytes =
+		tmpinfo.hiwat * tmpinfo.blocksize - tmpinfo.play.seek;
 		error = copyout(, SCARG(uap, data), sizeof bufinfo);
 		if (error) {
 			DPRINTF(("%s: SNDCTL_DSP_GETOSPACE = %d\n",



CVS commit: [netbsd-8] src/doc

2019-02-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb  9 14:43:40 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Ticket #1185


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-8.1

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

Modified files:

Index: src/doc/CHANGES-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.103 src/doc/CHANGES-8.1:1.1.2.104
--- src/doc/CHANGES-8.1:1.1.2.103	Fri Feb  8 16:05:46 2019
+++ src/doc/CHANGES-8.1	Sat Feb  9 14:43:40 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.103 2019/02/08 16:05:46 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.104 2019/02/09 14:43:40 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -2431,4 +2431,10 @@ sys/dev/raidframe/rf_disks.c			1.90
 	PR/53956: raidframe fails to create new raid set on disks.
 	[christos, ticket #1183]
 
+lib/libossaudio/ossaudio.c			1.35
+sys/compat/ossaudio/ossaudio.c			1.71
+
+	Fix SNDCTL_DSP_GETOSPACE.
+	[isaki, ticket #1185]
+
 



CVS commit: src/sys/compat/netbsd32

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb  9 11:30:13 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
- expand the comment about what netbsd32_machdep.h should provide.
- add missing NETBSD32_POINTER_TYPE
- add static inline functions to convert pointers to/from 32 bit,
  inclusing an overflow check for NETBSD32PTR32PLUS().


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/compat/netbsd32/netbsd32.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.121 src/sys/compat/netbsd32/netbsd32.h:1.122
--- src/sys/compat/netbsd32/netbsd32.h:1.121	Sun Jan 27 02:08:40 2019
+++ src/sys/compat/netbsd32/netbsd32.h	Sat Feb  9 11:30:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.121 2019/01/27 02:08:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.122 2019/02/09 11:30:13 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -76,10 +76,16 @@ typedef uint32_t netbsd32_uintptr_t;
 
 /*
  * machine dependant section; must define:
- *	netbsd32_pointer_t
+ *	NETBSD32_POINTER_TYPE
  *		- 32-bit pointer type, normally uint32_t but can be int32_t
  *		  for platforms which rely on sign-extension of pointers
  *		  such as SH-5.
+ *eg:	#define NETBSD32_POINTER_TYPE uint32_t
+ *	netbsd32_pointer_t
+ *		- a typedef'd struct with the above as an "i32" member.
+ *eg:	typedef struct {
+ *NETBSD32_POINTER_TYPE i32;
+ *			} netbsd32_pointer_t;
  *	NETBSD32PTR64(p32)
  *		- Translate a 32-bit pointer into something valid in a
  *		  64-bit context.
@@ -100,11 +106,6 @@ typedef uint32_t netbsd32_uintptr_t;
  */
 #include 
 
-/* netbsd32_machdep.h will have (typically) defined:
-#define NETBSD32_POINTER_TYPE uint32_t
-typedef	struct { NETBSD32_POINTER_TYPE i32; } netbsd32_pointer_t;
-*/
-
 /*
  * Conversion functions for the rest of the compat32 code:
  *
@@ -119,12 +120,33 @@ typedef	struct { NETBSD32_POINTER_TYPE i
  */
 #define	NETBSD32PTR64(p32)		NETBSD32IPTR64((p32).i32)
 #define	NETBSD32PTR32(p32, p64)		((p32).i32 = NETBSD32PTR32I(p64))
-#define	NETBSD32PTR32PLUS(p32, incr)	((p32).i32 += incr)
+#define	NETBSD32PTR32PLUS(p32, incr)	netbsd32_ptr32_incr(, incr)
+#define	NETBSD32PTR32I(p32)		netbsd32_ptr32i(p32)
+#define	NETBSD32IPTR64(p32)		netbsd32_iptr64(p32)
 
 static __inline NETBSD32_POINTER_TYPE
-NETBSD32PTR32I(const void *p64) { return (uintptr_t)p64; }
+netbsd32_ptr32i(const void *p64)
+{
+	uintptr_t u64 = (uintptr_t)p64;
+	KASSERT(u64 == (NETBSD32_POINTER_TYPE)u64);
+	return u64;
+}
+
 static __inline void *
-NETBSD32IPTR64(NETBSD32_POINTER_TYPE p32) { return (void *)(intptr_t)p32; }
+netbsd32_iptr64(NETBSD32_POINTER_TYPE p32)
+{
+	return (void *)(intptr_t)p32;
+}
+
+static __inline netbsd32_pointer_t
+netbsd32_ptr32_incr(netbsd32_pointer_t *p32, uint32_t incr)
+{
+	netbsd32_pointer_t n32 = *p32;
+
+	n32.i32 += incr;
+	KASSERT(NETBSD32PTR64(n32) > NETBSD32PTR64(*p32));
+	return *p32 = n32;
+}
 
 /* Nothing should be using the raw type, so kill it */
 #undef NETBSD32_POINTER_TYPE



CVS commit: src/sys/arch/sparc64/dev

2019-02-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb  9 11:27:06 UTC 2019

Modified Files:
src/sys/arch/sparc64/dev: iommu.c iommuvar.h schizo.c

Log Message:
on tomatillo unload the map before flushing the iommu, instead of
the reverse.  from opensolaris.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/sparc64/dev/iommu.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sparc64/dev/iommuvar.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sparc64/dev/schizo.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/sparc64/dev/iommu.c
diff -u src/sys/arch/sparc64/dev/iommu.c:1.114 src/sys/arch/sparc64/dev/iommu.c:1.115
--- src/sys/arch/sparc64/dev/iommu.c:1.114	Mon Sep  3 16:29:27 2018
+++ src/sys/arch/sparc64/dev/iommu.c	Sat Feb  9 11:27:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: iommu.c,v 1.114 2018/09/03 16:29:27 riastradh Exp $	*/
+/*	$NetBSD: iommu.c,v 1.115 2019/02/09 11:27:05 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.114 2018/09/03 16:29:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.115 2019/02/09 11:27:05 mrg Exp $");
 
 #include "opt_ddb.h"
 
@@ -748,10 +748,21 @@ iommu_dvmamap_unload(bus_dma_tag_t t, bu
 	/* Flush the iommu */
 	if (!map->_dm_dvmastart)
 		panic("%s: error dvmastart is zero!\n", __func__);
-	iommu_remove(is, map->_dm_dvmastart, map->_dm_dvmasize);
 
-	/* Flush the caches */
-	bus_dmamap_unload(t->_parent, map);
+	if (is->is_flags & IOMMU_SYNC_BEFORE_UNMAP) {
+
+		/* Flush the caches */
+		bus_dmamap_unload(t->_parent, map);
+
+		iommu_remove(is, map->_dm_dvmastart, map->_dm_dvmasize);
+
+	} else {
+
+		iommu_remove(is, map->_dm_dvmastart, map->_dm_dvmasize);
+
+		/* Flush the caches */
+		bus_dmamap_unload(t->_parent, map);
+	}
 
 	mutex_enter(>is_lock);
 	error = extent_free(is->is_dvmamap, map->_dm_dvmastart,

Index: src/sys/arch/sparc64/dev/iommuvar.h
diff -u src/sys/arch/sparc64/dev/iommuvar.h:1.22 src/sys/arch/sparc64/dev/iommuvar.h:1.23
--- src/sys/arch/sparc64/dev/iommuvar.h:1.22	Thu Sep  3 19:43:35 2015
+++ src/sys/arch/sparc64/dev/iommuvar.h	Sat Feb  9 11:27:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: iommuvar.h,v 1.22 2015/09/03 19:43:35 palle Exp $	*/
+/*	$NetBSD: iommuvar.h,v 1.23 2019/02/09 11:27:05 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -59,6 +59,7 @@ struct iommu_state {
 	int			is_flags;
 #define IOMMU_FLUSH_CACHE	0x0001
 #define IOMMU_TSBSIZE_IN_PTSB	0x0002	/* PCIe */
+#define IOMMU_SYNC_BEFORE_UNMAP	0x0004
 
 	struct strbuf_ctl	*is_sb[2];	/* Streaming buffers if any */
 

Index: src/sys/arch/sparc64/dev/schizo.c
diff -u src/sys/arch/sparc64/dev/schizo.c:1.40 src/sys/arch/sparc64/dev/schizo.c:1.41
--- src/sys/arch/sparc64/dev/schizo.c:1.40	Tue Feb  5 06:10:53 2019
+++ src/sys/arch/sparc64/dev/schizo.c	Sat Feb  9 11:27:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: schizo.c,v 1.40 2019/02/05 06:10:53 mrg Exp $	*/
+/*	$NetBSD: schizo.c,v 1.41 2019/02/09 11:27:05 mrg Exp $	*/
 /*	$OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $	*/
 
 /*
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.40 2019/02/05 06:10:53 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.41 2019/02/09 11:27:05 mrg Exp $");
 
 #include 
 #include 
@@ -263,6 +263,8 @@ schizo_attach(device_t parent, device_t 
 	}
 
 	aprint_normal_dev(sc->sc_dev, " ");
+	if (sc->sc_tomatillo)
+		is->is_flags |= IOMMU_SYNC_BEFORE_UNMAP;
 	schizo_init_iommu(sc, pbm);
 
 	pbm->sp_memt = schizo_alloc_mem_tag(pbm);



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:50:31 UTC 2019

Modified Files:
src/bin/sh: parser.c

Log Message:
Add a check that the file descriptor mentioned in a N> or N< type
redirect operator is within range of what the code tree node can
hold.   Currently this is a no-op change (the new error can never
occur) as the code already checks that N is in range for an int
(and errors if not) and the field in the node in which we store N
is also an int, so we cannot overflow - but fd's do not really need
to be that big (the max a typical kernel supports is < 1) so
this just adds validation in case it ever happens that we decide we
can save some node size (ie: sh memory) by making that field smaller.

Note this is parse time error detection, and has no bearing upon
the execution time error that will occur if a script attempts to use
an fd that exceeds the process's max fd limit.

NFCI (for now anyway.)


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/bin/sh/parser.c

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

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.165 src/bin/sh/parser.c:1.166
--- src/bin/sh/parser.c:1.165	Mon Feb  4 11:16:41 2019
+++ src/bin/sh/parser.c	Sat Feb  9 09:50:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.165 2019/02/04 11:16:41 kre Exp $	*/
+/*	$NetBSD: parser.c,v 1.166 2019/02/09 09:50:31 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,13 +37,14 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.165 2019/02/04 11:16:41 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.166 2019/02/09 09:50:31 kre Exp $");
 #endif
 #endif /* not lint */
 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 #include "shell.h"
 #include "parser.h"
@@ -1569,9 +1570,13 @@ parseredir(const char *out,  int c)
 	union node *np;
 	int fd;
 
-	fd = (*out == '\0') ? -1 : number(out);
-
 	np = stalloc(sizeof(struct nfile));
+
+	fd = (*out == '\0') ? -1 : number(out);		/* number(out) >= 0 */
+	np->nfile.fd = fd;	/* do this again later with updated fd */
+	if (fd != np->nfile.fd)
+		error("file descriptor (%d) out of range", fd);
+
 	VTRACE(DBG_LEXER, ("parseredir after '%s%c' ", out, c));
 	if (c == '>') {
 		if (fd < 0)



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:38:11 UTC 2019

Modified Files:
src/bin/sh: var.c

Log Message:
DTRT when dynamically generated variables return "unset" instead of
a value.   There are none which do that at the minute, so this is a NFCI
change, which is just making the code correct even though nothing
currently triggers any bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/bin/sh/var.c

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

Modified files:

Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.76 src/bin/sh/var.c:1.77
--- src/bin/sh/var.c:1.76	Sat Feb  9 03:35:55 2019
+++ src/bin/sh/var.c	Sat Feb  9 09:38:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.76 2019/02/09 03:35:55 kre Exp $	*/
+/*	$NetBSD: var.c,v 1.77 2019/02/09 09:38:11 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: var.c,v 1.76 2019/02/09 03:35:55 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.77 2019/02/09 09:38:11 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -562,13 +562,19 @@ char *
 lookupvar(const char *name)
 {
 	struct var *v;
+	char *p;
 
 	v = find_var(name, NULL, NULL);
 	if (v == NULL || v->flags & VUNSET)
 		return NULL;
-	if (v->rfunc && (v->flags & VFUNCREF) != 0)
-		return (*v->rfunc)(v) + v->name_len + 1;
-	return v->text + v->name_len + 1;
+	if (v->rfunc && (v->flags & VFUNCREF) != 0) {
+		p = (*v->rfunc)(v);
+		if (p == NULL)
+			return NULL;
+	} else
+		p = v->text;
+
+	return p + v->name_len + 1;
 }
 
 
@@ -584,6 +590,7 @@ bltinlookup(const char *name, int doall)
 {
 	struct strlist *sp;
 	struct var *v;
+	char *p;
 
 	for (sp = cmdenviron ; sp ; sp = sp->next) {
 		if (strequal(sp->text, name))
@@ -594,9 +601,15 @@ bltinlookup(const char *name, int doall)
 
 	if (v == NULL || v->flags & VUNSET || (!doall && !(v->flags & VEXPORT)))
 		return NULL;
-	if (v->rfunc && (v->flags & VFUNCREF) != 0)
-		return (*v->rfunc)(v) + v->name_len + 1;
-	return v->text + v->name_len + 1;
+
+	if (v->rfunc && (v->flags & VFUNCREF) != 0) {
+		p = (*v->rfunc)(v);
+		if (p == NULL)
+			return NULL;
+	} else
+		p = v->text;
+
+	return p + v->name_len + 1;
 }
 
 
@@ -626,9 +639,11 @@ environment(void)
 	for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
 		for (vp = *vpp ; vp ; vp = vp->next)
 			if ((vp->flags & (VEXPORT|VUNSET)) == VEXPORT) {
-if (vp->rfunc && (vp->flags & VFUNCREF))
-	*ep++ = (*vp->rfunc)(vp);
-else
+if (vp->rfunc && (vp->flags & VFUNCREF)) {
+	*ep = (*vp->rfunc)(vp);
+	if (*ep != NULL)
+		ep++;
+} else
 	*ep++ = vp->text;
 VTRACE(DBG_VARS, ("environment: %s\n", ep[-1]));
 			}
@@ -763,16 +778,20 @@ showvar(struct var *vp, const char *cmd,
 {
 	const char *p;
 
-	if (cmd)
-		out1fmt("%s ", cmd);
-	if (xtra)
-		out1fmt("%s ", xtra);
 	p = vp->text;
 	if (vp->rfunc && (vp->flags & VFUNCREF) != 0) {
 		p = (*vp->rfunc)(vp);
-		if (p == NULL)
+		if (p == NULL) {
+			if (!(show_value & 2))
+return;
 			p = vp->text;
+			show_value = 0;
+		}
 	}
+	if (cmd)
+		out1fmt("%s ", cmd);
+	if (xtra)
+		out1fmt("%s ", xtra);
 	for ( ; *p != '=' ; p++)
 		out1c(*p);
 	if (!(vp->flags & VUNSET) && show_value) {



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:34:43 UTC 2019

Modified Files:
src/bin/sh: redir.c

Log Message:
DEBUG mode change only.  Add one extra trace point.   NFC for normal builds.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/bin/sh/redir.c

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

Modified files:

Index: src/bin/sh/redir.c
diff -u src/bin/sh/redir.c:1.63 src/bin/sh/redir.c:1.64
--- src/bin/sh/redir.c:1.63	Sat Feb  9 03:35:55 2019
+++ src/bin/sh/redir.c	Sat Feb  9 09:34:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: redir.c,v 1.63 2019/02/09 03:35:55 kre Exp $	*/
+/*	$NetBSD: redir.c,v 1.64 2019/02/09 09:34:43 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)redir.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: redir.c,v 1.63 2019/02/09 03:35:55 kre Exp $");
+__RCSID("$NetBSD: redir.c,v 1.64 2019/02/09 09:34:43 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -425,6 +425,7 @@ openhere(const union node *redir)
 			xwrite(pip[1], redir->nhere.doc->narg.text, len);
 		else
 			expandhere(redir->nhere.doc, pip[1]);
+		VTRACE(DBG_PROCS|DBG_REDIR, ("wrote here doc.  exiting\n"));
 		_exit(0);
 	}
 	VTRACE(DBG_REDIR, ("openhere (closing %d)", pip[1]));



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:33:21 UTC 2019

Modified Files:
src/bin/sh: main.c

Log Message:
When an interactive shell exits due to an EOF on stdin, send a newline
to stderr (to follow the previous prompt) and cleanup more nicely.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/bin/sh/main.c

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

Modified files:

Index: src/bin/sh/main.c
diff -u src/bin/sh/main.c:1.81 src/bin/sh/main.c:1.82
--- src/bin/sh/main.c:1.81	Mon Feb  4 11:16:41 2019
+++ src/bin/sh/main.c	Sat Feb  9 09:33:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.81 2019/02/04 11:16:41 kre Exp $	*/
+/*	$NetBSD: main.c,v 1.82 2019/02/09 09:33:20 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.7 (Berkeley) 7/19/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.81 2019/02/04 11:16:41 kre Exp $");
+__RCSID("$NetBSD: main.c,v 1.82 2019/02/09 09:33:20 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -244,6 +244,10 @@ main(int argc, char **argv)
 	if (sflag || minusc == NULL) {
  state4:	/* XXX ??? - why isn't this before the "if" statement */
 		cmdloop(1);
+		if (iflag) {
+			out2str("\n");
+			flushout();
+		}
 	}
 #if PROFILE
 	monitor(0);



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:31:33 UTC 2019

Modified Files:
src/bin/sh: jobs.c

Log Message:
In the unlikely event that restarting a job fails (the fg bg and various
%x commands) generate the most useful error message (from errno value)
rather than whichever happened last.

In posix mode, cause the "jobs" command to delete records of completed
jobs it reports on (as posix requires) as is done in interactive shells.
We don't (won't) do this in !posix mode, as the ability to throw in a
"jobs" command in a script to debug what is happening is too useful to
lose -- and any script that is relying on "jobs" instead of "wait" to
cleanup background processes (from the sh jobs table, sh always collects
zombies from the kernel) is absurd and not worth considering (besides
which I've never seen one).


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/bin/sh/jobs.c

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

Modified files:

Index: src/bin/sh/jobs.c
diff -u src/bin/sh/jobs.c:1.104 src/bin/sh/jobs.c:1.105
--- src/bin/sh/jobs.c:1.104	Sat Feb  9 03:35:55 2019
+++ src/bin/sh/jobs.c	Sat Feb  9 09:31:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: jobs.c,v 1.104 2019/02/09 03:35:55 kre Exp $	*/
+/*	$NetBSD: jobs.c,v 1.105 2019/02/09 09:31:33 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)jobs.c	8.5 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: jobs.c,v 1.104 2019/02/09 03:35:55 kre Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.105 2019/02/09 09:31:33 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -374,16 +374,19 @@ STATIC void
 restartjob(struct job *jp)
 {
 	struct procstat *ps;
-	int i;
+	int i, e;
 
 	if (jp->state == JOBDONE)
 		return;
 	INTOFF;
-	for (i = 0; i < jp->nprocs; i++)
+	for (e = i = 0; i < jp->nprocs; i++) {
 		if (killpg(jp->ps[i].pid, SIGCONT) != -1)
 			break;
+		if (e == 0 && errno != ESRCH)
+			e = errno;
+	}
 	if (i >= jp->nprocs)
-		error("Cannot continue job (%s)", strerror(errno));
+		error("Cannot continue job (%s)", strerror(e ? e : ESRCH));
 	for (ps = jp->ps, i = jp->nprocs ; --i >= 0 ; ps++) {
 		if (WIFSTOPPED(ps->status)) {
 			VTRACE(DBG_JOBS, (
@@ -535,13 +538,15 @@ jobscmd(int argc, char **argv)
 			mode = SHOW_PID;
 		else
 			mode = SHOW_PGID;
-	if (!iflag)
+
+	if (!iflag && !posix)
 		mode |= SHOW_NO_FREE;
-	if (*argptr)
+
+	if (*argptr) {
 		do
 			showjob(out1, getjob(*argptr,0), mode);
 		while (*++argptr);
-	else
+	} else
 		showjobs(out1, mode);
 	return 0;
 }



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:20:47 UTC 2019

Modified Files:
src/bin/sh: input.c

Log Message:
KNF - white space changes, indent using tabs not spaces.   NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/bin/sh/input.c

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

Modified files:

Index: src/bin/sh/input.c
diff -u src/bin/sh/input.c:1.70 src/bin/sh/input.c:1.71
--- src/bin/sh/input.c:1.70	Sat Feb  9 03:35:55 2019
+++ src/bin/sh/input.c	Sat Feb  9 09:20:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: input.c,v 1.70 2019/02/09 03:35:55 kre Exp $	*/
+/*	$NetBSD: input.c,v 1.71 2019/02/09 09:20:47 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)input.c	8.3 (Berkeley) 6/9/95";
 #else
-__RCSID("$NetBSD: input.c,v 1.70 2019/02/09 03:35:55 kre Exp $");
+__RCSID("$NetBSD: input.c,v 1.71 2019/02/09 09:20:47 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -216,22 +216,22 @@ preadfd(void)
 
 
 	if (nr <= 0) {
-if (nr < 0) {
-if (errno == EINTR)
-goto retry;
-if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
-int flags = fcntl(0, F_GETFL, 0);
-
-if (flags >= 0 && flags & O_NONBLOCK) {
-flags &=~ O_NONBLOCK;
-if (fcntl(0, F_SETFL, flags) >= 0) {
+		if (nr < 0) {
+			if (errno == EINTR)
+goto retry;
+			if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
+int flags = fcntl(0, F_GETFL, 0);
+
+if (flags >= 0 && flags & O_NONBLOCK) {
+	flags &=~ O_NONBLOCK;
+	if (fcntl(0, F_SETFL, flags) >= 0) {
 		out2str("sh: turning off NDELAY mode\n");
-goto retry;
-}
-}
-}
-}
-nr = -1;
+		goto retry;
+	}
+}
+			}
+		}
+		nr = -1;
 	}
 	return nr;
 }



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:17:59 UTC 2019

Modified Files:
src/bin/sh: eval.c

Log Message:
DEBUG mode build changes - add extra trace output.

NFC for any normal shell build.


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.173 src/bin/sh/eval.c:1.174
--- src/bin/sh/eval.c:1.173	Sat Feb  9 09:15:22 2019
+++ src/bin/sh/eval.c	Sat Feb  9 09:17:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.173 2019/02/09 09:15:22 kre Exp $	*/
+/*	$NetBSD: eval.c,v 1.174 2019/02/09 09:17:59 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.173 2019/02/09 09:15:22 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.174 2019/02/09 09:17:59 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -976,6 +976,7 @@ evalcommand(union node *cmd, int flgs, s
 		 */
 		cmdentry.cmdtype = CMDBUILTIN;
 		cmdentry.u.bltin = bltincmd;
+		VTRACE(DBG_CMDS, ("No command name, assume \"comamnd\"\n"));
 	} else {
 		static const char PATH[] = "PATH=";
 
@@ -991,6 +992,8 @@ evalcommand(union node *cmd, int flgs, s
 			int argsused, use_syspath;
 
 			find_command(argv[0], , cmd_flags, path);
+			VTRACE(DBG_CMDS, ("Command %s type %d\n", argv[0],
+			cmdentry.cmdtype));
 #if 0
 			/*
 			 * This short circuits all of the processing that
@@ -1010,10 +1013,13 @@ evalcommand(union node *cmd, int flgs, s
 			if (cmdentry.cmdtype != CMDBUILTIN ||
 			cmdentry.u.bltin != bltincmd)
 break;
+			VTRACE(DBG_CMDS, ("Command \"command\"\n"));
 			cmd_flags |= DO_NOFUNC;
 			argsused = parse_command_args(argc, argv, _syspath);
 			if (argsused == 0) {
 /* use 'type' builtin to display info */
+VTRACE(DBG_CMDS,
+("Command \"command\" -> \"type\"\n"));
 cmdentry.u.bltin = typecmd;
 break;
 			}
@@ -1118,6 +1124,9 @@ evalcommand(union node *cmd, int flgs, s
 			default:
 VFORK_UNDO();
 		/* restore from vfork(2) */
+CTRACE(DBG_PROCS|DBG_CMDS,
+("parent after vfork - vforked=%d\n",
+  vforked));
 handler = savehandler;
 poplocalvars();
 localvars = savelocalvars;
@@ -1146,6 +1155,7 @@ evalcommand(union node *cmd, int flgs, s
 #endif
 			if (forkshell(jp, cmd, mode) != 0)
 goto parent;	/* at end of routine */
+			CTRACE(DBG_PROCS|DBG_CMDS, ("Child sets EV_EXIT\n"));
 			flags |= EV_EXIT;
 			FORCEINTON;
 #ifdef DO_SHAREDVFORK



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:15:22 UTC 2019

Modified Files:
src/bin/sh: eval.c

Log Message:
Delete extern decl for trap[] - hasn't been needed for a while now.


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.172 src/bin/sh/eval.c:1.173
--- src/bin/sh/eval.c:1.172	Sat Feb  9 03:35:55 2019
+++ src/bin/sh/eval.c	Sat Feb  9 09:15:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.172 2019/02/09 03:35:55 kre Exp $	*/
+/*	$NetBSD: eval.c,v 1.173 2019/02/09 09:15:22 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.172 2019/02/09 03:35:55 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.173 2019/02/09 09:15:22 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -841,7 +841,6 @@ parse_command_args(int argc, char **argv
 }
 
 int vforked = 0;
-extern char *trap[];
 
 /*
  * Execute a simple command.



CVS commit: src/bin/sh

2019-02-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Feb  9 09:11:07 UTC 2019

Modified Files:
src/bin/sh: alias.c

Log Message:
Allocate alias pointers for qsort() to use on the stack, rather than
directly via malloc() so they get cleaned up correctly on error/intr.

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/sh/alias.c

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

Modified files:

Index: src/bin/sh/alias.c
diff -u src/bin/sh/alias.c:1.20 src/bin/sh/alias.c:1.21
--- src/bin/sh/alias.c:1.20	Mon Dec  3 06:40:26 2018
+++ src/bin/sh/alias.c	Sat Feb  9 09:11:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: alias.c,v 1.20 2018/12/03 06:40:26 kre Exp $	*/
+/*	$NetBSD: alias.c,v 1.21 2019/02/09 09:11:07 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)alias.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: alias.c,v 1.20 2018/12/03 06:40:26 kre Exp $");
+__RCSID("$NetBSD: alias.c,v 1.21 2019/02/09 09:11:07 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -63,7 +63,7 @@ STATIC void list_aliases(void);
 STATIC int unalias(char *);
 STATIC struct alias **freealias(struct alias **, int);
 STATIC struct alias **hashalias(const char *);
-STATIC size_t countaliases(void);
+STATIC int countaliases(void);
 
 STATIC
 void
@@ -196,13 +196,13 @@ by_name(const void *a, const void *b)
 STATIC void
 list_aliases(void)
 {
-	size_t i, j, n;
+	int i, j, n;
 	const struct alias **aliases;
 	const struct alias *ap;
 
 	INTOFF;
 	n = countaliases();
-	aliases = ckmalloc(n * sizeof aliases[0]);
+	aliases = stalloc(n * (int)(sizeof aliases[0]));
 
 	j = 0;
 	for (i = 0; i < ATABSIZE; i++)
@@ -221,7 +221,7 @@ list_aliases(void)
 		out1c('\n');
 	}
 
-	ckfree(aliases);
+	stunalloc(aliases);
 }
 
 /*
@@ -230,7 +230,7 @@ list_aliases(void)
  * Use this opportunity to clean up any of those
  * zombies that are no longer needed.
  */
-STATIC size_t
+STATIC int
 countaliases(void)
 {
 	struct alias *ap, **app;



CVS commit: src/share/man/man4

2019-02-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Feb  9 08:08:32 UTC 2019

Modified Files:
src/share/man/man4: rgephy.4

Log Message:
Add 8153, sort adapters.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/rgephy.4

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

Modified files:

Index: src/share/man/man4/rgephy.4
diff -u src/share/man/man4/rgephy.4:1.3 src/share/man/man4/rgephy.4:1.4
--- src/share/man/man4/rgephy.4:1.3	Sat Dec 28 13:57:19 2013
+++ src/share/man/man4/rgephy.4	Sat Feb  9 08:08:32 2019
@@ -1,6 +1,6 @@
 .\"	$OpenBSD: rgephy.4,v 1.3 2004/09/30 19:59:25 mickey Exp $
 .\"
-.\"	$NetBSD: rgephy.4,v 1.3 2013/12/28 13:57:19 pgoyette Exp $
+.\"	$NetBSD: rgephy.4,v 1.4 2019/02/09 08:08:32 rin Exp $
 .\"
 .\" Copyright (c) 2004 Peter Valchev 
 .\"
@@ -16,18 +16,18 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd December 28, 2013
+.Dd February 9, 2019
 .Dt RGEPHY 4
 .Os
 .Sh NAME
 .Nm rgephy
-.Nd Realtek 8169S/8110S/8211 internal 10/100/1000 PHY driver
+.Nd Realtek 8110S/8153/8169S/8211 internal 10/100/1000 PHY driver
 .Sh SYNOPSIS
 .Cd "rgephy* at mii? phy ?"
 .Sh DESCRIPTION
 The
 .Nm
-driver supports the internal PHY found on Realtek 8169S/8110S/8211
+driver supports the internal PHY found on Realtek 8110S/8153/8169S/8211
 Ethernet adapters.
 .Sh SEE ALSO
 .Xr axen 4 ,



CVS commit: src/share/man/man4

2019-02-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Feb  9 08:07:13 UTC 2019

Modified Files:
src/share/man/man4: rlphy.4

Log Message:
Add Realtek RTL8201E and IC Plus IP101.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/rlphy.4

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

Modified files:

Index: src/share/man/man4/rlphy.4
diff -u src/share/man/man4/rlphy.4:1.2 src/share/man/man4/rlphy.4:1.3
--- src/share/man/man4/rlphy.4:1.2	Thu Jan  5 12:32:27 2006
+++ src/share/man/man4/rlphy.4	Sat Feb  9 08:07:13 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rlphy.4,v 1.2 2006/01/05 12:32:27 xtraeme Exp $
+.\"	$NetBSD: rlphy.4,v 1.3 2019/02/09 08:07:13 rin Exp $
 .\"	$OpenBSD: rlphy.4,v 1.11 2005/09/19 21:54:11 jmc Exp $
 .\"
 .\" Copyright (c) 1998 Jason L. Wright (ja...@thought.net)
@@ -25,12 +25,12 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 5, 2006
+.Dd February 9, 2019
 .Dt RLPHY 4
 .Os
 .Sh NAME
 .Nm rlphy
-.Nd Realtek 8139/8201L Ethernet PHY driver
+.Nd Realtek 8139/8201 and IC Plus IP101 Ethernet PHY driver
 .Sh SYNOPSIS
 .Cd "rlphy* at mii? phy ?"
 .Sh DESCRIPTION
@@ -39,9 +39,13 @@ The
 driver supports the internal physical layer interface (PHY) found on
 Realtek Semiconductor
 .Tn RTL8139
-based Ethernet adapters, as well as the
-.Tn RTL8201L
-Ethernet PHY chip.
+based Ethernet adapters,
+.Tn RTL8201E ,
+.Tn RTL8201L ,
+and
+IC Plus Corp
+.Tn IP101
+Ethernet PHY chips.
 .Sh SEE ALSO
 .Xr ifmedia 4 ,
 .Xr intro 4 ,