CVS commit: src/lib/libc/gen

2021-02-17 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb 17 23:51:04 UTC 2021

Modified Files:
src/lib/libc/gen: directory.3

Log Message:
Document that rewinddir(3) might either reopen or just lseek the dir.

(Currently it depends on the underlying directory, but documenting the
exact details seems inadvisable.)

Also, Someone(TM) should check if POSIX permits this or if we ought to
improve the implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/gen/directory.3

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

Modified files:

Index: src/lib/libc/gen/directory.3
diff -u src/lib/libc/gen/directory.3:1.42 src/lib/libc/gen/directory.3:1.43
--- src/lib/libc/gen/directory.3:1.42	Wed Feb 17 23:39:46 2021
+++ src/lib/libc/gen/directory.3	Wed Feb 17 23:51:04 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: directory.3,v 1.42 2021/02/17 23:39:46 dholland Exp $
+.\"	$NetBSD: directory.3,v 1.43 2021/02/17 23:51:04 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)directory.3	8.1 (Berkeley) 6/4/93
 .\"
-.Dd January 22, 2016
+.Dd February 17, 2021
 .Dt DIRECTORY 3
 .Os
 .Sh NAME
@@ -225,6 +225,15 @@ It also causes the directory stream to r
 current state of the corresponding directory, as if a call to
 .Fn opendir
 was made.
+It is not specified whether this refers to the ``corresponding directory''
+by name or by underlying object.
+(These can differ if
+.Xr rename 2
+has been used.)
+.\" Note: currently the underlying fd is reopened if and only if
+.\" __DTF_READALL is in effect, which is true for union mounts and
+.\" nfs; documenting that exactly seems inadvisable since it might
+.\" change.  -- dholland 20210217
 .Pp
 If
 .Fa dirp



CVS commit: src/lib/libc/gen

2021-02-17 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb 17 23:39:46 UTC 2021

Modified Files:
src/lib/libc/gen: directory.3

Log Message:
Fix some typos/malapropisms in directory(3).


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/gen/directory.3

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

Modified files:

Index: src/lib/libc/gen/directory.3
diff -u src/lib/libc/gen/directory.3:1.41 src/lib/libc/gen/directory.3:1.42
--- src/lib/libc/gen/directory.3:1.41	Mon Jul  3 21:32:49 2017
+++ src/lib/libc/gen/directory.3	Wed Feb 17 23:39:46 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: directory.3,v 1.41 2017/07/03 21:32:49 wiz Exp $
+.\"	$NetBSD: directory.3,v 1.42 2021/02/17 23:39:46 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -224,7 +224,7 @@ stream to the beginning of the directory
 It also causes the directory stream to refer to the
 current state of the corresponding directory, as if a call to
 .Fn opendir
-would have been made.
+was made.
 .Pp
 If
 .Fa dirp
@@ -281,7 +281,7 @@ return (NOT_FOUND);
 .Sh COMPATIBILITY
 The described directory operations have traditionally been problematic
 in terms of portability.
-A good example is the semantics around
+A good example is the semantics of
 .Sq \&.
 (dot) and
 .Sq \&..
@@ -313,7 +313,7 @@ When a file descriptor is used to implem
 function behaves as if the
 .Dv FD_CLOEXEC
 had been set for the file descriptor.
-In another words, it is mandatory that
+In other words, it is mandatory that
 .Fn closedir
 deallocates the file descriptor.
 .It
@@ -344,9 +344,9 @@ occurred between the calls to
 .Fn telldir
 and
 .Fn seekdir ,
-any subsequent call to
+the results of any subsequent call to
 .Fn readdir
-is unspecified, possibly resulting in undefined behavior.
+are unspecified, possibly resulting in undefined behavior.
 .It
 After a call to
 .Xr fork 2 ,



CVS commit: src/sys/arch

2021-02-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Feb 17 23:21:47 UTC 2021

Modified Files:
src/sys/arch/macppc/macppc: locore.S
src/sys/arch/ofppc/ofppc: locore.S

Log Message:
Document the register state on entry per the OpenFirmware PowerPC CPU
bindings.  Ensure we save off %r6 and %r7 before calling any other
functions.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/macppc/macppc/locore.S
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/ofppc/ofppc/locore.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/macppc/macppc/locore.S
diff -u src/sys/arch/macppc/macppc/locore.S:1.77 src/sys/arch/macppc/macppc/locore.S:1.78
--- src/sys/arch/macppc/macppc/locore.S:1.77	Sat Feb 13 02:17:02 2021
+++ src/sys/arch/macppc/macppc/locore.S	Wed Feb 17 23:21:46 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.77 2021/02/13 02:17:02 thorpej Exp $	*/
+/*	$NetBSD: locore.S,v 1.78 2021/02/17 23:21:46 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -77,10 +77,23 @@ _C_LABEL(kernel_text):
 /*
  * Startup entry.  Note, this must be the first thing in the text
  * segment!
+ *
+ * Register state as transfer is passed from OpenFirmware / boot loader:
+ *
+ *	%r1	Stack provided by OpenFirmware / boot loader
+ *	%r3	Reserved for platform binding (unused here)
+ *	%r4	Reserved for platform binding (unused here)
+ *	%r5	OpenFirmware client entry point
+ *	%r6	Arguments
+ *	%r7	Arguments length
  */
 	.text
 	.globl	__start
 __start:
+	/* Save off arguments that we need preserved. */
+	mr	%r13,%r6
+	mr	%r14,%r7
+
 	bl	_C_LABEL(ofwinit)		/* init OF */
 
 	li	%r0,0
@@ -89,8 +102,6 @@ __start:
 #endif
 	isync
 
-	mr	%r13,%r6
-	mr	%r14,%r7
 	bl	_C_LABEL(cpu_model_init)	/* init oeacpufeat */
 
 /* compute end of kernel memory */

Index: src/sys/arch/ofppc/ofppc/locore.S
diff -u src/sys/arch/ofppc/ofppc/locore.S:1.50 src/sys/arch/ofppc/ofppc/locore.S:1.51
--- src/sys/arch/ofppc/ofppc/locore.S:1.50	Sun Jul 15 05:16:43 2018
+++ src/sys/arch/ofppc/ofppc/locore.S	Wed Feb 17 23:21:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.50 2018/07/15 05:16:43 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.51 2021/02/17 23:21:47 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -75,13 +75,24 @@ _C_LABEL(kernel_text):
 /*
  * Startup entry.  Note, this must be the first thing in the text
  * segment!
+ *
+ * Register state as transfer is passed from OpenFirmware / boot loader:
+ *
+ *	%r1	Stack provided by OpenFirmware / boot loader
+ *	%r3	Reserved for platform binding (unused here)
+ *	%r4	Reserved for platform binding (unused here)
+ *	%r5	OpenFirmware client entry point
+ *	%r6	Arguments
+ *	%r7	Arguments length
  */
 	.text
 	.globl	__start
 __start:
+	/* Save off arguments that we need preserved. */
 	mr	%r13,%r6
 	mr	%r14,%r7
-	bl	_C_LABEL(ofwinit)	/* init our OF hooks */
+
+	bl	_C_LABEL(ofwinit)	/* init OF */
 
 	li	%r0,0
 	mtmsr	%r0			/* Disable FPU/MMU/exceptions */



CVS commit: src/lib/libc/sys

2021-02-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb 17 22:55:20 UTC 2021

Modified Files:
src/lib/libc/sys: fsync.2

Log Message:
Merge EINVAL descriptions; replace Xr to itself with Nm.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/fsync.2

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

Modified files:

Index: src/lib/libc/sys/fsync.2
diff -u src/lib/libc/sys/fsync.2:1.20 src/lib/libc/sys/fsync.2:1.21
--- src/lib/libc/sys/fsync.2:1.20	Wed Feb 17 17:43:09 2021
+++ src/lib/libc/sys/fsync.2	Wed Feb 17 22:55:20 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fsync.2,v 1.20 2021/02/17 17:43:09 dholland Exp $
+.\"	$NetBSD: fsync.2,v 1.21 2021/02/17 22:55:20 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -106,7 +106,7 @@ on the specified range.
 .It Dv FFILESYNC
 Synchronize all modified file data and meta-data for the specified range.
 This is equivalent to
