Re: CVS commit: src/lib/libc/gen

2021-02-17 Thread David Holland
On Wed, Feb 17, 2021 at 11:51:04PM +, David A. Holland wrote:
 > Also, Someone(TM) should check if POSIX permits this or if we ought to
 > improve the implementation.

Unsurprisingly, POSIX is silent. It just says "rewinddir shall also
cause the directory stream to refer to the current state of the
corresponding directory, as a call to opendir() would have done,"
basically the same text we had previously.

This could be read as _mandating_ reopening it, but that is almost
certainly not what they intended, so I think we're ok.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/opendir.html
https://pubs.opengroup.org/onlinepubs/9699919799/functions/rewinddir.html

-- 
David A. Holland
dholl...@netbsd.org


Re: POINTER_ALIGNED_P (was: Re: CVS commit: src/sys)

2021-02-17 Thread Christos Zoulas
In article <5912ca9e-b4e7-423d-a45d-f4693d1c9...@zoulas.com>,
Christos Zoulas   wrote:
>-=-=-=-=-=-

Here's the final changes

- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
  correct because it works with non-primitive types and provides the ABI
  alignment for the type the compiler will use.
- Remove all the *_HDR_ALIGNMENT macros and asserts
- Replace POINTER_ALIGNED_P with ACCESSIBLE_POINTER which is identical to
  ALIGNED_POINTER, but returns that the pointer is always aligned if the
  CPU supports unaligned accesses.

Index: sys/mbuf.h
===
RCS file: /cvsroot/src/sys/sys/mbuf.h,v
retrieving revision 1.231
diff -u -u -r1.231 mbuf.h
--- sys/mbuf.h  17 Feb 2021 22:32:04 -  1.231
+++ sys/mbuf.h  17 Feb 2021 23:54:31 -
@@ -843,15 +843,21 @@
m->m_pkthdr.rcvif_index = n->m_pkthdr.rcvif_index;
 }
 
+#define M_GET_ALIGNED_HDR(m, type, linkhdr) \
+m_get_aligned_hdr((m), __alignof(type) - 1, sizeof(type), (linkhdr))
+
 static __inline int
-m_get_aligned_hdr(struct mbuf **m, int align, size_t hlen, bool linkhdr)
+m_get_aligned_hdr(struct mbuf **m, int mask, size_t hlen, bool linkhdr)
 {
-   if (POINTER_ALIGNED_P(mtod(*m, void *), align) == 0) {
-   --align;// Turn into mask
+#ifndef __NO_STRICT_ALIGNMENT
+   if (((uintptr_t)mtod(*m, void *) & mask) != 0)
*m = m_copyup(*m, hlen, 
- linkhdr ? (max_linkhdr + align) & ~align : 0);
-   } else if (__predict_false((size_t)(*m)->m_len < hlen))
+ linkhdr ? (max_linkhdr + mask) & ~mask : 0);
+   else
+#endif
+   if (__predict_false((size_t)(*m)->m_len < hlen))
*m = m_pullup(*m, hlen);
+
return *m == NULL;
 }
 
Index: sys/param.h
===
RCS file: /cvsroot/src/sys/sys/param.h,v
retrieving revision 1.689
diff -u -u -r1.689 param.h
--- sys/param.h 17 Feb 2021 22:32:04 -  1.689
+++ sys/param.h 17 Feb 2021 23:54:31 -
@@ -281,16 +281,24 @@
 #defineALIGN(p)(((uintptr_t)(p) + ALIGNBYTES) & 
~ALIGNBYTES)
 #endif
 #ifndef ALIGNED_POINTER
-#defineALIGNED_POINTER(p,t)uintptr_t)(p)) & (sizeof(t) - 1)) 
== 0)
+#defineALIGNED_POINTER(p,t)uintptr_t)(p)) & (__alignof(t) - 
1)) == 0)
 #endif
 #ifndef ALIGNED_POINTER_LOAD
 #defineALIGNED_POINTER_LOAD(q,p,t) (*(q) = *((const t *)(p)))
 #endif
 
+/*
+ * Return if the pointer p is accessible for type t. For primitive types
+ * this means that the pointer itself can be dereferenced; for structures
+ * and unions this means that any field can be dereferenced. On CPUs
+ * that allow unaligned pointer access, we always return that the pointer
+ * is accessible to prevent unnecessary copies, although this might not be
+ * necessarily faster.
+ */
 #ifdef __NO_STRICT_ALIGNMENT
