CVS commit: src/sys/ufs/ffs

2018-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jul 19 05:09:34 UTC 2018

Modified Files:
src/sys/ufs/ffs: ffs_alloc.c

Log Message:
Avoid using magic numbers for arguments of workqueue_create (NFC)


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/ufs/ffs/ffs_alloc.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_alloc.c
diff -u src/sys/ufs/ffs/ffs_alloc.c:1.159 src/sys/ufs/ffs/ffs_alloc.c:1.160
--- src/sys/ufs/ffs/ffs_alloc.c:1.159	Thu Dec  7 21:53:41 2017
+++ src/sys/ufs/ffs/ffs_alloc.c	Thu Jul 19 05:09:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_alloc.c,v 1.159 2017/12/07 21:53:41 chs Exp $	*/
+/*	$NetBSD: ffs_alloc.c,v 1.160 2018/07/19 05:09:34 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.159 2017/12/07 21:53:41 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.160 2018/07/19 05:09:34 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1641,7 +1641,7 @@ ffs_discard_init(struct vnode *devvp, st
 
 	ts = kmem_zalloc(sizeof (*ts), KM_SLEEP);
 	error = workqueue_create(>wq, "trimwq", ffs_discardcb, ts,
- 0, 0, 0);
+ PRI_USER, IPL_NONE, 0);
 	if (error) {
 		kmem_free(ts, sizeof (*ts));
 		return NULL;



CVS commit: src/sys

2018-07-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jul 18 23:10:28 UTC 2018

Modified Files:
src/sys/arch/arm/sunxi: sun4i_emac.c
src/sys/arch/dreamcast/dev/g2: if_mbe_g2.c
src/sys/arch/mips/sibyte/dev: sbmac.c
src/sys/arch/next68k/next68k: nextrom.c
src/sys/dev/ic: dwc_gmac.c
src/sys/dev/pci: if_kse.c if_ti.c if_vge.c if_vr.c

Log Message:
Be consistent among ethernet drivers on the convention for printing ethernet
addresses.

NFC


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sun4i_emac.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/next68k/next68k/nextrom.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ic/dwc_gmac.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_kse.c
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/if_ti.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.124 -r1.125 src/sys/dev/pci/if_vr.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/sunxi/sun4i_emac.c
diff -u src/sys/arch/arm/sunxi/sun4i_emac.c:1.4 src/sys/arch/arm/sunxi/sun4i_emac.c:1.5
--- src/sys/arch/arm/sunxi/sun4i_emac.c:1.4	Tue Jun 26 06:47:58 2018
+++ src/sys/arch/arm/sunxi/sun4i_emac.c	Wed Jul 18 23:10:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sun4i_emac.c,v 1.4 2018/06/26 06:47:58 msaitoh Exp $ */
+/* $NetBSD: sun4i_emac.c,v 1.5 2018/07/18 23:10:27 sevan Exp $ */
 
 /*-
  * Copyright (c) 2013-2017 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.4 2018/06/26 06:47:58 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.5 2018/07/18 23:10:27 sevan Exp $");
 
 #include 
 #include 
@@ -333,7 +333,7 @@ sun4i_emac_attach(device_t parent, devic
 		enaddr[4] = a0 >>  8;
 		enaddr[5] = a0 >>  0;
 	}
-	aprint_normal_dev(self, "Ethernet address: %s\n", ether_sprintf(enaddr));
+	aprint_normal_dev(self, "Ethernet address %s\n", ether_sprintf(enaddr));
 
 	snprintf(ifp->if_xname, IFNAMSIZ, EMAC_IFNAME, device_unit(self));
 	ifp->if_softc = sc;

Index: src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c
diff -u src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c:1.8 src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c:1.9
--- src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c:1.8	Tue Jul 19 15:52:30 2011
+++ src/sys/arch/dreamcast/dev/g2/if_mbe_g2.c	Wed Jul 18 23:10:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mbe_g2.c,v 1.8 2011/07/19 15:52:30 dyoung Exp $	*/
+/*	$NetBSD: if_mbe_g2.c,v 1.9 2018/07/18 23:10:27 sevan Exp $	*/
 
 /*
  * Copyright (c) 2002 Christian Groessler
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mbe_g2.c,v 1.8 2011/07/19 15:52:30 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mbe_g2.c,v 1.9 2018/07/18 23:10:27 sevan Exp $");
 
 #include 
 #include 
@@ -171,7 +171,7 @@ mbe_g2_detect(bus_space_tag_t iot, bus_s
 	mb86965_read_eeprom(iot, ioh, eeprom);
 	memcpy(enaddr, eeprom, ETHER_ADDR_LEN);
 
-	DPRINTF("Ethernet address: %s\n", ether_sprintf(enaddr));
+	DPRINTF("Ethernet address %s\n", ether_sprintf(enaddr));
 
 	/* Make sure we got a valid station address. */
 	if ((enaddr[0] & 0x03) != 0x00 ||

Index: src/sys/arch/mips/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.50 src/sys/arch/mips/sibyte/dev/sbmac.c:1.51
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.50	Tue Jun 26 06:47:59 2018
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Wed Jul 18 23:10:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.50 2018/06/26 06:47:59 msaitoh Exp $ */
+/* $NetBSD: sbmac.c,v 1.51 2018/07/18 23:10:27 sevan Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.50 2018/06/26 06:47:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.51 2018/07/18 23:10:27 sevan Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -2303,7 +2303,7 @@ sbmac_attach(device_t parent, device_t s
 	 */
 	aprint_normal(": Ethernet%s\n",
 	sc->sbm_pass3_dma ? ", using unaligned tx DMA" : "");
-	aprint_normal_dev(self, "Ethernet address: %s\n", ether_sprintf(eaddr));
+	aprint_normal_dev(self, "Ethernet address %s\n", ether_sprintf(eaddr));
 
 
 	/*

Index: src/sys/arch/next68k/next68k/nextrom.c
diff -u src/sys/arch/next68k/next68k/nextrom.c:1.26 src/sys/arch/next68k/next68k/nextrom.c:1.27
--- src/sys/arch/next68k/next68k/nextrom.c:1.26	Thu Mar  8 03:12:02 2018
+++ src/sys/arch/next68k/next68k/nextrom.c	Wed Jul 18 23:10:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nextrom.c,v 1.26 2018/03/08 03:12:02 mrg Exp $	*/
+/*	$NetBSD: nextrom.c,v 1.27 2018/07/18 23:10:27 sevan Exp $	*/
 /*
  * Copyright (c) 1998 Darrin B. Jewell
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nextrom.c,v 1.26 2018/03/08 03:12:02 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextrom.c,v 1.27 

CVS commit: src/sys/ufs/ffs

2018-07-18 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jul 18 22:40:56 UTC 2018

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

Log Message:
ffs_superblock_validate - check fs_old_size too.

Now I can mount OpenWindows Version 3 CD from 1991.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/sys/ufs/ffs/ffs_vfsops.c

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

Modified files:

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.357 src/sys/ufs/ffs/ffs_vfsops.c:1.358
--- src/sys/ufs/ffs/ffs_vfsops.c:1.357	Mon May 28 21:04:38 2018
+++ src/sys/ufs/ffs/ffs_vfsops.c	Wed Jul 18 22:40:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.357 2018/05/28 21:04:38 chs Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.358 2018/07/18 22:40:56 uwe Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.357 2018/05/28 21:04:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.358 2018/07/18 22:40:56 uwe Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -971,7 +971,7 @@ ffs_superblock_validate(struct fs *fs)
 	 * XXX: these values are just zero-checked to prevent obvious
 	 * bugs. We need more strict checks.
 	 */
-	if (fs->fs_size == 0)
+	if (fs->fs_size == 0 && fs->fs_old_size == 0)
 		return 0;
 	if (fs->fs_cssize == 0)
 		return 0;



CVS commit: src/sbin/restore

2018-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 18 17:57:00 UTC 2018

Modified Files:
src/sbin/restore: restore.8

Log Message:
Remove superfluous macro.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sbin/restore/restore.8

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

Modified files:

Index: src/sbin/restore/restore.8
diff -u src/sbin/restore/restore.8:1.55 src/sbin/restore/restore.8:1.56
--- src/sbin/restore/restore.8:1.55	Sun Jul 15 06:16:12 2018
+++ src/sbin/restore/restore.8	Wed Jul 18 17:57:00 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: restore.8,v 1.55 2018/07/15 06:16:12 dholland Exp $
+.\"	$NetBSD: restore.8,v 1.56 2018/07/18 17:57:00 wiz Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -354,7 +354,6 @@ with the command
 .Bd -literal -offset indent
 dump 0f - /usr | (cd /mnt; restore xf -)
 .Ed
-.Pp
 .It Fl h
 Extract the actual directory,
 rather than the files that it references.



CVS commit: src/usr.sbin/tprof

2018-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 18 16:50:05 UTC 2018

Modified Files:
src/usr.sbin/tprof: tprof.8 tprof.c

Log Message:
Various improvements to man page. Sync usage.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/tprof/tprof.8
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/tprof/tprof.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/tprof/tprof.8
diff -u src/usr.sbin/tprof/tprof.8:1.8 src/usr.sbin/tprof/tprof.8:1.9
--- src/usr.sbin/tprof/tprof.8:1.8	Fri Jul 13 12:04:50 2018
+++ src/usr.sbin/tprof/tprof.8	Wed Jul 18 16:50:05 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tprof.8,v 1.8 2018/07/13 12:04:50 maxv Exp $
+.\"	$NetBSD: tprof.8,v 1.9 2018/07/18 16:50:05 wiz Exp $
 .\"
 .\" Copyright (c)2011 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -58,7 +58,7 @@ The first argument,
 .Ar op ,
 specifies the action to take.
 Valid actions are:
-.Bl -tag -width offline
+.Bl -tag -width offline -offset indent
 .It list
 Display a list of performance counter events available on the system.
 .It monitor Xo
@@ -84,12 +84,8 @@ if specified.
 The default is
 .Dq Pa tprof.out .
 .It analyze Xo
-.Op Fl C
-.Op Fl k
-.Op Fl L
-.Op Fl P
+.Op Fl CkLPs
 .Op Fl p Ar pid
-.Op Fl s
 .Ar file
 .Xc
 Analyze the samples produced by a previous run of
@@ -97,6 +93,7 @@ Analyze the samples produced by a previo
 stored in
 .Ar file ,
 and generate a plain text representation of them.
+.Bl -tag -width XPXpidXX -offset indent
 .It Fl C
 Don't distinguish CPUs.
 All samples are treated as its CPU number is 0.
@@ -116,13 +113,13 @@ and ignore the rest.
 .It Fl s
 Per symbol.
 .El
+.El
 .Sh EXAMPLES
 The following command profiles the system during 20 seconds and writes the
 samples into the file myfile.out.
 .Dl # tprof monitor -e llc-misses:k -o myfile.out sleep 20
 The following command displays the results of the sampling.
 .Dl # tprof analyze myfile.out
-.Ed
 .Sh DIAGNOSTICS
 The
 .Nm
@@ -148,6 +145,7 @@ were dropped.
 .Sh SEE ALSO
 .Xr tprof 4
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 utility is written by

Index: src/usr.sbin/tprof/tprof.c
diff -u src/usr.sbin/tprof/tprof.c:1.11 src/usr.sbin/tprof/tprof.c:1.12
--- src/usr.sbin/tprof/tprof.c:1.11	Sat Jul 14 16:34:15 2018
+++ src/usr.sbin/tprof/tprof.c	Wed Jul 18 16:50:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof.c,v 1.11 2018/07/14 16:34:15 jmcneill Exp $	*/
+/*	$NetBSD: tprof.c,v 1.12 2018/07/18 16:50:05 wiz Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: tprof.c,v 1.11 2018/07/14 16:34:15 jmcneill Exp $");
+__RCSID("$NetBSD: tprof.c,v 1.12 2018/07/18 16:50:05 wiz Exp $");
 #endif /* not lint */
 
 #include 
@@ -109,7 +109,7 @@ usage(void)
 	fprintf(stderr, "\tmonitor -e name:option [-o outfile] command\n");
 	fprintf(stderr, "\t\tMonitor the event 'name' with option 'option'\n"
 	"\t\tcounted during the execution of 'command'.\n");
-	fprintf(stderr, "\tanalyze [-C] [-k] [-L] [-P] [-p pid] [-s] file\n");
+	fprintf(stderr, "\tanalyze [-CkLPs] [-p pid] file\n");
 	fprintf(stderr, "\t\tAnalyze the samples of the file 'file'.\n");
 
 	exit(EXIT_FAILURE);



CVS commit: src/crypto/external/bsd/openssh/dist

2018-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 18 16:42:49 UTC 2018

Modified Files:
src/crypto/external/bsd/openssh/dist: ssh-agent.1

Log Message:
Fix Dd argument.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssh/dist/ssh-agent.1

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/ssh-agent.1
diff -u src/crypto/external/bsd/openssh/dist/ssh-agent.1:1.13 src/crypto/external/bsd/openssh/dist/ssh-agent.1:1.14
--- src/crypto/external/bsd/openssh/dist/ssh-agent.1:1.13	Tue Jul 10 22:12:08 2018
+++ src/crypto/external/bsd/openssh/dist/ssh-agent.1	Wed Jul 18 16:42:49 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ssh-agent.1,v 1.13 2018/07/10 22:12:08 sevan Exp $
+.\"	$NetBSD: ssh-agent.1,v 1.14 2018/07/18 16:42:49 wiz Exp $
 .\" $OpenBSD: ssh-agent.1,v 1.64 2016/11/30 06:54:26 jmc Exp $
 .\"
 .\"
@@ -36,7 +36,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 30 2016
+.Dd July 10, 2018
 .Dt SSH-AGENT 1
 .Os
 .Sh NAME



CVS commit: src/share/man/man4

2018-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 18 16:41:54 UTC 2018

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

Log Message:
Remove superfluous macros.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/drm.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/drm.4
diff -u src/share/man/man4/drm.4:1.16 src/share/man/man4/drm.4:1.17
--- src/share/man/man4/drm.4:1.16	Tue Jul 10 17:01:43 2018
+++ src/share/man/man4/drm.4	Wed Jul 18 16:41:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: drm.4,v 1.16 2018/07/10 17:01:43 maya Exp $
+.\"	$NetBSD: drm.4,v 1.17 2018/07/18 16:41:53 wiz Exp $
 .\"
 .\" Copyright (c) 2007, 2013 Thomas Klausner
 .\" All rights reserved.
@@ -42,11 +42,9 @@
 .Cd optionsDRM_DEBUG
 .Cd optionsDRM_NO_AGP
 .Sh DESCRIPTION
-The
-.Tn Direct Rendering Manager
-is part of the
-.Tn Direct Rendering Infrastructure
-for supporting video acceleration (3d acceleration, mostly).
+The Direct Rendering Manager is part of the Direct Rendering
+Infrastructure for supporting video acceleration (3d acceleration,
+mostly).
 .Pp
 The
 .Nm
@@ -195,7 +193,6 @@ drivers appeared in
 .An Daryll Strauss ,
 .An Keith Whitwell
 .Sh CAVEATS
-.Pp
 In case of errors,
 .Pa /dev/dri/card0
 may be changed, make sure to recreate it in that case.



CVS commit: src/share/man/man9

2018-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 18 16:40:30 UTC 2018

Modified Files:
src/share/man/man9: radio.9

Log Message:
Various improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/radio.9

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/man9/radio.9
diff -u src/share/man/man9/radio.9:1.5 src/share/man/man9/radio.9:1.6
--- src/share/man/man9/radio.9:1.5	Mon Jul  9 10:36:30 2018
+++ src/share/man/man9/radio.9	Wed Jul 18 16:40:30 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: radio.9,v 1.5 2018/07/09 10:36:30 rkujawa Exp $
+.\"	$NetBSD: radio.9,v 1.6 2018/07/18 16:40:30 wiz Exp $
 .\"	$OpenBSD: radio.9,v 1.2 2001/10/08 08:52:50 mpech Exp $
 .\"
 .\" Copyright (c) Maxim Tsyplakov 
@@ -29,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm radio
-.Nd interface between low and high level FM radio drivers
+.Nd interface between low- and high-level FM radio drivers
 .Sh SYNOPSIS
 .In dev/radio_if.h
 .Ft device_t
@@ -43,22 +43,22 @@ The
 .Nm
 layer provides support for digitally programmable FM radio tuners.
 .Pp
-It is divided into a machine independent, high level part responsible for
-managing device file, and low level hardware drivers.
+It is divided into a machine independent, high-level part responsible for
+managing device files, and low-level hardware drivers.
 .Pp
-The high level radio driver attaches to the low level driver
+The high-level radio driver attaches to the low-level driver
 when the latter calls
 .Fn radio_attach_mi .
 .Pp
 The
 .Fa radio_hw_if
-struct is contains pointers to functions provided by the low level driver.
+struct contains pointers to functions provided by the low-level driver.
 The
 .Fa hdlp
-argument is a handle to a low level driver's softc structure.
+argument is a handle to a low-level driver's softc structure.
 It is sent as the first argument to all the functions in
 .Fa radio_hw_if
-when the high level driver calls them.
+when the high-level driver calls them.
 .Fa dev
 is the device struct for the hardware device.
 .Pp
@@ -74,24 +74,27 @@ struct radio_hw_if {
 	int (*search)(void *, int);
 };
 .Ed
-.Pp
 .Bl -tag -width 
 .It Fn (*open) "sc" "flags" "fmt" "lwp"
 Called when the radio device is opened.
-Optional, if there is no need to call a driver's function when device file is
-opened, NULL should be passed in this field.
+Optionally, if there is no need to call a driver's function when the device file is
+opened,
+.Dv NULL
+should be passed in this field.
 Returns 0 on success, otherwise an error code.
 .It Fn (*close) "sc" "flags" "fmt" "lwp"
 Called when the radio device is closed.
-Optional, if there is no need to call a driver's function when device file is
-closed, NULL should be passed in thie field.
+Optionally, if there is no need to call a driver's function when the device file is
+closed,
+.Dv NULL
+should be passed in thie field.
 Returns 0 on success, otherwise an error code.
 .It Fn (*get_info) "sc" "ri"
 Fills the radio_info struct.
 This function is used to obtain the current state of a hardware device.
 It is executed as a result of calling
 .Dv RIOCGINFO
-on a device file managed by the high level driver.
+on a device file managed by the high-level driver.
 Returns 0 on success, otherwise an error code.
 .It Fn (*set_info) "sc" "ri"
 Set values from the radio_info struct.
@@ -99,18 +102,19 @@ This function is used to modify the curr
 (enable/disable various modes and parameters).
 It is executed as a result of calling
 .Dv RIOCSINFO
-on a device file managed by the high level driver.
+on a device file managed by the high-level driver.
 Returns 0 on success, otherwise an error code.
 .It Fn (*search) "sc" "ri"
-Initiates an automatic search for the radio station.
+Initiates automatic search for the radio station.
 It is executed as a result of calling
 .Dv RIOCSSRCH
-on a device file managed by the high level driver.
+on a device file managed by the high-level driver.
 Returns 0 on success, otherwise an error code.
 .El
 .Sh SEE ALSO
 .Xr radio 4
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 API was written by



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

2018-07-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul 18 13:39:36 UTC 2018

Modified Files:
src/common/lib/libc/arch/i386/atomic: atomic.S

Log Message:
On Xen, always alias _atomic_cas_64 to _atomic_cas_cx8. AFAIK Xen doesn't
support CPUs that don't support cx8.
i386 XENPAE_DOMU boots again.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/common/lib/libc/arch/i386/atomic/atomic.S

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

Modified files:

Index: src/common/lib/libc/arch/i386/atomic/atomic.S
diff -u src/common/lib/libc/arch/i386/atomic/atomic.S:1.22 src/common/lib/libc/arch/i386/atomic/atomic.S:1.23
--- src/common/lib/libc/arch/i386/atomic/atomic.S:1.22	Fri May 23 03:17:31 2014
+++ src/common/lib/libc/arch/i386/atomic/atomic.S	Wed Jul 18 13:39:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic.S,v 1.22 2014/05/23 03:17:31 uebayasi Exp $	*/
+/*	$NetBSD: atomic.S,v 1.23 2018/07/18 13:39:36 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -43,6 +43,7 @@
 #endif
 
 #ifdef _HARDKERNEL
+#include "opt_xen.h"
 #define	LOCK(n)		.Lpatch ## n:	lock
 #define	ENDLABEL(a)	_ALIGN_TEXT; LABEL(a)
 #else
@@ -196,6 +197,9 @@ END(_membar_sync)
 ENDLABEL(membar_sync_end)
 
 #if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL)
+#ifdef XEN
+STRONG_ALIAS(_atomic_cas_64,_atomic_cas_cx8)
+#else
 ENTRY(_atomic_cas_64)
 #ifdef _HARDKERNEL
 	pushf
@@ -227,6 +231,7 @@ ENTRY(_atomic_cas_64)
 	jmp	1b
 END(_atomic_cas_64)
 ENDLABEL(_atomic_cas_64_end)
+#endif /* !XEN */
 
 ENTRY(_atomic_cas_cx8)
 	pushl	%edi



CVS commit: src/sys/dev/usb

2018-07-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 18 10:44:17 UTC 2018

Modified Files:
src/sys/dev/usb: xhci.c xhcireg.h

Log Message:
 Read xHCI 1.1's HCCPARAMS2 registar and print it with aprint_debug_dev().
e.g.: xhci0: hcc2=0x7d


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/xhcireg.h

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

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.94 src/sys/dev/usb/xhci.c:1.95
--- src/sys/dev/usb/xhci.c:1.94	Mon Jul 16 23:07:31 2018
+++ src/sys/dev/usb/xhci.c	Wed Jul 18 10:44:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.94 2018/07/16 23:07:31 christos Exp $	*/
+/*	$NetBSD: xhci.c,v 1.95 2018/07/18 10:44:17 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.94 2018/07/16 23:07:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.95 2018/07/18 10:44:17 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -879,6 +879,18 @@ xhci_ecp(struct xhci_softc *sc, uint32_t
 	"b\0AC64\0"		\
 	"\0"
 
+#define XHCI_HCC2_BITS	\
+	"\177\020"	/* New bitmask */			\
+	"b\7ETC_TSC\0"		\
+	"b\6ETC\0"		\
+	"b\5CIC\0"		\
+	"b\4LEC\0"		\
+	"b\3CTC\0"		\
+	"b\2FSC\0"		\
+	"b\1CMC\0"		\
+	"b\0U3C\0"		\
+	"\0"
+
 void
 xhci_start(struct xhci_softc *sc)
 {
@@ -900,7 +912,7 @@ int
 xhci_init(struct xhci_softc *sc)
 {
 	bus_size_t bsz;
-	uint32_t cap, hcs1, hcs2, hcs3, hcc, dboff, rtsoff;
+	uint32_t cap, hcs1, hcs2, hcs3, hcc, dboff, rtsoff, hcc2;
 	uint32_t pagesize, config;
 	int i = 0;
 	uint16_t hciversion;
@@ -961,6 +973,11 @@ xhci_init(struct xhci_softc *sc)
 		snprintb(sbuf, sizeof(sbuf), XHCI_HCCV1_x_BITS, hcc);
 	aprint_debug_dev(sc->sc_dev, "hcc=%s\n", sbuf);
 	aprint_debug_dev(sc->sc_dev, "xECP %x\n", XHCI_HCC_XECP(hcc) * 4);
+	if (hciversion >= XHCI_HCIVERSION_1_1) {
+		hcc2 = xhci_cap_read_4(sc, XHCI_HCCPARAMS2);
+		snprintb(sbuf, sizeof(sbuf), XHCI_HCC2_BITS, hcc2);
+		aprint_debug_dev(sc->sc_dev, "hcc2=%s\n", sbuf);
+	}
 
 	/* default all ports to bus 0, i.e. usb 3 */
 	sc->sc_ctlrportbus = kmem_zalloc(

Index: src/sys/dev/usb/xhcireg.h
diff -u src/sys/dev/usb/xhcireg.h:1.11 src/sys/dev/usb/xhcireg.h:1.12
--- src/sys/dev/usb/xhcireg.h:1.11	Fri Jun 29 17:48:24 2018
+++ src/sys/dev/usb/xhcireg.h	Wed Jul 18 10:44:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: xhcireg.h,v 1.11 2018/06/29 17:48:24 msaitoh Exp $ */
+/* $NetBSD: xhcireg.h,v 1.12 2018/07/18 10:44:17 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
@@ -51,6 +51,7 @@
 #define	 XHCI_HCIVERSION_0_9	0x0090	/* xHCI version 0.9 */
 #define	 XHCI_HCIVERSION_0_96	0x0096	/* xHCI version 0.96 */
 #define	 XHCI_HCIVERSION_1_0	0x0100	/* xHCI version 1.0 */
+#define	 XHCI_HCIVERSION_1_1	0x0110	/* xHCI version 1.1 */
 
 #define	XHCI_HCSPARAMS1		0x04	/* RO structual parameters 1 */
 #define	 XHCI_HCS1_MAXSLOTS(x)	((x) & 0xFF)
@@ -89,6 +90,15 @@
 
 #define	 XHCI_DBOFF		0x14	/* RO doorbell offset */
 #define	 XHCI_RTSOFF		0x18	/* RO runtime register space offset */
+#define XHCI_HCCPARAMS2	0x1c	/* RO capability parameters 2 */
+#define	 XHCI_HCC2_U3C(x)	(((x) >> 0) & 0x1)	/* U3 Entry capable */
+#define	 XHCI_HCC2_CMC(x)	(((x) >> 1) & 0x1)	/* CEC MaxExLatTooLg */
+#define	 XHCI_HCC2_FSC(x)	(((x) >> 2) & 0x1)	/* Foce Save Context */
+#define	 XHCI_HCC2_CTC(x)	(((x) >> 3) & 0x1)	/* Compliance Transc */
+#define	 XHCI_HCC2_LEC(x)	(((x) >> 4) & 0x1)	/* Large ESIT Paylod */
+#define	 XHCI_HCC2_CIC(x)	(((x) >> 5) & 0x1)	/* Configuration Inf */
+#define	 XHCI_HCC2_ETC(x)	(((x) >> 6) & 0x1)	/* Extended TBC */
+#define	 XHCI_HCC2_ETC_TSC(x)	(((x) >> 7) & 0x1)	/* ExtTBC TRB Status */
 
 /* XHCI operational registers.  Offset given by XHCI_CAPLENGTH register */
 #define	XHCI_USBCMD		0x00	/* XHCI command */



CVS commit: src/sys/kern

2018-07-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 18 07:06:40 UTC 2018

Modified Files:
src/sys/kern: files.kern uipc_mbuf.c uipc_mbufdebug.c

Log Message:
- Fix compile error for kernel configuration file which has no any Ethernet
  device driver.
- Add missing default label.
- Fix NetBSD RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/files.kern
cvs rdiff -u -r1.216 -r1.217 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/uipc_mbufdebug.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/files.kern
diff -u src/sys/kern/files.kern:1.19 src/sys/kern/files.kern:1.20
--- src/sys/kern/files.kern:1.19	Tue Jul 17 05:52:07 2018
+++ src/sys/kern/files.kern	Wed Jul 18 07:06:40 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.kern,v 1.19 2018/07/17 05:52:07 msaitoh Exp $
+#	$NetBSD: files.kern,v 1.20 2018/07/18 07:06:40 msaitoh Exp $
 
 #
 # kernel sources
@@ -175,7 +175,7 @@ file	kern/uipc_accf.c		kern
 file	kern/uipc_domain.c		kern
 file	kern/uipc_mbuf.c		kern
 file	kern/uipc_mbuf2.c		kern
-file	kern/uipc_mbufdebug.c		kern
+file	kern/uipc_mbufdebug.c		kern & ether
 file	net/link_proto.c		kern	# XXX
 file	kern/uipc_proto.c		kern
 file	kern/uipc_sem.c			kern

Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.216 src/sys/kern/uipc_mbuf.c:1.217
--- src/sys/kern/uipc_mbuf.c:1.216	Tue Jul 17 05:52:07 2018
+++ src/sys/kern/uipc_mbuf.c	Wed Jul 18 07:06:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.216 2018/07/17 05:52:07 msaitoh Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.217 2018/07/18 07:06:40 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,12 +62,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.216 2018/07/17 05:52:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.217 2018/07/18 07:06:40 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
 #include "opt_nmbclusters.h"
 #include "opt_ddb.h"
+#include "ether.h"
 #endif
 
 #include 
@@ -1646,10 +1647,12 @@ void
 m_print(const struct mbuf *m, const char *modif, void (*pr)(const char *, ...))
 {
 	char ch;
-	const struct mbuf *m0 = NULL;
 	bool opt_c = false;
 	bool opt_d = false;
+#if NETHER > 0
 	bool opt_v = false;
+	const struct mbuf *m0 = NULL;
+#endif
 	int no = 0;
 	char buf[512];
 
@@ -1661,10 +1664,14 @@ m_print(const struct mbuf *m, const char
 		case 'd':
 			opt_d = true;
 			break;
+#if NETHER > 0
 		case 'v':
 			opt_v = true;
 			m0 = m;
 			break;
+#endif
+		default:
+			break;
 		}
 	}
 
@@ -1727,9 +1734,10 @@ nextchain:
 		}
 	}
 
-	if (opt_v && m0) {
+#if NETHER > 0
+	if (opt_v && m0)
 		m_examine(m0, AF_ETHER, modif, pr);
-	}
+#endif
 }
 #endif /* defined(DDB) */
 

Index: src/sys/kern/uipc_mbufdebug.c
diff -u src/sys/kern/uipc_mbufdebug.c:1.1 src/sys/kern/uipc_mbufdebug.c:1.2
--- src/sys/kern/uipc_mbufdebug.c:1.1	Tue Jul 17 05:52:07 2018
+++ src/sys/kern/uipc_mbufdebug.c	Wed Jul 18 07:06:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbufdebug.c,v 1.1 2018/07/17 05:52:07 msaitoh Exp $	*/
+/*	$NetBSD: uipc_mbufdebug.c,v 1.2 2018/07/18 07:06:40 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$SEIL: uipc_mbufseil.c$");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbufdebug.c,v 1.2 2018/07/18 07:06:40 msaitoh Exp $");
 
 #include 
 #include 



CVS commit: src/sys/arch/evbarm/fdt

2018-07-18 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Jul 18 06:50:48 UTC 2018

Modified Files:
src/sys/arch/evbarm/fdt: fdt_start.S

Log Message:
remove ifdef __clang.
make position independent, and cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/fdt/fdt_start.S

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_start.S
diff -u src/sys/arch/evbarm/fdt/fdt_start.S:1.2 src/sys/arch/evbarm/fdt/fdt_start.S:1.3
--- src/sys/arch/evbarm/fdt/fdt_start.S:1.2	Tue Jul 17 00:37:42 2018
+++ src/sys/arch/evbarm/fdt/fdt_start.S	Wed Jul 18 06:50:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdt_start.S,v 1.2 2018/07/17 00:37:42 christos Exp $	*/
+/*	$NetBSD: fdt_start.S,v 1.3 2018/07/18 06:50:48 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -32,11 +32,17 @@
 
 #include 
 
-RCSID("$NetBSD: fdt_start.S,v 1.2 2018/07/17 00:37:42 christos Exp $")
+RCSID("$NetBSD: fdt_start.S,v 1.3 2018/07/18 06:50:48 ryo Exp $")
 
 #define PRINT(string)	\
 	bl xprint;.asciz string;.align 2
 
+/* load far effective address (pc relative) */
+.macro	ADDR, reg, addr
+	adrp	\reg, \addr
+	add	\reg, \reg, #:lo12:\addr
+.endm
+
 /*
  * Kernel start routine for aarch64 boards.
  */
@@ -47,29 +53,16 @@ start:
 
 	sub	x10, x10, x9
 
-#ifdef __clang__
-	ldr	x8, =(kern_vtopdiff - start)
-#else
-	ldr x7, =start
-	ldr	x8, =kern_vtopdiff
-	sub	x8, x8, x7
-#endif
-	add	x8, x8, x9
-	str	x10, [x8]
+	/* address of kern_vtopdiff (relative) */
+	ADDR	x8, kern_vtopdiff
+	str	x10, [x8]	/* kern_vtopdiff = start(virt) - start(phys) */
 
 	/*
 	 * store uboot arguments to uboot_args[4]
 	 */
 
-	/* offset of uboot_args from start */
-#ifdef __clang__
-	ldr	x8, =(uboot_args - start)
-#else
-	ldr	x8, =uboot_args
-	sub	x8, x8, x7
-#endif
-	add	x8, x8, x9		/* add load address to offset */
-
+	/* address of uboot_args (relative) */
+	ADDR	x8, uboot_args
 	str	x0, [x8, #(8*0)]
 	str	x1, [x8, #(8*1)]
 	str	x2, [x8, #(8*2)]
@@ -78,13 +71,7 @@ start:
 	/*
 	 * ARM64 boot protocol has FDT address in x0 *
 	 */
-#ifdef __clang__
-	ldr	x8, =(fdt_addr_r - start)
-#else
-	ldr	x8, =fdt_addr_r
-	sub	x8, x8, x7
-#endif
-	add	x8, x8, x9
+	ADDR	x8, fdt_addr_r
 	str	x0, [x8]