CVS commit: src

2020-05-18 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue May 19 06:26:37 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.sparc64: Makefile

Log Message:
Add tadpmu to Makefile and set list.


To generate a diff of this commit:
cvs rdiff -u -r1.1690 -r1.1691 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/man4.sparc64/Makefile

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1690 src/distrib/sets/lists/man/mi:1.1691
--- src/distrib/sets/lists/man/mi:1.1690	Sat May 16 19:05:05 2020
+++ src/distrib/sets/lists/man/mi	Tue May 19 06:26:37 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1690 2020/05/16 19:05:05 christos Exp $
+# $NetBSD: mi,v 1.1691 2020/05/19 06:26:37 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1775,6 +1775,7 @@
 ./usr/share/man/cat4/sparc64/lom.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/sab.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/sabtty.0		man-sys-catman		.cat
+./usr/share/man/cat4/sparc64/tadpmu.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/tda.0		man-sys-catman		.cat
 ./usr/share/man/cat4/spc.0			man-sys-catman		.cat
 ./usr/share/man/cat4/spdmem.0			man-sys-catman		.cat
@@ -4907,6 +4908,7 @@
 ./usr/share/man/html4/sparc64/lom.html		man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/sab.html		man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/sabtty.html	man-sys-htmlman		html
+./usr/share/man/html4/sparc64/tadpmu.html	man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/tda.html		man-sys-htmlman		html
 ./usr/share/man/html4/spc.html			man-sys-htmlman		html
 ./usr/share/man/html4/spdmem.html		man-sys-htmlman		html
@@ -7949,6 +7951,7 @@
 ./usr/share/man/man4/sparc64/lom.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/sab.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/sabtty.4		man-sys-man		.man
+./usr/share/man/man4/sparc64/tadpmu.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/tda.4		man-sys-man		.man
 ./usr/share/man/man4/spc.4			man-sys-man		.man
 ./usr/share/man/man4/spdmem.4			man-sys-man		.man

Index: src/share/man/man4/man4.sparc64/Makefile
diff -u src/share/man/man4/man4.sparc64/Makefile:1.7 src/share/man/man4/man4.sparc64/Makefile:1.8
--- src/share/man/man4/man4.sparc64/Makefile:1.7	Sun Feb  3 14:51:57 2013
+++ src/share/man/man4/man4.sparc64/Makefile	Tue May 19 06:26:37 2020
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2013/02/03 14:51:57 jdc Exp $
+# $NetBSD: Makefile,v 1.8 2020/05/19 06:26:37 jdc Exp $
 
 MANSUBDIR=/sparc64
 
-MAN=	envctrl.4 ffb.4 fdc.4 intro.4 lom.4 sab.4 tda.4
+MAN=	envctrl.4 ffb.4 fdc.4 intro.4 lom.4 sab.4 tadpmu.4 tda.4
 
 MLINKS+=	sab.4 sabtty.4
 



CVS commit: src/doc

2020-05-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue May 19 04:04:50 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note rockchip RNG.


To generate a diff of this commit:
cvs rdiff -u -r1.2690 -r1.2691 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2690 src/doc/CHANGES:1.2691
--- src/doc/CHANGES:1.2690	Sat May 16 18:37:32 2020
+++ src/doc/CHANGES	Tue May 19 04:04:50 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2690 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2691 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -206,3 +206,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[riastradh 20200514]
 	ACL: Add FFS support for ACLS via extended attributes, from FreeBSD.
 		[christos 20200516]
+	evbarm: Added support for Rockchip RK3399 crypto random number
+		generator device [riastradh 20200517]



CVS commit: src/external/bsd/blacklist/bin

2020-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 19 00:56:25 UTC 2020

Modified Files:
src/external/bsd/blacklist/bin: blacklistd.conf.5

Log Message:
Typo fixes from FreeBSD via Ed Maste


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/blacklist/bin/blacklistd.conf.5

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/blacklist/bin/blacklistd.conf.5
diff -u src/external/bsd/blacklist/bin/blacklistd.conf.5:1.9 src/external/bsd/blacklist/bin/blacklistd.conf.5:1.10
--- src/external/bsd/blacklist/bin/blacklistd.conf.5:1.9	Wed Nov  6 15:33:30 2019
+++ src/external/bsd/blacklist/bin/blacklistd.conf.5	Mon May 18 20:56:25 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: blacklistd.conf.5,v 1.9 2019/11/06 20:33:30 para Exp $
+.\" $NetBSD: blacklistd.conf.5,v 1.10 2020/05/19 00:56:25 christos Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 5, 2017
+.Dd May 18, 2020
 .Dt BLACKLISTD.CONF 5
 .Os
 .Sh NAME
@@ -125,18 +125,18 @@ The second field is the socket
 .Dv dgram ,
 or numeric.
 The third field is the
-.Va prococol :
+.Va protocol :
 .Dv tcp ,
 .Dv udp ,
 .Dv tcp6 ,
 .Dv udp6 ,
 or numeric.
-The fourth file is the effective user
+The fourth field is the effective user
 .Va ( owner )
 of the daemon process reporting the event,
 either as a username or a userid.
 .Pp
-The rest of the fields are controlling the behavior of the filter.
+The rest of the fields control the behavior of the filter.
 .Pp
 The
 .Va name



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

2020-05-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon May 18 21:28:10 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
fix build on netbsd-9 hosts.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.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/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.7 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.8
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.7	Tue Apr 28 03:00:23 2020
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Mon May 18 21:28:10 2020
@@ -365,6 +365,7 @@ host_detect_local_cpu (int argc, const c
 	{
 	  exts += "asimd ";
 	}
+#ifdef ID_AA64ISAR0_EL1_RDM
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_RDM) == ID_AA64ISAR0_EL1_RDM_SQRDML)
 	{
 	  exts += "asimdrdm ";
@@ -377,6 +378,7 @@ host_detect_local_cpu (int argc, const c
 	{
 	  exts += "asimdfml ";
 	}
+#endif
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES) == ID_AA64ISAR0_EL1_AES_AES)
 	{
 	  exts += "aes ";
@@ -389,10 +391,12 @@ host_detect_local_cpu (int argc, const c
 	{
 	  exts += "crc32 ";
 	}
+#ifdef ID_AA64ISAR0_EL1_ATOMIC
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_ATOMIC) == ID_AA64ISAR0_EL1_ATOMIC_SWP)
 	{
 	  exts += "atomics ";
 	}