-#definePOINTER_ALIGNED_P(p, a) 1
+#defineACCESSIBLE_POINTER(p, t)1
 #else
-#definePOINTER_ALIGNED_P(p, a) (((uintptr_t)(p) & ((a) - 1)) 
== 0)
+#defineACCESSIBLE_POINTER(p, t)ALIGNED_POINTER(p, t)
 #endif
 
 /*
Index: net/if_arp.h
===
RCS file: /cvsroot/src/sys/net/if_arp.h,v
retrieving revision 1.42
diff -u -u -r1.42 if_arp.h
--- net/if_arp.h17 Feb 2021 22:32:04 -  1.42
+++ net/if_arp.h17 Feb 2021 23:54:31 -
@@ -72,8 +72,6 @@
uint8_t  ar_tpa[];  /* target protocol address */
 #endif
 };
-#defineARP_HDR_ALIGNMENT   __alignof(struct arphdr)
-__CTASSERT(ARP_HDR_ALIGNMENT == 2);
 
 static __inline uint8_t *
 ar_data(struct arphdr *ap)
Index: net/if_bridge.c
===
RCS file: /cvsroot/src/sys/net/if_bridge.c,v
retrieving revision 1.178
diff -u -u -r1.178 if_bridge.c
--- net/if_bridge.c 14 Feb 2021 20:58:34 -  1.178
+++ net/if_bridge.c 17 Feb 2021 23:54:31 -
@@ -2806,7 +2806,7 @@
if (*mp == NULL)
return -1;
 
