CVS commit: src/doc

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 19 06:57:39 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note removal of HIPPI support.


To generate a diff of this commit:
cvs rdiff -u -r1.2636 -r1.2637 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.2636 src/doc/CHANGES:1.2637
--- src/doc/CHANGES:1.2636	Sun Jan 19 06:40:09 2020
+++ src/doc/CHANGES	Sun Jan 19 06:57:39 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2636 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2637 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -99,3 +99,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[mrg 20201114]
 	uyurex(4): Removed from the tree. [maya 20200117]
 	strip(4): Removed from the tree. [thorpej 20200118]
+	hippi and esh(4): Removed from the trere. [thorpej 20200118]



CVS commit: src

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 19 06:55:24 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: mi
src/sys/arch/alpha/conf: GENERIC RAWHIDE
src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0
src/sys/arch/arc/conf: GENERIC
src/sys/arch/cats/conf: GENERIC INSTALL
src/sys/arch/cobalt/conf: GENERIC INSTALL
src/sys/arch/evbarm/conf: IXDP425 ZAO425
src/sys/arch/evbmips/conf: MALTA
src/sys/arch/evbppc/conf: PMPPC
src/sys/arch/hppa/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC GENERIC_TINY INSTALL_FLOPPY
XEN3PAE_DOM0
src/sys/arch/sgimips/conf: GENERIC32_IP3x
src/sys/arch/sparc64/conf: GENERIC
src/sys/conf: files
src/sys/dev/ic: Makefile
src/sys/dev/pci: files.pci
src/sys/net: Makefile files.net
src/usr.sbin: Makefile
Removed Files:
src/sys/dev/ic: rrunner.c rrunnerreg.h rrunnervar.h
src/sys/dev/pci: if_esh_pci.c
src/sys/net: if_hippi.h if_hippisubr.c
src/usr.sbin/eshconfig: Makefile eshconfig.8 eshconfig.c

Log Message:
Remove HIPPI support and the esh(4) driver that uses it.  There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.


To generate a diff of this commit:
cvs rdiff -u -r1.1224 -r1.1225 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.2300 -r1.2301 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.397 -r1.398 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/conf/RAWHIDE
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.555 -r1.556 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.170 -r1.171 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.194 -r1.195 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.174 -r1.175 src/sys/arch/cats/conf/GENERIC
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/cats/conf/INSTALL
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/cobalt/conf/GENERIC
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/cobalt/conf/INSTALL
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/evbarm/conf/IXDP425
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/conf/ZAO425
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/evbmips/conf/MALTA
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbppc/conf/PMPPC
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/conf/GENERIC
cvs rdiff -u -r1.481 -r1.482 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1219 -r1.1220 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.164 -r1.165 src/sys/arch/i386/conf/GENERIC_TINY
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/i386/conf/INSTALL_FLOPPY
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/conf/XEN3PAE_DOM0
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/sgimips/conf/GENERIC32_IP3x
cvs rdiff -u -r1.219 -r1.220 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.1249 -r1.1250 src/sys/conf/files
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/Makefile
cvs rdiff -u -r1.89 -r0 src/sys/dev/ic/rrunner.c
cvs rdiff -u -r1.10 -r0 src/sys/dev/ic/rrunnerreg.h
cvs rdiff -u -r1.14 -r0 src/sys/dev/ic/rrunnervar.h
cvs rdiff -u -r1.421 -r1.422 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.33 -r0 src/sys/dev/pci/if_esh_pci.c
cvs rdiff -u -r1.38 -r1.39 src/sys/net/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/net/files.net
cvs rdiff -u -r1.13 -r0 src/sys/net/if_hippi.h
cvs rdiff -u -r1.48 -r0 src/sys/net/if_hippisubr.c
cvs rdiff -u -r1.282 -r1.283 src/usr.sbin/Makefile
cvs rdiff -u -r1.2 -r0 src/usr.sbin/eshconfig/Makefile
cvs rdiff -u -r1.8 -r0 src/usr.sbin/eshconfig/eshconfig.8
cvs rdiff -u -r1.10 -r0 src/usr.sbin/eshconfig/eshconfig.c

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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1224 src/distrib/sets/lists/base/mi:1.1225
--- src/distrib/sets/lists/base/mi:1.1224	Mon Dec 23 06:45:36 2019
+++ src/distrib/sets/lists/base/mi	Sun Jan 19 06:55:22 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1224 2019/12/23 06:45:36 maxv Exp $
+# $NetBSD: mi,v 1.1225 2020/01/19 06:55:22 thorpej Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1732,7 +1732,7 @@
 ./usr/sbin/editmapbase-obsolete		obsolete
 ./usr/sbin/edquotabase-sysutil-bin
 ./usr/sbin/envstatbase-sysutil-bin
-./usr/sbin/eshconfigbase-sysutil-bin
+./usr/sbin/eshconfigbase-obsolete		obsolete
 ./usr/sbin/etcupdatebase-sysutil-bin
 ./usr/sbin/extattrctlbase-sysutil-bin
 ./usr/sbin/execsnoopbase-debug-bin		dtrace

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2300 src/distrib/sets/lists/comp/mi:1.2301
--- src/distrib/sets/lists/comp/mi:1.2300	Mon Jan 13 08:25:02 2020
+++ src/distrib/sets/lists/comp/mi	Sun Jan 19 06:55:22 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2300 2020/01/13 08:25:02 kamil Exp $
+#	$NetBSD: mi,v 1.2301 2020/01/19 06:55:22 thorpej Exp $
 

CVS commit: src/doc

2020-01-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Jan 19 06:40:09 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note removal of uyurex


To generate a diff of this commit:
cvs rdiff -u -r1.2635 -r1.2636 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.2635 src/doc/CHANGES:1.2636
--- src/doc/CHANGES:1.2635	Sun Jan 19 01:38:26 2020
+++ src/doc/CHANGES	Sun Jan 19 06:40:09 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2635 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2636 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -97,4 +97,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	evbarm: Add support for NXP i.MX 8M family SoCs. [jmcneill 20200114]
 	arm: Add support for cpu topology for ARMv7 and ARMv7 CPUs.
 		[mrg 20201114]
+	uyurex(4): Removed from the tree. [maya 20200117]
 	strip(4): Removed from the tree. [thorpej 20200118]



CVS commit: src/sys/net

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 19 05:07:22 UTC 2020

Modified Files:
src/sys/net: bpf.c