+#endif
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA1) & ID_AA64ISAR0_EL1_SHA1_SHA1CPMHSU) != 0)
 	{
 	  exts += "sha1 ";
@@ -401,6 +405,7 @@ host_detect_local_cpu (int argc, const c
 	{
 	  exts += "sha2 ";
 	}
+#ifdef ID_AA64ISAR0_EL1_SHA2_SHA512HSU
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA2) & ID_AA64ISAR0_EL1_SHA2_SHA512HSU) != 0)
 	{
 	  exts += "sha512 ";
@@ -425,6 +430,7 @@ host_detect_local_cpu (int argc, const c
 	{
 	  exts += "lrcpc ";
 	}
+#endif
 
 	  strncpy(buf, exts.c_str(), sizeof(buf) - 1);
 	  buf[sizeof(buf) - 1] = '\0';



CVS commit: src

2020-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 21:19:36 UTC 2020

Modified Files:
src: build.sh
src/distrib/sets: README comments deps descrs maketars regpkgset
sets.subr
src/distrib/sets/lists/base: mi
src/distrib/utils/embedded: mkimage
src/distrib/utils/embedded/conf: arm64.conf armv7.conf rpi.conf
rpi_inst.conf
src/etc: Makefile
src/etc/etc.evbarm: Makefile.inc
src/etc/mtree: Makefile
src/share/mk: Makefile bsd.README bsd.own.mk
src/sys: Makefile
src/sys/arch/evbarm/conf: GENERIC GENERIC64 IMX RPI RPI2
src/usr.sbin/sysinst: Makefile.inc defs.h msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c
Added Files:
src/distrib/sets/lists/dtb: ad.aarch64 ad.earmv6 ad.earmv6eb
ad.earmv6hf ad.earmv6hfeb ad.earmv7 ad.earmv7hf ad.earmv7hfeb mi
src/etc/mtree: NetBSD.dist.dtb
src/share/mk: bsd.dtb.mk
src/sys/dtb: Makefile
src/sys/dtb/arm: Makefile
src/sys/dtb/arm64: Makefile Makefile.inc
src/sys/dtb/arm64/allwinner: Makefile
src/sys/dtb/arm64/amlogic: Makefile
src/sys/dtb/arm64/broadcom: Makefile
src/sys/dtb/arm64/freescale: Makefile
src/sys/dtb/arm64/nvidia: Makefile
src/sys/dtb/arm64/rockchip: Makefile

Log Message:
Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/build.sh
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/README
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/comments src/distrib/sets/descrs
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/deps
cvs rdiff -u -r1.90 -r1.91 src/distrib/sets/maketars
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/regpkgset
cvs rdiff -u -r1.190 -r1.191 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1243 -r1.1244 src/distrib/sets/lists/base/mi
cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/dtb/ad.aarch64 \
src/distrib/sets/lists/dtb/ad.earmv6 \
src/distrib/sets/lists/dtb/ad.earmv6eb \
src/distrib/sets/lists/dtb/ad.earmv6hf \
src/distrib/sets/lists/dtb/ad.earmv6hfeb \
src/distrib/sets/lists/dtb/ad.earmv7 \
src/distrib/sets/lists/dtb/ad.earmv7hf \
src/distrib/sets/lists/dtb/ad.earmv7hfeb src/distrib/sets/lists/dtb/mi
cvs rdiff -u -r1.71 -r1.72 src/distrib/utils/embedded/mkimage
cvs rdiff -u -r1.9 -r1.10 src/distrib/utils/embedded/conf/arm64.conf
cvs rdiff -u -r1.40 -r1.41 src/distrib/utils/embedded/conf/armv7.conf
cvs rdiff -u -r1.35 -r1.36 src/distrib/utils/embedded/conf/rpi.conf
cvs rdiff -u -r1.15 -r1.16 src/distrib/utils/embedded/conf/rpi_inst.conf
cvs rdiff -u -r1.444 -r1.445 src/etc/Makefile
cvs rdiff -u -r1.114 -r1.115 src/etc/etc.evbarm/Makefile.inc
cvs rdiff -u -r1.41 -r1.42 src/etc/mtree/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/mtree/NetBSD.dist.dtb
cvs rdiff -u -r1.51 -r1.52 src/share/mk/Makefile
cvs rdiff -u -r1.402 -r1.403 src/share/mk/bsd.README
cvs rdiff -u -r0 -r1.1 src/share/mk/bsd.dtb.mk
cvs rdiff -u -r1.1188 -r1.1189 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.85 -r1.86 src/sys/Makefile
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/IMX
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/evbarm/conf/RPI
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/RPI2
cvs rdiff -u -r0 -r1.1 src/sys/dtb/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/Makefile \
src/sys/dtb/arm64/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/allwinner/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/amlogic/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/broadcom/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/freescale/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/nvidia/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dtb/arm64/rockchip/Makefile
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/Makefile.inc
cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/util.c

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.334 src/build.sh:1.335
--- src/build.sh:1.334	Sat Mar 28 20:13:13 2020
+++ src/build.sh	Mon May 18 21:19:34 2020
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.334 2020/03/28 20:13:13 jmcneill Exp $
+#	$NetBSD: build.sh,v 1.335 2020

CVS commit: src/usr.bin/calendar/calendars

2020-05-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon May 18 20:57:06 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars: calendar.birthday

Log Message:
Add Margaret Hamilton, Florian Schneider, Ron Hardy, Little Richard


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/calendar/calendars/calendar.birthday

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.birthday
diff -u src/usr.bin/calendar/calendars/calendar.birthday:1.42 src/usr.bin/calendar/calendars/calendar.birthday:1.43
--- src/usr.bin/calendar/calendars/calendar.birthday:1.42	Mon May 11 12:42:58 2020
+++ src/usr.bin/calendar/calendars/calendar.birthday	Mon May 18 20:57:06 2020
@@ -80,6 +80,7 @@
 02/29	Herman Hollerith born, 1860
 03/01	David Niven born, 1910
 03/02	Dr. Seuss born, 1904
+03/02	Ron Hardy died in Chicago, Illinois, 1992
 03/04	Casimir Pulaski born, 1747
 03/05	John Belushi dies in Los Angeles, 1982
 03/07	Sir John Frederick William Herschel born, 1792, astronomer
@@ -112,6 +113,7 @@
 04/01	Alan Jay Perlis was born in Pittsburgh, Pennsylvania, 1922
 04/03	Washington Irving born, 1783
 04/05	Thomas Hobbes born, 1588, philosopher
+04/07	Florian Schneider-Esleben was born in Baden-Wurttemberg, Germany, 1947
 04/08	Buddha born, 563 BC
 04/08	David Rittenhouse born, 1732, astronomer & mathematician
 04/09	Edward Muybridge born, 1830, motion-picture pioneer
@@ -123,6 +125,7 @@
 		discovered Saturn's rings
 04/15	Leonardo da Vinci born, 1452
 04/16	Charles (Charlie) Chaplin (Sir) born in London, 1889
+04/21	Florian Schneider-Esleben died in Dusseldorf, Germany, 2020
 04/22	Immanuel Kant born, 1724
 04/24	Lawrence Gordon Tesler was born in The Bronx, New York City, 1945
 04/27	Louis Victor de Broglie born, 1774, physicist
@@ -133,6 +136,9 @@
 05/01	Little Walter (Marion Walter Jacobs) born in Alexandria,
 		Louisiana, 1930
 05/02	Dr. Benjamin Spock born, 1903
+05/08	Ron Hardy was born in Chicago, Illinois, 1958
+05/09	Little Richard (Richard Wayne Penniman) died in Tullahoma, Tennessee,
+		2020
 05/09	Pinza died, 1957
 05/10	Fred Astaire (Frederick Austerlitz) born in Omaha, Nebraska, 1899
 05/10	William Robert "Bert" Sutherland was born in Hastings, Nebraska, 1936
@@ -197,6 +203,7 @@
 08/13	Annie Oakley born, 1860
 08/13	Fidel Castro born, 1927
 08/17	Mae West born, 1892
+08/17	Margaret Heafield Hamilton was born in Paoli, Indiana, 1936
 08/18	Meriwether Lewis born, 1774, American explorer
 08/20	Leon Trotsky assassinated, 1940
 08/23	Gene Kelly born, 1912
@@ -275,6 +282,8 @@
 11/30	Mark Twain (Samuel Clemens) born in Florida, Missouri, 1835
 12/01	Woody Allen (Allen Stuart Konigsberg) born in Brooklyn, NY, 1935
 12/04	Tommy Bolin dies of a heroin overdose in Miami, 1976
+12/05	Little Richard (Richard Wayne Penniman) was born in Macon, Georgia,
+		1932
 12/05	Walt (Walter Elias) Disney born in Chicago, 1901
 12/08	Horace (Quintus Horatius Flaccus) born in Venosa (Italy), 65 BC
 12/08	James (Grover) Thurber born in Columbus, Ohio, 1894



CVS commit: src/share/misc

2020-05-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon May 18 20:28:44 UTC 2020

Modified Files:
src/share/misc: acronyms.comp

Log Message:
BMP, DGEMM, DIB, GEMM, WMF


To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.303 src/share/misc/acronyms.comp:1.304
--- src/share/misc/acronyms.comp:1.303	Tue May  5 01:28:17 2020
+++ src/share/misc/acronyms.comp	Mon May 18 20:28:44 2020
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.303 2020/05/05 01:28:17 ginsbach Exp $
+$NetBSD: acronyms.comp,v 1.304 2020/05/18 20:28:44 sevan Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -155,6 +155,8 @@ BLE	Bluetooth low energy
 BLOB	binary large object
 BM	bus master
 BMC	baseboard management controller
+BMP	basic multilingual plane
+BMP	bitmap image file
 BMIC	bus master interface controller
 BN	boundary neutral
 BNF	Backus-Naur form
@@ -394,9 +396,11 @@ DFSAN	Data Flow Sanitizer
 DFT	diagnostic function test
 DFT	discrete Fourier transform
 DGL	data generation language
+DGEMM	double precision general matrix multiply
 DH	Diffie-Hellman
 DHCP	Dynamic Host Configuration Protocol
 DIA	dedicated Internet access
+DIB	device independent bitmap
 DIFS	distributed inter-frame space
 DIMM	dual inline memory module
 DIRT	design in real time
@@ -617,6 +621,7 @@ GDT	global descriptor table
 GECOS	general comprehensive operating supervisor
 GEM	graphics environment manager
 GEM	graphics execution manager
+GEMM	general matrix multiply
 GENA	general event notification architecture
 GHC	Glasgow Haskell compiler
 GHES	generic hardware error source
@@ -1755,6 +1760,7 @@ WHEA	Windows hardware error architecture
 WIFI	wireless fidelity
 WLAN	wireless local area network
 WM	write miss
+WMF	Windows meta file
 WMI	Windows Management Instrumentation
 WOL	Wake-on-LAN
 WOM	Wake-on-Modem



CVS commit: src/games/fortune/datfiles

2020-05-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon May 18 20:19:08 UTC 2020

Modified Files:
src/games/fortune/datfiles: fortunes

Log Message:
Heads up on Bell patents
P21 on https://minnie.tuhs.org/Archive/Documentation/AUUGN/AUUGN-V01.1.pdf


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/games/fortune/datfiles/fortunes

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

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.89 src/games/fortune/datfiles/fortunes:1.90
--- src/games/fortune/datfiles/fortunes:1.89	Thu Apr  2 05:55:02 2020
+++ src/games/fortune/datfiles/fortunes	Mon May 18 20:19:08 2020
@@ -16297,3 +16297,8 @@ Fail we may, sail we must
 %
 Don't shout at your JBODs, they don't like it!
 		-- Brendan Gregg, "Shouting in the Datacenter"
+%
+Bell has two patents on UNIX
+a) set-user-id bit
+b) on "typo" !
+		-- John Lions, Australian UNIX Users Group Newsletter, Oct 1978



CVS commit: src/sys/miscfs/genfs

2020-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 19:55:42 UTC 2020

Modified Files:
src/sys/miscfs/genfs: genfs_vnops.c