-.Xr fsync 2
+.Nm
 on the specified range.
 .It Dv FDISKSYNC
 Request the destination device to ensure that the relevant data
@@ -165,8 +165,7 @@ is less than zero, or
 .Fa length
 is less than
 .Fa start
-or triggers an integer overflow.
-.It Bq Er EINVAL
+or triggers an integer overflow; or
 .Fa how
 contains an invalid value.
 .El



CVS commit: src/sys

2021-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 22:32:04 UTC 2021

Modified Files:
src/sys/net: if_arp.h
src/sys/netinet: icmp_private.h igmp_var.h ip_private.h tcp_private.h
udp_private.h
src/sys/netinet6: ip6_private.h
src/sys/sys: mbuf.h param.h

Log Message:
- pass the alignment instead of the mask (as Roy asked and to match the
  other macro)
- use alignof to determine that alignment and CTASSERT what we expect
- remove unused macros


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/net/if_arp.h
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet/icmp_private.h \
src/sys/netinet/ip_private.h src/sys/netinet/tcp_private.h \
src/sys/netinet/udp_private.h
cvs rdiff -u -r1.26 -r1.27 src/sys/netinet/igmp_var.h
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet6/ip6_private.h
cvs rdiff -u -r1.230 -r1.231 src/sys/sys/mbuf.h
cvs rdiff -u -r1.688 -r1.689 src/sys/sys/param.h

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

Modified files:

Index: src/sys/net/if_arp.h
diff -u src/sys/net/if_arp.h:1.41 src/sys/net/if_arp.h:1.42
--- src/sys/net/if_arp.h:1.41	Tue Feb 16 05:20:56 2021
+++ src/sys/net/if_arp.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.h,v 1.41 2021/02/16 10:20:56 martin Exp $	*/
+/*	$NetBSD: if_arp.h,v 1.42 2021/02/17 22:32:04 christos Exp $	*/
 
 /*
  * Copyright (c) 1986, 1993
@@ -72,7 +72,8 @@ struct	arphdr {
 	uint8_t  ar_tpa[];	/* target protocol address */
 #endif
 };
-#define	ARP_HDR_ALIGNMENT	1
+#define	ARP_HDR_ALIGNMENT	__alignof(struct arphdr)
+__CTASSERT(ARP_HDR_ALIGNMENT == 2);
 
 static __inline uint8_t *
 ar_data(struct arphdr *ap)

Index: src/sys/netinet/icmp_private.h
diff -u src/sys/netinet/icmp_private.h:1.4 src/sys/netinet/icmp_private.h:1.5
--- src/sys/netinet/icmp_private.h:1.4	Sun Feb 14 15:58:35 2021
+++ src/sys/netinet/icmp_private.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp_private.h,v 1.4 2021/02/14 20:58:35 christos Exp $	*/
+/*	$NetBSD: icmp_private.h,v 1.5 2021/02/17 22:32:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -44,7 +44,6 @@ extern percpu_t *icmpstat_percpu;
 
 #define	ICMP_STATINC(x)		_NET_STATINC(icmpstat_percpu, x)
 
-#define	ICMP_HDR_ALIGNMENT	3
 #endif /* _KERNEL_ */
 
 #endif /* !_NETINET_ICMP_PRIVATE_H_ */
Index: src/sys/netinet/ip_private.h
diff -u src/sys/netinet/ip_private.h:1.4 src/sys/netinet/ip_private.h:1.5
--- src/sys/netinet/ip_private.h:1.4	Sun Feb 14 15:58:35 2021
+++ src/sys/netinet/ip_private.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_private.h,v 1.4 2021/02/14 20:58:35 christos Exp $	*/
+/*	$NetBSD: ip_private.h,v 1.5 2021/02/17 22:32:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -43,7 +43,8 @@ extern	percpu_t *ipstat_percpu;
 #define	IP_STATINC(x)		_NET_STATINC(ipstat_percpu, x)
 #define	IP_STATDEC(x)		_NET_STATDEC(ipstat_percpu, x)
 
-#define	IP_HDR_ALIGNMENT	3
+#define	IP_HDR_ALIGNMENT	__alignof(struct ip)
+__CTASSERT(IP_HDR_ALIGNMENT == 4);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_IP_PRIVATE_H_ */
Index: src/sys/netinet/tcp_private.h
diff -u src/sys/netinet/tcp_private.h:1.4 src/sys/netinet/tcp_private.h:1.5
--- src/sys/netinet/tcp_private.h:1.4	Sun Feb 14 15:58:35 2021
+++ src/sys/netinet/tcp_private.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_private.h,v 1.4 2021/02/14 20:58:35 christos Exp $	*/
+/*	$NetBSD: tcp_private.h,v 1.5 2021/02/17 22:32:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -43,7 +43,8 @@ extern	percpu_t *tcpstat_percpu;
 #define	TCP_STATINC(x)		_NET_STATINC(tcpstat_percpu, x)
 #define	TCP_STATADD(x, v)	_NET_STATADD(tcpstat_percpu, x, v)
 
-#define	TCP_HDR_ALIGNMENT	3
+#define	TCP_HDR_ALIGNMENT	__alignof(struct tcphdr)
+__CTASSERT(TCP_HDR_ALIGNMENT == 4);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_TCP_PRIVATE_H_ */
Index: src/sys/netinet/udp_private.h
diff -u src/sys/netinet/udp_private.h:1.4 src/sys/netinet/udp_private.h:1.5
--- src/sys/netinet/udp_private.h:1.4	Sun Feb 14 15:58:35 2021
+++ src/sys/netinet/udp_private.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp_private.h,v 1.4 2021/02/14 20:58:35 christos Exp $	*/
+/*	$NetBSD: udp_private.h,v 1.5 2021/02/17 22:32:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -39,7 +39,8 @@ extern	percpu_t *udpstat_percpu;
 
 #define	UDP_STATINC(x)		_NET_STATINC(udpstat_percpu, x)
 
-#define	UDP_HDR_ALIGNMENT	3
+#define	UDP_HDR_ALIGNMENT	__alignof(struct udphdr)
+__CTASSERT(UDP_HDR_ALIGNMENT == 2);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_UDP_PRIVATE_H_ */

Index: src/sys/netinet/igmp_var.h
diff -u src/sys/netinet/igmp_var.h:1.26 src/sys/netinet/igmp_var.h:1.27
--- src/sys/netinet/igmp_var.h:1.26	Sun Feb 14 15:58:35 2021
+++ src/sys/netinet/igmp_var.h	Wed Feb 17 17:32:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: 

CVS commit: src/usr.bin/mail

2021-02-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 17 21:09:39 UTC 2021

Modified Files:
src/usr.bin/mail: dotlock.c