Log Message:
Stop including strip.h (it's no longer generated).


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/net/bpf.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/net/bpf.c
diff -u src/sys/net/bpf.c:1.232 src/sys/net/bpf.c:1.233
--- src/sys/net/bpf.c:1.232	Fri Nov 29 17:29:31 2019
+++ src/sys/net/bpf.c	Sun Jan 19 05:07:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.232 2019/11/29 17:29:31 ryo Exp $	*/
+/*	$NetBSD: bpf.c,v 1.233 2020/01/19 05:07:22 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,12 +39,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.232 2019/11/29 17:29:31 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.233 2020/01/19 05:07:22 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
 #include "sl.h"
-#include "strip.h"
 #include "opt_net_mpsafe.h"
 #endif
 



CVS commit: src/doc

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 19 01:38:26 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Document removal of strip(4).


To generate a diff of this commit:
cvs rdiff -u -r1.2634 -r1.2635 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.2634 src/doc/CHANGES:1.2635
--- src/doc/CHANGES:1.2634	Wed Jan 15 09:21:21 2020
+++ src/doc/CHANGES	Sun Jan 19 01:38:26 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2634 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2635 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -97,3 +97,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	evbarm: Add support for NXP i.MX 8M family SoCs. [jmcneill 20200114]
 	arm: Add support for cpu topology for ARMv7 and ARMv7 CPUs.
 		[mrg 20201114]
+	strip(4): Removed from the tree. [thorpej 20200118]



CVS commit: src

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 19 01:25:08 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/modules: mi
src/sbin/slattach: slattach.8
src/share/man/man4: Makefile sl.4
src/sys/arch/acorn32/conf: EB7500ATX GENERIC INSTALL LOWMEM_WSCONS NC
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/amd64/conf: ALL GENERIC MODULAR
src/sys/arch/arc/conf: ARCTIC GENERIC M403 MIMORI PICA RPC44
src/sys/arch/bebox/conf: GENERIC
src/sys/arch/cats/conf: GENERIC INSTALL
src/sys/arch/cobalt/conf: GENERIC INSTALL
src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 ARMADILLO210 ARMADILLO9
CUBOX CUBOX-I DUOVERO GUMSTIX HDL_G HPT5325 IMX6UL-STARTER IYONIX
MARVELL_NAS MINI2440 MMNET_GENERIC MPCSA_GENERIC MV2120
OPENBLOCKS_A6 OPENBLOCKS_AX3 PEPPER RPI SHEEVAPLUG SMDK2410
SMDK2800 TWINTAIL
src/sys/arch/evbmips/conf: ADM5120 ADM5120-NB ADM5120-USB ALCHEMY AP30
CI20 DB120 ERLITE LINKITSMART7688 MALTA MERAKI RB153 RB433UAH
SBMIPS WGT624V3 XLSATX
src/sys/arch/evbppc/conf: EXPLORA451 OPENBLOCKS266 OPENBLOCKS600
src/sys/arch/ews4800mips/conf: GENERIC RAMDISK
src/sys/arch/hpcarm/conf: IPAQ JORNADA720 JORNADA820 NETBOOKPRO WZERO3
src/sys/arch/hppa/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC GENERIC_TINY INSTALL_FLOPPY
INSTALL_TINY NET4501 XEN3PAE_DOM0
src/sys/arch/ia64/conf: GENERIC.SKI
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mipsco/conf: GENERIC RC3230
src/sys/arch/mmeye/conf: GENERIC MMEYE_WLF MMTA MMTAICE MMTAROMNEW
src/sys/arch/mvmeppc/conf: GENERIC
src/sys/arch/news68k/conf: GENERIC GENERIC_TINY LIBERO NEWS1200
src/sys/arch/newsmips/conf: GENERIC
src/sys/arch/prep/conf: GENERIC
src/sys/arch/rs6000/conf: GENERIC
src/sys/arch/sbmips/conf: GENERIC
src/sys/arch/sgimips/conf: GENERIC32_IP12 GENERIC32_IP2x GENERIC32_IP3x
src/sys/arch/shark/conf: GENERIC
src/sys/arch/sparc/conf: GENERIC INSTALL
src/sys/arch/sparc64/conf: GENERIC NONPLUS64
src/sys/modules: Makefile
src/sys/net: files.net
Removed Files:
src/share/man/man4: strip.4
src/sys/modules/if_strip: Makefile strip.ioconf
src/sys/net: if_strip.c if_stripvar.h

Log Message:
Remove the strip(4) - Starmode Radio IP - pseudo-device driver.  It is
long since obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.1669 -r1.1670 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.129 -r1.130 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.29 -r1.30 src/sbin/slattach/slattach.8
cvs rdiff -u -r1.694 -r1.695 src/share/man/man4/Makefile
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/sl.4
cvs rdiff -u -r1.16 -r0 src/share/man/man4/strip.4
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/acorn32/conf/EB7500ATX
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/acorn32/conf/GENERIC
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/acorn32/conf/INSTALL
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/acorn32/conf/LOWMEM_WSCONS \
src/sys/arch/acorn32/conf/NC
cvs rdiff -u -r1.396 -r1.397 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.554 -r1.555 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/conf/MODULAR
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/arc/conf/ARCTIC
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/arc/conf/M403
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/arc/conf/MIMORI
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arc/conf/PICA
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/arc/conf/RPC44
cvs rdiff -u -r1.160 -r1.161 src/sys/arch/bebox/conf/GENERIC
cvs rdiff -u -r1.173 -r1.174 src/sys/arch/cats/conf/GENERIC
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/cats/conf/INSTALL
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/cobalt/conf/GENERIC
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/cobalt/conf/INSTALL
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/evbarm/conf/ARMADILLO210
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/evbarm/conf/ARMADILLO9
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/CUBOX \
src/sys/arch/evbarm/conf/DUOVERO
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/conf/CUBOX-I
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/evbarm/conf/GUMSTIX
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbarm/conf/HPT5325
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/IMX6UL-STARTER
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/IYONIX
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/MARVELL_NAS
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/MINI2440
cvs rdiff -u -r1.46 -r1.47 

CVS commit: src

2020-01-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 19 00:58:15 UTC 2020

Modified Files:
src/distrib/sets/lists/xbase: md.evbarm mi
src/distrib/sets/lists/xcomp: md.evbarm
src/distrib/sets/lists/xdebug: md.evbarm
src/distrib/sets/lists/xserver: md.evbarm
src/etc/mtree: NetBSD.dist.Xorg
src/external/apache2/llvm/librt: Makefile
src/external/mit/xorg/lib: Makefile
src/external/mit/xorg/lib/dri: Makefile
src/external/mit/xorg/lib/gallium: Makefile
src/external/mit/xorg/server/drivers: Makefile
src/external/mit/xorg/server/drivers/xf86-video-radeon: Makefile
src/external/mit/xorg/server/drivers/xf86-video-radeon-kms: Makefile

Log Message:
Build radeon and nouveau drivers on evbarm.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/xbase/md.evbarm
cvs rdiff -u -r1.154 -r1.155 src/distrib/sets/lists/xbase/mi
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/xcomp/md.evbarm
cvs rdiff -u -r1.24 -r1.25 src/distrib/sets/lists/xdebug/md.evbarm
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/xserver/md.evbarm
cvs rdiff -u -r1.25 -r1.26 src/etc/mtree/NetBSD.dist.Xorg
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/librt/Makefile
cvs rdiff -u -r1.50 -r1.51 src/external/mit/xorg/lib/Makefile
cvs rdiff -u -r1.34 -r1.35 src/external/mit/xorg/lib/dri/Makefile
cvs rdiff -u -r1.40 -r1.41 src/external/mit/xorg/lib/gallium/Makefile
cvs rdiff -u -r1.97 -r1.98 src/external/mit/xorg/server/drivers/Makefile
cvs rdiff -u -r1.21 -r1.22 \
src/external/mit/xorg/server/drivers/xf86-video-radeon/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/mit/xorg/server/drivers/xf86-video-radeon-kms/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/xbase/md.evbarm
diff -u src/distrib/sets/lists/xbase/md.evbarm:1.5 src/distrib/sets/lists/xbase/md.evbarm:1.6
--- src/distrib/sets/lists/xbase/md.evbarm:1.5	Mon Aug 12 03:48:32 2019
+++ src/distrib/sets/lists/xbase/md.evbarm	Sun Jan 19 00:58:13 2020
@@ -1,4 +1,7 @@
-# $NetBSD: md.evbarm,v 1.5 2019/08/12 03:48:32 uki Exp $
+# $NetBSD: md.evbarm,v 1.6 2020/01/19 00:58:13 jmcneill Exp $
+./usr/X11R7/lib/libdrm_amdgpu.so		xbase-libdrm_amdgpu-lib		xorg,compatx11file
+./usr/X11R7/lib/libdrm_amdgpu.so.1		xbase-libdrm_amdgpu-lib		xorg,compatx11file
+./usr/X11R7/lib/libdrm_amdgpu.so.1.0		xbase-libdrm_amdgpu-lib		xorg,compatx11file
 ./usr/X11R7/lib/libdrm_nouveau.so		xbase-libdrm_nouveau-lib		xorg
 ./usr/X11R7/lib/libdrm_nouveau.so.3		xbase-libdrm_nouveau-lib		xorg
 ./usr/X11R7/lib/libdrm_nouveau.so.3.0		xbase-libdrm_nouveau-lib		xorg

Index: src/distrib/sets/lists/xbase/mi
diff -u src/distrib/sets/lists/xbase/mi:1.154 src/distrib/sets/lists/xbase/mi:1.155
--- src/distrib/sets/lists/xbase/mi:1.154	Tue Aug 20 12:08:17 2019
+++ src/distrib/sets/lists/xbase/mi	Sun Jan 19 00:58:13 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.154 2019/08/20 12:08:17 uki Exp $
+# $NetBSD: mi,v 1.155 2020/01/19 00:58:13 jmcneill Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1395,6 +1395,7 @@
 ./usr/X11R7/man/cat1/xwud.0xbase-xwud-catman	.cat,xorg
 ./usr/X11R7/man/cat3	base-x11-root	xorg
 ./usr/X11R7/man/cat4	base-x11-root	xorg
+./usr/X11R7/man/cat4/evbarmbase-x11-root	xorg
 ./usr/X11R7/man/cat4/x86	base-x11-root	xorg
 ./usr/X11R7/man/cat5	base-x11-root	xorg
 ./usr/X11R7/man/cat5/fonts-conf.0			xbase-x11-catman	.cat,xorg
@@ -1541,6 +1542,7 @@
 ./usr/X11R7/man/html1/xwud.htmlxbase-xwud-htmlman	html,xorg
 ./usr/X11R7/man/html3	base-x11-root	xorg
 ./usr/X11R7/man/html4	base-x11-root	xorg
+./usr/X11R7/man/html4/evbarmbase-x11-root	xorg
 ./usr/X11R7/man/html4/x86	base-x11-root	xorg
 ./usr/X11R7/man/html5	base-x11-root	xorg
 ./usr/X11R7/man/html5/fonts-conf.html			xbase-x11-htmlman	html,xorg
@@ -1688,6 +1690,7 @@
 ./usr/X11R7/man/man1/xwud.1xbase-xwud-man	.man,xorg
 ./usr/X11R7/man/man3	base-x11-root	xorg
 ./usr/X11R7/man/man4	base-x11-root	xorg
+./usr/X11R7/man/man4/evbarmbase-x11-root	xorg
 ./usr/X11R7/man/man4/x86	base-x11-root	xorg
 ./usr/X11R7/man/man5	base-x11-root	xorg
 ./usr/X11R7/man/man5/fonts-conf.5			xbase-x11-man	.man,xorg

Index: src/distrib/sets/lists/xcomp/md.evbarm
diff -u src/distrib/sets/lists/xcomp/md.evbarm:1.15 src/distrib/sets/lists/xcomp/md.evbarm:1.16
--- src/distrib/sets/lists/xcomp/md.evbarm:1.15	Thu Sep 12 09:45:43 2019
+++ src/distrib/sets/lists/xcomp/md.evbarm	Sun Jan 19 00:58:13 2020
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbarm,v 1.15 2019/09/12 09:45:43 uki Exp $
+# $NetBSD: md.evbarm,v 1.16 2020/01/19 00:58:13 jmcneill Exp $
 ./usr/X11R7/include/libdrm/nouveau/nvif/cl0080.h	xcomp-libdrm-include	xorg
 ./usr/X11R7/include/libdrm/nouveau/nvif/cl9097.h	xcomp-libdrm-include	xorg
 ./usr/X11R7/include/libdrm/nouveau/nvif/class.h		

CVS commit: src/share/mk

2020-01-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 19 00:57:18 UTC 2020

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

Log Message:
Install nouveau and radeon firmware on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.1172 -r1.1173 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.1172 src/share/mk/bsd.own.mk:1.1173
--- src/share/mk/bsd.own.mk:1.1172	Fri Jan 17 16:26:12 2020
+++ src/share/mk/bsd.own.mk	Sun Jan 19 00:57:18 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1172 2020/01/17 16:26:12 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1173 2020/01/19 00:57:18 jmcneill Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1174,8 +1174,10 @@ MKFIRMWARE.sparc64=		yes
 # Only install the nouveau and radeon firmwares on DRM-happy systems.
 MKNOUVEAUFIRMWARE.x86_64=	yes
 MKNOUVEAUFIRMWARE.i386=		yes
+MKNOUVEAUFIRMWARE.aarch64=	yes
 MKRADEONFIRMWARE.x86_64=	yes
 MKRADEONFIRMWARE.i386=		yes
+MKRADEONFIRMWARE.aarch64=	yes
 
 # Only install the tegra firmware on evbarm.
 MKTEGRAFIRMWARE.evbarm=		yes



CVS commit: src/distrib/miniroot

2020-01-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 19 00:57:00 UTC 2020

Modified Files:
src/distrib/miniroot: install.sub

Log Message:
test ! -n "$foo"   is just a quaint way of saying test -z "$foo"
and test ! -z "$foo" is really just test -n "$foo"  so let's just
use the simple (and more obvious) forms.

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/miniroot/install.sub

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

Modified files:

Index: src/distrib/miniroot/install.sub
diff -u src/distrib/miniroot/install.sub:1.52 src/distrib/miniroot/install.sub:1.53
--- src/distrib/miniroot/install.sub:1.52	Sun Jan 19 00:50:25 2020
+++ src/distrib/miniroot/install.sub	Sun Jan 19 00:57:00 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: install.sub,v 1.52 2020/01/19 00:50:25 kre Exp $
+#	$NetBSD: install.sub,v 1.53 2020/01/19 00:57:00 kre Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -523,7 +523,7 @@ if [ -f /mnt/etc/rc.conf ]; then
 		echo -n "configuring network interfaces:"
 		for i in $tmp; do
 			eval $(echo 'args=$ifconfig_'$i)
-			if [ ! -z "$args" ]; then
+			if [ -n "$args" ]; then
 echo -n " $i"
 ifconfig $i $args
 			elif [ -f /mnt/etc/ifconfig.$i ]; then
@@ -555,7 +555,7 @@ else
 			read af name mask bcaddr extras
 			read dt dtaddr
 
-			if [ ! -n "$name" ]; then
+			if [ -z "$name" ]; then
 		echo "/etc/hostname.$1: invalid network configuration file"
 exit
 			fi
@@ -1047,7 +1047,7 @@ The following filesystem types are suppo
 __mount_a_disk_2
 	_md_fstype=$(md_native_fstype)
 	_md_fsopts=$(md_native_fsopts)
-	if [ ! -z "$_md_fstype" ]; then
+	if [ -n "$_md_fstype" ]; then
 		echo "	3) $_md_fstype"
 	else
 		_md_fstype="_undefined_"



CVS commit: src/distrib/miniroot

2020-01-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 19 00:50:25 UTC 2020

Modified Files:
src/distrib/miniroot: install.sub

Log Message:
The idiom

set $whatever
while [ $# - gt 10 ]; do shift 10; done
eval echo \$$#

fails when $# turns out to be 10 (or any multiple), it would need
to be instead

while [ $# -ge 10 ]; do shift 9; done

but there hasn't been a shell that cannot handle ${10} (etc) correctly
in a very long time, so let's just use that instead (properly quoted,
in case IFS happens to contain a digit for some bizarre reason).

We should also "set -f" / "set +f" (or better, restore the prev setting of -f)
around the "set $whatever" part, but if that was ever going to cause a problem
here, it would have already, so leave that for now.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/miniroot/install.sub

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

Modified files:

Index: src/distrib/miniroot/install.sub
diff -u src/distrib/miniroot/install.sub:1.51 src/distrib/miniroot/install.sub:1.52
--- src/distrib/miniroot/install.sub:1.51	Sun Jan 12 03:56:14 2020
+++ src/distrib/miniroot/install.sub	Sun Jan 19 00:50:25 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: install.sub,v 1.51 2020/01/12 03:56:14 tsutsui Exp $
+#	$NetBSD: install.sub,v 1.52 2020/01/19 00:50:25 kre Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -114,8 +114,7 @@ cutlast () {
 	read _a; set -- $_a
 	IFS="$_oifs"
 	if [ "$1" = "" ]; then return; fi
-	while [ "$#" -gt 10 ]; do shift 10; done
-	eval echo \$$#
+	eval echo '"${'"$#"'}"'
 }
 
 firstchar () {
@@ -135,8 +134,7 @@ basename () {
 	IFS="/"
 	set -- $1
 	IFS="$_oifs"
-	while [ "$#" -gt 10 ]; do shift 10; done
-	eval echo \$$#
+	eval echo '"${'"$#"'}"'
 }
 
 dir_has_sets() {



CVS commit: src/sys/dev/pci

2020-01-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 18 22:17:34 UTC 2020

Modified Files:
src/sys/dev/pci: pciconf.c

Log Message:
Fix several problems with pci_configure_bus():
- Track the 64-bit range capability of prefetchable and non-prefetchable
  memory separately.  Probe the extent maps provided by the caller to
  initialize these values.  Without this, we never get 64-bit range
  capablity on the root bus, and thus are never able to forward it along
  to downstream busses.
- Always prefer allocating space for a 64-bit memory BAR > 4GB.  We will
  fall back on a 32-bit range if no space above 4GB is available.
- Constrain allocation of 32-bit memory BARs (including expansion ROM BARs)
  to be below 4GB, even if the window has a larger range available.
- When allocating non-prefetchable memory space for a PCI-PCI bridge, ensure
  it falls below 4GB, since a bridge cannot forward a 64-bit non-prefetchable
  range.
- Account for expansion ROMs as non-prefetchable memory rather than
  prefetchable memory; expansion ROMs have 32-bit BARs, and if a device
  with an expansion ROM is downstream of a brige, a 32-bit prefetchable
  range might not be available.

Tested by jmcneill@ on an Arm Neoverse N1 SDP, where the previous
code failed to configure all devices correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/pciconf.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/pci/pciconf.c
diff -u src/sys/dev/pci/pciconf.c:1.43 src/sys/dev/pci/pciconf.c:1.44
--- src/sys/dev/pci/pciconf.c:1.43	Thu Dec  5 07:03:01 2019
+++ src/sys/dev/pci/pciconf.c	Sat Jan 18 22:17:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pciconf.c,v 1.43 2019/12/05 07:03:01 msaitoh Exp $	*/
+/*	$NetBSD: pciconf.c,v 1.44 2020/01/18 22:17:34 thorpej Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.43 2019/12/05 07:03:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.44 2020/01/18 22:17:34 thorpej Exp $");
 
 #include "opt_pci.h"
 
@@ -131,6 +131,7 @@ typedef struct _s_pciconf_bus_t {
 	int		swiz;
 	int		io_32bit;
 	int		pmem_64bit;
+	int		mem_64bit;
 	int		io_align;
 	int		mem_align;
 	int		pmem_align;
@@ -164,7 +165,7 @@ static int	setup_iowins(pciconf_bus_t *)
 static int	setup_memwins(pciconf_bus_t *);
 static int	configure_bridge(pciconf_dev_t *);
 static int	configure_bus(pciconf_bus_t *);
-static uint64_t	pci_allocate_range(struct extent *, uint64_t, int);
+static uint64_t	pci_allocate_range(struct extent *, uint64_t, int, bool);
 static pciconf_win_t	*get_io_desc(pciconf_bus_t *, bus_size_t);
 static pciconf_win_t	*get_mem_desc(pciconf_bus_t *, bus_size_t);
 static pciconf_bus_t	*query_bus(pciconf_bus_t *, pciconf_dev_t *, int);
@@ -180,6 +181,12 @@ print_tag(pci_chipset_tag_t pc, pcitag_t
 	printf("PCI: bus %d, device %d, function %d: ", bus, dev, func);
 }
 
+#ifdef _LP64
+#define	__used_only_lp64	__unused
+#else
+#define	__used_only_lp64	/* nothing */
+#endif /* _LP64 */
+
 //
 //
 /***   Bus probing routines   ***/
@@ -353,6 +360,9 @@ query_bus(pciconf_bus_t *parent, pciconf
 			pb->pmem_64bit = 1;
 	}
 
+	/* Bridges only forward a 32-bit range of non-prefetcable memory. */
+	pb->mem_64bit = 0;
+
 	if (probe_bus(pb)) {
 		printf("Failed to probe bus %d\n", pb->busno);
 		goto err;
@@ -660,14 +670,22 @@ pci_do_device_query(pciconf_bus_t *pb, p
 			pm->reg = PCI_MAPREG_ROM;
 			pm->size = size;
 			pm->align = 4;
-			pm->prefetch = 1;
+			pm->prefetch = 0;
 			if (pci_conf_debug) {
 print_tag(pb->pc, tag);
 printf("Expansion ROM memory size %"
 PRIu64 "\n", pm->size);
 			}
 			pb->nmemwin++;
-			pb->pmem_total += size;
+			if (pm->prefetch) {
+pb->pmem_total += size;
+if (pb->pmem_align < pm->size)
+	pb->pmem_align = pm->size;
+			} else {
+pb->mem_total += size;
+if (pb->mem_align < pm->size)
+	pb->mem_align = pm->size;
+			}
 		}
 	} else {
 		/* Don't enable ROMs if we aren't going to map them. */
@@ -691,15 +709,52 @@ pci_do_device_query(pciconf_bus_t *pb, p
 //
 //
 static uint64_t
-pci_allocate_range(struct extent *ex, uint64_t amt, int align)
+pci_allocate_range(struct extent * const ex, const uint64_t amt,
+		   const int align, const bool ok64 __used_only_lp64)
 {
 	int	r;
 	u_long	addr;
 
-	r = extent_alloc(ex, amt, align, 0, EX_NOWAIT, );
+	u_long end = ex->ex_end;
+
+#ifdef _LP64
+	/*
+	 * If a 64-bit range is not OK:
+	 * ==> If the start of the range is > 4GB, allocation not possible.
+	 * ==> If the end of the 

CVS commit: src/sys/dev/sun

2020-01-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 18 21:08:42 UTC 2020

Modified Files:
src/sys/dev/sun: kbd.c

Log Message:
Fix panic on sun3 when any key is typed when kbd is not console. PR/54873

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/sun/kbd.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/sun/kbd.c
diff -u src/sys/dev/sun/kbd.c:1.70 src/sys/dev/sun/kbd.c:1.71
--- src/sys/dev/sun/kbd.c:1.70	Sun Nov 10 21:16:37 2019
+++ src/sys/dev/sun/kbd.c	Sat Jan 18 21:08:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.70 2019/11/10 21:16:37 chs Exp $	*/
+/*	$NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.70 2019/11/10 21:16:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $");
 
 #include 
 #include 
@@ -202,7 +202,7 @@ kbdopen(dev_t dev, int flags, int mode, 
 	k->k_events.ev_io = l->l_proc;
 
 	/* stop pending autorepeat of console input */
-	if (k->k_repeating) {
+	if (k->k_cc != NULL && k->k_repeating) {
 		k->k_repeating = 0;
 		callout_stop(>k_repeat_ch);
 	}
@@ -492,9 +492,11 @@ kbd_input(struct kbd_softc *k, int code)
 
 	/*
 	 * If /dev/kbd is not connected in event mode, or wskbd mode,
-	 * translate and send upstream (to console).
+	 * and is attached as console, translate and send upstream
+	 * (to console).
 	 */
-	kbd_input_console(k, code);
+	if (k->k_cc != NULL)
+		kbd_input_console(k, code);
 }
 
 



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

2020-01-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 18 20:47:15 UTC 2020

Modified Files:
src/sys/arch/sun3/include: pmap.h pmap3.h pmap3x.h

Log Message:
Fix "modload nfsserver" failure on sun3.  PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun3/include/pmap.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sun3/include/pmap3.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sun3/include/pmap3x.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/sun3/include/pmap.h
diff -u src/sys/arch/sun3/include/pmap.h:1.32 src/sys/arch/sun3/include/pmap.h:1.33
--- src/sys/arch/sun3/include/pmap.h:1.32	Fri Dec 11 18:31:27 2009
+++ src/sys/arch/sun3/include/pmap.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.32 2009/12/11 18:31:27 tsutsui Exp $	*/
+/*	$NetBSD: pmap.h,v 1.33 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,6 +37,12 @@
 #endif	/* SUN3X */
 
 #ifdef _KERNEL
+/*
+ * Some pmap(9) API macros should be defined here for module(7)
+ * because they are common between sun3 and sun3x. (see PR/54869)
+ */
+#define	pmap_update(pmap)		/* nothing (yet) */
+
 void pmap_procwr(struct proc *, vaddr_t, size_t);
 #endif
 

Index: src/sys/arch/sun3/include/pmap3.h
diff -u src/sys/arch/sun3/include/pmap3.h:1.49 src/sys/arch/sun3/include/pmap3.h:1.50
--- src/sys/arch/sun3/include/pmap3.h:1.49	Mon Jan  7 16:58:09 2013
+++ src/sys/arch/sun3/include/pmap3.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3.h,v 1.49 2013/01/07 16:58:09 chs Exp $	*/
+/*	$NetBSD: pmap3.h,v 1.50 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -64,8 +64,6 @@ extern segsz_t pmap_wired_pages(pmap_t);
 /* We use the PA plus some low bits for device mmap. */
 #define pmap_phys_address(addr) 	(addr)
 
-#define	pmap_update(pmap)		/* nothing (yet) */
-
 /* Map a given physical region to a virtual region */
 extern vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
 

Index: src/sys/arch/sun3/include/pmap3x.h
diff -u src/sys/arch/sun3/include/pmap3x.h:1.29 src/sys/arch/sun3/include/pmap3x.h:1.30
--- src/sys/arch/sun3/include/pmap3x.h:1.29	Fri Jun  3 17:03:52 2011
+++ src/sys/arch/sun3/include/pmap3x.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3x.h,v 1.29 2011/06/03 17:03:52 tsutsui Exp $	*/
+/*	$NetBSD: pmap3x.h,v 1.30 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -53,8 +53,6 @@ segsz_t pmap_count(pmap_t, int);
 /* We use the PA plus some low bits for device mmap. */
 #define pmap_phys_address(addr) 	(addr)
 
-#define	pmap_update(pmap)		/* nothing (yet) */
-
 /* Map a given physical region to a virtual region */
 vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
 



CVS commit: src/sys/arch/i386/stand/efiboot

2020-01-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Jan 18 19:25:58 UTC 2020

Modified Files:
src/sys/arch/i386/stand/efiboot: devopen.c

Log Message:
x86 efiboot: Fixed the problem that /EFI/NetBSD/boot.cfg could not be loaded.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/stand/efiboot/devopen.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/i386/stand/efiboot/devopen.c
diff -u src/sys/arch/i386/stand/efiboot/devopen.c:1.10 src/sys/arch/i386/stand/efiboot/devopen.c:1.11
--- src/sys/arch/i386/stand/efiboot/devopen.c:1.10	Sat Jan 18 19:20:23 2020
+++ src/sys/arch/i386/stand/efiboot/devopen.c	Sat Jan 18 19:25:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.10 2020/01/18 19:20:23 nonaka Exp $	 */
+/*	$NetBSD: devopen.c,v 1.11 2020/01/18 19:25:58 nonaka Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@ bios2dev(int biosdev, daddr_t sector, ch
 		*devname = "hd";
 
 	(void)biosdisk_findpartition(biosdev, sector, partition, part_name);
-	if (*part_name != NULL) {
+	if (part_name != NULL && *part_name != NULL) {
 		snprintf(savedevname, sizeof(savedevname),
 		"NAME=%s", *part_name);
 		*devname = savedevname;



CVS commit: src/sys/arch/i386/stand/efiboot

2020-01-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Jan 18 19:20:23 UTC 2020

Modified Files:
src/sys/arch/i386/stand/efiboot: devopen.c

Log Message:
fix indent.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/efiboot/devopen.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/i386/stand/efiboot/devopen.c
diff -u src/sys/arch/i386/stand/efiboot/devopen.c:1.9 src/sys/arch/i386/stand/efiboot/devopen.c:1.10
--- src/sys/arch/i386/stand/efiboot/devopen.c:1.9	Tue Dec 10 02:02:47 2019
+++ src/sys/arch/i386/stand/efiboot/devopen.c	Sat Jan 18 19:20:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.9 2019/12/10 02:02:47 manu Exp $	 */
+/*	$NetBSD: devopen.c,v 1.10 2020/01/18 19:20:23 nonaka Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@ bios2dev(int biosdev, daddr_t sector, ch
 	if (*part_name != NULL) {
 		snprintf(savedevname, sizeof(savedevname),
 		"NAME=%s", *part_name);
-			*devname = savedevname;
+		*devname = savedevname;
 	}
 }
 



CVS commit: src/usr.sbin/sysinst

2020-01-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 18 18:39:55 UTC 2020

Modified Files:
src/usr.sbin/sysinst: mbr.c

Log Message:
PR install/54872: fix printf argument order, sectors and heads were
swapped in the bios geometry display.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sysinst/mbr.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/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.27 src/usr.sbin/sysinst/mbr.c:1.28
--- src/usr.sbin/sysinst/mbr.c:1.27	Wed Jan 15 19:36:30 2020
+++ src/usr.sbin/sysinst/mbr.c	Sat Jan 18 18:39:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.27 2020/01/15 19:36:30 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.28 2020/01/18 18:39:55 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -260,8 +260,8 @@ set_bios_geom_with_mbr_guess(struct disk
 {
 	int cyl, head, sec;
 
-	msg_fmt_display(MSG_nobiosgeom, "%d%d%d", pm->dlcyl, pm->dlhead,
-	pm->dlsec);
+	msg_fmt_display(MSG_nobiosgeom, "%d%d%d",
+	pm->dlcyl, pm->dlsec, pm->dlhead);
 	if (guess_biosgeom_from_parts(parts, , , ) >= 0)
 		msg_fmt_display_add(MSG_biosguess, "%d%d%d", cyl, head, sec);
 	set_bios_geom(parts, , , );



CVS commit: src/distrib/sets/lists

2020-01-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jan 18 17:18:41 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
Move recently added .debug files from tests/mi to debug/mi (with all the
others) and while so doing, give them the "debug" attribute.

While here, sort.


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.827 -r1.828 src/distrib/sets/lists/tests/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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.290 src/distrib/sets/lists/debug/mi:1.291
--- src/distrib/sets/lists/debug/mi:1.290	Tue Dec  3 04:20:45 2019
+++ src/distrib/sets/lists/debug/mi	Sat Jan 18 17:18:41 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.290 2019/12/03 04:20:45 hikaru Exp $
+# $NetBSD: mi,v 1.291 2020/01/18 17:18:41 kre Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1885,6 +1885,7 @@
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini2.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini3.debug			tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini_array.debug			tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libarchive/h_libarchive.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_bluetooth.debug	tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_sdp_data.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libbluetooth/t_sdp_get.debug		tests-lib-debug		debug,atf,compattestfile
@@ -2249,13 +2250,13 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/dlopen/t_dso_pthread_create.debug 	tests-lib-debug	debug,atf,pic,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/dlopen/t_main_pthread_create.debug 	tests-lib-debug	debug,atf,pic,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/h_atexit.debug		tests-lib-tests		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libpthread/h_cancel.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/h_exit.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/h_resolv.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/h_thread_local_dtor.debug	tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_barrier.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_call_once.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_cnd.debug		tests-lib-tests		debug,atf,compattestfile
-./usr/libdata/debug/usr/tests/lib/libpthread/h_cancel.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_cond.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_condwait.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_detach.debug		tests-lib-tests		debug,atf,compattestfile
@@ -2277,9 +2278,9 @@
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_sleep.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug		tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_swapcontext.debug	tests-lib-tests		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libpthread/t_thrd.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_timedmutex.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread/t_tss.debug		tests-lib-tests		debug,atf,compattestfile
-./usr/libdata/debug/usr/tests/lib/libpthread/t_thrd.debug		tests-lib-tests		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libpthread_dbg/t_dummy.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libpthread_dbg/t_threads.debug	tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/librefuse/t_refuse_opt.debug		tests-lib-debug		debug,atf,compattestfile
@@ -2414,7 +2415,9 @@
 ./usr/libdata/debug/usr/tests/syscall/t_truncate.debug			tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/syscall/t_umask.debug			tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/syscall/t_unlink.debug			tests-obsolete		obsolete,compattestfile
+./usr/libdata/debug/usr/tests/usr.bin/cpio/h_cpio.debug			tests-usr.bin-debug	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/usr.bin/id/h_id.debug			

CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:16:20 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
Fix namecache_print().


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.7 -r1.126.2.8 src/sys/kern/vfs_cache.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_cache.c
diff -u src/sys/kern/vfs_cache.c:1.126.2.7 src/sys/kern/vfs_cache.c:1.126.2.8
--- src/sys/kern/vfs_cache.c:1.126.2.7	Sat Jan 18 15:42:02 2020
+++ src/sys/kern/vfs_cache.c	Sat Jan 18 17:16:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_cache.c,v 1.126.2.7 2020/01/18 15:42:02 ad Exp $	*/
+/*	$NetBSD: vfs_cache.c,v 1.126.2.8 2020/01/18 17:16:20 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.126.2.7 2020/01/18 15:42:02 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.126.2.8 2020/01/18 17:16:20 ad Exp $");
 
 #define __NAMECACHE_PRIVATE
 #ifdef _KERNEL_OPT
@@ -1388,7 +1388,6 @@ cache_stat_sysctl(SYSCTLFN_ARGS)
 void
 namecache_print(struct vnode *vp, void (*pr)(const char *, ...))
 {
-	struct vnode *dvp = NULL;
 	struct namecache *nc;
 	struct nchnode *dnn;
 	enum cache_lru_id id;
@@ -1402,7 +1401,7 @@ namecache_print(struct vnode *vp, void (
 			}
 		}
 	}
-	if (dvp == NULL) {
+	if (dnn == NULL) {
 		(*pr)("name not found\n");
 		return;
 	}



CVS commit: [ad-namecache] src/sys/sys

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:14:35 UTC 2020

Modified Files:
src/sys/sys [ad-namecache]: vnode_if.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.103.2.1 src/sys/sys/vnode_if.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/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.103 src/sys/sys/vnode_if.h:1.103.2.1
--- src/sys/sys/vnode_if.h:1.103	Sun Dec  1 13:58:53 2019
+++ src/sys/sys/vnode_if.h	Sat Jan 18 17:14:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.h,v 1.103 2019/12/01 13:58:53 ad Exp $	*/
+/*	$NetBSD: vnode_if.h,v 1.103.2.1 2020/01/18 17:14:35 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.68.2.1 2020/01/18 17:12:59 ad Exp
  */
 
 /*



CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:14:13 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vnode_if.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.109.2.1 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.109 src/sys/kern/vnode_if.c:1.109.2.1
--- src/sys/kern/vnode_if.c:1.109	Sun Dec  1 13:58:52 2019
+++ src/sys/kern/vnode_if.c	Sat Jan 18 17:14:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.109 2019/12/01 13:58:52 ad Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.109.2.1 2020/01/18 17:14:13 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.68.2.1 2020/01/18 17:12:59 ad Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.109 2019/12/01 13:58:52 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.109.2.1 2020/01/18 17:14:13 ad Exp $");
 
 #include 
 #include 
@@ -1280,7 +1280,7 @@ VOP_LOCK(struct vnode *vp,
 	a.a_desc = VDESC(vop_lock);
 	a.a_vp = vp;
 	a.a_flags = flags;
-	error = vop_pre(vp, , , (flags & (LK_UPGRADE|LK_DOWNGRADE) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES)));
+	error = vop_pre(vp, , , (!(flags & (LK_SHARED|LK_EXCLUSIVE)) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES)));
 	if (error)
 		return error;
 	error = (VCALL(vp, VOFFSET(vop_lock), ));



CVS commit: [ad-namecache] src/sys

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 17:12:59 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vnode_if.sh
src/sys/miscfs/genfs [ad-namecache]: genfs_vnops.c

Log Message:
Allow VOP_LOCK(LK_NONE).


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.2.1 src/sys/kern/vnode_if.sh
cvs rdiff -u -r1.200 -r1.200.2.1 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/kern/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.68 src/sys/kern/vnode_if.sh:1.68.2.1
--- src/sys/kern/vnode_if.sh:1.68	Sun Dec  1 13:56:29 2019
+++ src/sys/kern/vnode_if.sh	Sat Jan 18 17:12:59 2020
@@ -29,7 +29,7 @@ copyright="\
  * SUCH DAMAGE.
  */
 "
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.68.2.1 2020/01/18 17:12:59 ad Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -481,7 +481,7 @@ function bodynorm() {
 	}
 	if (fstrans == "LOCK")
 		printf("\terror = vop_pre(%s, , , %s);\n",
-			argname[0], "(flags & (LK_UPGRADE|LK_DOWNGRADE) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES))");
+			argname[0], "(!(flags & (LK_SHARED|LK_EXCLUSIVE)) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES))");
 	else if (fstrans == "UNLOCK")
 		printf("\terror = vop_pre(%s, , , FST_%s);\n",
 			argname[0], "NO");

Index: src/sys/miscfs/genfs/genfs_vnops.c
diff -u src/sys/miscfs/genfs/genfs_vnops.c:1.200 src/sys/miscfs/genfs/genfs_vnops.c:1.200.2.1
--- src/sys/miscfs/genfs/genfs_vnops.c:1.200	Sun Dec  1 13:56:29 2019
+++ src/sys/miscfs/genfs/genfs_vnops.c	Sat Jan 18 17:12:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_vnops.c,v 1.200 2019/12/01 13:56:29 ad Exp $	*/
+/*	$NetBSD: genfs_vnops.c,v 1.200.2.1 2020/01/18 17:12:59 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.200 2019/12/01 13:56:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.200.2.1 2020/01/18 17:12:59 ad Exp $");
 
 #include 
 #include 
@@ -301,7 +301,7 @@ genfs_deadlock(void *v)
 			rw_exit(vip->vi_lock);
 			rw_enter(vip->vi_lock, RW_WRITER);
 		}
-	} else {
+	} else if ((flags & (LK_EXCLUSIVE | LK_SHARED)) != 0) {
 		op = (ISSET(flags, LK_EXCLUSIVE) ? RW_WRITER : RW_READER);
 		if (ISSET(flags, LK_NOWAIT)) {
 			if (!rw_tryenter(vip->vi_lock, op))
@@ -355,7 +355,7 @@ genfs_lock(void *v)
 			rw_exit(vip->vi_lock);
 			rw_enter(vip->vi_lock, RW_WRITER);
 		}
-	} else {
+	} else if ((flags & (LK_EXCLUSIVE | LK_SHARED)) != 0) {
 		op = (ISSET(flags, LK_EXCLUSIVE) ? RW_WRITER : RW_READER);
 		if (ISSET(flags, LK_NOWAIT)) {
 			if (!rw_tryenter(vip->vi_lock, op))



CVS commit: [ad-namecache] src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 15:42:02 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_cache.c

Log Message:
- Adjust comments & assertions.
- Ditch memcmp().


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.6 -r1.126.2.7 src/sys/kern/vfs_cache.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_cache.c
diff -u src/sys/kern/vfs_cache.c:1.126.2.6 src/sys/kern/vfs_cache.c:1.126.2.7
--- src/sys/kern/vfs_cache.c:1.126.2.6	Fri Jan 17 22:26:25 2020
+++ src/sys/kern/vfs_cache.c	Sat Jan 18 15:42:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_cache.c,v 1.126.2.6 2020/01/17 22:26:25 ad Exp $	*/
+/*	$NetBSD: vfs_cache.c,v 1.126.2.7 2020/01/18 15:42:02 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.126.2.6 2020/01/17 22:26:25 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.126.2.7 2020/01/18 15:42:02 ad Exp $");
 
 #define __NAMECACHE_PRIVATE
 #ifdef _KERNEL_OPT
@@ -330,6 +330,22 @@ cache_key(const char *name, size_t nlen)
 }
 
 /*
+ * Like memcmp() but tuned for small strings of equal length.
+ */
+static inline int
+cache_namecmp(struct namecache *nc, const char *name, size_t namelen)
+{
+	size_t i;
+	int d;
+
+	KASSERT(nc->nc_nlen == namelen);
+	for (d = 0, i = 0; i < namelen; i++) {
+		d |= (nc->nc_name[i] ^ name[i]);
+	}
+	return d;
+}
+
+/*
  * Remove an entry from the cache.  The directory lock must be held, and if
  * "dir2node" is true, then we're locking in the conventional direction and
  * the list lock will be acquired when removing the entry from the vnode
@@ -378,11 +394,10 @@ cache_remove(struct namecache *nc, const
 }
 
 /*
- * Find a single cache entry and return it locked.  The directory lock must
- * be held.
+ * Find a single cache entry and return it.  The nchnode lock must be held.
  *
  * Marked __noinline, and with everything unnecessary excluded, the compiler
- * (gcc 8.3.0 x86_64) does a great job on this.
+ * (gcc 8.3.0 x86_64) does a good job on this.
  */
 static struct namecache * __noinline
 cache_lookup_entry(struct nchnode *dnn, const char *name, size_t namelen,
@@ -394,12 +409,12 @@ cache_lookup_entry(struct nchnode *dnn, 
 	KASSERT(rw_lock_held(>nn_lock));
 
 	/*
-	 * Search the RB tree for the key.  This is one of the most
-	 * performance sensitive code paths in the system, so here is an
-	 * inlined version of rb_tree_find_node() tailored for exactly
-	 * what's needed here (64-bit key and so on).  Elsewhere during
-	 * entry/removal the generic functions are used as it doesn't
-	 * matter so much there.
+	 * Search the RB tree for the key.  File lookup is very performance
+	 * sensitive, so here is an inlined lookup tailored for exactly
+	 * what's needed here (64-bit key and so on) that is much faster
+	 * than using rb_tree_find_node().  Elsewhere during entry/removal
+	 * the generic functions are used as it doesn't matter so much
+	 * there.
 	 */
 	for (;;) {
 		if (__predict_false(RB_SENTINEL_P(node))) {
@@ -415,8 +430,7 @@ cache_lookup_entry(struct nchnode *dnn, 
 	}
 
 	/* Exclude collisions. */
-	KASSERT(nc->nc_nlen == namelen);
-	if (__predict_false(memcmp(nc->nc_name, name, namelen) != 0)) {
+	if (__predict_false(cache_namecmp(nc, name, namelen))) {
 		return NULL;
 	}
 
@@ -666,7 +680,7 @@ cache_lookup_linked(struct vnode *dvp, c
 			rw_exit(*plock);
 		}
 		*plock = >nn_lock;
-	} else {
+	} else if (*plock == NULL) {
 		KASSERT(dvp->v_usecount > 0);
 	}
 
@@ -674,6 +688,8 @@ cache_lookup_linked(struct vnode *dvp, c
 	 * First up check if the user is allowed to look up files in this
 	 * directory.
 	 */
+	KASSERT(dnn->nn_mode != VNOVAL && dnn->nn_uid != VNOVAL &&
+	dnn->nn_gid != VNOVAL);
 	error = kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(VEXEC,
 	dvp->v_type, dnn->nn_mode & ALLPERMS), dvp, NULL,
 	genfs_can_access(dvp->v_type, dnn->nn_mode & ALLPERMS,
@@ -857,7 +873,7 @@ cache_enter(struct vnode *dvp, struct vn
 	onc = rb_tree_find_node(>nn_tree, >nc_key);
 	if (onc) {
 		KASSERT(onc->nc_nlen == nc->nc_nlen);
-		if (memcmp(onc->nc_name, nc->nc_name, nc->nc_nlen) != 0) {
+		if (cache_namecmp(onc, name, namelen)) {
 			COUNT(ncs_collisions);
 		}
 		cache_remove(onc, true);



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

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 15:21:32 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Track page dirtyness for ZFS (yamt-pagecache).  I had forgotten that it had
its own cache.  Thanks to hannken@ for the repro.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_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/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.55 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.56
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.55	Wed Jan 15 17:55:43 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Sat Jan 18 15:21:32 2020
@@ -779,7 +779,7 @@ update_pages(vnode_t *vp, int64_t start,
 	struct uvm_object *uobj = >v_uobj;
 	kmutex_t *mtx = uobj->vmobjlock;
 	caddr_t va;
-	int off;
+	int off, status;
 
 	ASSERT(vp->v_mount != NULL);
 
@@ -796,6 +796,26 @@ update_pages(vnode_t *vp, int64_t start,
 		found = uvn_findpages(uobj, start, , , NULL,
 		UFP_NOALLOC);
 		if (found) {
+			/*
+			 * We're about to zap the page's contents and don't
+			 * care about any existing modifications.  We must
+			 * keep track of any new modifications past this
+			 * point.  Clear the modified bit in the pmap, and
+			 * if the page is marked dirty revert to tracking
+			 * the modified bit.
+			 */
+			switch (uvm_pagegetdirty(pp)) {
+			case UVM_PAGE_STATUS_DIRTY:
+/* Does pmap_clear_modify(). */
+uvm_pagemarkdirty(pp, UVM_PAGE_STATUS_UNKNOWN);
+break;
+			case UVM_PAGE_STATUS_UNKNOWN:
+pmap_clear_modify(pp);
+break;
+			case UVM_PAGE_STATUS_CLEAN:
+/* Nothing to do. */
+break;
+			}
 			mutex_exit(mtx);
 
 			va = zfs_map_page(pp, S_WRITE);
@@ -5990,10 +6010,13 @@ zfs_netbsd_getpages(void *v)
 
 		mutex_enter(mtx);
 		pg->flags &= ~(PG_FAKE);
-		pmap_clear_modify(pg);
 	}
 
 	if (memwrite) {
+		if (uvm_pagegetdirty(pg) == UVM_PAGE_STATUS_CLEAN) {
+			/* For write faults, start dirtiness tracking. */
+			uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_UNKNOWN);
+		}
 		if ((vp->v_iflag & VI_ONWORKLST) == 0) {
 			vn_syncer_add_to_worklist(vp, filedelay);
 		}



CVS commit: src/tests

2020-01-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 18 15:16:48 UTC 2020

Modified Files:
src/tests/lib/libarchive: Makefile
src/tests/usr.bin/cpio: Makefile
src/tests/usr.bin/tar: Makefile

Log Message:
not require .d files for the build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libarchive/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/cpio/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/tar/Makefile

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

Modified files:

Index: src/tests/lib/libarchive/Makefile
diff -u src/tests/lib/libarchive/Makefile:1.2 src/tests/lib/libarchive/Makefile:1.3
--- src/tests/lib/libarchive/Makefile:1.2	Sat Jan 18 08:56:53 2020
+++ src/tests/lib/libarchive/Makefile	Sat Jan 18 10:16:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2020/01/18 15:16:47 christos Exp $
 
 NOMAN=
 
@@ -596,7 +596,7 @@ test_write_disk_no_hfs_compression.tgz.u
 
 .include 
 
-test_main.d: list.h
+test_main.o test_main.d: list.h
 
 CLEANFILES+=list.h
 

Index: src/tests/usr.bin/cpio/Makefile
diff -u src/tests/usr.bin/cpio/Makefile:1.2 src/tests/usr.bin/cpio/Makefile:1.3
--- src/tests/usr.bin/cpio/Makefile:1.2	Sat Jan 18 08:56:53 2020
+++ src/tests/usr.bin/cpio/Makefile	Sat Jan 18 10:16:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2020/01/18 15:16:48 christos Exp $
 
 NOMAN=
 
@@ -107,7 +107,7 @@ test_option_tv.stdout.uu
 
 .include 
 
-test_main.d: list.h
+test_main.o test_main.d: list.h
 
 CLEANFILES+=list.h
 

Index: src/tests/usr.bin/tar/Makefile
diff -u src/tests/usr.bin/tar/Makefile:1.2 src/tests/usr.bin/tar/Makefile:1.3
--- src/tests/usr.bin/tar/Makefile:1.2	Sat Jan 18 08:56:53 2020
+++ src/tests/usr.bin/tar/Makefile	Sat Jan 18 10:16:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2020/01/18 15:16:48 christos Exp $
 
 NOMAN=
 
@@ -113,7 +113,7 @@ test_print_longpath.tar.Z.uu
 
 .include 
 
-test_main.d: list.h
+test_main.o test_main.d: list.h
 
 CLEANFILES+=list.h
 



CVS commit: src/sys

2020-01-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 18 14:40:04 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: cpu.c pmap.c
src/sys/arch/arm/include: cpu.h types.h
src/sys/arch/arm/include/arm32: param.h pmap.h pte.h
src/sys/kern: init_sysctl.c

Log Message:
Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.379 -r1.380 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/arm/include/cpu.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/include/types.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/include/arm32/param.h
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/arm/include/arm32/pmap.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/arm32/pte.h
cvs rdiff -u -r1.223 -r1.224 src/sys/kern/init_sysctl.c

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

Modified files:

Index: src/sys/arch/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.140 src/sys/arch/arm/arm32/cpu.c:1.141
--- src/sys/arch/arm/arm32/cpu.c:1.140	Wed Jan 15 08:34:04 2020
+++ src/sys/arch/arm/arm32/cpu.c	Sat Jan 18 14:40:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.140 2020/01/15 08:34:04 mrg Exp $	*/
+/*	$NetBSD: cpu.c,v 1.141 2020/01/18 14:40:04 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.140 2020/01/15 08:34:04 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.141 2020/01/18 14:40:04 skrll Exp $");
 
 #include 
 #include 
@@ -886,3 +886,12 @@ identify_features(device_t dv)
 	"pfr: [0]=%#x [1]=%#x\n",
 	cpu_processor_features[0], cpu_processor_features[1]);
 }
+
+#ifdef _ARM_ARCH_6
+int
+cpu_maxproc_hook(int nmaxproc)
+{
+
+	return pmap_maxproc_set(nmaxproc);
+}
+#endif

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.379 src/sys/arch/arm/arm32/pmap.c:1.380
--- src/sys/arch/arm/arm32/pmap.c:1.379	Sat Jan 18 07:52:33 2020
+++ src/sys/arch/arm/arm32/pmap.c	Sat Jan 18 14:40:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.379 2020/01/18 07:52:33 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.380 2020/01/18 14:40:04 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -221,7 +221,7 @@
 #include 
 #endif
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.379 2020/01/18 07:52:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.380 2020/01/18 14:40:04 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -745,6 +745,7 @@ static void		pmap_use_l1(pmap_t);
 
 static struct l2_bucket *pmap_get_l2_bucket(pmap_t, vaddr_t);
 static struct l2_bucket *pmap_alloc_l2_bucket(pmap_t, vaddr_t);
+static int		pmap_l1tt_ctor(void *, void *, int);
 static void		pmap_free_l2_bucket(pmap_t, struct l2_bucket *, u_int);
 static int		pmap_l2ptp_ctor(void *, void *, int);
 static int		pmap_l2dtable_ctor(void *, void *, int);
@@ -778,6 +779,20 @@ static void		pmap_init_l1(struct l1_ttab
 #endif
 static vaddr_t		kernel_pt_lookup(paddr_t);
 
+#ifdef ARM_MMU_EXTENDED
+
+static struct pool_cache pmap_l1tt_cache;
+
+static void *pmap_l1tt_alloc(struct pool *, int);
+static void pmap_l1tt_free(struct pool *, void *);
+
+static struct pool_allocator pmap_l1tt_allocator = {
+	.pa_alloc = pmap_l1tt_alloc,
+	.pa_free = pmap_l1tt_free,
+	.pa_pagesz = L1TT_SIZE,
+};
+
+#endif
 
 /*
  * Misc variables
@@ -1290,6 +1305,29 @@ pmap_modify_pv(struct vm_page_md *md, pa
 	return (oflags);
 }
 
+
+#if defined(ARM_MMU_EXTENDED)
+int
+pmap_maxproc_set(int nmaxproc)
+{
+	static const char pmap_l1ttpool_warnmsg[] =
+	"WARNING: l1ttpool limit reached; increase kern.maxproc";
+
+//	pool_cache_setlowat(_l1tt_cache, nmaxproc);
+
+	/*
+	 * Set the hard limit on the pmap_l1tt_cache to the number
+	 * of processes the kernel is to support.  Log the limit
+	 * reached message max once a minute.
+	 */
+	pool_cache_sethardlimit(_l1tt_cache, nmaxproc,
+	pmap_l1ttpool_warnmsg, 60);
+
+	return 0;
+}
+
+#endif
+
 /*
  * Allocate an L1 translation table for the specified pmap.
  * This is called at pmap creation time.
@@ -1298,33 +1336,11 @@ static void
 pmap_alloc_l1(pmap_t pm)
 {
 #ifdef ARM_MMU_EXTENDED
-#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
-	struct vm_page *pg;
-	bool ok __diagused;
-	for (;;) {
-#ifdef PMAP_NEED_ALLOC_POOLPAGE
-		pg = arm_pmap_alloc_poolpage(UVM_PGA_ZERO);
-#else
-		pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO);
-#endif
-		if (pg != NULL)
-			break;
-		uvm_wait("pmapl1alloc");
-	}
-	pm->pm_l1_pa = VM_PAGE_TO_PHYS(pg);
-	vaddr_t va = pmap_direct_mapped_phys(pm->pm_l1_pa, , 

CVS commit: src/sys/compat/netbsd32

2020-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 14:07:31 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen generated files _after_ committing changes to the source file.

This gets the "Generated from" comments to use the new version number.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.146 -r1.147 src/sys/compat/netbsd32/netbsd32_syscallargs.h \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.26 -r1.27 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.145 -r1.146 src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/netbsd32/netbsd32_systrace_args.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/compat/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.147 src/sys/compat/netbsd32/netbsd32_syscall.h:1.148
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.147	Sat Jan 18 07:33:24 2020
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Sat Jan 18 14:07:31 2020
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.147 2020/01/18 07:33:24 kamil Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.148 2020/01/18 14:07:31 pgoyette Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.130 2019/11/04 11:32:22 rin Exp
+ * created from	NetBSD: syscalls.master,v 1.131 2020/01/18 07:33:24 kamil Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_

Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.146 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.147
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.146	Sat Jan 18 07:33:24 2020
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Sat Jan 18 14:07:31 2020
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.146 2020/01/18 07:33:24 kamil Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.147 2020/01/18 14:07:31 pgoyette Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.130 2019/11/04 11:32:22 rin Exp
+ * created from	NetBSD: syscalls.master,v 1.131 2020/01/18 07:33:24 kamil Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.146 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.147
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.146	Sat Jan 18 07:33:24 2020
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Sat Jan 18 14:07:31 2020
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.146 2020/01/18 07:33:24 kamil Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.147 2020/01/18 14:07:31 pgoyette Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.130 2019/11/04 11:32:22 rin Exp
+ * created from	NetBSD: syscalls.master,v 1.131 2020/01/18 07:33:24 kamil Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.146 2020/01/18 07:33:24 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.147 2020/01/18 14:07:31 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)

Index: src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.26 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.27
--- src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c:1.26	Sat Jan 18 07:33:24 2020
+++ src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c	Sat Jan 18 14:07:31 2020
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls_autoload.c,v 1.26 2020/01/18 07:33:24 kamil Exp $ */
+/* $NetBSD: netbsd32_syscalls_autoload.c,v 1.27 2020/01/18 14:07:31 pgoyette Exp $ */
 
 /*
  * System call autoload table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.130 2019/11/04 11:32:22 rin Exp
+ * created from	NetBSD: syscalls.master,v 1.131 2020/01/18 07:33:24 kamil Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls_autoload.c,v 1.26 2020/01/18 07:33:24 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls_autoload.c,v 1.27 2020/01/18 14:07:31 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"

Index: src/sys/compat/netbsd32/netbsd32_sysent.c
diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.145 src/sys/compat/netbsd32/netbsd32_sysent.c:1.146
--- src/sys/compat/netbsd32/netbsd32_sysent.c:1.145	Sat Jan 18 07:33:24 2020
+++ src/sys/compat/netbsd32/netbsd32_sysent.c	Sat Jan 18 

CVS commit: src/sys/dev

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 14:02:18 UTC 2020

Modified Files:
src/sys/dev: md.c

Log Message:
Mark the cdev MPSAFE too.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/md.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/md.c
diff -u src/sys/dev/md.c:1.82 src/sys/dev/md.c:1.83
--- src/sys/dev/md.c:1.82	Thu Aug 29 16:20:48 2019
+++ src/sys/dev/md.c	Sat Jan 18 14:02:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.82 2019/08/29 16:20:48 hannken Exp $	*/
+/*	$NetBSD: md.c,v 1.83 2020/01/18 14:02:18 ad Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.82 2019/08/29 16:20:48 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.83 2020/01/18 14:02:18 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_md.h"
@@ -128,7 +128,7 @@ const struct cdevsw md_cdevsw = {
 	.d_mmap = nommap,
 	.d_kqfilter = nokqfilter,
 	.d_discard = nodiscard,
-	.d_flag = D_DISK
+	.d_flag = D_DISK | D_MPSAFE
 };
 
 static struct dkdriver mddkdriver = {



CVS commit: src/tests

2020-01-18 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Sat Jan 18 13:56:53 UTC 2020

Modified Files:
src/tests/lib/libarchive: Makefile
src/tests/usr.bin/cpio: Makefile
src/tests/usr.bin/tar: Makefile

Log Message:
Fix build. Three list.h files are required to generate .d files


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libarchive/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/cpio/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/tar/Makefile

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

Modified files:

Index: src/tests/lib/libarchive/Makefile
diff -u src/tests/lib/libarchive/Makefile:1.1 src/tests/lib/libarchive/Makefile:1.2
--- src/tests/lib/libarchive/Makefile:1.1	Fri Jan 17 16:24:03 2020
+++ src/tests/lib/libarchive/Makefile	Sat Jan 18 13:56:53 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/01/17 16:24:03 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
 
 NOMAN=
 
@@ -596,7 +596,7 @@ test_write_disk_no_hfs_compression.tgz.u
 
 .include 
 
-test_main.o: list.h
+test_main.d: list.h
 
 CLEANFILES+=list.h
 

Index: src/tests/usr.bin/cpio/Makefile
diff -u src/tests/usr.bin/cpio/Makefile:1.1 src/tests/usr.bin/cpio/Makefile:1.2
--- src/tests/usr.bin/cpio/Makefile:1.1	Fri Jan 17 16:25:37 2020
+++ src/tests/usr.bin/cpio/Makefile	Sat Jan 18 13:56:53 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/01/17 16:25:37 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
 
 NOMAN=
 
@@ -107,7 +107,7 @@ test_option_tv.stdout.uu
 
 .include 
 
-test_main.o: list.h
+test_main.d: list.h
 
 CLEANFILES+=list.h
 

Index: src/tests/usr.bin/tar/Makefile
diff -u src/tests/usr.bin/tar/Makefile:1.1 src/tests/usr.bin/tar/Makefile:1.2
--- src/tests/usr.bin/tar/Makefile:1.1	Fri Jan 17 16:25:37 2020
+++ src/tests/usr.bin/tar/Makefile	Sat Jan 18 13:56:53 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/01/17 16:25:37 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/18 13:56:53 ryoon Exp $
 
 NOMAN=
 
@@ -113,7 +113,7 @@ test_print_longpath.tar.Z.uu
 
 .include 
 
-test_main.o: list.h
+test_main.d: list.h
 
 CLEANFILES+=list.h
 



CVS commit: src/sys/kern

2020-01-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Jan 18 13:53:50 UTC 2020

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

Log Message:
sched_bestcpu(): break out of the loop earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_runq.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_runq.c
diff -u src/sys/kern/kern_runq.c:1.60 src/sys/kern/kern_runq.c:1.61
--- src/sys/kern/kern_runq.c:1.60	Fri Jan 17 20:27:28 2020
+++ src/sys/kern/kern_runq.c	Sat Jan 18 13:53:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_runq.c,v 1.60 2020/01/17 20:27:28 ad Exp $	*/
+/*	$NetBSD: kern_runq.c,v 1.61 2020/01/18 13:53:50 ad Exp $	*/
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.60 2020/01/17 20:27:28 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.61 2020/01/18 13:53:50 ad Exp $");
 
 #include "opt_dtrace.h"
 
@@ -487,6 +487,13 @@ sched_bestcpu(struct lwp *l, struct cpu_
 			}
 
 			curspc = >ci_schedstate;
+
+			/* If this CPU is idle and 1st class, we're done. */
+			if ((curspc->spc_flags & (SPCF_IDLE | SPCF_1STCLASS)) ==
+			(SPCF_IDLE | SPCF_1STCLASS)) {
+return curci;
+			}
+
 			curpri = MAX(curspc->spc_curpriority,
 			curspc->spc_maxpriority);
 
@@ -512,11 +519,6 @@ sched_bestcpu(struct lwp *l, struct cpu_
 			bestci = curci;
 			bestspc = curspc;
 
-			/* If this CPU is idle and 1st class, we're done. */
-			if ((curspc->spc_flags & (SPCF_IDLE | SPCF_1STCLASS)) ==
-			(SPCF_IDLE | SPCF_1STCLASS)) {
-break;
-			}
 		} while (curci = curci->ci_sibling[CPUREL_PACKAGE],
 		curci != outer);
 	} while (outer = outer->ci_sibling[CPUREL_PACKAGE1ST],



CVS commit: src/sys/dev/acpi

2020-01-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 18 12:32:57 UTC 2020

Modified Files:
src/sys/dev/acpi: acpi_pci.c

Log Message:
Ignore PCI boot config unless the _DSM for ignoring PCI boot config is
explicitly set to 0.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/acpi/acpi_pci.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/acpi/acpi_pci.c
diff -u src/sys/dev/acpi/acpi_pci.c:1.27 src/sys/dev/acpi/acpi_pci.c:1.28
--- src/sys/dev/acpi/acpi_pci.c:1.27	Fri Jan 17 17:06:32 2020
+++ src/sys/dev/acpi/acpi_pci.c	Sat Jan 18 12:32:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci.c,v 1.27 2020/01/17 17:06:32 jmcneill Exp $ */
+/* $NetBSD: acpi_pci.c,v 1.28 2020/01/18 12:32:57 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.27 2020/01/17 17:06:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.28 2020/01/18 12:32:57 jmcneill Exp $");
 
 #include 
 #include 
@@ -518,9 +518,9 @@ acpi_pci_ignore_boot_config(ACPI_HANDLE 
 	buf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
 
 	if (ACPI_FAILURE(AcpiEvaluateObject(handle, "_DSM", , )) || buf.Pointer == NULL)
-		return 0;
+		return 1;
 
-	ret = 0;
+	ret = 1;
 
 	pobj = buf.Pointer;
 	switch (pobj->Type) {



CVS commit: src/sys/dev/hdaudio

2020-01-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 18 12:00:33 UTC 2020

Modified Files:
src/sys/dev/hdaudio: hdafg.c

Log Message:
Make sure we have at least one of playback or capture streams setup before
attaching the audio layer.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/hdaudio/hdafg.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/hdaudio/hdafg.c
diff -u src/sys/dev/hdaudio/hdafg.c:1.18 src/sys/dev/hdaudio/hdafg.c:1.19
--- src/sys/dev/hdaudio/hdafg.c:1.18	Sat Jun  8 08:02:38 2019
+++ src/sys/dev/hdaudio/hdafg.c	Sat Jan 18 12:00:33 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.18 2019/06/08 08:02:38 isaki Exp $ */
+/* $NetBSD: hdafg.c,v 1.19 2020/01/18 12:00:33 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd 
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.18 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.19 2020/01/18 12:00:33 jmcneill Exp $");
 
 #include 
 #include 
@@ -3781,6 +3781,12 @@ hdafg_attach(device_t parent, device_t s
 	sc->sc_audiodev.ad_playback = hdaudio_stream_establish(sc->sc_host,
 	HDAUDIO_STREAM_OSS, hdafg_stream_intr, >sc_audiodev);
 
+	if (sc->sc_audiodev.ad_capture == NULL &&
+	sc->sc_audiodev.ad_playback == NULL) {
+		hda_error(sc, "couldn't find any input or output streams\n");
+		return;
+	}
+
 	hda_debug(sc, "connecting streams\n");
 	defparams.channels = 2;
 	defparams.sample_rate = sc->sc_fixed_rate ? sc->sc_fixed_rate : 48000;



CVS commit: src/sys/dev

2020-01-18 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan 18 11:26:11 UTC 2020

Modified Files:
src/sys/dev/ic: ahcisata_core.c ahcisatavar.h
src/sys/dev/pci: ahcisata_pci.c

Log Message:
Add new AHCI_QUIRK_BADNCQ quick for controllers that have issues with
NCQ on (some) drives.  Enable this quirk for ATI (AMD) SB600/SB700
controllers.  Alternate fix for kern/54790 and kern/54855.

ok jdolecek@, tested on my SB700 chipset and tsutsui's SB600 chipset.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/ahcisatavar.h
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/ahcisata_pci.c

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

Modified files:

Index: src/sys/dev/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.80 src/sys/dev/ic/ahcisata_core.c:1.81
--- src/sys/dev/ic/ahcisata_core.c:1.80	Fri Dec 27 09:41:50 2019
+++ src/sys/dev/ic/ahcisata_core.c	Sat Jan 18 11:26:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.80 2019/12/27 09:41:50 msaitoh Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.81 2020/01/18 11:26:11 simonb Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.80 2019/12/27 09:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.81 2020/01/18 11:26:11 simonb Exp $");
 
 #include 
 #include 
@@ -276,6 +276,11 @@ ahci_attach(struct ahci_softc *sc)
 		"ignoring broken port multiplier support\n");
 		sc->sc_ahci_cap &= ~AHCI_CAP_SPM;
 	}
+	if (sc->sc_ahci_quirks & AHCI_QUIRK_BADNCQ) {
+		aprint_verbose_dev(sc->sc_atac.atac_dev,
+		"ignoring broken NCQ support\n");
+		sc->sc_ahci_cap &= ~AHCI_CAP_NCQ;
+	}
 	sc->sc_atac.atac_nchannels = (sc->sc_ahci_cap & AHCI_CAP_NPMASK) + 1;
 	sc->sc_ncmds = ((sc->sc_ahci_cap & AHCI_CAP_NCS) >> 8) + 1;
 	ahci_rev = AHCI_READ(sc, AHCI_VS);

Index: src/sys/dev/ic/ahcisatavar.h
diff -u src/sys/dev/ic/ahcisatavar.h:1.23 src/sys/dev/ic/ahcisatavar.h:1.24
--- src/sys/dev/ic/ahcisatavar.h:1.23	Sun Sep 29 21:16:14 2019
+++ src/sys/dev/ic/ahcisatavar.h	Sat Jan 18 11:26:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisatavar.h,v 1.23 2019/09/29 21:16:14 jakllsch Exp $	*/
+/*	$NetBSD: ahcisatavar.h,v 1.24 2020/01/18 11:26:11 simonb Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -59,6 +59,7 @@ struct ahci_softc {
 #define AHCI_PCI_QUIRK_BAD64	__BIT(1)  /* broken 64-bit DMA */
 #define AHCI_QUIRK_BADPMP	__BIT(2)  /* broken PMP support, ignore */
 #define AHCI_QUIRK_SKIP_RESET	__BIT(4)  /* skip drive reset sequence */
+#define AHCI_QUIRK_BADNCQ	__BIT(5)  /* possibly broken NCQ support, ignore */
 
 	uint32_t sc_ahci_cap;	/* copy of AHCI_CAP */
 	int sc_ncmds; /* number of command slots */

Index: src/sys/dev/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.56 src/sys/dev/pci/ahcisata_pci.c:1.57
--- src/sys/dev/pci/ahcisata_pci.c:1.56	Fri Oct 18 17:16:50 2019
+++ src/sys/dev/pci/ahcisata_pci.c	Sat Jan 18 11:26:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.56 2019/10/18 17:16:50 tnn Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.57 2020/01/18 11:26:11 simonb Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.56 2019/10/18 17:16:50 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.57 2020/01/18 11:26:11 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -179,17 +179,17 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_PCI_QUIRK_FORCE },
 	/* ATI SB600 AHCI 64-bit DMA only works on some boards/BIOSes */
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA_1,
-	AHCI_PCI_QUIRK_BAD64 | AHCI_QUIRK_BADPMP },
+	AHCI_PCI_QUIRK_BAD64 | AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_SATA_AHCI,
-	AHCI_QUIRK_BADPMP },
+	AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_SATA_RAID,
-	AHCI_QUIRK_BADPMP },
+	AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_SATA_RAID5,
-	AHCI_QUIRK_BADPMP },
+	AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_SATA_AHCI2,
-	AHCI_QUIRK_BADPMP },
+	AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_SATA_STORAGE,
-	AHCI_QUIRK_BADPMP },
+	AHCI_QUIRK_BADPMP | AHCI_QUIRK_BADNCQ },
 	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237R_SATA,
 	AHCI_QUIRK_BADPMP },
 	{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA,



CVS commit: src/sys/dev/ata

2020-01-18 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan 18 11:24:40 UTC 2020

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
Tidy quirk table and remove outdated quick from the quirk format string.


To generate a diff of this commit:
cvs rdiff -u -r1.456 -r1.457 src/sys/dev/ata/wd.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.456 src/sys/dev/ata/wd.c:1.457
--- src/sys/dev/ata/wd.c:1.456	Sat Jan 18 11:22:49 2020
+++ src/sys/dev/ata/wd.c	Sat Jan 18 11:24:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $ */
+/*	$NetBSD: wd.c,v 1.457 2020/01/18 11:24:40 simonb Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.457 2020/01/18 11:24:40 simonb Exp $");
 
 #include "opt_ata.h"
 #include "opt_wd.h"
@@ -232,7 +232,7 @@ static void bad144intern(struct wd_softc
 
 #define	WD_QUIRK_SPLIT_MOD15_WRITE	0x0001	/* must split certain writes */
 
-#define	WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE\2FORCE_LBA48"
+#define	WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE"
 
 /*
  * Quirk table for IDE drives.  Put more-specific matches first, since
@@ -259,12 +259,9 @@ static const struct wd_quirk {
 	 * Seagate Barracuda Serial ATA V family.
 	 *
 	 */
-	{ "ST3120023AS",
-	  WD_QUIRK_SPLIT_MOD15_WRITE },
-	{ "ST380023AS",
-	  WD_QUIRK_SPLIT_MOD15_WRITE },
-	{ "ST360015AS",
-	  WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ "ST3120023AS", WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ "ST380023AS", WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ "ST360015AS", WD_QUIRK_SPLIT_MOD15_WRITE },
 	{ NULL,
 	  0 }
 };



CVS commit: src

2020-01-18 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan 18 11:22:49 UTC 2020

Modified Files:
src/share/man/man4: wd.4
src/sys/dev/ata: wd.c

Log Message:
Revert kern/54790 and kern/54855 NCQ fix that penalised all Samsung
EVO 860 drives.

ok jdolecek@


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/wd.4
cvs rdiff -u -r1.455 -r1.456 src/sys/dev/ata/wd.c

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/wd.4
diff -u src/share/man/man4/wd.4:1.23 src/share/man/man4/wd.4:1.24
--- src/share/man/man4/wd.4:1.23	Tue Jan 14 09:30:34 2020
+++ src/share/man/man4/wd.4	Sat Jan 18 11:22:49 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wd.4,v 1.23 2020/01/14 09:30:34 wiz Exp $
+.\"	$NetBSD: wd.4,v 1.24 2020/01/18 11:22:49 simonb Exp $
 .\"
 .\"
 .\" Copyright (c) 1994 James A. Jegers
@@ -85,22 +85,6 @@ Default to false.
 .El
 .Sh NOTES
 Certain
-.Tn Samsung
-.Tn 860 EVO
-SSD drives have firmware bug which causes interface CRC errors when NCQ
-ATA commands are used.
-For this reason NCQ is disabled for these drives by default.
-Affected drives include, but are not limited to:
-.Pp
-.Bl -tag -width Ds -offset indent -compact
-.It Samsung SSD 860 EVO 500GB
-.It Samsung SSD 860 EVO 1TB
-.El
-.Pp
-It is recommended to not use the EVO SSD drives, and replace them
-with other models.
-.Pp
-Certain
 .Tn Seagate
 .Tn Barracuda
 drives sold around 2003 have a known firmware bug leading to corrupted

Index: src/sys/dev/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.455 src/sys/dev/ata/wd.c:1.456
--- src/sys/dev/ata/wd.c:1.455	Tue Jan 14 21:08:06 2020
+++ src/sys/dev/ata/wd.c	Sat Jan 18 11:22:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.455 2020/01/14 21:08:06 jdolecek Exp $ */
+/*	$NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.455 2020/01/14 21:08:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $");
 
 #include "opt_ata.h"
 #include "opt_wd.h"
@@ -231,9 +231,8 @@ static void bad144intern(struct wd_softc
 #endif
 
 #define	WD_QUIRK_SPLIT_MOD15_WRITE	0x0001	/* must split certain writes */
-#define	WD_QUIRK_BAD_NCQ		0x0002	/* drive NCQ support broken */
 
-#define	WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE\2BAD_NCQ"
+#define	WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE\2FORCE_LBA48"
 
 /*
  * Quirk table for IDE drives.  Put more-specific matches first, since
@@ -260,11 +259,14 @@ static const struct wd_quirk {
 	 * Seagate Barracuda Serial ATA V family.
 	 *
 	 */
-	{ "ST3120023AS", WD_QUIRK_SPLIT_MOD15_WRITE },
-	{ "ST380023AS", WD_QUIRK_SPLIT_MOD15_WRITE },
-	{ "ST360015AS", WD_QUIRK_SPLIT_MOD15_WRITE },
-	{ "Samsung SSD 860 EVO *", WD_QUIRK_BAD_NCQ },
-	{ NULL, 0 }
+	{ "ST3120023AS",
+	  WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ "ST380023AS",
+	  WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ "ST360015AS",
+	  WD_QUIRK_SPLIT_MOD15_WRITE },
+	{ NULL,
+	  0 }
 };
 
 static const struct wd_quirk *
@@ -373,10 +375,6 @@ wdattach(device_t parent, device_t self,
 		if (wd->sc_quirks & WD_QUIRK_SPLIT_MOD15_WRITE) {
 			aprint_error_dev(self, "drive corrupts write transfers with certain controllers, consider replacing\n");
 		}
-
-		if (wd->sc_quirks & WD_QUIRK_BAD_NCQ) {
-			aprint_error_dev(self, "drive NCQ support broken, NCQ disabled, consider replacing\n");
-		}
 	}
 
 	if ((wd->sc_params.atap_multi & 0xff) > 1) {
@@ -2183,7 +2181,7 @@ wd_sysctl_attach(struct wd_softc *wd)
 		return;
 	}
 
-	wd->drv_ncq = ((wd->sc_quirks & WD_QUIRK_BAD_NCQ) == 0) ? true : false;
+	wd->drv_ncq = true;
 	if ((error = sysctl_createv(>nodelog, 0, NULL, NULL,
 CTLFLAG_READWRITE, CTLTYPE_BOOL, "use_ncq",
 SYSCTL_DESCR("use NCQ if supported"),