Log Message:
remove debugging, it is just clutter.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/sys/miscfs/genfs/genfs_vnops.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/miscfs/genfs/genfs_vnops.c
diff -u src/sys/miscfs/genfs/genfs_vnops.c:1.205 src/sys/miscfs/genfs/genfs_vnops.c:1.206
--- src/sys/miscfs/genfs/genfs_vnops.c:1.205	Mon May 18 15:42:16 2020
+++ src/sys/miscfs/genfs/genfs_vnops.c	Mon May 18 15:55:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_vnops.c,v 1.205 2020/05/18 19:42:16 christos Exp $	*/
+/*	$NetBSD: genfs_vnops.c,v 1.206 2020/05/18 19:55:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.205 2020/05/18 19:42:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.206 2020/05/18 19:55:42 christos Exp $");
 
 #include 
 #include 
@@ -695,13 +695,7 @@ genfs_can_access(vnode_t *vp, kauth_cred
 
 	KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0);
 	KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE));
-#ifdef ACL_DEBUG
-	char buf[128];
-	snprintb(buf, sizeof(buf), __VNODE_PERM_BITS, accmode);
-	printf("%s: %s cred_uid=%d cred_gid=%d file_uid=%d file_gid=%d\n",
-	__func__, buf, kauth_cred_geteuid(cred), kauth_cred_getegid(cred),
-	file_uid, file_gid);
-#endif
+
 	/*
 	 * Look for a normal, non-privileged way to access the file/directory
 	 * as requested.  If it exists, go with that.
@@ -719,10 +713,6 @@ genfs_can_access(vnode_t *vp, kauth_cred
 		if (file_mode & S_IWUSR)
 			dac_granted |= (VWRITE | VAPPEND);
 
-#ifdef ACL_DEBUG
-		printf("%s: owner %o %o\n", __func__,
-		accmode & dac_granted, accmode);
-#endif
 		goto privchk;
 	}
 
@@ -739,10 +729,6 @@ genfs_can_access(vnode_t *vp, kauth_cred
 		if (file_mode & S_IWGRP)
 			dac_granted |= (VWRITE | VAPPEND);
 
-#ifdef ACL_DEBUG
-		printf("%s: group %o %o\n", __func__,
-		accmode & dac_granted, accmode);
-#endif
 		goto privchk;
 	}
 
@@ -754,10 +740,6 @@ genfs_can_access(vnode_t *vp, kauth_cred
 	if (file_mode & S_IWOTH)
 		dac_granted |= (VWRITE | VAPPEND);
 
-#ifdef ACL_DEBUG
-	printf("%s: others %o %o\n", __func__,
-	accmode & dac_granted, accmode);
-#endif
 privchk:
 	if ((accmode & dac_granted) == accmode)
 		return 0;
@@ -1127,12 +1109,6 @@ genfs_can_access_acl_nfs4(vnode_t *vp, k
 	VREAD_ACL | VWRITE_ACL | VWRITE_OWNER | VSYNCHRONIZE)) == 0);
 	KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE));
 
-#ifdef ACL_DEBUG
-	char buf[128];
-	snprintb(buf, sizeof(buf), __VNODE_PERM_BITS, accmode);
-	printf("%s: %s file_uid=%d file_gid=%d\n", __func__, buf, file_uid, file_gid);
-#endif
-
 	if (accmode & VADMIN)
 		must_be_owner = 1;
 



CVS commit: src/sys/miscfs/genfs

2020-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 19:42:16 UTC 2020

Modified Files:
src/sys/miscfs/genfs: genfs_vnops.c

Log Message:
Fix EPERM vs EACCES return.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/miscfs/genfs/genfs_vnops.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/miscfs/genfs/genfs_vnops.c
diff -u src/sys/miscfs/genfs/genfs_vnops.c:1.204 src/sys/miscfs/genfs/genfs_vnops.c:1.205
--- src/sys/miscfs/genfs/genfs_vnops.c:1.204	Sat May 16 14:31:51 2020
+++ src/sys/miscfs/genfs/genfs_vnops.c	Mon May 18 15:42:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_vnops.c,v 1.204 2020/05/16 18:31:51 christos Exp $	*/
+/*	$NetBSD: genfs_vnops.c,v 1.205 2020/05/18 19:42:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.204 2020/05/16 18:31:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.205 2020/05/18 19:42:16 christos Exp $");
 
 #include 
 #include 
@@ -695,7 +695,13 @@ genfs_can_access(vnode_t *vp, kauth_cred
 
 	KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0);
 	KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE));
-
+#ifdef ACL_DEBUG
+	char buf[128];
+	snprintb(buf, sizeof(buf), __VNODE_PERM_BITS, accmode);
+	printf("%s: %s cred_uid=%d cred_gid=%d file_uid=%d file_gid=%d\n",
+	__func__, buf, kauth_cred_geteuid(cred), kauth_cred_getegid(cred),
+	file_uid, file_gid);
+#endif
 	/*
 	 * Look for a normal, non-privileged way to access the file/directory
 	 * as requested.  If it exists, go with that.
@@ -713,7 +719,11 @@ genfs_can_access(vnode_t *vp, kauth_cred
 		if (file_mode & S_IWUSR)
 			dac_granted |= (VWRITE | VAPPEND);
 
-		return (accmode & dac_granted) == accmode ? 0 : EPERM;
+#ifdef ACL_DEBUG
+		printf("%s: owner %o %o\n", __func__,
+		accmode & dac_granted, accmode);
+#endif
+		goto privchk;
 	}
 
 	/* Otherwise, check the groups (first match) */
@@ -729,7 +739,11 @@ genfs_can_access(vnode_t *vp, kauth_cred
 		if (file_mode & S_IWGRP)
 			dac_granted |= (VWRITE | VAPPEND);
 
-		return (accmode & dac_granted) == accmode ? 0 : EACCES;
+#ifdef ACL_DEBUG
+		printf("%s: group %o %o\n", __func__,
+		accmode & dac_granted, accmode);
+#endif
+		goto privchk;
 	}
 
 	/* Otherwise, check everyone else. */