-   if (m_get_aligned_hdr(, IP_HDR_ALIGNMENT, sizeof(*ip), true) != 0) {
+   if (M_GET_ALIGNED_HDR(, struct ip, true) != 0) {
/* XXXJRT new stat, please */
ip_statinc(IP_STAT_TOOSMALL);
goto bad;
@@ -2900,7 +2900,7 @@
 * it.  Otherwise, if it is aligned, make sure the entire base
 * IPv6 header is in the first mbuf of the chain.
 */
-   if (m_get_aligned_hdr(, IP6_HDR_ALIGNMENT, sizeof(*ip6), true) != 0) {
+   if (M_GET_ALIGNED_HDR(, struct ip6_hdr, true) != 0) {
struct ifnet *inifp = m_get_rcvif_NOMPSAFE(m);
/* XXXJRT new stat, please */
ip6_statinc(IP6_STAT_TOOSMALL);
Index: netinet/if_arp.c
===
RCS file: 

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: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.



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/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.



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.



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/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.



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/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.



Re: POINTER_ALIGNED_P (was: Re: CVS commit: src/sys)

2021-02-17 Thread Christos Zoulas


> On Feb 17, 2021, at 4:20 PM, Valery Ushakov  wrote:
> 
> On Wed, Feb 17, 2021 at 17:49:15 -, Christos Zoulas wrote:
> 
> This incrementally improves wrong things b/c you still have the "is
> aligned" and "ought to be aligned" conflated in one.

The incremental patch improves things and does not make things worse.
I will address the __NO_STRICT_ALIGNMENT issue separately. I am planning
to propose something in tech-kern once I have it working to my liking. This
patch helps me because it aligns the semantics of the two macros better.

christos


signature.asc
Description: Message signed with OpenPGP


Re: POINTER_ALIGNED_P (was: Re: CVS commit: src/sys)

2021-02-17 Thread Valery Ushakov
On Wed, Feb 17, 2021 at 17:49:15 -, Christos Zoulas wrote:

> In article ,
> Valery Ushakov   wrote:
> 
> >But to get back to my main point, PLEASE, can we stop making random
> >aimless changes without prior discussion?
> 
> Here's the change I'd like to make:
> - 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
> 
> This incrementally improves things.
[...]
> diff -u -p -u -r1.688 param.h
> --- sys/param.h   15 Feb 2021 19:46:53 -  1.688
> +++ sys/param.h   17 Feb 2021 17:45:55 -
> @@ -290,7 +290,7 @@
>  #ifdef __NO_STRICT_ALIGNMENT
>  #define  POINTER_ALIGNED_P(p, a) 1
>  #else
> -#define  POINTER_ALIGNED_P(p, a) (((uintptr_t)(p) & (a)) == 0)
> +#define  POINTER_ALIGNED_P(p, a) (((uintptr_t)(p) & ((a) - 1)) 
> == 0)
>  #endif
>  
>  /*

This incrementally improves wrong things b/c you still have the "is
aligned" and "ought to be aligned" conflated in one.


-uwe


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.



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;



Re: POINTER_ALIGNED_P (was: Re: CVS commit: src/sys)

2021-02-17 Thread Christos Zoulas
In article ,
Valery Ushakov   wrote:

>But to get back to my main point, PLEASE, can we stop making random
>aimless changes without prior discussion?

Here's the change I'd like to make:
- 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

This incrementally improves things.

christos

Index: net/if_arp.h
===
RCS file: /cvsroot/src/sys/net/if_arp.h,v
retrieving revision 1.41
diff -u -p -u -r1.41 if_arp.h
--- net/if_arp.h16 Feb 2021 10:20:56 -  1.41
+++ net/if_arp.h17 Feb 2021 17:45:55 -
@@ -72,7 +72,8 @@ structarphdr {
uint8_t  ar_tpa[];  /* target protocol address */
 #endif
 };
-#defineARP_HDR_ALIGNMENT   1
+#defineARP_HDR_ALIGNMENT   __alignof(struct arphdr)
+__CTASSERT(ARP_HDR_ALIGNMENT == 2);
 
 static __inline uint8_t *
 ar_data(struct arphdr *ap)
Index: netinet/icmp_private.h
===
RCS file: /cvsroot/src/sys/netinet/icmp_private.h,v
retrieving revision 1.4
diff -u -p -u -r1.4 icmp_private.h
--- netinet/icmp_private.h  14 Feb 2021 20:58:35 -  1.4
+++ netinet/icmp_private.h  17 Feb 2021 17:45:55 -
@@ -44,7 +44,6 @@ extern percpu_t *icmpstat_percpu;
 
 #defineICMP_STATINC(x) _NET_STATINC(icmpstat_percpu, x)
 
-#defineICMP_HDR_ALIGNMENT  3
 #endif /* _KERNEL_ */
 
 #endif /* !_NETINET_ICMP_PRIVATE_H_ */
Index: netinet/igmp_var.h
===
RCS file: /cvsroot/src/sys/netinet/igmp_var.h,v
retrieving revision 1.26
diff -u -p -u -r1.26 igmp_var.h
--- netinet/igmp_var.h  14 Feb 2021 20:58:35 -  1.26
+++ netinet/igmp_var.h  17 Feb 2021 17:45:55 -
@@ -105,8 +105,6 @@
  */
 #defineIGMP_RANDOM_DELAY(X)(cprng_fast32() % (X) + 1)
 
-#defineIGMP_HDR_ALIGNMENT  3
-
 void   igmp_init(void);
 void   igmp_input(struct mbuf *, int, int);
 intigmp_joingroup(struct in_multi *);
Index: netinet/ip_private.h
===
RCS file: /cvsroot/src/sys/netinet/ip_private.h,v
retrieving revision 1.4
diff -u -p -u -r1.4 ip_private.h
--- netinet/ip_private.h14 Feb 2021 20:58:35 -  1.4
+++ netinet/ip_private.h17 Feb 2021 17:45:55 -
@@ -43,7 +43,8 @@ externpercpu_t *ipstat_percpu;
 #defineIP_STATINC(x)   _NET_STATINC(ipstat_percpu, x)
 #defineIP_STATDEC(x)   _NET_STATDEC(ipstat_percpu, x)
 
-#defineIP_HDR_ALIGNMENT3
+#defineIP_HDR_ALIGNMENT__alignof(struct ip)
+__CTASSERT(IP_HDR_ALIGNMENT == 4);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_IP_PRIVATE_H_ */
Index: netinet/tcp_private.h
===
RCS file: /cvsroot/src/sys/netinet/tcp_private.h,v
retrieving revision 1.4
diff -u -p -u -r1.4 tcp_private.h
--- netinet/tcp_private.h   14 Feb 2021 20:58:35 -  1.4
+++ netinet/tcp_private.h   17 Feb 2021 17:45:55 -
@@ -43,7 +43,8 @@ externpercpu_t *tcpstat_percpu;
 #defineTCP_STATINC(x)  _NET_STATINC(tcpstat_percpu, x)
 #defineTCP_STATADD(x, v)   _NET_STATADD(tcpstat_percpu, x, v)
 
-#defineTCP_HDR_ALIGNMENT   3
+#defineTCP_HDR_ALIGNMENT   __alignof(struct tcphdr)
+__CTASSERT(TCP_HDR_ALIGNMENT == 4);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_TCP_PRIVATE_H_ */
Index: netinet/udp_private.h
===
RCS file: /cvsroot/src/sys/netinet/udp_private.h,v
retrieving revision 1.4
diff -u -p -u -r1.4 udp_private.h
--- netinet/udp_private.h   14 Feb 2021 20:58:35 -  1.4
+++ netinet/udp_private.h   17 Feb 2021 17:45:55 -
@@ -39,7 +39,8 @@ externpercpu_t *udpstat_percpu;
 
 #defineUDP_STATINC(x)  _NET_STATINC(udpstat_percpu, x)
 
-#defineUDP_HDR_ALIGNMENT   3
+#defineUDP_HDR_ALIGNMENT   __alignof(struct udphdr)
+__CTASSERT(UDP_HDR_ALIGNMENT == 2);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_UDP_PRIVATE_H_ */
Index: netinet6/ip6_private.h
===
RCS file: /cvsroot/src/sys/netinet6/ip6_private.h,v
retrieving revision 1.4
diff -u -p -u -r1.4 ip6_private.h
--- netinet6/ip6_private.h  14 Feb 2021 20:58:35 -  1.4
+++ netinet6/ip6_private.h  17 Feb 2021 17:45:55 -
@@ -43,7 +43,8 @@ externpercpu_t *ip6stat_percpu;
 #defineIP6_STATINC(x)  _NET_STATINC(ip6stat_percpu, x)
 #defineIP6_STATDEC(x)  _NET_STATDEC(ip6stat_percpu, x)
 
-#defineIP6_HDR_ALIGNMENT   3
+#defineIP6_HDR_ALIGNMENT   __alignof(struct ip6_hdr)
+__CTASSERT(IP6_HDR_ALIGNMENT == 4);

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.



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/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.



Re: CVS commit: src/sys

2021-02-17 Thread J. Hannken-Illjes
Jared,

please test if the attached diff is sufficient.

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig



uvm_swap.c.diff
Description: Binary data

> On 17. Feb 2021, at 13:07, Jared McNeill  wrote:
> 
> I noticed this on reboot since this change:
> 
> [ 3636.2891122] turning off swap...stopping swap on /swap failed with error 16
> [ 3636.2991109] stopping swap on /swap2 failed with error 16
> 
> Can you have a look?
> 
> Thanks!
> Jared
> 
> 
> On Tue, 16 Feb 2021, Juergen Hannken-Illjes wrote:
> 
>> Module Name: src
>> Committed By:hannken
>> Date:Tue Feb 16 09:56:32 UTC 2021
>> 
>> Modified Files:
>>  src/sys/kern: vfs_mount.c
>>  src/sys/uvm: uvm_swap.c
>> 
>> Log Message:
>> Reorganize uvm_swap_shutdown() a bit, make sure the vnode gets
>> locked and referenced across the call to swap_off() and finally
>> use it from vfs_unmountall1() to remove swap after unmounting
>> the last file system.
>> 
>> Adresses PR kern/54969 (Disk cache is no longer flushed on shutdown)
>> 
>> 
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.85 -r1.86 src/sys/kern/vfs_mount.c
>> cvs rdiff -u -r1.200 -r1.201 src/sys/uvm/uvm_swap.c
>> 
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>> 
>> 



signature.asc
Description: Message signed with OpenPGP


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: 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.



Re: CVS commit: src/sys

2021-02-17 Thread Jared McNeill

I noticed this on reboot since this change:

 [ 3636.2891122] turning off swap...stopping swap on /swap failed with error 16
 [ 3636.2991109] stopping swap on /swap2 failed with error 16

Can you have a look?

Thanks!
Jared


On Tue, 16 Feb 2021, Juergen Hannken-Illjes wrote:


Module Name:src
Committed By:   hannken
Date:   Tue Feb 16 09:56:32 UTC 2021

Modified Files:
src/sys/kern: vfs_mount.c
src/sys/uvm: uvm_swap.c

Log Message:
Reorganize uvm_swap_shutdown() a bit, make sure the vnode gets
locked and referenced across the call to swap_off() and finally
use it from vfs_unmountall1() to remove swap after unmounting
the last file system.

Adresses PR kern/54969 (Disk cache is no longer flushed on shutdown)


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.200 -r1.201 src/sys/uvm/uvm_swap.c

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




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/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.



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-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.



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/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.



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-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.



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-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-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-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.



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: [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.



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.



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: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.



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/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.



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

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.



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/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.



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
 
 



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.