Log Message:
add O_CLOEXEC


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/mail/dotlock.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.bin/mail/dotlock.c
diff -u src/usr.bin/mail/dotlock.c:1.13 src/usr.bin/mail/dotlock.c:1.14
--- src/usr.bin/mail/dotlock.c:1.13	Sat Jul  4 18:45:08 2015
+++ src/usr.bin/mail/dotlock.c	Wed Feb 17 16:09:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $	*/
+/*	$NetBSD: dotlock.c,v 1.14 2021/02/17 21:09:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1996 Christos Zoulas.  All rights reserved.
@@ -26,7 +26,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $");
+__RCSID("$NetBSD: dotlock.c,v 1.14 2021/02/17 21:09:39 christos Exp $");
 #endif
 
 #include "rcv.h"
@@ -81,7 +81,8 @@ create_exclusive(const char *fname)
 	 * We try to create the unique filename.
 	 */
 	for (ntries = 0; ; ntries++) {
-		fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC, 0);
+		fd = open(path,
+		O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC|O_CLOEXEC, 0);
 		if (fd != -1) {
 			(void)close(fd);
 			break;



CVS commit: src/lib/libc/sys

2021-02-17 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb 17 17:43:09 UTC 2021

Modified Files:
src/lib/libc/sys: fsync.2

Log Message:
Document more EINVAL cases for fsync_range.

Corresponds to previous code fix.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/sys/fsync.2

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

Modified files:

Index: src/lib/libc/sys/fsync.2
diff -u src/lib/libc/sys/fsync.2:1.19 src/lib/libc/sys/fsync.2:1.20
--- src/lib/libc/sys/fsync.2:1.19	Sat Feb 13 06:24:08 2021
+++ src/lib/libc/sys/fsync.2	Wed Feb 17 17:43:09 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fsync.2,v 1.19 2021/02/13 06:24:08 dholland Exp $
+.\"	$NetBSD: fsync.2,v 1.20 2021/02/17 17:43:09 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)fsync.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd February 12, 2021
+.Dd February 17, 2021
 .Dt FSYNC 2
 .Os
 .Sh NAME
@@ -159,10 +159,13 @@ fails if:
 is not open for writing.
 .It Bq Er EINVAL
 .Fa start
+is less than zero, or
+.Fa start
 +
 .Fa length
 is less than
-.Fa start .
+.Fa start
+or triggers an integer overflow.
 .It Bq Er EINVAL
 .Fa how
 contains an invalid value.



CVS commit: src/sys/kern

2021-02-17 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb 17 17:39:08 UTC 2021

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

Log Message:
Don't allow callers of fsync_range() to trigger UB in the kernel.

(also prohibit syncing ranges at start offsets less than zero)


To generate a diff of this commit:
cvs rdiff -u -r1.548 -r1.549 src/sys/kern/vfs_syscalls.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_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.548 src/sys/kern/vfs_syscalls.c:1.549
--- src/sys/kern/vfs_syscalls.c:1.548	Sat May 16 18:31:50 2020
+++ src/sys/kern/vfs_syscalls.c	Wed Feb 17 17:39:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.548 2020/05/16 18:31:50 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.549 2021/02/17 17:39:08 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.548 2020/05/16 18:31:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.549 2021/02/17 17:39:08 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -4198,11 +4198,12 @@ sys_fsync_range(struct lwp *l, const str
 	/* If length == 0, we do the whole file, and s = e = 0 will do that */
 	if (len) {
 		s = SCARG(uap, start);
-		e = s + len;
-		if (e < s) {
+		if (s < 0 || len < 0 || len > OFF_T_MAX - s) {
 			error = EINVAL;
 			goto out;
 		}
+		e = s + len;
+		KASSERT(s <= e);
 	} else {
 		e = 0;
 		s = 0;



CVS commit: src/sys/dev

2021-02-17 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Feb 17 12:37:33 UTC 2021

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

Log Message:
Attach this only if the parent device has playback capability.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/spkr_audio.c

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

Modified files:

Index: src/sys/dev/spkr_audio.c
diff -u src/sys/dev/spkr_audio.c:1.8 src/sys/dev/spkr_audio.c:1.9
--- src/sys/dev/spkr_audio.c:1.8	Fri Jun 21 09:34:30 2019
+++ src/sys/dev/spkr_audio.c	Wed Feb 17 12:37:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: spkr_audio.c,v 1.8 2019/06/21 09:34:30 isaki Exp $	*/
+/*	$NetBSD: spkr_audio.c,v 1.9 2021/02/17 12:37:33 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss 
@@ -27,10 +27,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.8 2019/06/21 09:34:30 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr_audio.c,v 1.9 2021/02/17 12:37:33 isaki Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: spkr_audio.c
 #include 
 #include 
 
-#include 
+#include 
 #include 
 
 #include 
@@ -90,8 +91,12 @@ spkr_audio_rest(device_t self, int ticks
 static int
 spkr_audio_probe(device_t parent, cfdata_t cf, void *aux)
 {
+	struct audio_softc *asc = device_private(parent);
 
-	return 1;
+	if ((asc->sc_props & AUDIO_PROP_PLAYBACK))
+		return 1;
+
+	return 0;
 }
 
 static void



CVS commit: [netbsd-8] src/doc

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:56:53 UTC 2021

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

Log Message:
Tickets #1655 and #1656


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.71 src/doc/CHANGES-8.3:1.1.2.72
--- src/doc/CHANGES-8.3:1.1.2.71	Thu Feb 11 13:05:16 2021
+++ src/doc/CHANGES-8.3	Wed Feb 17 09:56:53 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.71 2021/02/11 13:05:16 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.72 2021/02/17 09:56:53 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1577,3 +1577,155 @@ sys/arch/x68k/x68k/machdep.c			1.204
 	fixing kernel crash dumps for x68k.
 	[tsutsui, ticket #1654]
 
+sys/dev/raidframe/rf_reconstruct.c		1.125
+
+	raid(4): fix am issue where a RAID reconstruction would also rebuild
+	the unused end portion of a component.
+	[oster, ticket #1655]
+
+xsrc/external/mit/xterm/dist/package/debian/xterm-dev.lintian-overrides up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/freebsd/distinfo up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/freebsd/pkg-message.wchar up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/Makefile up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/DESCRup to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/distinfo up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/PLISTup to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/options.mk up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/closest-rgb.pl  up to 1.1.1.2
+xsrc/external/mit/xterm/dist/vttests/query-status.pl up to 1.1.1.2
+xsrc/external/mit/xterm/dist/vttests/modify-keys.pl  up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/mouse-codes up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/other-sgr.shup to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/print-vt-chars.pl up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/query-dynamic.pl up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/query-xres.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/report-sgr.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/sgrPushPop.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/sgrPushPop2.pl  up to 1.1.1.1
+xsrc/external/mit/xterm/dist/COPYING up to 1.1.1.1
+xsrc/external/mit/xterm/dist/gen-charsets.pl up to 1.1.1.1
+xsrc/external/mit/xterm/include/Tekparse.hin delete
+xsrc/external/mit/xterm/include/VTparse.hin  delete
+xsrc/external/mit/xterm/dist/INSTALL up to 1.1.1.12
+xsrc/external/mit/xterm/dist/Imakefile   up to 1.1.1.10
+xsrc/external/mit/xterm/dist/MANIFESTup to 1.1.1.16
+xsrc/external/mit/xterm/dist/Makefile.in up to 1.1.1.13
+xsrc/external/mit/xterm/dist/NEWSup to 1.1.1.3
+xsrc/external/mit/xterm/dist/THANKS  up to 1.1.1.9
+xsrc/external/mit/xterm/dist/TekPrsTbl.c up to 1.1.1.2
+xsrc/external/mit/xterm/dist/Tekproc.c   up to 1.1.1.14
+xsrc/external/mit/xterm/dist/UXTerm.ad   up to 1.1.1.3
+xsrc/external/mit/xterm/dist/VTPrsTbl.c  up to 1.1.1.9
+xsrc/external/mit/xterm/dist/VTparse.def up to 1.1.1.8
+xsrc/external/mit/xterm/dist/VTparse.h   up to 1.1.1.10
+xsrc/external/mit/xterm/dist/XTerm.adup to 1.11
+xsrc/external/mit/xterm/dist/aclocal.m4  up to 1.1.1.14
+xsrc/external/mit/xterm/dist/button.cup to 1.1.1.16
+xsrc/external/mit/xterm/dist/cachedGCs.c up to 1.1.1.11
+xsrc/external/mit/xterm/dist/charclass.c up to 1.1.1.6
+xsrc/external/mit/xterm/dist/charclass.h up to 1.1.1.3
+xsrc/external/mit/xterm/dist/charproc.c  up to 1.1.1.15
+xsrc/external/mit/xterm/dist/charsets.c  up to 1.1.1.6
+xsrc/external/mit/xterm/dist/config.guessup to 1.1.1.12
+xsrc/external/mit/xterm/dist/config.sub  up to 1.1.1.12
+xsrc/external/mit/xterm/dist/configure   up to 1.1.1.14
+xsrc/external/mit/xterm/dist/configure.inup to 1.1.1.13
+xsrc/external/mit/xterm/dist/ctlseqs.ms  up to 1.1.1.15
+xsrc/external/mit/xterm/dist/ctlseqs.txt up to 1.1.1.15
+xsrc/external/mit/xterm/dist/cursor.cup to 1.1.1.9
+xsrc/external/mit/xterm/dist/data.c  up to 1.1.1.7
+xsrc/external/mit/xterm/dist/data.h  up to 1.1.1.10
+xsrc/external/mit/xterm/dist/df-install.in   up to 1.1.1.3
+xsrc/external/mit/xterm/dist/doublechr.c up to 1.1.1.9
+xsrc/external/mit/xterm/dist/error.h up to 1.1.1.6
+xsrc/external/mit/xterm/dist/fontutils.c up to 1.8

CVS commit: [netbsd-8] src/external/mit/xorg/bin/xterm

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:55:20 UTC 2021

Modified Files:
src/external/mit/xorg/bin/xterm [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1656):

external/mit/xorg/bin/xterm/Makefile: revision 1.20 (patch)

add new files for xterm 366.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.8.1 src/external/mit/xorg/bin/xterm/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/xterm/Makefile
diff -u src/external/mit/xorg/bin/xterm/Makefile:1.15 src/external/mit/xorg/bin/xterm/Makefile:1.15.8.1
--- src/external/mit/xorg/bin/xterm/Makefile:1.15	Thu Jul 23 09:37:59 2015
+++ src/external/mit/xorg/bin/xterm/Makefile	Wed Feb 17 09:55:20 2021
@@ -1,18 +1,20 @@
-#	$NetBSD: Makefile,v 1.15 2015/07/23 09:37:59 mrg Exp $
+#	$NetBSD: Makefile,v 1.15.8.1 2021/02/17 09:55:20 martin Exp $
 
 .include 
 
 PROG=	xterm
 SRCS=	button.c charproc.c charsets.c cursor.c data.c doublechr.c \
-	fontutils.c input.c linedata.c menu.c misc.c print.c ptydata.c \
-	screen.c scrollback.c scrollbar.c tabs.c util.c xstrings.c \
-	TekPrsTbl.c Tekproc.c VTPrsTbl.c main.c charclass.c precompose.c \
-	wcwidth.c xutf8.c cachedGCs.c xtermcap.c version.c
+	graphics.c graphics_sixel.c fontutils.c input.c linedata.c menu.c \
+	misc.c print.c ptydata.c screen.c scrollback.c scrollbar.c tabs.c \
+	util.c xstrings.c TekPrsTbl.c Tekproc.c VTPrsTbl.c main.c \
+	charclass.c precompose.c wcwidth.c xutf8.c cachedGCs.c xtermcap.c \
+	svg.c html.c version.c
 
 # graphics_regis.c graphics_sixel.c
 # xterm.appdata.xml
 
-CPPFLAGS+=	-I${X11SRCDIR.${PROG}} \
+CPPFLAGS+=	-I. \
+		-I${X11SRCDIR.${PROG}} \
 		-I${X11SRCDIR.${PROG}}/../include \
 		-I${DESTDIR}${X11INCDIR}/freetype2 \
 		-DPROJECTROOT=${X11ROOTDIR} \
@@ -44,6 +46,12 @@ COPTS.input.c+=	-Wno-error	# uses XKeyco
 
 # XXXMRG should probably build builtin_icons.h
 
+.SUFFIXES: .def .hin
+.def.hin:
+	${TOOL_AWK} '/^CASE_/{printf "#define %s %d\n", $$1, n++}' < $< >$@
+DPSRCS+= Tekparse.hin VTparse.hin
+CLEANFILES+= Tekparse.hin VTparse.hin
+
 .include "Makefile.inc"
 
 .include 



CVS commit: [netbsd-9] src/doc

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:52:36 UTC 2021

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

Log Message:
Tickets #1206 and #1207


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-9.2

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

Modified files:

Index: src/doc/CHANGES-9.2
diff -u src/doc/CHANGES-9.2:1.1.2.45 src/doc/CHANGES-9.2:1.1.2.46
--- src/doc/CHANGES-9.2:1.1.2.45	Thu Feb 11 13:03:10 2021
+++ src/doc/CHANGES-9.2	Wed Feb 17 09:52:36 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.2,v 1.1.2.45 2021/02/11 13:03:10 martin Exp $
+# $NetBSD: CHANGES-9.2,v 1.1.2.46 2021/02/17 09:52:36 martin Exp $
 
 A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2
 release:
@@ -1523,3 +1523,146 @@ sys/arch/x68k/x68k/machdep.c			1.204
 	fixing kernel crash dumps for x68k.
 	[tsutsui, ticket #1205]
 
+sys/dev/raidframe/rf_reconstruct.c		1.125
+
+	raid(4): fix am issue where a RAID reconstruction would also rebuild
+	the unused end portion of a component.
+	[oster, ticket #1206]
+
+xsrc/external/mit/xterm/dist/package/debian/xterm-dev.lintian-overrides up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/freebsd/distinfo up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/freebsd/pkg-message.wchar up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/Makefile up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/DESCRup to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/distinfo up to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/PLISTup to 1.1.1.1
+xsrc/external/mit/xterm/dist/package/pkgsrc/options.mk up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/modify-keys.pl  up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/mouse-codes up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/other-sgr.shup to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/print-vt-chars.pl up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/query-dynamic.pl up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/query-xres.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/report-sgr.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/sgrPushPop.pl   up to 1.1.1.1
+xsrc/external/mit/xterm/dist/vttests/sgrPushPop2.pl  up to 1.1.1.1
+xsrc/external/mit/xterm/dist/COPYING up to 1.1.1.1
+xsrc/external/mit/xterm/dist/gen-charsets.pl up to 1.1.1.1
+xsrc/external/mit/xterm/dist/INSTALL up to 1.1.1.12
+xsrc/external/mit/xterm/dist/Imakefile   up to 1.1.1.10
+xsrc/external/mit/xterm/dist/MANIFESTup to 1.1.1.16
+xsrc/external/mit/xterm/dist/Makefile.in up to 1.1.1.13
+xsrc/external/mit/xterm/dist/NEWSup to 1.1.1.3
+xsrc/external/mit/xterm/dist/THANKS  up to 1.1.1.9
+xsrc/external/mit/xterm/dist/TekPrsTbl.c up to 1.1.1.2
+xsrc/external/mit/xterm/dist/Tekproc.c   up to 1.1.1.14
+xsrc/external/mit/xterm/dist/UXTerm.ad   up to 1.1.1.3
+xsrc/external/mit/xterm/dist/VTPrsTbl.c  up to 1.1.1.9
+xsrc/external/mit/xterm/dist/VTparse.def up to 1.1.1.8
+xsrc/external/mit/xterm/dist/VTparse.h   up to 1.1.1.10
+xsrc/external/mit/xterm/dist/XTerm.adup to 1.11
+xsrc/external/mit/xterm/dist/aclocal.m4  up to 1.1.1.14
+xsrc/external/mit/xterm/dist/button.cup to 1.1.1.16
+xsrc/external/mit/xterm/dist/cachedGCs.c up to 1.1.1.11
+xsrc/external/mit/xterm/dist/charclass.c up to 1.1.1.6
+xsrc/external/mit/xterm/dist/charclass.h up to 1.1.1.3
+xsrc/external/mit/xterm/dist/charproc.c  up to 1.1.1.15
+xsrc/external/mit/xterm/dist/charsets.c  up to 1.1.1.6
+xsrc/external/mit/xterm/dist/config.guessup to 1.1.1.12
+xsrc/external/mit/xterm/dist/config.sub  up to 1.1.1.12
+xsrc/external/mit/xterm/dist/configure   up to 1.1.1.14
+xsrc/external/mit/xterm/dist/configure.inup to 1.1.1.13
+xsrc/external/mit/xterm/dist/ctlseqs.ms  up to 1.1.1.15
+xsrc/external/mit/xterm/dist/ctlseqs.txt up to 1.1.1.15
+xsrc/external/mit/xterm/dist/cursor.cup to 1.1.1.9
+xsrc/external/mit/xterm/dist/data.c  up to 1.1.1.7
+xsrc/external/mit/xterm/dist/data.h  up to 1.1.1.10
+xsrc/external/mit/xterm/dist/df-install.in   up to 1.1.1.3
+xsrc/external/mit/xterm/dist/doublechr.c up to 1.1.1.9
+xsrc/external/mit/xterm/dist/error.h up to 1.1.1.6
+xsrc/external/mit/xterm/dist/fontutils.c up to 1.8
+xsrc/external/mit/xterm/dist/fontutils.h up to 1.1.1.10
+xsrc/external/mit/xterm/dist/graphics.c  up to 1.1.1.6
+xsrc/external/mit/xterm/dist/graphics_regis.cup to 1.1.1.5
+xsrc/external/mit/xterm/dist/graphics_sixel.cup to 

CVS commit: [netbsd-9] src/external/mit/xorg/bin/xterm

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:50:20 UTC 2021

Modified Files:
src/external/mit/xorg/bin/xterm [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1207):

external/mit/xorg/bin/xterm/Makefile: revision 1.20

add new files for xterm 366.


To generate a diff of this commit:
cvs rdiff -u -r1.17.4.1 -r1.17.4.2 src/external/mit/xorg/bin/xterm/Makefile

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

Modified files:

Index: src/external/mit/xorg/bin/xterm/Makefile
diff -u src/external/mit/xorg/bin/xterm/Makefile:1.17.4.1 src/external/mit/xorg/bin/xterm/Makefile:1.17.4.2
--- src/external/mit/xorg/bin/xterm/Makefile:1.17.4.1	Thu Oct  8 15:40:52 2020
+++ src/external/mit/xorg/bin/xterm/Makefile	Wed Feb 17 09:50:20 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17.4.1 2020/10/08 15:40:52 martin Exp $
+#	$NetBSD: Makefile,v 1.17.4.2 2021/02/17 09:50:20 martin Exp $
 
 .include 
 
@@ -8,7 +8,7 @@ SRCS=	button.c charproc.c charsets.c cur
 	misc.c print.c ptydata.c screen.c scrollback.c scrollbar.c tabs.c \
 	util.c xstrings.c TekPrsTbl.c Tekproc.c VTPrsTbl.c main.c \
 	charclass.c precompose.c wcwidth.c xutf8.c cachedGCs.c xtermcap.c \
-	version.c
+	svg.c html.c version.c
 
 CPPFLAGS+=	-I. \
 		-I${X11SRCDIR.${PROG}} \



CVS commit: [netbsd-8] xsrc/external/mit/xterm

2021-02-17 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Feb 17 09:48:40 UTC 2021

Modified Files:
xsrc/external/mit/xterm/dist [netbsd-8]: INSTALL Imakefile MANIFEST
Makefile.in NEWS THANKS TekPrsTbl.c Tekproc.c UXTerm.ad VTPrsTbl.c
VTparse.def VTparse.h XTerm.ad aclocal.m4 button.c cachedGCs.c
charclass.c charclass.h charproc.c charsets.c config.guess
config.sub configure configure.in ctlseqs.ms ctlseqs.txt cursor.c
data.c data.h df-install.in doublechr.c error.h fontutils.c
fontutils.h graphics.c graphics_regis.c graphics_sixel.c html.c
input.c keysym2ucs.c koi8rxterm koi8rxterm.man linedata.c main.c
main.h menu.c menu.h minstall.in misc.c plink.sh print.c ptydata.c
ptyx.h resize.c resize.man run-tic.sh screen.c scrollback.c
scrollbar.c svg.c tabs.c termcap terminfo testxmc.c trace.c trace.h
util.c uxterm uxterm.desktop uxterm.man version.c version.h vms.c
wcwidth.c wcwidth.h xcharmouse.h xstrings.c xstrings.h
xterm.appdata.xml xterm.dat xterm.h xterm.log.html xterm.man
xterm_io.h xtermcap.c xtermcfg.hin xutf8.c
xsrc/external/mit/xterm/dist/icons [netbsd-8]: filled-xterm.svg
mini.xterm.svg terminal_48x48.svg xterm-color.svg xterm.svg
xsrc/external/mit/xterm/dist/package [netbsd-8]: xterm.spec
xsrc/external/mit/xterm/dist/package/debian [netbsd-8]: changelog
compat control copyright rules watch xterm-dev.docs xterm-dev.menu
xsrc/external/mit/xterm/dist/package/freebsd [netbsd-8]: Makefile
pkg-descr
xsrc/external/mit/xterm/dist/unicode [netbsd-8]: convmap.pl keysym.map
xsrc/external/mit/xterm/dist/vttests [netbsd-8]: 256colors.pl
256colors2.pl 88colors.pl 88colors2.pl dynamic.pl paste64.pl
query-color.pl query-fonts.pl resize.pl tcapquery.pl
xsrc/external/mit/xterm/include [netbsd-8]: xtermcfg.h
Added Files:
xsrc/external/mit/xterm/dist [netbsd-8]: COPYING gen-charsets.pl
xsrc/external/mit/xterm/dist/package/debian [netbsd-8]:
xterm-dev.lintian-overrides
xsrc/external/mit/xterm/dist/package/freebsd [netbsd-8]: distinfo
pkg-message.wchar
xsrc/external/mit/xterm/dist/package/pkgsrc [netbsd-8]: DESCR Makefile
PLIST distinfo options.mk
xsrc/external/mit/xterm/dist/vttests [netbsd-8]: closest-rgb.pl
modify-keys.pl mouse-codes other-sgr.sh print-vt-chars.pl
query-dynamic.pl query-status.pl query-xres.pl report-sgr.pl
sgrPushPop.pl sgrPushPop2.pl
Removed Files:
xsrc/external/mit/xterm/include [netbsd-8]: Tekparse.hin VTparse.hin

Log Message:
Pull up the following

xsrc/external/mit/xterm/dist/package/debian/xterm-dev.lintian-overrides 
up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/freebsd/distinfo up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/freebsd/pkg-message.wchar up to 
1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/Makefile up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/DESCRup to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/distinfo up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/PLISTup to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/options.mk up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/closest-rgb.pl  up to 1.1.1.2
xsrc/external/mit/xterm/dist/vttests/query-status.pl up to 1.1.1.2
xsrc/external/mit/xterm/dist/vttests/modify-keys.pl  up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/mouse-codes up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/other-sgr.shup to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/print-vt-chars.pl up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/query-dynamic.pl up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/query-xres.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/report-sgr.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/sgrPushPop.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/sgrPushPop2.pl  up to 1.1.1.1
xsrc/external/mit/xterm/dist/COPYING up to 1.1.1.1
xsrc/external/mit/xterm/dist/gen-charsets.pl up to 1.1.1.1
xsrc/external/mit/xterm/include/Tekparse.hin delete
xsrc/external/mit/xterm/include/VTparse.hin  delete
xsrc/external/mit/xterm/dist/INSTALL up to 1.1.1.12
xsrc/external/mit/xterm/dist/Imakefile   up to 1.1.1.10
xsrc/external/mit/xterm/dist/MANIFESTup to 1.1.1.16
xsrc/external/mit/xterm/dist/Makefile.in up to 1.1.1.13
xsrc/external/mit/xterm/dist/NEWSup to 1.1.1.3
xsrc/external/mit/xterm/dist/THANKS

CVS commit: [netbsd-9] xsrc/external/mit/xterm

2021-02-17 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Feb 17 09:45:01 UTC 2021

Modified Files:
xsrc/external/mit/xterm/dist [netbsd-9]: INSTALL Imakefile MANIFEST
Makefile.in NEWS THANKS TekPrsTbl.c Tekproc.c UXTerm.ad VTPrsTbl.c
VTparse.def VTparse.h XTerm.ad aclocal.m4 button.c cachedGCs.c
charclass.c charclass.h charproc.c charsets.c config.guess
config.sub configure configure.in ctlseqs.ms ctlseqs.txt cursor.c
data.c data.h df-install.in doublechr.c error.h fontutils.c
fontutils.h graphics.c graphics_regis.c graphics_sixel.c html.c
input.c keysym2ucs.c koi8rxterm koi8rxterm.man linedata.c main.c
main.h menu.c menu.h minstall.in misc.c plink.sh print.c ptydata.c
ptyx.h resize.c resize.man run-tic.sh screen.c scrollback.c
scrollbar.c svg.c tabs.c termcap terminfo testxmc.c trace.c trace.h
util.c uxterm uxterm.desktop uxterm.man version.c version.h vms.c
wcwidth.c xcharmouse.h xstrings.c xterm.appdata.xml xterm.dat
xterm.h xterm.log.html xterm.man xterm_io.h xtermcap.c xtermcfg.hin
xutf8.c
xsrc/external/mit/xterm/dist/icons [netbsd-9]: filled-xterm.svg
mini.xterm.svg terminal_48x48.svg xterm-color.svg xterm.svg
xsrc/external/mit/xterm/dist/package [netbsd-9]: xterm.spec
xsrc/external/mit/xterm/dist/package/debian [netbsd-9]: changelog
compat control copyright rules watch
xsrc/external/mit/xterm/dist/package/freebsd [netbsd-9]: Makefile
pkg-descr
xsrc/external/mit/xterm/dist/unicode [netbsd-9]: convmap.pl keysym.map
xsrc/external/mit/xterm/dist/vttests [netbsd-9]: 256colors2.pl
88colors2.pl closest-rgb.pl dynamic.pl paste64.pl query-color.pl
query-fonts.pl query-status.pl tcapquery.pl
xsrc/external/mit/xterm/include [netbsd-9]: xtermcfg.h
Added Files:
xsrc/external/mit/xterm/dist [netbsd-9]: COPYING gen-charsets.pl
xsrc/external/mit/xterm/dist/package/debian [netbsd-9]:
xterm-dev.lintian-overrides
xsrc/external/mit/xterm/dist/package/freebsd [netbsd-9]: distinfo
pkg-message.wchar
xsrc/external/mit/xterm/dist/package/pkgsrc [netbsd-9]: DESCR Makefile
PLIST distinfo options.mk
xsrc/external/mit/xterm/dist/vttests [netbsd-9]: modify-keys.pl
mouse-codes other-sgr.sh print-vt-chars.pl query-dynamic.pl
query-xres.pl report-sgr.pl sgrPushPop.pl sgrPushPop2.pl

Log Message:
Pull up the following

xsrc/external/mit/xterm/dist/package/debian/xterm-dev.lintian-overrides 
up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/freebsd/distinfo up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/freebsd/pkg-message.wchar up to 
1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/Makefile up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/DESCRup to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/distinfo up to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/PLISTup to 1.1.1.1
xsrc/external/mit/xterm/dist/package/pkgsrc/options.mk up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/modify-keys.pl  up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/mouse-codes up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/other-sgr.shup to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/print-vt-chars.pl up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/query-dynamic.pl up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/query-xres.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/report-sgr.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/sgrPushPop.pl   up to 1.1.1.1
xsrc/external/mit/xterm/dist/vttests/sgrPushPop2.pl  up to 1.1.1.1
xsrc/external/mit/xterm/dist/COPYING up to 1.1.1.1
xsrc/external/mit/xterm/dist/gen-charsets.pl up to 1.1.1.1
xsrc/external/mit/xterm/dist/INSTALL up to 1.1.1.12
xsrc/external/mit/xterm/dist/Imakefile   up to 1.1.1.10
xsrc/external/mit/xterm/dist/MANIFESTup to 1.1.1.16
xsrc/external/mit/xterm/dist/Makefile.in up to 1.1.1.13
xsrc/external/mit/xterm/dist/NEWSup to 1.1.1.3
xsrc/external/mit/xterm/dist/THANKS  up to 1.1.1.9
xsrc/external/mit/xterm/dist/TekPrsTbl.c up to 1.1.1.2
xsrc/external/mit/xterm/dist/Tekproc.c   up to 1.1.1.14
xsrc/external/mit/xterm/dist/UXTerm.ad   up to 1.1.1.3
xsrc/external/mit/xterm/dist/VTPrsTbl.c  up to 1.1.1.9
xsrc/external/mit/xterm/dist/VTparse.def up to 1.1.1.8
xsrc/external/mit/xterm/dist/VTparse.h   up to 1.1.1.10

CVS commit: [netbsd-8] src/sys/dev/raidframe

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:36:10 UTC 2021

Modified Files:
src/sys/dev/raidframe [netbsd-8]: rf_reconstruct.c

Log Message:
Pull up following revision(s) (requested by oster in ticket #1655):

sys/dev/raidframe/rf_reconstruct.c: revision 1.125

Fix a long long-standing off-by-one error in computing lastPSID.

SUsPerPU is only really supported for a value of 1, and since the
first PSID is 0, the last will be numStripe-1.  Also update the
setting of pending_writes to reflect the change to lastPSID.

Needs pullups to -8 and -9.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.121.12.1 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/rf_reconstruct.c
diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.121 src/sys/dev/raidframe/rf_reconstruct.c:1.121.12.1
--- src/sys/dev/raidframe/rf_reconstruct.c:1.121	Fri Nov 14 14:29:16 2014
+++ src/sys/dev/raidframe/rf_reconstruct.c	Wed Feb 17 09:36:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconstruct.c,v 1.121 2014/11/14 14:29:16 oster Exp $	*/
+/*	$NetBSD: rf_reconstruct.c,v 1.121.12.1 2021/02/17 09:36:10 martin Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  /
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.121 2014/11/14 14:29:16 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.121.12.1 2021/02/17 09:36:10 martin Exp $");
 
 #include 
 #include 
@@ -616,7 +616,7 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 	mapPtr = raidPtr->reconControl->reconMap;
 
 	incPSID = RF_RECONMAP_SIZE;
-	lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU;
+	lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU - 1;
 	RUsPerPU = raidPtr->Layout.SUsPerPU / raidPtr->Layout.SUsPerRU;
 	recon_error = 0;
 	write_error = 0;
@@ -631,7 +631,7 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 		raidPtr->reconControl->lastPSID = lastPSID;
 
 	if (pending_writes > lastPSID)
-		pending_writes = lastPSID;
+		pending_writes = lastPSID + 1;
 
 	/* start the actual reconstruction */
 
@@ -796,7 +796,6 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 			pending_writes = lastPSID - prev;
 			raidPtr->reconControl->lastPSID = lastPSID;
 		}
-		
 		/* back down curPSID to get ready for the next round... */
 		for (i = 0; i < raidPtr->numCol; i++) {
 			if (i != col) {



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

2021-02-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 17 09:34:20 UTC 2021

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

Log Message:
Pull up following revision(s) (requested by oster in ticket #1206):

sys/dev/raidframe/rf_reconstruct.c: revision 1.125

Fix a long long-standing off-by-one error in computing lastPSID.

SUsPerPU is only really supported for a value of 1, and since the
first PSID is 0, the last will be numStripe-1.  Also update the
setting of pending_writes to reflect the change to lastPSID.

Needs pullups to -8 and -9.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.122.4.1 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/rf_reconstruct.c
diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.122 src/sys/dev/raidframe/rf_reconstruct.c:1.122.4.1
--- src/sys/dev/raidframe/rf_reconstruct.c:1.122	Sat Feb  9 03:34:00 2019
+++ src/sys/dev/raidframe/rf_reconstruct.c	Wed Feb 17 09:34:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconstruct.c,v 1.122 2019/02/09 03:34:00 christos Exp $	*/
+/*	$NetBSD: rf_reconstruct.c,v 1.122.4.1 2021/02/17 09:34:20 martin Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  /
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.122 2019/02/09 03:34:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.122.4.1 2021/02/17 09:34:20 martin Exp $");
 
 #include 
 #include 
@@ -616,7 +616,7 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 	mapPtr = raidPtr->reconControl->reconMap;
 
 	incPSID = RF_RECONMAP_SIZE;
-	lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU;
+	lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU - 1;
 	RUsPerPU = raidPtr->Layout.SUsPerPU / raidPtr->Layout.SUsPerRU;
 	recon_error = 0;
 	write_error = 0;
@@ -631,7 +631,7 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 		raidPtr->reconControl->lastPSID = lastPSID;
 
 	if (pending_writes > lastPSID)
-		pending_writes = lastPSID;
+		pending_writes = lastPSID + 1;
 
 	/* start the actual reconstruction */
 
@@ -796,7 +796,6 @@ rf_ContinueReconstructFailedDisk(RF_Raid
 			pending_writes = lastPSID - prev;
 			raidPtr->reconControl->lastPSID = lastPSID;
 		}
-		
 		/* back down curPSID to get ready for the next round... */
 		for (i = 0; i < raidPtr->numCol; i++) {
 			if (i != col) {



CVS commit: src/distrib/amd64/cdroms

2021-02-17 Thread Darrin B. Jewell
Module Name:src
Committed By:   dbj
Date:   Wed Feb 17 08:49:55 UTC 2021

Modified Files:
src/distrib/amd64/cdroms: Makefile.cdrom
src/distrib/amd64/cdroms/bootcd-com: Makefile

Log Message:
Revert "distrib/amd64/cdroms: honor CDBOOTOPTIONS when installing EFI 
bootloader"

https://mail-index.netbsd.org/current-users/2021/02/17/msg040358.html
I think this change had unexpected side effects and needs further review


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/distrib/amd64/cdroms/Makefile.cdrom
cvs rdiff -u -r1.7 -r1.8 src/distrib/amd64/cdroms/bootcd-com/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/amd64/cdroms/Makefile.cdrom
diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.24 src/distrib/amd64/cdroms/Makefile.cdrom:1.25
--- src/distrib/amd64/cdroms/Makefile.cdrom:1.24	Sat Feb  6 16:02:43 2021
+++ src/distrib/amd64/cdroms/Makefile.cdrom	Wed Feb 17 08:49:54 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.24 2021/02/06 16:02:43 dbj Exp $
+# $NetBSD: Makefile.cdrom,v 1.25 2021/02/17 08:49:54 dbj Exp $
 
 .include 
 .include 
@@ -27,12 +27,6 @@ ${EFIBOOTIMG}: ${DESTDIR}/usr/mdec/bootx
 	${RM} -rf efiboot/EFI/boot
 	${MKDIR} ${MKDIRPERM} efiboot/EFI/boot
 	${INSTALL} ${COPY} -m 0444 ${.ALLSRC} efiboot/EFI/boot/
-.if defined(CDBOOTOPTIONS)
-	${CHMOD} +w efiboot/EFI/boot/bootx64.efi efiboot/EFI/boot/bootia32.efi
-	${TOOL_INSTALLBOOT} -m${MACHINE} -e ${CDBOOTOPTIONS} efiboot/EFI/boot/bootx64.efi
-	${TOOL_INSTALLBOOT} -m${MACHINE} -e ${CDBOOTOPTIONS} efiboot/EFI/boot/bootia32.efi
-	${CHMOD} -w efiboot/EFI/boot/bootx64.efi efiboot/EFI/boot/bootia32.efi
-.endif
 	${TOOL_MAKEFS} -M 1m -m 1m -B ${TARGET_ENDIANNESS} ${MAKEFS_TIMESTAMP} \
 		-t msdos -o F=12,c=1 ${EFIBOOTIMG} efiboot
 

Index: src/distrib/amd64/cdroms/bootcd-com/Makefile
diff -u src/distrib/amd64/cdroms/bootcd-com/Makefile:1.7 src/distrib/amd64/cdroms/bootcd-com/Makefile:1.8
--- src/distrib/amd64/cdroms/bootcd-com/Makefile:1.7	Sat Feb  6 16:02:43 2021
+++ src/distrib/amd64/cdroms/bootcd-com/Makefile	Wed Feb 17 08:49:55 2021
@@ -1,12 +1,11 @@
-#	$NetBSD: Makefile,v 1.7 2021/02/06 16:02:43 dbj Exp $
+#	$NetBSD: Makefile,v 1.8 2021/02/17 08:49:55 dbj Exp $
 #
 
-# HP Proliant iLO serial console is on com1
-CDBOOTOPTIONS=	-o console=com0
-
 .include "${.CURDIR}/../Makefile.cdrom"
 
 CDBASE=		boot-com			# gives ${CDBASE}.iso
+# HP Proliant iLO serial console is on com1
+CDBOOTOPTIONS=	-o console=com0
 
 CDBUILDEXTRA+=	boot.cfg		# Add boot.cfg file
 CLEANFILES+=	boot.cfg



CVS commit: src/sys/arch/evbmips/loongson/dev

2021-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 08:19:06 UTC 2021

Modified Files:
src/sys/arch/evbmips/loongson/dev: glx.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/loongson/dev/glx.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/evbmips/loongson/dev/glx.c
diff -u src/sys/arch/evbmips/loongson/dev/glx.c:1.7 src/sys/arch/evbmips/loongson/dev/glx.c:1.8
--- src/sys/arch/evbmips/loongson/dev/glx.c:1.7	Wed Feb 17 08:18:39 2021
+++ src/sys/arch/evbmips/loongson/dev/glx.c	Wed Feb 17 08:19:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: glx.c,v 1.7 2021/02/17 08:18:39 skrll Exp $	*/
+/*	$NetBSD: glx.c,v 1.8 2021/02/17 08:19:06 skrll Exp $	*/
 /*	$OpenBSD: glx.c,v 1.6 2010/10/14 21:23:04 pirofti Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  * XXX too many hardcoded numbers... need to expand glxreg.h
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: glx.c,v 1.7 2021/02/17 08:18:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: glx.c,v 1.8 2021/02/17 08:19:06 skrll Exp $");
 
 #include 
 #include 
@@ -273,7 +273,7 @@ glx_pci_write_hook(void *v, pcitag_t tag
 		gen_pci_conf_write(v, tag, offset, data);
 		return;
 	}
-		
+
 
 	pci_decompose_tag(glxbase_pc, tag, , , );
 	if (bus != 0 || dev != glxbase_dev) {



CVS commit: src/sys/arch/evbmips/loongson/dev

2021-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 08:18:39 UTC 2021

Modified Files:
src/sys/arch/evbmips/loongson/dev: glx.c

Log Message:
Use the PCI_MAPREG_TYPE macro.  Same binary after change.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/loongson/dev/glx.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/evbmips/loongson/dev/glx.c
diff -u src/sys/arch/evbmips/loongson/dev/glx.c:1.6 src/sys/arch/evbmips/loongson/dev/glx.c:1.7
--- src/sys/arch/evbmips/loongson/dev/glx.c:1.6	Thu Feb  8 09:05:17 2018
+++ src/sys/arch/evbmips/loongson/dev/glx.c	Wed Feb 17 08:18:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: glx.c,v 1.6 2018/02/08 09:05:17 dholland Exp $	*/
+/*	$NetBSD: glx.c,v 1.7 2021/02/17 08:18:39 skrll Exp $	*/
 /*	$OpenBSD: glx.c,v 1.6 2010/10/14 21:23:04 pirofti Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  * XXX too many hardcoded numbers... need to expand glxreg.h
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: glx.c,v 1.6 2018/02/08 09:05:17 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: glx.c,v 1.7 2021/02/17 08:18:39 skrll Exp $");
 
 #include 
 #include 
@@ -460,8 +460,7 @@ glx_fn0_write(int reg, pcireg_t data)
 		if (data == 0x) {
 			pcib_bar_values[index] = data;
 		} else if (pcib_bar_msr[index] != 0) {
-			if ((data & PCI_MAPREG_TYPE_MASK) ==
-			PCI_MAPREG_TYPE_IO) {
+			if (PCI_MAPREG_TYPE(data) == PCI_MAPREG_TYPE_IO) {
 data &= PCI_MAPREG_IO_ADDR_MASK;
 data &= ~(pcib_bar_sizes[index] - 1);
 wrmsr(pcib_bar_msr[index],
@@ -573,8 +572,7 @@ glx_fn2_write(int reg, pcireg_t data)
 		if (data == 0x) {
 			pciide_bar_value = data;
 		} else {
-			if ((data & PCI_MAPREG_TYPE_MASK) ==
-			PCI_MAPREG_TYPE_IO) {
+			if (PCI_MAPREG_TYPE(data) == PCI_MAPREG_TYPE_IO) {
 data &= PCI_MAPREG_IO_ADDR_MASK;
 msr = (uint32_t)data & 0xfff0;
 wrmsr(GCSC_IDE_IO_BAR, msr);
@@ -686,8 +684,7 @@ glx_fn3_write(int reg, pcireg_t data)
 		if (data == 0x) {
 			ac97_bar_value = data;
 		} else {
-			if ((data & PCI_MAPREG_TYPE_MASK) ==
-			PCI_MAPREG_TYPE_IO) {
+			if (PCI_MAPREG_TYPE(data) == PCI_MAPREG_TYPE_IO) {
 data &= PCI_MAPREG_IO_ADDR_MASK;
 msr = rdmsr(GCSC_GLIU_IOD_BM1);
 msr &= 0x0f00ULL;
@@ -799,8 +796,7 @@ glx_fn4_write(int reg, pcireg_t data)
 		if (data == 0x) {
 			ohci_bar_value = data;
 		} else {
-			if ((data & PCI_MAPREG_TYPE_MASK) ==
-			PCI_MAPREG_TYPE_MEM) {
+			if (PCI_MAPREG_TYPE(data) == PCI_MAPREG_TYPE_MEM) {
 data &= PCI_MAPREG_MEM_ADDR_MASK;
 msr = rdmsr(GCSC_GLIU_P2D_BM3);
 msr &= 0x0f00ULL;
@@ -925,9 +921,8 @@ glx_fn5_write(int reg, pcireg_t data)
 		if (data == 0x) {
 			ehci_bar_value = data;
 		} else {
-			if ((data & PCI_MAPREG_TYPE_MASK) ==
-			PCI_MAPREG_TYPE_MEM) {
-data &= PCI_MAPREG_MEM_ADDR_MASK;
+			if (PCI_MAPREG_TYPE(data) == PCI_MAPREG_TYPE_MEM) {
+data = PCI_MAPREG_MEM_ADDR(data);
 msr = rdmsr(GCSC_GLIU_P2D_BM4);
 msr &= 0x0f00ULL;
 msr |= 2ULL << 61;	/* USB */



CVS commit: src

2021-02-17 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Wed Feb 17 08:15:43 UTC 2021

Modified Files:
src/share/man/man4: wm.4
src/sys/dev/pci: files.pci if_wm.c

Log Message:
In 64 bit architectures, WM_EVENT_COUNTER is enabled by default.

No objection from tech-kern@n.o and tech-net@n.o.

ok'ed by msaitoh@n.o.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/share/man/man4/wm.4
cvs rdiff -u -r1.433 -r1.434 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.698 -r1.699 src/sys/dev/pci/if_wm.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/wm.4
diff -u src/share/man/man4/wm.4:1.41 src/share/man/man4/wm.4:1.42
--- src/share/man/man4/wm.4:1.41	Wed Apr  8 23:01:51 2020
+++ src/share/man/man4/wm.4	Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wm.4,v 1.41 2020/04/08 23:01:51 jdolecek Exp $
+.\"	$NetBSD: wm.4,v 1.42 2021/02/17 08:15:43 knakahara Exp $
 .\"
 .\" Copyright 2002, 2003 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 9, 2020
+.Dd February 17, 2021
 .Dt WM 4
 .Os
 .Sh NAME
@@ -213,8 +213,11 @@ Transmit side of
 .It Dv WM_EVENT_COUNTERS
 Enable many event counters such as each Tx drop counter and Rx interrupt
 counter.
+In 64 bit architectures, this is enabled by default.
 Caution: If this flag is enabled, the number of evcnt entries increase
 very much.
+.It Dv WM_DISABLE_EVENT_COUNTERS
+Disable event counters for 64 bit architectures.
 .It Dv WM_DISABLE_MSI
 If this option is set non-zero value, this driver does not use msi.
 The default value is 0.

Index: src/sys/dev/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.433 src/sys/dev/pci/files.pci:1.434
--- src/sys/dev/pci/files.pci:1.433	Sat Jan 30 21:26:32 2021
+++ src/sys/dev/pci/files.pci	Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.433 2021/01/30 21:26:32 jmcneill Exp $
+#	$NetBSD: files.pci,v 1.434 2021/02/17 08:15:43 knakahara Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -674,7 +674,7 @@ file	dev/pci/ixgbe/ixv.c		ixv
 device	wm: ether, ifnet, arp, mii, mii_bitbang
 attach	wm at pci
 file	dev/pci/if_wm.c			wm
-defflag	opt_if_wm.h	WM_EVENT_COUNTERS
+defflag	opt_if_wm.h	WM_EVENT_COUNTERS WM_DISABLE_EVENT_COUNTERS
 defparam opt_if_wm.h	WM_RX_PROCESS_LIMIT_DEFAULT
 			WM_RX_INTR_PROCESS_LIMIT_DEFAULT
 			WM_DISABLE_MSI

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.698 src/sys/dev/pci/if_wm.c:1.699
--- src/sys/dev/pci/if_wm.c:1.698	Wed Feb 17 08:10:33 2021
+++ src/sys/dev/pci/if_wm.c	Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -313,6 +313,12 @@ static const uint32_t wm_82580_rxpbs_tab
 
 struct wm_softc;
 
+#if defined(_LP64) && !defined(WM_DISABLE_EVENT_COUNTERS)
+#if !defined(WM_EVENT_COUNTERS)
+#define WM_EVENT_COUNTERS 1
+#endif
+#endif
+
 #ifdef WM_EVENT_COUNTERS
 #define WM_Q_EVCNT_DEFINE(qname, evname)\
 	char qname##_##evname##_evcnt_name[sizeof("qname##XX##evname")]; \



CVS commit: src/sys/dev/pci

2021-02-17 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Wed Feb 17 08:10:34 UTC 2021

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

Log Message:
wm(4) use atomic_{load,store}_relaxed for evcnt 64 bit counter.

ok'ed by msaitoh@n.o.


To generate a diff of this commit:
cvs rdiff -u -r1.697 -r1.698 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.697 src/sys/dev/pci/if_wm.c:1.698
--- src/sys/dev/pci/if_wm.c:1.697	Thu Nov 19 02:36:30 2020
+++ src/sys/dev/pci/if_wm.c	Wed Feb 17 08:10:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.697 2020/11/19 02:36:30 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.697 2020/11/19 02:36:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -661,8 +661,12 @@ do {	\
 } while (/*CONSTCOND*/0)
 
 #ifdef WM_EVENT_COUNTERS
-#define	WM_EVCNT_INCR(ev)	(ev)->ev_count++
-#define	WM_EVCNT_ADD(ev, val)	(ev)->ev_count += (val)
+#define	WM_EVCNT_INCR(ev)		\
+	atomic_store_relaxed(&((ev)->ev_count),\
+	atomic_load_relaxed(&(ev)->ev_count) + 1)
+#define	WM_EVCNT_ADD(ev, val)		\
+	atomic_store_relaxed(&((ev)->ev_count),\
+	atomic_load_relaxed(&(ev)->ev_count) + (val))
 
 #define WM_Q_EVCNT_INCR(qname, evname)			\
 	WM_EVCNT_INCR(&(qname)->qname##_ev_##evname)



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

2021-02-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 17 08:09:22 UTC 2021

Modified Files:
src/sys/arch/mips/include: profile.h

Log Message:
Use the register name and not its number in _PROF_CPLOAD.

"yes please!" from simon@


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/mips/include/profile.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/mips/include/profile.h
diff -u src/sys/arch/mips/include/profile.h:1.23 src/sys/arch/mips/include/profile.h:1.24
--- src/sys/arch/mips/include/profile.h:1.23	Tue Feb 16 06:06:58 2021
+++ src/sys/arch/mips/include/profile.h	Wed Feb 17 08:09:22 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.23 2021/02/16 06:06:58 simonb Exp $	*/
+/*	$NetBSD: profile.h,v 1.24 2021/02/17 08:09:22 skrll Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,7 +57,7 @@
 #ifdef _KERNEL
 # define _PROF_CPLOAD	""
 #else
-# define _PROF_CPLOAD	".cpload $25;"
+# define _PROF_CPLOAD	".cpload t9;"
 #endif