@@ -739,8 +753,16 @@ genfs_can_access(vnode_t *vp, kauth_cred
 		dac_granted |= VREAD;
 	if (file_mode & S_IWOTH)
 		dac_granted |= (VWRITE | VAPPEND);
-	return (accmode & dac_granted) == accmode ? 0 : EACCES;
-		return (0);
+
+#ifdef ACL_DEBUG
+	printf("%s: others %o %o\n", __func__,
+	accmode & dac_granted, accmode);
+#endif
+privchk:
+	if ((accmode & dac_granted) == accmode)
+		return 0;
+
+	return (accmode & VADMIN) ? EPERM : EACCES;
 }
 
 /*
@@ -1108,7 +1130,7 @@ genfs_can_access_acl_nfs4(vnode_t *vp, k
 #ifdef ACL_DEBUG
 	char buf[128];
 	snprintb(buf, sizeof(buf), __VNODE_PERM_BITS, accmode);
-	printf("%s: %s uid=%d gid=%d\n", __func__, buf, file_uid, file_gid);
+	printf("%s: %s file_uid=%d file_gid=%d\n", __func__, buf, file_uid, file_gid);
 #endif
 
 	if (accmode & VADMIN)



CVS commit: [netbsd-9] src/doc

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 19:07:35 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #908 - #916


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-9.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-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.58 src/doc/CHANGES-9.1:1.1.2.59
--- src/doc/CHANGES-9.1:1.1.2.58	Wed May 13 18:17:31 2020
+++ src/doc/CHANGES-9.1	Mon May 18 19:07:35 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.58 2020/05/13 18:17:31 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.59 2020/05/18 19:07:35 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -2576,3 +2576,74 @@ libexec/ld.elf_so/symbols.map			1.3,1.4
 	linker is in a consistent state.
 	[chs, ticket #907]
 
+sys/arch/hp300/dev/sti_sgc.c			1.3
+sys/dev/ic/sti.c1.21
+sys/dev/ic/stivar.h1.10
+
+	Add bitmap access ops support for EVRX framebuffer on HP9000/425e.
+	[tsutsui, ticket #908]
+
+sys/dev/audio/audio.c1.65
+
+	Start recording immediately on opening /dev/audio or /dev/sound
+	for reading.
+	[isaki, ticket #909]
+
+sys/dev/audio/audio.c1.49,1.61,1.66,1.67
+
+	Improve diagnostic messages.
+	[isaki, ticket #910]
+
+sys/arch/amd64/conf/GENERIC			1.564
+sys/arch/evbarm/conf/GENERIC			1.75
+sys/arch/evbarm/conf/GENERIC64			1.148
+sys/arch/hppa/include/param.h			1.27
+sys/arch/m68k/include/param.h			1.23
+sys/arch/sh3/include/param.h			1.25
+sys/arch/sparc/include/param.h			1.74
+sys/arch/vax/include/param.h			1.63
+sys/dev/audio/audio.c1.68,1.69
+sys/dev/audio/audiodef.h			1.13,1.14
+
+	Improve default latency settings for audio with usable
+	per-architecture defaults.
+	[isaki, ticket #911]
+
+sys/arch/arm/dts/sun50i-a64.dtsi		1.14
+sys/arch/arm/sunxi/files.sunxi			1.67
+sys/arch/arm/sunxi/sun50i_a64_ccu.c		1.21,1.22
+sys/arch/arm/sunxi/sun8i_crypto.c		1.1-1.12
+sys/arch/arm/sunxi/sun8i_crypto.h		1.1
+sys/arch/evbarm/conf/GENERIC64			1.116,1.131
+
+	Add sun8i Crypto Engine random number generator.
+	[riastradh, ticket #912]
+
+sys/arch/arm/dts/rk3399-crypto.dtsi		1.1
+sys/arch/arm/dts/rk3399-pinebook-pro.dts	1.3
+sys/arch/arm/dts/rk3399-rockpro64.dts		1.11
+sys/arch/arm/rockchip/files.rockchip		1.24
+sys/arch/arm/rockchip/rk3399_cru.c		1.20
+sys/arch/arm/rockchip/rk_v1crypto.c		1.1,1.2 + patch
+sys/arch/arm/rockchip/rk_v1crypto.h		1.1
+sys/arch/evbarm/conf/GENERIC64			1.158
+
+	Add support for the Rockchip Crypto v1 random number generator.
+	[riastradh, ticket #913]
+
+sys/kern/subr_cprng.c1.37 (via patch, adapted)
+
+	Make kern.arandom truncate the output instead of failing with ETOOBIG
+	when the requested data exceeds 256 bytes in size.
+	[nia, ticket #914]
+
+sys/netinet/igmp.c1.70
+
+	igmp: fix info leak
+	[maxv, ticket #915]
+
+sys/kern/kern_time.c1.204
+
+	kern_time: fix info leak.
+	[maxv, ticket #916]
+



CVS commit: [netbsd-9] src/sys/kern

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 19:05:32 UTC 2020

Modified Files:
src/sys/kern [netbsd-9]: kern_time.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #916):

sys/kern/kern_time.c: revision 1.204

Fix uninitialized memory access. Found by KMSAN.


To generate a diff of this commit:
cvs rdiff -u -r1.197.4.2 -r1.197.4.3 src/sys/kern/kern_time.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/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.197.4.2 src/sys/kern/kern_time.c:1.197.4.3
--- src/sys/kern/kern_time.c:1.197.4.2	Wed Sep 11 16:36:13 2019
+++ src/sys/kern/kern_time.c	Mon May 18 19:05:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.197.4.2 2019/09/11 16:36:13 martin Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.197.4.3 2020/05/18 19:05:32 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.197.4.2 2019/09/11 16:36:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.197.4.3 2020/05/18 19:05:32 martin Exp $");
 
 #include 
 #include 
@@ -356,8 +356,12 @@ again:
 		struct timespec rmtend;
 		struct timespec t0;
 		struct timespec *t;
+		int err;
+
+		err = clock_gettime1(clock_id, &rmtend);
+		if (err != 0)
+			return err;
 
-		(void)clock_gettime1(clock_id, &rmtend);
 		t = (rmt != NULL) ? rmt : &t0;
 		if (flags & TIMER_ABSTIME) {
 			timespecsub(rqt, &rmtend, t);



CVS commit: [netbsd-9] src/sys/netinet

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:59:40 UTC 2020

Modified Files:
src/sys/netinet [netbsd-9]: igmp.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #915):

sys/netinet/igmp.c: revision 1.70

igmp_sendpkt() expects ip_output() to set 'imo.imo_multicast_ttl' into
'ip->ip_ttl'; but ip_output() won't if the target is not a multicast
address, meaning that the uninitialized 'ip->ip_ttl' byte gets sent to
the network. This leaks one byte of kernel heap.

Fix this by filling 'ip->ip_ttl' with a TTL of one.

Found by KMSAN.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.69.4.1 src/sys/netinet/igmp.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/netinet/igmp.c
diff -u src/sys/netinet/igmp.c:1.69 src/sys/netinet/igmp.c:1.69.4.1
--- src/sys/netinet/igmp.c:1.69	Fri Sep 14 05:09:51 2018
+++ src/sys/netinet/igmp.c	Mon May 18 18:59:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: igmp.c,v 1.69 2018/09/14 05:09:51 maxv Exp $	*/
+/*	$NetBSD: igmp.c,v 1.69.4.1 2020/05/18 18:59:39 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.69 2018/09/14 05:09:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.69.4.1 2020/05/18 18:59:39 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mrouting.h"
@@ -613,6 +613,7 @@ igmp_sendpkt(struct in_multi *inm, int t
 	ip->ip_tos = 0;
 	ip->ip_len = htons(sizeof(struct ip) + IGMP_MINLEN);
 	ip->ip_off = htons(0);
+	ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL;
 	ip->ip_p = IPPROTO_IGMP;
 	ip->ip_src = zeroin_addr;
 	ip->ip_dst = inm->inm_addr;



CVS commit: [netbsd-9] src/sys/kern

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:57:32 UTC 2020

Modified Files:
src/sys/kern [netbsd-9]: subr_cprng.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #914):

sys/kern/subr_cprng.c: revision 1.37 (via patch, adapted)

Make kern.arandom truncate the output instead of failing with ETOOBIG
when the requested data exceeds 256 bytes in size. The actual size of
the returned data is output to oldlenp.

This matches FreeBSD's behaviour and seems to be more in line with
what software in the wild expects.

"sounds reasonble" - Riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.3 -r1.30.2.4 src/sys/kern/subr_cprng.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/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.30.2.3 src/sys/kern/subr_cprng.c:1.30.2.4
--- src/sys/kern/subr_cprng.c:1.30.2.3	Thu Apr 30 15:34:06 2020
+++ src/sys/kern/subr_cprng.c	Mon May 18 18:57:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.30.2.3 2020/04/30 15:34:06 martin Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.30.2.4 2020/05/18 18:57:31 martin Exp $ */
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.30.2.3 2020/04/30 15:34:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.30.2.4 2020/05/18 18:57:31 martin Exp $");
 
 #include 
 #include 
@@ -551,7 +551,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS)
 		return 0;
 	default:
 		if (*oldlenp > 256) {
-			return E2BIG;
+			*oldlenp = 256;
 		}
 		RUN_ONCE(&sysctl_prng_once, makeprng);
 		v = kmem_alloc(*oldlenp, KM_SLEEP);



CVS commit: [netbsd-9] src/sys/arch

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:54:30 UTC 2020

Modified Files:
src/sys/arch/arm/dts [netbsd-9]: rk3399-pinebook-pro.dts
rk3399-rockpro64.dts
src/sys/arch/arm/rockchip [netbsd-9]: files.rockchip rk3399_cru.c
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64
Added Files:
src/sys/arch/arm/dts [netbsd-9]: rk3399-crypto.dtsi
src/sys/arch/arm/rockchip [netbsd-9]: rk_v1crypto.c rk_v1crypto.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399.  This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1.  Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/dts/rk3399-crypto.dtsi
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/sys/arch/arm/dts/rk3399-pinebook-pro.dts
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/arch/arm/dts/rk3399-rockpro64.dts
cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/sys/arch/arm/rockchip/files.rockchip
cvs rdiff -u -r1.8.4.3 -r1.8.4.4 src/sys/arch/arm/rockchip/rk3399_cru.c
cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/arm/rockchip/rk_v1crypto.c
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/rockchip/rk_v1crypto.h
cvs rdiff -u -r1.103.2.11 -r1.103.2.12 src/sys/arch/evbarm/conf/GENERIC64

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/dts/rk3399-pinebook-pro.dts
diff -u src/sys/arch/arm/dts/rk3399-pinebook-pro.dts:1.2.4.2 src/sys/arch/arm/dts/rk3399-pinebook-pro.dts:1.2.4.3
--- src/sys/arch/arm/dts/rk3399-pinebook-pro.dts:1.2.4.2	Tue Jan 21 10:39:59 2020
+++ src/sys/arch/arm/dts/rk3399-pinebook-pro.dts	Mon May 18 18:54:30 2020
@@ -12,6 +12,7 @@
 #include 
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
+#include "rk3399-crypto.dtsi"
 
 / {
 	model = "Pine64 Pinebook Pro";

Index: src/sys/arch/arm/dts/rk3399-rockpro64.dts
diff -u src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7.2.2 src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7.2.3
--- src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7.2.2	Tue Jan 21 10:39:59 2020
+++ src/sys/arch/arm/dts/rk3399-rockpro64.dts	Mon May 18 18:54:30 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399-rockpro64.dts,v 1.7.2.2 2020/01/21 10:39:59 martin Exp $ */
+/* $NetBSD: rk3399-rockpro64.dts,v 1.7.2.3 2020/05/18 18:54:30 martin Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -27,6 +27,7 @@
  */
 
 #include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts"
+#include "rk3399-crypto.dtsi"
 
 / {
 	pwm-fan {
@@ -147,7 +148,6 @@
 		status = "okay";
 	};
 #endif
-
 };
 
 &pinctrl {

Index: src/sys/arch/arm/rockchip/files.rockchip
diff -u src/sys/arch/arm/rockchip/files.rockchip:1.19.2.3 src/sys/arch/arm/rockchip/files.rockchip:1.19.2.4
--- src/sys/arch/arm/rockchip/files.rockchip:1.19.2.3	Tue Jan 21 10:39:59 2020
+++ src/sys/arch/arm/rockchip/files.rockchip	Mon May 18 18:54:30 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rockchip,v 1.19.2.3 2020/01/21 10:39:59 martin Exp $
+#	$NetBSD: files.rockchip,v 1.19.2.4 2020/05/18 18:54:30 martin Exp $
 #
 # Configuration info for Rockchip family SoCs
 #
@@ -112,6 +112,11 @@ device	rki2s	
 attach  rki2s at fdt with rk_i2s
 filearch/arm/rockchip/rk_i2s.c		rk_i2s
 
+# Crypto engine v1
+device	rkv1crypto
+attach	rkv1crypto at fdt with rk_v1crypto
+file	arch/arm/rockchip/rk_v1crypto.c		rk_v1crypto
+
 # SOC parameters
 defflag	opt_soc.h			SOC_ROCKCHIP
 defflag	opt_soc.h			SOC_RK3328: SOC_ROCKCHIP

Index: src/sys/arch/arm/rockchip/rk3399_cru.c
diff -u src/sys/arch/arm/rockchip/rk3399_cru.c:1.8.4.3 src/sys/arch/arm/rockchip/rk3399_cru.c:1.8.

CVS commit: [netbsd-9] src/sys/arch

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:45:40 UTC 2020

Modified Files:
src/sys/arch/arm/dts [netbsd-9]: sun50i-a64.dtsi
src/sys/arch/arm/sunxi [netbsd-9]: files.sunxi sun50i_a64_ccu.c
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64
Added Files:
src/sys/arch/arm/sunxi [netbsd-9]: sun8i_crypto.c sun8i_crypto.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic.  I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy.  This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works.  Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/sys/arch/arm/dts/sun50i-a64.dtsi
cvs rdiff -u -r1.65 -r1.65.2.1 src/sys/arch/arm/sunxi/files.sunxi
cvs rdiff -u -r1.13.2.3 -r1.13.2.4 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c
cvs rdiff -u -r0 -r1.14.2.2 src/sys/arch/arm/sunxi/sun8i_crypto.c
cvs rdiff -u -r0 -r1.1.10.2 src/sys/arch/arm/sunxi/sun8i_crypto.h
cvs rdiff -u -r1.103.2.10 -r1.103.2.11 src/sys/arch/evbarm/conf/GENERIC64

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/dts/sun50i-a64.d

CVS commit: [netbsd-9] src/sys

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:12:25 UTC 2020

Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC GENERIC64
src/sys/arch/hppa/include [netbsd-9]: param.h
src/sys/arch/m68k/include [netbsd-9]: param.h
src/sys/arch/sh3/include [netbsd-9]: param.h
src/sys/arch/sparc/include [netbsd-9]: param.h
src/sys/arch/vax/include [netbsd-9]: param.h
src/sys/dev/audio [netbsd-9]: audio.c audiodef.h

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

sys/dev/audio/audiodef.h: revision 1.13
sys/dev/audio/audiodef.h: revision 1.14
sys/arch/sparc/include/param.h: revision 1.74
sys/arch/evbarm/conf/GENERIC64: revision 1.148
sys/arch/sh3/include/param.h: revision 1.25
sys/arch/evbarm/conf/GENERIC: revision 1.75
sys/arch/m68k/include/param.h: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.564
sys/arch/hppa/include/param.h: revision 1.27
sys/dev/audio/audio.c: revision 1.68
sys/arch/vax/include/param.h: revision 1.63
sys/dev/audio/audio.c: revision 1.69

Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before).  And remove the option from GENERIC.

- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
  too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.

Set AUDIO_BLK_MS 40 msec on other old(slow) architectures not only m68k.

Thanks tsutsui@ for comment about architecture choice.
And move it from audiodef.h to audio.c as suggested by joerg@.

Move machine dependent AUDIO_BLK_MS default value to .
If the port has __AUDIO_BLK_MS in , it will be used.

Otherwise the default value (currently 10 msec) defined in audio.c will
be used.  This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block.  Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).

But please don't be eager to make the default value shorter.
 was discussed in source-changes-d.  It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this.  Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html


To generate a diff of this commit:
cvs rdiff -u -r1.531.2.8 -r1.531.2.9 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.48.2.7 -r1.48.2.8 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.103.2.9 -r1.103.2.10 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/arch/hppa/include/param.h
cvs rdiff -u -r1.22 -r1.22.4.1 src/sys/arch/m68k/include/param.h
cvs rdiff -u -r1.24 -r1.24.4.1 src/sys/arch/sh3/include/param.h
cvs rdiff -u -r1.73 -r1.73.2.1 src/sys/arch/sparc/include/param.h
cvs rdiff -u -r1.62 -r1.62.4.1 src/sys/arch/vax/include/param.h
cvs rdiff -u -r1.28.2.14 -r1.28.2.15 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.7.2.3 -r1.7.2.4 src/sys/dev/audio/audiodef.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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.531.2.8 src/sys/arch/amd64/conf/GENERIC:1.531.2.9
--- src/sys/arch/amd64/conf/GENERIC:1.531.2.8	Mon Jan 27 07:06:02 2020
+++ src/sys/arch/amd64/conf/GENERIC	Mon May 18 18:12:25 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.531.2.8 2020/01/27 07:06:02 martin Exp $
+# $NetBSD: GENERIC,v 1.531.2.9 2020/05/18 18:12:25 martin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.531.2.8 $"
+#ident		"GENERIC-$Revision: 1.531.2.9 $"
 
 maxusers	64		# estimated number of users
 
@@ -55,9 +55,6 @@ maxusers	64		# estimated number of users
 
 options 	INSECURE	# disable kernel security levels - X needs this
 
-options		AUDIO_BLK_MS=4	# make software with low latency needs performant
-# no substantial CPU overhead on this platform
-
 options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
 options 	NTP		# NTP phase/frequency locked loop
 

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.48.2.7 src/sys/arch/evbarm/conf/GENERIC:1.48.2.8
--- src/sys/arch/evbarm/conf/GENERIC:1.48.2.7	Thu Apr  2 19:20:07 2020
+++ src/sys/arch/evbarm/conf/GENERIC	Mon May 18 18:12:25 2020
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.48.2.7 2020/04/02 19:20:07 martin Exp $
+#	$NetBSD: GENERIC,v 1.48.2.8 2020/05/18 18:12:25 martin Exp $
 #
 #	GENERI

CVS commit: [netbsd-9] src/sys/dev/audio

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:05:34 UTC 2020

Modified Files:
src/sys/dev/audio [netbsd-9]: audio.c

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

sys/dev/audio/audio.c: revision 1.49
sys/dev/audio/audio.c: revision 1.61
sys/dev/audio/audio.c: revision 1.66
sys/dev/audio/audio.c: revision 1.67

Move #if DIAGNOSTIC..#endif to correct place.
It should ignore stray interrupts regardless of DIAGNOSTIC.

Improve an error message about round_blocksize.

Improve diagnostic messages.

Improve the blocksize notation.
The blocksize is expressed in bytes, and the millisecond notation
is supplementary information to make it easier to understand.


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.13 -r1.28.2.14 src/sys/dev/audio/audio.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/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.28.2.13 src/sys/dev/audio/audio.c:1.28.2.14
--- src/sys/dev/audio/audio.c:1.28.2.13	Mon May 18 18:02:23 2020
+++ src/sys/dev/audio/audio.c	Mon May 18 18:05:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.28.2.13 2020/05/18 18:02:23 martin Exp $	*/
+/*	$NetBSD: audio.c,v 1.28.2.14 2020/05/18 18:05:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.13 2020/05/18 18:02:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.14 2020/05/18 18:05:34 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -4783,6 +4783,7 @@ audio_mixer_init(struct audio_softc *sc,
 	const audio_format2_t *hwfmt, const audio_filter_reg_t *reg)
 {
 	char codecbuf[64];
+	char blkdmsbuf[8];
 	audio_trackmixer_t *mixer;
 	void (*softint_handler)(void *);
 	int len;
@@ -4791,6 +4792,7 @@ audio_mixer_init(struct audio_softc *sc,
 	size_t bufsize;
 	int hwblks;
 	int blkms;
+	int blkdms;
 	int error;
 
 	KASSERT(hwfmt != NULL);
@@ -4827,8 +4829,13 @@ audio_mixer_init(struct audio_softc *sc,
 			if ((rounded * NBBY) % (mixer->hwbuf.fmt.stride *
 			mixer->hwbuf.fmt.channels) != 0) {
 device_printf(sc->sc_dev,
-"blksize not configured %d -> %d\n",
-blksize, rounded);
+"round_blocksize must return blocksize "
+"divisible by framesize: "
+"blksize=%d rounded=%d "
+"stride=%ubit channels=%u\n",
+blksize, rounded,
+mixer->hwbuf.fmt.stride,
+mixer->hwbuf.fmt.channels);
 return EINVAL;
 			}
 			/* Recalculation */
@@ -4965,13 +4972,20 @@ audio_mixer_init(struct audio_softc *sc,
 		mixer->hwbuf.fmt.precision);
 	}
 	blkms = mixer->blktime_n * 1000 / mixer->blktime_d;
-	aprint_normal_dev(sc->sc_dev, "%s:%d%s %dch %dHz, blk %dms for %s\n",
+	blkdms = (mixer->blktime_n * 1 / mixer->blktime_d) % 10;
+	blkdmsbuf[0] = '\0';
+	if (blkdms != 0) {
+		snprintf(blkdmsbuf, sizeof(blkdmsbuf), ".%1d", blkdms);
+	}
+	aprint_normal_dev(sc->sc_dev,
+	"%s:%d%s %dch %dHz, blk %d bytes (%d%sms) for %s\n",
 	audio_encoding_name(mixer->track_fmt.encoding),
 	mixer->track_fmt.precision,
 	codecbuf,
 	mixer->track_fmt.channels,
 	mixer->track_fmt.sample_rate,
-	blkms,
+	blksize,
+	blkms, blkdmsbuf,
 	(mode == AUMODE_PLAY) ? "playback" : "recording");
 
 	return 0;
@@ -5455,12 +5469,14 @@ audio_pintr(void *arg)
 
 	if (sc->sc_dying)
 		return;
-#if defined(DIAGNOSTIC)
 	if (sc->sc_pbusy == false) {
-		device_printf(sc->sc_dev, "stray interrupt\n");
+#if defined(DIAGNOSTIC)
+		device_printf(sc->sc_dev,
+		"DIAGNOSTIC: %s raised stray interrupt\n",
+		device_xname(sc->hw_dev));
+#endif
 		return;
 	}
-#endif
 
 	mixer = sc->sc_pmixer;
 	mixer->hw_complete_counter += mixer->frames_per_block;
@@ -5728,12 +5744,14 @@ audio_rintr(void *arg)
 
 	if (sc->sc_dying)
 		return;
-#if defined(DIAGNOSTIC)
 	if (sc->sc_rbusy == false) {
-		device_printf(sc->sc_dev, "stray interrupt\n");
+#if defined(DIAGNOSTIC)
+		device_printf(sc->sc_dev,
+		"DIAGNOSTIC: %s raised stray interrupt\n",
+		device_xname(sc->hw_dev));
+#endif
 		return;
 	}
-#endif
 
 	mixer = sc->sc_rmixer;
 	mixer->hw_complete_counter += mixer->frames_per_block;



CVS commit: [netbsd-9] src/sys/dev/audio

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 18:02:23 UTC 2020

Modified Files:
src/sys/dev/audio [netbsd-9]: audio.c

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

sys/dev/audio/audio.c: revision 1.65

Fix to start recording immediately when open() with READ mode is
called (unless pause).
- Opening /dev/audio always initializes pause with false.  Therefore
  it always starts recording.
- Opening /dev/sound inherites pause from the sticky parameter.
  Therefore whether /dev/sound starts recording or not depends on the
  sticky pause parameter.

This fixes two problems:
- Opening /dev/audio didn't start recording after merging isaki-audio2.
- Opening /dev/sound didn't start recording regardless of the sticky
  pause, probably since long time ago (at least netbsd-7).


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.12 -r1.28.2.13 src/sys/dev/audio/audio.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/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.28.2.12 src/sys/dev/audio/audio.c:1.28.2.13
--- src/sys/dev/audio/audio.c:1.28.2.12	Thu Apr 30 16:05:18 2020
+++ src/sys/dev/audio/audio.c	Mon May 18 18:02:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.28.2.12 2020/04/30 16:05:18 martin Exp $	*/
+/*	$NetBSD: audio.c,v 1.28.2.13 2020/05/18 18:02:23 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.12 2020/04/30 16:05:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.13 2020/05/18 18:02:23 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2224,7 +2224,10 @@ audio_open(dev_t dev, struct audio_softc
 goto bad3;
 		}
 	}
-	/* Call init_input if this is the first recording open. */
+	/*
+	 * Call init_input and start rmixer, if this is the first recording
+	 * open.  See pause consideration notes.
+	 */
 	if (af->rtrack && sc->sc_ropens == 0) {
 		if (sc->hw_if->init_input) {
 			hwbuf = &sc->sc_rmixer->hwbuf;
@@ -2239,6 +2242,10 @@ audio_open(dev_t dev, struct audio_softc
 			if (error)
 goto bad3;
 		}
+
+		mutex_enter(sc->sc_lock);
+		audio_rmixer_start(sc);
+		mutex_exit(sc->sc_lock);
 	}
 
 	if (bellfile == NULL) {
@@ -2457,21 +2464,18 @@ audio_read(struct audio_softc *sc, struc
 
 	TRACET(2, track, "resid=%zd", uio->uio_resid);
 
+#ifdef AUDIO_PM_IDLE
 	error = audio_exlock_mutex_enter(sc);
 	if (error)
 		return error;
 
-#ifdef AUDIO_PM_IDLE
 	if (device_is_active(&sc->sc_dev) || sc->sc_idle)
 		device_active(&sc->sc_dev, DVA_SYSTEM);
-#endif
 
-	/*
-	 * The first read starts rmixer.
-	 */
-	if (sc->sc_rbusy == false)
-		audio_rmixer_start(sc);
+	/* In recording, unlike playback, read() never operates rmixer. */
+
 	audio_exlock_mutex_exit(sc);
+#endif
 
 	usrbuf = &track->usrbuf;
 	input = track->input;
@@ -6672,10 +6676,22 @@ audio_mixers_get_format(struct audio_sof
 /*
  * Pause consideration:
  *
- * The introduction of these two behavior makes pause/unpause operation
- * simple.
- * 1. The first read/write access of the first track makes mixer start.
- * 2. A pause of the last track doesn't make mixer stop.
+ * Pausing/unpausing never affect [pr]mixer.  This single rule makes
+ * operation simple.  Note that playback and recording are asymmetric.
+ *
+ * For playback,
+ *  1. Any playback open doesn't start pmixer regardless of initial pause
+ * state of this track.
+ *  2. The first write access among playback tracks only starts pmixer
+ * regardless of this track's pause state.
+ *  3. Even a pause of the last playback track doesn't stop pmixer.
+ *  4. The last close of all playback tracks only stops pmixer.
+ *
+ * For recording,
+ *  1. The first recording open only starts rmixer regardless of initial
+ * pause state of this track.
+ *  2. Even a pause of the last track doesn't stop rmixer.
+ *  3. The last close of all recording tracks only stops rmixer.
  */
 
 /*



CVS commit: [netbsd-9] src/sys

2020-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 17:52:22 UTC 2020

Modified Files:
src/sys/arch/hp300/dev [netbsd-9]: sti_sgc.c
src/sys/dev/ic [netbsd-9]: sti.c stivar.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #908):

sys/dev/ic/stivar.h: revision 1.10
sys/dev/ic/sti.c: revision 1.21
sys/arch/hp300/dev/sti_sgc.c: revision 1.3

Add bitmap access ops support for EVRX framebuffer on HP9000/425e.

8bpp Xorg wsfb server and mlterm-wscons (formerly mlterm-fb) work.
No particular comment on port-hp300@ and port-hppa@:
 https://mail-index.netbsd.org/port-hp300/2020/05/02/msg000170.html

Special thanks to Miod Vallat, for his advice about HP-UX implementation
and binutils patches to disassemble old HP-UX a.out-hp300hpux binaries
(and also contributing his 425e back in 2014).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.34.1 src/sys/arch/hp300/dev/sti_sgc.c
cvs rdiff -u -r1.19 -r1.19.12.1 src/sys/dev/ic/sti.c
cvs rdiff -u -r1.9 -r1.9.34.1 src/sys/dev/ic/stivar.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/hp300/dev/sti_sgc.c
diff -u src/sys/arch/hp300/dev/sti_sgc.c:1.2 src/sys/arch/hp300/dev/sti_sgc.c:1.2.34.1
--- src/sys/arch/hp300/dev/sti_sgc.c:1.2	Sun Apr 20 04:12:54 2014
+++ src/sys/arch/hp300/dev/sti_sgc.c	Mon May 18 17:52:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti_sgc.c,v 1.2 2014/04/20 04:12:54 tsutsui Exp $	*/
+/*	$NetBSD: sti_sgc.c,v 1.2.34.1 2020/05/18 17:52:22 martin Exp $	*/
 /*	$OpenBSD: sti_sgc.c,v 1.14 2007/05/26 00:36:03 krw Exp $	*/
 
 /*
@@ -27,7 +27,7 @@
  *
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.2 2014/04/20 04:12:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.2.34.1 2020/05/18 17:52:22 martin Exp $");
 
 #include 
 #include 
@@ -35,6 +35,7 @@ __KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 
 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -44,6 +45,36 @@ __KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 
 #include 
 #include 
 
+struct sti_sgc_softc {
+	struct sti_softc sc_sti;
+
+	paddr_t sc_bitmap;
+	bus_space_tag_t sc_bst;
+	bus_space_handle_t sc_ramdach;
+};
+
+/*
+ * 425e EVRX specific hardware
+ */
+#define STI_EVRX_RAMDACOFFSET	0x06
+#define STI_EVRX_RAMDACSIZE	0x000800
+#define STI_EVRX_FBOFFSET	0x20
+
+#define EVRX_BT458_ADDR		(0x200 + 2)
+#define EVRX_BT458_CMAP		(0x204 + 2)
+#define EVRX_BT458_CTRL		(0x208 + 2)
+#define EVRX_BT458_OMAP		(0x20C + 2)
+
+/* from HP-UX /usr/lib/libddevrx.a */
+#define EVRX_MAGIC00		0x600
+#define EVRX_MAGIC04		0x604
+#define EVRX_MAGIC08		0x608
+#define EVRX_MAGIC0C		0x60c
+#define EVRX_MAGIC10		0x610
+#define EVRX_MAGIC10_BSY	0x0001
+#define EVRX_MAGIC18		0x618
+#define EVRX_MAGIC1C		0x61c
+
 static int sticonslot = -1;
 static struct sti_rom sticn_rom;
 static struct sti_screen sticn_scr;
@@ -54,9 +85,25 @@ static void sti_sgc_attach(device_t, dev
 
 static int sti_sgc_probe(bus_space_tag_t, int);
 
-CFATTACH_DECL_NEW(sti_sgc, sizeof(struct sti_softc),
+CFATTACH_DECL_NEW(sti_sgc, sizeof(struct sti_sgc_softc),
 sti_sgc_match, sti_sgc_attach, NULL, NULL);
 
+/* 425e EVRX specific access functions */
+static int sti_evrx_setcmap(struct sti_sgc_softc *, struct wsdisplay_cmap *);
+static void sti_evrx_resetramdac(struct sti_sgc_softc *);
+static void sti_evrx_resetcmap(struct sti_sgc_softc *);
+static int sti_evrx_ioctl(void *, void *, u_long, void *, int, struct lwp *);
+static paddr_t sti_evrx_mmap(void *, void *, off_t, int);
+
+static const struct wsdisplay_accessops sti_evrx_accessops = {
+	sti_evrx_ioctl,
+	sti_evrx_mmap,
+	sti_alloc_screen,
+	sti_free_screen,
+	sti_show_screen,
+	sti_load_font
+};
+
 static int
 sti_sgc_match(device_t parent, struct cfdata *cf, void *aux)
 {
@@ -75,24 +122,31 @@ sti_sgc_match(device_t parent, struct cf
 static void
 sti_sgc_attach(device_t parent, device_t self, void *aux)
 {
-	struct sti_softc *sc = device_private(self);
+	struct sti_sgc_softc *sc = device_private(self);
+	struct sti_softc *ssc = &sc->sc_sti;
 	struct sgc_attach_args *saa = aux;
+	struct sti_screen *scr;
 	bus_space_handle_t romh;
 	bus_addr_t base;
+	struct wsemuldisplaydev_attach_args waa;
 	u_int romend;
+	struct sti_dd *rom_dd;
+	uint32_t grid0;
 	int i;
 
-	sc->sc_dev = self;
+	ssc->sc_dev = self;
+	base = (bus_addr_t)sgc_slottopa(saa->saa_slot);
 
 	if (saa->saa_slot == sticonslot) {
-		sc->sc_flags |= STI_CONSOLE | STI_ATTACHED;
-		sc->sc_rom = &sticn_rom;
-		sc->sc_scr = &sticn_scr;
-		memcpy(sc->bases, sticn_bases, sizeof(sc->bases));
+		ssc->sc_flags |= STI_CONSOLE | STI_ATTACHED;
+		ssc->sc_rom = &sticn_rom;
+		ssc->sc_rom->rom_softc = ssc;
+		ssc->sc_scr = &sticn_scr;
+		ssc->sc_scr->scr_rom = ssc->sc_rom;
+		memcpy(ssc->bases, sticn_bases, sizeof(ssc->bases));
 
-		sti_describe(sc);
+		sti_describe(ssc);
 	} else {
-		base = (bus_addr_t)sgc_slottopa(saa->saa_slot);
 		if (bus_space_map

CVS commit: src/share/man/man4/man4.sparc64

2020-05-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon May 18 16:42:05 UTC 2020

Modified Files:
src/share/man/man4/man4.sparc64: tadpmu.4

Log Message:
Whitespace fixes and a serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.sparc64/tadpmu.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/man4.sparc64/tadpmu.4
diff -u src/share/man/man4/man4.sparc64/tadpmu.4:1.1 src/share/man/man4/man4.sparc64/tadpmu.4:1.2
--- src/share/man/man4/man4.sparc64/tadpmu.4:1.1	Mon May 18 08:40:44 2020
+++ src/share/man/man4/man4.sparc64/tadpmu.4	Mon May 18 16:42:05 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tadpmu.4,v 1.1 2020/05/18 08:40:44 jdc Exp $
+.\"	$NetBSD: tadpmu.4,v 1.2 2020/05/18 16:42:05 wiz Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .Os
 .Sh NAME
 .Nm tda
-.Nd Tadpole PMU 
+.Nd Tadpole PMU
 .Sh SYNOPSIS
 .Cd "Tadpole PMU Version 1.33"
 .Sh DESCRIPTION
@@ -40,10 +40,11 @@ The
 .Nm
 driver provides basic support for the Tadpole PMU found in Tadpole SPARCle
 and Viper systems.
-The status of the AC adapter, battery and fan are reported via the
+The status of the AC adapter, battery, and fan are reported via the
 .Xr envstat 8
 interface, and AC adapter and lid switch events are reported via the
-.Xr sysmon_pswitch 9 interface.
+.Xr sysmon_pswitch 9
+interface.
 .Sh SEE ALSO
 .Xr envstat 8
 .Sh BUGS



CVS commit: src/sys/arch/mips/cavium/dev

2020-05-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 18 16:05:09 UTC 2020

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_rnm.c

Log Message:
Adjust entropy estimate for the Octeon.

We are hedging in serial and in parallel, and more conservative than
the Linux driver from Cavium seems to be, so although I don't know
exactly what the thermal jitter of the device is, this seems like a
reasonable compromise.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/cavium/dev/octeon_rnm.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/mips/cavium/dev/octeon_rnm.c
diff -u src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.5 src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.6
--- src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.5	Wed May 13 21:09:02 2020
+++ src/sys/arch/mips/cavium/dev/octeon_rnm.c	Mon May 18 16:05:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_rnm.c,v 1.5 2020/05/13 21:09:02 riastradh Exp $	*/
+/*	$NetBSD: octeon_rnm.c,v 1.6 2020/05/18 16:05:09 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -67,27 +67,39 @@
  *	The first sample of each RO always seems to be zero.  Further,
  *	consecutive samples from a single ring oscillator are not
  *	independent, so naive debiasing like a von Neumann extractor
- *	falls flat on its face.
- *
- *	We read out one FIFO's worth of raw samples from all 128 ring
- *	oscillators by going through them round-robin, and without a
- *	more detailed assessment of the jitter on the physical devices,
- *	we assume it takes a couple thousand samples of ring
- *	oscillators (one bit per sample) to reach one bit of entropy,
- *	so we read out 8 KB to get about 256 bits of entropy.
- *
- *	We could use the on-board LFSR/SHA-1 conditioner, but it's not
- *	clear how many RO samples go into the conditioner, and our
- *	entropy pool is a perfectly good conditioner itself, so it
- *	seems there is little advantage -- other than expedience -- to
- *	using the LFSR/SHA-1 conditioner.
+ *	falls flat on its face.  And parallel ring oscillators powered
+ *	by the same source may not be independent either, if they end
+ *	up locked.
+ *
+ *	We read out one FIFO's worth of raw samples from groups of 8
+ *	ring oscillators at a time, of 128 total, by going through them
+ *	round robin.  We take 32 consecutive samples from each ring
+ *	oscillator in a group of 8 in parallel before we count one bit
+ *	of entropy.  To get 256 bits of entropy, we read 4Kbit of data
+ *	from each of two 8-RO groups.
+ *
+ *	We could use the on-board LFSR/SHA-1 conditioner like the Linux
+ *	driver written by Cavium does, but it's not clear how many RO
+ *	samples go into the conditioner, and our entropy pool is a
+ *	perfectly good conditioner itself, so it seems there is little
+ *	advantage -- other than expedience -- to using the LFSR/SHA-1
+ *	conditioner.  All the manual says is that it samples 125 of the
+ *	128 ROs.  But the Cavium SHA-1 CPU instruction is advertised to
+ *	have a latency of 100 cycles, so it seems implausible that much
+ *	more than one sample from each RO could be squeezed in there.
+ *
+ *	The hardware exposes only 64 bits of each SHA-1 hash, and the
+ *	Linux driver uses 32 bits of that -- which, if treated as full
+ *	entropy, would mean an assessment of 3.9 bits of RO samples to
+ *	get 1 bit of entropy, whereas we take 256 bits of RO samples to
+ *	get one bit of entropy, so this seems reasonably conservative.
  *
  * Reference: Cavium Networks OCTEON Plus CN50XX Hardware Reference
  * Manual, CN50XX-HM-0.99E PRELIMINARY, July 2008.
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_rnm.c,v 1.5 2020/05/13 21:09:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_rnm.c,v 1.6 2020/05/18 16:05:09 riastradh Exp $");
 
 #include 
 #include 
@@ -209,8 +221,7 @@ octeon_rnm_attach(device_t parent, devic
 static void
 octeon_rnm_rng(size_t nbytes, void *vsc)
 {
-	/* Assume we need 2048 RO samples to get one bit of entropy.  */
-	const unsigned BPB = 2048;
+	const unsigned BPB = 256; /* bits of data per bit of entropy */
 	uint64_t sample[32];
 	struct octeon_rnm_softc *sc = vsc;
 	size_t needed = NBBY*nbytes;



CVS commit: src/sys/sys

2020-05-18 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Mon May 18 09:52:30 UTC 2020

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

Log Message:
Remove misleading comment.

I've successfully transferred 16-byte command. I've checked scsipi source and
see no reason for this limitation.


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

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

Modified files:

Index: src/sys/sys/scsiio.h
diff -u src/sys/sys/scsiio.h:1.12 src/sys/sys/scsiio.h:1.13
--- src/sys/sys/scsiio.h:1.12	Sun Mar  4 06:03:41 2007
+++ src/sys/sys/scsiio.h	Mon May 18 09:52:30 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiio.h,v 1.12 2007/03/04 06:03:41 christos Exp $*/
+/* $NetBSD: scsiio.h,v 1.13 2020/05/18 09:52:30 rkujawa Exp $*/
 
 #ifndef _SYS_SCSIIO_H_
 #define _SYS_SCSIIO_H_
@@ -12,7 +12,7 @@
 typedef struct	scsireq {
 	u_long	flags;		/* info about the request status and type */
 	u_long	timeout;
-	u_char	cmd[16];	/* 12 is actually the max */
+	u_char	cmd[16];
 	u_char	cmdlen;
 	void *	databuf;	/* address in user space of buffer */
 	u_long	datalen;	/* size of user buffer (request) */



CVS commit: src/share/man/man4/man4.sparc64

2020-05-18 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May 18 08:40:45 UTC 2020

Added Files:
src/share/man/man4/man4.sparc64: tadpmu.4

Log Message:
Add a basic manual page for tadpmu.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.sparc64/tadpmu.4

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

Added files:

Index: src/share/man/man4/man4.sparc64/tadpmu.4
diff -u /dev/null src/share/man/man4/man4.sparc64/tadpmu.4:1.1
--- /dev/null	Mon May 18 08:40:45 2020
+++ src/share/man/man4/man4.sparc64/tadpmu.4	Mon May 18 08:40:44 2020
@@ -0,0 +1,54 @@
+.\"	$NetBSD: tadpmu.4,v 1.1 2020/05/18 08:40:44 jdc Exp $
+.\"
+.\" Copyright (c) 2020 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Julian Coleman
+.\"
+.\" 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.
+.\"
+.Dd May 16, 2020
+.Dt TADPMU 4 sparc64
+.Os
+.Sh NAME
+.Nm tda
+.Nd Tadpole PMU 
+.Sh SYNOPSIS
+.Cd "Tadpole PMU Version 1.33"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides basic support for the Tadpole PMU found in Tadpole SPARCle
+and Viper systems.
+The status of the AC adapter, battery and fan are reported via the
+.Xr envstat 8
+interface, and AC adapter and lid switch events are reported via the
+.Xr sysmon_pswitch 9 interface.
+.Sh SEE ALSO
+.Xr envstat 8
+.Sh BUGS
+The battery status is reported by reading the battery voltage.
+Pp.
+The points at which the battery level becomes warning and critical are
+reported by the PMU, but are not directly correlated with battery voltage,
+so might be misreported by the driver.



CVS commit: src/sys/kern

2020-05-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon May 18 08:29:34 UTC 2020

Modified Files:
src/sys/kern: vnode_if.src

Log Message:
VOP_STRATEGY() may still deadlock with devices.

Change FSTRANS from LAZY to NO.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/kern/vnode_if.src

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

Modified files:

Index: src/sys/kern/vnode_if.src
diff -u src/sys/kern/vnode_if.src:1.79 src/sys/kern/vnode_if.src:1.80
--- src/sys/kern/vnode_if.src:1.79	Sat May 16 18:31:50 2020
+++ src/sys/kern/vnode_if.src	Mon May 18 08:29:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: vnode_if.src,v 1.79 2020/05/16 18:31:50 christos Exp $
+#	$NetBSD: vnode_if.src,v 1.80 2020/05/18 08:29:34 hannken Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -445,7 +445,7 @@ vop_bmap {
 #% strategy   vp  = = =
 #
 vop_strategy {
-	FSTRANS=LAZY
+	FSTRANS=NO
 	IN struct vnode *vp;
 	IN struct buf *bp;
 };



CVS commit: src/sys/kern

2020-05-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon May 18 08:30:06 UTC 2020

Modified Files:
src/sys/kern: vnode_if.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/vnode_if.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/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.111 src/sys/kern/vnode_if.c:1.112
--- src/sys/kern/vnode_if.c:1.111	Sat May 16 18:31:50 2020
+++ src/sys/kern/vnode_if.c	Mon May 18 08:30:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.111 2020/05/16 18:31:50 christos Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.112 2020/05/18 08:30:06 hannken Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.111 2020/05/16 18:31:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.112 2020/05/18 08:30:06 hannken Exp $");
 
 #include 
 #include 
@@ -1414,11 +1414,11 @@ VOP_STRATEGY(struct vnode *vp,
 	a.a_desc = VDESC(vop_strategy);
 	a.a_vp = vp;
 	a.a_bp = bp;
-	error = vop_pre(vp, &mp, &mpsafe, FST_LAZY);
+	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
 	if (error)
 		return error;
 	error = (VCALL(vp, VOFFSET(vop_strategy), &a));
-	vop_post(vp, mp, mpsafe, FST_LAZY);
+	vop_post(vp, mp, mpsafe, FST_NO);
 	return error;
 }
 



CVS commit: src/sys/ufs

2020-05-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon May 18 08:28:44 UTC 2020

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c
src/sys/ufs/ufs: ufs_vnops.c

Log Message:
Assert ufs_strategy() always gets used while current thread
holds a fstrans lock.


To generate a diff of this commit:
cvs rdiff -u -r1.369 -r1.370 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.254 -r1.255 src/sys/ufs/ufs/ufs_vnops.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/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.369 src/sys/ufs/ffs/ffs_vfsops.c:1.370
--- src/sys/ufs/ffs/ffs_vfsops.c:1.369	Sat May 16 18:31:53 2020
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon May 18 08:28:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.369 2020/05/16 18:31:53 christos Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.370 2020/05/18 08:28:44 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.369 2020/05/16 18:31:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.370 2020/05/18 08:28:44 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -75,6 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -581,7 +582,12 @@ ffs_mount(struct mount *mp, const char *
 			DPRINTF("VOP_OPEN returned %d", error);
 			goto fail;
 		}
+		/* Need fstrans_start() for assertion in ufs_strategy(). */
+		if ((mp->mnt_flag & MNT_RDONLY) == 0)
+			fstrans_start(mp);
 		error = ffs_mountfs(devvp, mp, l);
+		if ((mp->mnt_flag & MNT_RDONLY) == 0)
+			fstrans_done(mp);
 		if (error) {
 			DPRINTF("ffs_mountfs returned %d", error);
 			vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);

Index: src/sys/ufs/ufs/ufs_vnops.c
diff -u src/sys/ufs/ufs/ufs_vnops.c:1.254 src/sys/ufs/ufs/ufs_vnops.c:1.255
--- src/sys/ufs/ufs/ufs_vnops.c:1.254	Sat May 16 18:31:54 2020
+++ src/sys/ufs/ufs/ufs_vnops.c	Mon May 18 08:28:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_vnops.c,v 1.254 2020/05/16 18:31:54 christos Exp $	*/
+/*	$NetBSD: ufs_vnops.c,v 1.255 2020/05/18 08:28:44 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.254 2020/05/16 18:31:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.255 2020/05/18 08:28:44 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -84,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1869,6 +1870,7 @@ ufs_strategy(void *v)
 	ip = VTOI(vp);
 	if (vp->v_type == VBLK || vp->v_type == VCHR)
 		panic("ufs_strategy: spec");
+	KASSERT(fstrans_held(vp->v_mount));
 	KASSERT(bp->b_bcount != 0);
 	if (bp->b_blkno == bp->b_lblkno) {
 		error = VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno,



CVS commit: src/sys/kern

2020-05-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon May 18 08:27:54 UTC 2020

Modified Files:
src/sys/kern: vfs_vnode.c

Log Message:
vrele_flush(): yield() every 100ms like we do it in vflush().


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/kern/vfs_vnode.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/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.121 src/sys/kern/vfs_vnode.c:1.122
--- src/sys/kern/vfs_vnode.c:1.121	Sun Apr 19 13:25:00 2020
+++ src/sys/kern/vfs_vnode.c	Mon May 18 08:27:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.121 2020/04/19 13:25:00 hannken Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.122 2020/05/18 08:27:54 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.121 2020/04/19 13:25:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.122 2020/05/18 08:27:54 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -534,6 +534,7 @@ vrele_flush(struct mount *mp)
 {
 	vnode_impl_t *vip, *marker;
 	vnode_t *vp;
+	int when = 0;
 
 	KASSERT(fstrans_is_owner(mp));
 
@@ -561,6 +562,11 @@ vrele_flush(struct mount *mp)
 		mutex_enter(vp->v_interlock);
 		vrelel(vp, 0, LK_EXCLUSIVE);
 
+		if (getticks() > when) {
+			yield();
+			when = getticks() + hz / 10;
+		}
+
 		mutex_enter(&vdrain_lock);
 	}