re: CVS commit: src/lib/libc/stdlib

2023-10-13 Thread matthew green
> Minor changes to jemalloc100 (the old one that only vax etc currently uses).

thanks.

i'm still using this version on a bunch of modern machines.

new jemalloc was problematic for a few things for me a
number of years ago and i keep meaning to test again, but
for now i'm still mostly using this version everwhere.

FYI.


.mrg.


CVS commit: src/sys/arch/amiga/dev

2023-10-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct 13 22:20:46 UTC 2023

Modified Files:
src/sys/arch/amiga/dev: fd.c

Log Message:
s/fdstartegy/fdstrategy/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/amiga/dev/fd.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/amiga/dev/fd.c
diff -u src/sys/arch/amiga/dev/fd.c:1.102 src/sys/arch/amiga/dev/fd.c:1.103
--- src/sys/arch/amiga/dev/fd.c:1.102	Sat Aug 26 21:20:48 2023
+++ src/sys/arch/amiga/dev/fd.c	Fri Oct 13 22:20:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.102 2023/08/26 21:20:48 andvar Exp $ */
+/*	$NetBSD: fd.c,v 1.103 2023/10/13 22:20:46 andvar Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.102 2023/08/26 21:20:48 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.103 2023/10/13 22:20:46 andvar Exp $");
 
 #include 
 #include 
@@ -1182,7 +1182,7 @@ fdstart(struct fd_softc *sc)
 #endif
 
 	/*
-	 * if DMA'ing just return. we must have been called from fdstartegy.
+	 * if DMA'ing just return. we must have been called from fdstrategy.
 	 */
 	if (fdc_indma)
 		return;



CVS commit: src/sys/arch/amiga/dev

2023-10-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct 13 22:20:46 UTC 2023

Modified Files:
src/sys/arch/amiga/dev: fd.c

Log Message:
s/fdstartegy/fdstrategy/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/amiga/dev/fd.c

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



CVS commit: src/lib/libc/stdlib

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 20:57:30 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Convert to use Matt Thomas's rbtree, which the env code probably already
pulls into libc.  amd64 object size before and after:

   textdata bss dec hex filename
  21001  88 365   2145453ce jemalloc.po
  14991 184 429   156043cf4 jemalloc.po

libmicro on AMD Athlon Silver 3050e comparing this and the revision before
previous (i.e. the old code, versus arena changes + rbtree changes):

exit_10_nolibc  135.168300  128.07790[   +5.5%]
fork_100180.539040  149.63721[  +20.7%]
fork_1000   200.421650  167.09660[  +19.9%]
mallocT2_10 0.1329200.13317[   -0.2%]
mallocT2_1000.1363500.13635[   +0.0%]
mallocT2_100k   0.2586900.26641[   -3.0%]
mallocT2_10k0.2233400.22733[   -1.8%]
mallocT2_1k 0.1371700.14254[   -3.9%]
malloc_10   0.1005400.10849[   -7.9%]
malloc_100  0.1072900.10753[   -0.2%]
malloc_100k 0.1935600.19355[   +0.0%]
malloc_10k  0.1732500.17454[   -0.7%]
malloc_1k   0.1134900.11335[   +0.1%]


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libc/stdlib/jemalloc.c

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/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.57 src/lib/libc/stdlib/jemalloc.c:1.58
--- src/lib/libc/stdlib/jemalloc.c:1.57	Fri Oct 13 19:30:28 2023
+++ src/lib/libc/stdlib/jemalloc.c	Fri Oct 13 20:57:30 2023
@@ -1,7 +1,8 @@
-/*	$NetBSD: jemalloc.c,v 1.57 2023/10/13 19:30:28 ad Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.58 2023/10/13 20:57:30 ad Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans .
+ * Copyright (C) 2023 Andrew Doran .
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -110,7 +111,7 @@
 
 #include 
 /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */
-__RCSID("$NetBSD: jemalloc.c,v 1.57 2023/10/13 19:30:28 ad Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.58 2023/10/13 20:57:30 ad Exp $");
 
 #include "namespace.h"
 #include 
@@ -118,7 +119,7 @@ __RCSID("$NetBSD: jemalloc.c,v 1.57 2023
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include  /* Must come after several other sys/ includes. */
 
@@ -161,6 +162,27 @@ __RCSID("$NetBSD: jemalloc.c,v 1.57 2023
 #  define inline
 #endif
 
+/*
+ * Compare two pointers of 64/32 bit width and produce a ternary 32-bit
+ * indicator without using conditionals that maintains the expected
+ * ordering: [negative, equal, positive].
+ *
+ * XXX it depends on twos complement arithemetic.
+ * XXX maybe should be a built-in for rbtree?
+ */
+static inline int
+ptrcmp(const void *pa, const void *pb)
+{
+#ifdef _LP64
+	const intptr_t a = (intptr_t)pa, b = (intptr_t)pb;
+	const intptr_t diff = a - b;
+	assert(((a | b) & 1) == 0);
+	return (int)(diff >> 32) | ((int)diff >> 1);
+#else
+	return (intptr_t)a - (intptr_t)b;
+#endif
+}
+
 /* Size of stack-allocated buffer passed to strerror_r(). */
 #define	STRERROR_BUF		64
 
@@ -412,7 +434,7 @@ struct chunk_stats_s {
 typedef struct chunk_node_s chunk_node_t;
 struct chunk_node_s {
 	/* Linkage for the chunk tree. */
-	RB_ENTRY(chunk_node_s) link;
+	rb_node_t link;
 
 	/*
 	 * Pointer to the chunk that this tree node is responsible for.  In some
@@ -426,7 +448,14 @@ struct chunk_node_s {
 	size_t	size;
 };
 typedef struct chunk_tree_s chunk_tree_t;
-RB_HEAD(chunk_tree_s, chunk_node_s);
+
+static int chunk_comp(void *, const void *, const void *);
+
+static const rb_tree_ops_t chunk_tree_ops = {
+	.rbto_compare_nodes = chunk_comp,
+	.rbto_compare_key = chunk_comp,
+	.rbto_node_offset = offsetof(struct chunk_node_s, link),
+};
 
 /**/
 /*
@@ -455,12 +484,12 @@ struct arena_chunk_map_s {
 /* Arena chunk header. */
 typedef struct arena_chunk_s arena_chunk_t;
 struct arena_chunk_s {
+	/* Linkage for the arena's chunk tree. */
+	rb_node_t link;
+
 	/* Arena that owns the chunk. */
 	arena_t *arena;
 
-	/* Linkage for the arena's chunk tree. */
-	RB_ENTRY(arena_chunk_s) link;
-
 	/*
 	 * Number of pages in use.  This is maintained in order to make
 	 * detection of empty chunks fast.
@@ -490,12 +519,19 @@ struct arena_chunk_s {
 	arena_chunk_map_t map[1]; /* Dynamically sized. */
 };
 typedef struct arena_chunk_tree_s arena_chunk_tree_t;
-RB_HEAD(arena_chunk_tree_s, arena_chunk_s);
+
+static int arena_chunk_comp(void *, const void *, const void *);
+
+static const rb_tree_ops_t arena_chunk_tree_ops = {
+	.rbto_compare_nodes = arena_chunk_comp,

CVS commit: src/lib/libc/stdlib

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 20:57:30 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Convert to use Matt Thomas's rbtree, which the env code probably already
pulls into libc.  amd64 object size before and after:

   textdata bss dec hex filename
  21001  88 365   2145453ce jemalloc.po
  14991 184 429   156043cf4 jemalloc.po

libmicro on AMD Athlon Silver 3050e comparing this and the revision before
previous (i.e. the old code, versus arena changes + rbtree changes):

exit_10_nolibc  135.168300  128.07790[   +5.5%]
fork_100180.539040  149.63721[  +20.7%]
fork_1000   200.421650  167.09660[  +19.9%]
mallocT2_10 0.1329200.13317[   -0.2%]
mallocT2_1000.1363500.13635[   +0.0%]
mallocT2_100k   0.2586900.26641[   -3.0%]
mallocT2_10k0.2233400.22733[   -1.8%]
mallocT2_1k 0.1371700.14254[   -3.9%]
malloc_10   0.1005400.10849[   -7.9%]
malloc_100  0.1072900.10753[   -0.2%]
malloc_100k 0.1935600.19355[   +0.0%]
malloc_10k  0.1732500.17454[   -0.7%]
malloc_1k   0.1134900.11335[   +0.1%]


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libc/stdlib/jemalloc.c

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



CVS commit: src/lib/libc/stdlib

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 19:30:28 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Minor changes to jemalloc100 (the old one that only vax etc currently uses).

- Don't use TLS nor pretend to hash out arenas to reduce lock contention,
  because NetBSD uses thr_curcpu() to choose arena (i.e. per-CPU arenas).

- In a single threaded process, don't prepare "ncpus" worth of arenas,
  allocate only one.

- Use getpagesize() since it caches the return.

- Sprinkle branch hints.

- Make MALLOC_TRACE and MALLOC_DEBUG work again.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libc/stdlib/jemalloc.c

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/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.56 src/lib/libc/stdlib/jemalloc.c:1.57
--- src/lib/libc/stdlib/jemalloc.c:1.56	Sun May  7 12:41:47 2023
+++ src/lib/libc/stdlib/jemalloc.c	Fri Oct 13 19:30:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: jemalloc.c,v 1.56 2023/05/07 12:41:47 skrll Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.57 2023/10/13 19:30:28 ad Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans .
@@ -97,13 +97,6 @@
 
 /* LINTLIBRARY */
 
-#ifdef __NetBSD__
-#  define xutrace(a, b)		utrace("malloc", (a), (b))
-#  define __DECONST(x, y)	((x)__UNCONST(y))
-#else
-#  define xutrace(a, b)		utrace((a), (b))
-#endif	/* __NetBSD__ */
-
 /*
  * MALLOC_PRODUCTION disables assertions and statistics gathering.  It also
  * defaults the A and J runtime options to off.  These settings are appropriate
@@ -117,21 +110,11 @@
 
 #include 
 /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */
-__RCSID("$NetBSD: jemalloc.c,v 1.56 2023/05/07 12:41:47 skrll Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.57 2023/10/13 19:30:28 ad Exp $");
 
-#ifdef __FreeBSD__
-#include "libc_private.h"
-#ifdef MALLOC_DEBUG
-#  define _LOCK_DEBUG
-#endif
-#include "spinlock.h"
-#endif
 #include "namespace.h"
 #include 
 #include 
-#ifdef __FreeBSD__
-#include 
-#endif
 #include 
 #include 
 #include 
@@ -139,12 +122,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #include 
 #include  /* Must come after several other sys/ includes. */
 
-#ifdef __FreeBSD__
-#include 
-#include 
-#include 
-#endif
-
 #include 
 #include 
 #include 
@@ -158,17 +135,10 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #include 
 #include 
 
-#ifdef __NetBSD__
-#  include 
-#  include "extern.h"
+#include 
+#include "extern.h"
 
 #define STRERROR_R(a, b, c)	strerror_r_ss(a, b, c);
-#endif
-
-#ifdef __FreeBSD__
-#define STRERROR_R(a, b, c)	strerror_r(a, b, c);
-#include "un-namespace.h"
-#endif
 
 /* MALLOC_STATS enables statistics calculation. */
 #ifndef MALLOC_PRODUCTION
@@ -260,7 +230,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #  define QUANTUM_2POW_MIN	4
 #  define SIZEOF_PTR_2POW	2
 #  define USE_BRK
-#  define NO_TLS
 #endif
 #ifdef __sh__
 #  define QUANTUM_2POW_MIN	4
@@ -271,9 +240,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #  define QUANTUM_2POW_MIN	4
 #  define SIZEOF_PTR_2POW	2
 #  define USE_BRK
-#  ifdef __mc68010__
-#define NO_TLS
-#  endif
 #endif
 #if defined(__mips__)
 #  ifdef _LP64
@@ -284,9 +250,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #  endif
 #  define QUANTUM_2POW_MIN	4
 #  define USE_BRK
-#  if defined(__mips__)
-#define NO_TLS
-#  endif
 #endif
 #if defined(__riscv__)
 #  ifdef _LP64
@@ -297,7 +260,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 #  endif
 #  define QUANTUM_2POW_MIN	4
 #  define USE_BRK
-#  define NO_TLS
 #endif
 #ifdef __hppa__
 #  define QUANTUM_2POW_MIN	4
@@ -367,21 +329,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.56 2023
 
 /**/
 
-#ifdef __FreeBSD__
-/*
- * Mutexes based on spinlocks.  We can't use normal pthread mutexes, because
- * they require malloc()ed memory.
- */
-typedef struct {
-	spinlock_t	lock;
-} malloc_mutex_t;
-
-/* Set to true once the allocator has been initialized. */
-static bool malloc_initialized = false;
-
-/* Used to avoid initialization races. */
-static malloc_mutex_t init_lock = {_SPINLOCK_INITIALIZER};
-#else
 #define	malloc_mutex_t	mutex_t
 
 /* Set to true once the allocator has been initialized. */
@@ -391,7 +338,6 @@ static bool malloc_initialized = false;
 /* Used to avoid initialization races. */
 static mutex_t init_lock = MUTEX_INITIALIZER;
 #endif
-#endif
 
 /**/
 /*
@@ -774,71 +720,10 @@ static size_t		base_mapped;
  * arenas array are necessarily used; arenas are created lazily as needed.
  */
 static arena_t		**arenas;
-static unsigned		narenas;
-static unsigned		next_arena;
 #ifdef _REENTRANT
 static malloc_mutex_t	arenas_mtx; /* Protects arenas initialization. */
 #endif
 
-/*
- * Map of pthread_self() --> arenas[???], used for 

CVS commit: src/lib/libc/stdlib

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 19:30:28 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Minor changes to jemalloc100 (the old one that only vax etc currently uses).

- Don't use TLS nor pretend to hash out arenas to reduce lock contention,
  because NetBSD uses thr_curcpu() to choose arena (i.e. per-CPU arenas).

- In a single threaded process, don't prepare "ncpus" worth of arenas,
  allocate only one.

- Use getpagesize() since it caches the return.

- Sprinkle branch hints.

- Make MALLOC_TRACE and MALLOC_DEBUG work again.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/libc/stdlib/jemalloc.c

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



CVS commit: src

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 19:07:09 UTC 2023

Modified Files:
src/sys/ddb: db_command.c db_interface.h db_xxx.c
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h
src/usr.bin/fstat: fstat.c

Log Message:
Simplify/streamline pipes a little bit:

- Allocate only one struct pipe not two (no need to be bidirectional here).
- Then use f_flag (FREAD/FWRITE) to figure out what to do in the fileops.
- Never wake the other side or acquire long-term (I/O) lock unless needed.
- Whenever possible, defer wakeups until after locks have been released.
- Do some things locklessly in pipe_ioctl() and pipe_poll().

Some notable results:

- -30% latency on a 486DX2/66 doing 1 byte ping-pong within a single process.
- 2.5x less lock contention during "make cleandir" of src on a 48 CPU machine.
- 1.5x bandwith with 1kB messages on the same 48 CPU machine (8kB: same b/w).


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/ddb/db_command.c
cvs rdiff -u -r1.41 -r1.42 src/sys/ddb/db_interface.h
cvs rdiff -u -r1.77 -r1.78 src/sys/ddb/db_xxx.c
cvs rdiff -u -r1.164 -r1.165 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/pipe.h
cvs rdiff -u -r1.118 -r1.119 src/usr.bin/fstat/fstat.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/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.186 src/sys/ddb/db_command.c:1.187
--- src/sys/ddb/db_command.c:1.186	Sat Oct  7 20:27:20 2023
+++ src/sys/ddb/db_command.c	Fri Oct 13 19:07:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.186 2023/10/07 20:27:20 ad Exp $	*/
+/*	$NetBSD: db_command.c,v 1.187 2023/10/13 19:07:08 ad Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009, 2019
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.186 2023/10/07 20:27:20 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.187 2023/10/13 19:07:08 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -301,6 +301,8 @@ static const struct db_command db_show_c
 	0 ,"List all used memory pages.",NULL,NULL) },
 	{ DDB_ADD_CMD("panic",	db_show_panic,	0,
 	"Print the current panic string",NULL,NULL) },
+	{ DDB_ADD_CMD("pipe", db_show_pipe,
+	0 ,"Show the contents of a pipe.",NULL,NULL) },
 	{ DDB_ADD_CMD("pool",	db_pool_print_cmd,	0,
 	"Print the pool at address.", "[/clp] address",NULL) },
 	/* added from all sub cmds */

Index: src/sys/ddb/db_interface.h
diff -u src/sys/ddb/db_interface.h:1.41 src/sys/ddb/db_interface.h:1.42
--- src/sys/ddb/db_interface.h:1.41	Sat Oct  7 20:27:20 2023
+++ src/sys/ddb/db_interface.h	Fri Oct 13 19:07:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.h,v 1.41 2023/10/07 20:27:20 ad Exp $	*/
+/*	$NetBSD: db_interface.h,v 1.42 2023/10/13 19:07:08 ad Exp $	*/
 
 /*-
  * Copyright (c) 1995, 2023 The NetBSD Foundation, Inc.
@@ -86,6 +86,9 @@ void		db_show_sleepq(db_expr_t, bool, db
 /* kern/kern_condvar.c */
 void		db_show_condvar(db_expr_t, bool, db_expr_t, const char *);
 
+/* kern/sys_pipe.c */
+void		db_show_pipe(db_expr_t, bool, db_expr_t, const char *);
+
 /* kern/sys_select.c */
 void		db_show_selinfo(db_expr_t, bool, db_expr_t, const char *);
 

Index: src/sys/ddb/db_xxx.c
diff -u src/sys/ddb/db_xxx.c:1.77 src/sys/ddb/db_xxx.c:1.78
--- src/sys/ddb/db_xxx.c:1.77	Sun Oct  8 15:03:16 2023
+++ src/sys/ddb/db_xxx.c	Fri Oct 13 19:07:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_xxx.c,v 1.77 2023/10/08 15:03:16 martin Exp $	*/
+/*	$NetBSD: db_xxx.c,v 1.78 2023/10/13 19:07:08 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.77 2023/10/08 15:03:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.78 2023/10/13 19:07:08 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kgdb.h"
@@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -366,6 +367,51 @@ db_show_sleepq(db_expr_t addr, bool hadd
 }
 
 void
+db_show_pipe(db_expr_t addr, bool haddr, db_expr_t count, const char *modif)
+{
+	struct pipe pipe, *ppipe = (struct pipe *)addr;
+
+	db_read_bytes(addr, sizeof(pipe), (char *));
+
+	db_printf("pipe_lock\t\t%p\n", pipe.pipe_lock);
+
+	db_printf("pipe_read\t\t");
+	db_show_condvar((db_addr_t)>pipe_read, false, 0, modif);
+
+	db_printf("pipe_write\t\t");
+	db_show_condvar((db_addr_t)>pipe_write, false, 0, modif);
+
+	db_printf("pipe_busy\t\t");
+	db_show_condvar((db_addr_t)>pipe_busy, false, 0, modif);
+
+	db_printf("pipe_buffer.cnt\t\t%ld\n", (long)pipe.pipe_buffer.cnt);
+	db_printf("pipe_buffer.in\t\t%d\n", pipe.pipe_buffer.in);
+	db_printf("pipe_buffer.out\t\t%d\n", pipe.pipe_buffer.out);
+	db_printf("pipe_buffer.size\t%ld\n", (long)pipe.pipe_buffer.size);
+	db_printf("pipe_buffer.buffer\t%p\n", pipe.pipe_buffer.buffer);
+
+	db_printf("pipe_wrsel\t\t");
+	

CVS commit: src

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 19:07:09 UTC 2023

Modified Files:
src/sys/ddb: db_command.c db_interface.h db_xxx.c
src/sys/kern: sys_pipe.c
src/sys/sys: pipe.h
src/usr.bin/fstat: fstat.c

Log Message:
Simplify/streamline pipes a little bit:

- Allocate only one struct pipe not two (no need to be bidirectional here).
- Then use f_flag (FREAD/FWRITE) to figure out what to do in the fileops.
- Never wake the other side or acquire long-term (I/O) lock unless needed.
- Whenever possible, defer wakeups until after locks have been released.
- Do some things locklessly in pipe_ioctl() and pipe_poll().

Some notable results:

- -30% latency on a 486DX2/66 doing 1 byte ping-pong within a single process.
- 2.5x less lock contention during "make cleandir" of src on a 48 CPU machine.
- 1.5x bandwith with 1kB messages on the same 48 CPU machine (8kB: same b/w).


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/ddb/db_command.c
cvs rdiff -u -r1.41 -r1.42 src/sys/ddb/db_interface.h
cvs rdiff -u -r1.77 -r1.78 src/sys/ddb/db_xxx.c
cvs rdiff -u -r1.164 -r1.165 src/sys/kern/sys_pipe.c
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/pipe.h
cvs rdiff -u -r1.118 -r1.119 src/usr.bin/fstat/fstat.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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:59:15 UTC 2023

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

Log Message:
Tickets #1911 - #1913


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.202 -r1.1.2.203 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.202 src/doc/CHANGES-8.3:1.1.2.203
--- src/doc/CHANGES-8.3:1.1.2.202	Sun Oct  8 15:33:07 2023
+++ src/doc/CHANGES-8.3	Fri Oct 13 18:59:15 2023
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-8.3,v 1.1.2.202 2023/10/08 15:33:07 martin Exp $
+$NetBSD: CHANGES-8.3,v 1.1.2.203 2023/10/13 18:59:15 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -3984,3 +3984,42 @@ sys/dev/pci/if_wm.c1.785-1.789
 	- Modify some event counters' descriptions to clarify meaning.
 	[msaitoh, ticket #1910]
 
+sys/dev/pci/pcidevs1.1496
+sys/dev/pci/ahcisata_pci.c			1.71
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	ahcisata(4): add support for ASMEDIA 0x0624
+	(ASM1062 + JMB575 Port Multiplier)
+	[abs, ticket #1911]
+
+sys/dev/pci/ixgbe/if_bypass.c		1.10
+sys/dev/pci/ixgbe/if_fdir.c		1.6 via patch
+sys/dev/pci/ixgbe/if_sriov.c		1.18 via patch
+sys/dev/pci/ixgbe/ix_txrx.c		1.102 via patch
+sys/dev/pci/ixgbe/ixgbe.c		1.333,1.339 via patch
+sys/dev/pci/ixgbe/ixgbe.h		1.89
+sys/dev/pci/ixgbe/ixgbe_api.h		1.17
+sys/dev/pci/ixgbe/ixgbe_common.h	1.17
+sys/dev/pci/ixgbe/ixgbe_bypass.h	1.4
+sys/dev/pci/ixgbe/ixgbe_common.c	1.45
+sys/dev/pci/ixgbe/ixgbe_fdir.h		1.5
+sys/dev/pci/ixgbe/ixgbe_netmap.h	1.3
+sys/dev/pci/ixgbe/ixgbe_netmap.c	1.6
+sys/dev/pci/ixgbe/ixgbe_osdep.c		1.9 via patch
+sys/dev/pci/ixgbe/ixgbe_sriov.h		1.6
+sys/dev/pci/ixgbe/ixgbe_type.h		1.58
+sys/dev/pci/ixgbe/ixgbe_x550.c		1.27
+sys/dev/pci/ixgbe/ixv.c			1.186 via patch
+
+	ixg(4): Rename some definitions, modify comment. No functional change.
+	[msaitoh, ticket #1912]
+
+sys/dev/pci/pcidevs1.1493,1.1495
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add Intel 82599 LS.
+	Add Pericom(Diodes) PCIe switches.
+	[msaitoh, ticket #1913]
+



Re: CVS commit: src/sys

2023-10-13 Thread Andrew Doran
On Thu, Oct 12, 2023 at 11:55:46AM +0200, J. Hannken-Illjes wrote:
> > On 10. Oct 2023, at 20:58, Andrew Doran  wrote:
> > 
> > On Tue, Oct 10, 2023 at 06:00:57PM +0200, J. Hannken-Illjes wrote:
> > 
> >>> cvs rdiff -u -r1.63 -r1.64 src/sys/kern/sys_select.c
> >> 
> >> -sleepq_unsleep(l, false);
> >> +sleepq_remove(l->l_sleepq, l, true);
> >>}
> >>   }
> >>   mutex_spin_exit(lock);
> >> 
> >> Looks like sleepq_remove() unlocks l->l_mutex == lock and
> >> then mutex_spin_exit(lock) will unlock an unlocked mutex.
> > 
> > lock is held before the call to sleepq_remove() and this is also true at the
> > time: l->l_mutex == lock.
> > 
> > After the call lock is still held, but now l->l_mutex != lock, because l has
> > changed state (e.g LSSLEEP -> LSRUN) which causes l_mutex to change in
> > concert.  There is a rough overview here:
> > 
> > https://nxr.netbsd.org/xref/src/sys/kern/kern_lwp.c#156
> > 
> > Did you encounter a problem?
> 
> This is not true for RUMP.  Hero you added sleepq_remove() as
> "sleepq_unsleep(l, true)".  This will unlock l_mutex without changing.
> 
> Just poking around and using sleepq_unsleep(l, false) here makes the
> NFS tests using rump_server pass.

Ah, now I see, thank you.  I committed a fix and will do a test run once my
build completes.

Cheers,
Andrew


CVS commit: [netbsd-10] src/doc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:57:25 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #403 - #407


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.137 -r1.1.2.138 src/doc/CHANGES-10.0

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-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.137 src/doc/CHANGES-10.0:1.1.2.138
--- src/doc/CHANGES-10.0:1.1.2.137	Tue Oct 10 18:54:07 2023
+++ src/doc/CHANGES-10.0	Fri Oct 13 18:57:25 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.137 2023/10/10 18:54:07 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.138 2023/10/13 18:57:25 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -12359,3 +12359,69 @@ tests/lib/libcurses/check_files/waddstr2
 	applications (like sysinst).
 	[kim, ticket #402]
 
+sys/dev/pci/pcidevs1.1496
+sys/dev/pci/ahcisata_pci.c			1.71
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	ahcisata(4): add support for ASMEDIA 0x0624
+	(ASM1062 + JMB575 Port Multiplier)
+	[abs, ticket #403]
+
+etc/defaults/rc.conf1.167
+etc/rc.d/npf	1.8
+
+	Add support for npf_rules to rc.conf.
+	[abs, ticket #404]
+
+sys/dev/pci/ixgbe/if_bypass.c			1.10
+sys/dev/pci/ixgbe/if_fdir.c			1.6
+sys/dev/pci/ixgbe/if_sriov.c			1.18
+sys/dev/pci/ixgbe/ix_txrx.c			1.102
+sys/dev/pci/ixgbe/ixgbe.c			1.333,1.339
+sys/dev/pci/ixgbe/ixgbe.h			1.89
+sys/dev/pci/ixgbe/ixgbe_api.h			1.17
+sys/dev/pci/ixgbe/ixgbe_bypass.h		1.4
+sys/dev/pci/ixgbe/ixgbe_common.c		1.45
+sys/dev/pci/ixgbe/ixgbe_common.h		1.17
+sys/dev/pci/ixgbe/ixgbe_fdir.h			1.5
+sys/dev/pci/ixgbe/ixgbe_netmap.c		1.6
+sys/dev/pci/ixgbe/ixgbe_netmap.h		1.3
+sys/dev/pci/ixgbe/ixgbe_osdep.c			1.9
+sys/dev/pci/ixgbe/ixgbe_sriov.h			1.6
+sys/dev/pci/ixgbe/ixgbe_type.h			1.58
+sys/dev/pci/ixgbe/ixgbe_x550.c			1.27
+sys/dev/pci/ixgbe/ixv.c1.186
+
+	ixg(4): Rename some definitions, modify comment. No functional change.
+	[msaitoh, ticket #405]
+
+sys/dev/pci/pcidevs1.1493,1.1495
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add Intel 82599 LS.
+	Add Pericom(Diodes) PCIe switches.
+	[msaitoh, ticket #406]
+
+sys/dev/pci/ixgbe/ix_txrx.c			1.103
+sys/dev/pci/ixgbe/ixgbe.c			1.334-1.338
+sys/dev/pci/ixgbe/ixgbe.h			1.90-1.92
+sys/dev/pci/ixgbe/ixgbe_82599.c			1.31,1.32
+sys/dev/pci/ixgbe/ixgbe_api.c			1.29
+sys/dev/pci/ixgbe/ixgbe_bypass.h		1.5
+sys/dev/pci/ixgbe/ixgbe_common.c		1.46,1.47
+sys/dev/pci/ixgbe/ixgbe_common.h		1.18
+sys/dev/pci/ixgbe/ixgbe_dcb.c			1.14,1.15
+sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.13
+sys/dev/pci/ixgbe/ixgbe_type.h			1.59,1.60
+sys/dev/pci/ixgbe/ixgbe_x540.c			1.24,1.28
+sys/dev/pci/ixgbe/ixv.c1.187-1.189
+
+- Add 82599 LS support once again.
+- Filter out spurious link up indication more.
+- Modify error message of wrong TX/RX descriptor size.
+- Enable interrupt after setting IFF_RUNNING.
+- Cleanup the code.
+	[msaitoh, ticket #407]
+



CVS commit: [netbsd-10] src/doc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:57:25 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #403 - #407


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.137 -r1.1.2.138 src/doc/CHANGES-10.0

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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:59:15 UTC 2023

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

Log Message:
Tickets #1911 - #1913


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.202 -r1.1.2.203 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-9] src/doc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:58:19 UTC 2023

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

Log Message:
Tickets #1748 - #1750


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 src/doc/CHANGES-9.4

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.4
diff -u src/doc/CHANGES-9.4:1.1.2.109 src/doc/CHANGES-9.4:1.1.2.110
--- src/doc/CHANGES-9.4:1.1.2.109	Tue Oct 10 18:56:33 2023
+++ src/doc/CHANGES-9.4	Fri Oct 13 18:58:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.109 2023/10/10 18:56:33 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.110 2023/10/13 18:58:19 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -2251,3 +2251,43 @@ lib/libm/Makefile1.222
 	Bump ramdisk size slightly.
 	[he, ticket #1747]
 
+sys/dev/pci/pcidevs1.1496
+sys/dev/pci/ahcisata_pci.c			1.71
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	ahcisata(4): add support for ASMEDIA 0x0624
+	(ASM1062 + JMB575 Port Multiplier)
+	[abs, ticket #1748]
+
+sys/dev/pci/ixgbe/if_bypass.c		1.10
+sys/dev/pci/ixgbe/if_fdir.c		1.6 via patch
+sys/dev/pci/ixgbe/if_sriov.c		1.18 via patch
+sys/dev/pci/ixgbe/ix_txrx.c		1.102 via patch
+sys/dev/pci/ixgbe/ixgbe.c		1.333,1.339 via patch
+sys/dev/pci/ixgbe/ixgbe.h		1.89
+sys/dev/pci/ixgbe/ixgbe_api.h		1.17
+sys/dev/pci/ixgbe/ixgbe_common.h	1.17
+sys/dev/pci/ixgbe/ixgbe_bypass.h	1.4
+sys/dev/pci/ixgbe/ixgbe_common.c	1.45
+sys/dev/pci/ixgbe/ixgbe_fdir.h		1.5
+sys/dev/pci/ixgbe/ixgbe_netmap.h	1.3
+sys/dev/pci/ixgbe/ixgbe_netmap.c	1.6
+sys/dev/pci/ixgbe/ixgbe_osdep.c		1.9
+sys/dev/pci/ixgbe/ixgbe_sriov.h		1.6
+sys/dev/pci/ixgbe/ixgbe_type.h		1.58
+sys/dev/pci/ixgbe/ixgbe_x550.c		1.27
+sys/dev/pci/ixgbe/ixv.c			1.186 via patch
+
+	ixg(4): Rename some definitions, modify comment. No functional change.
+	[msaitoh, ticket #1749]
+
+
+sys/dev/pci/pcidevs1.1493,1.1495
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add Intel 82599 LS.
+	Add Pericom(Diodes) PCIe switches.
+	[msaitoh, ticket #1750]
+



CVS commit: [netbsd-9] src/doc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:58:19 UTC 2023

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

Log Message:
Tickets #1748 - #1750


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 src/doc/CHANGES-9.4

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



CVS commit: src/sys

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:50:39 UTC 2023

Modified Files:
src/sys/kern: uipc_socket.c uipc_syscalls.c
src/sys/sys: socketvar.h

Log Message:
Use cv_fdrestart() to implement fo_restart.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.165 -r1.166 src/sys/sys/socketvar.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.305 src/sys/kern/uipc_socket.c:1.306
--- src/sys/kern/uipc_socket.c:1.305	Wed Oct  4 22:17:09 2023
+++ src/sys/kern/uipc_socket.c	Fri Oct 13 18:50:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.305 2023/10/04 22:17:09 ad Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.306 2023/10/13 18:50:39 ad Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.305 2023/10/04 22:17:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.306 2023/10/13 18:50:39 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -895,7 +895,6 @@ sosend(struct socket *so, struct sockadd
 	struct mbuf **mp, *m;
 	long space, len, resid, clen, mlen;
 	int error, s, dontroute, atomic;
-	short wakeup_state = 0;
 
 	clen = 0;
 
@@ -968,17 +967,11 @@ sosend(struct socket *so, struct sockadd
 goto release;
 			}
 			sbunlock(>so_snd);
-			if (wakeup_state & SS_RESTARTSYS) {
-error = ERESTART;
-goto out;
-			}
 			error = sbwait(>so_snd);
 			if (error)
 goto out;
-			wakeup_state = so->so_state;
 			goto restart;
 		}
-		wakeup_state = 0;
 		mp = 
 		space -= clen;
 		do {
@@ -1160,7 +1153,6 @@ soreceive(struct socket *so, struct mbuf
 	struct mbuf *nextrecord;
 	int mbuf_removed = 0;
 	const struct domain *dom;
-	short wakeup_state = 0;
 
 	pr = so->so_proto;
 	atomic = pr->pr_flags & PR_ATOMIC;
@@ -1271,16 +1263,12 @@ restart:
 		SBLASTRECORDCHK(>so_rcv, "soreceive sbwait 1");
 		SBLASTMBUFCHK(>so_rcv, "soreceive sbwait 1");
 		sbunlock(>so_rcv);
-		if (wakeup_state & SS_RESTARTSYS)
-			error = ERESTART;
-		else
-			error = sbwait(>so_rcv);
+		error = sbwait(>so_rcv);
 		if (error != 0) {
 			sounlock(so);
 			splx(s);
 			return error;
 		}
-		wakeup_state = so->so_state;
 		goto restart;
 	}
 
@@ -1457,7 +1445,6 @@ dontblock:
 #endif
 
 		so->so_state &= ~SS_RCVATMARK;
-		wakeup_state = 0;
 		len = uio->uio_resid;
 		if (so->so_oobmark && len > so->so_oobmark - offset)
 			len = so->so_oobmark - offset;
@@ -1600,10 +1587,7 @@ dontblock:
 (*pr->pr_usrreqs->pr_rcvd)(so, flags, l);
 			SBLASTRECORDCHK(>so_rcv, "soreceive sbwait 2");
 			SBLASTMBUFCHK(>so_rcv, "soreceive sbwait 2");
-			if (wakeup_state & SS_RESTARTSYS)
-error = ERESTART;
-			else
-error = sbwait(>so_rcv);
+			error = sbwait(>so_rcv);
 			if (error != 0) {
 sbunlock(>so_rcv);
 sounlock(so);
@@ -1612,7 +1596,6 @@ dontblock:
 			}
 			if ((m = so->so_rcv.sb_mb) != NULL)
 nextrecord = m->m_nextpkt;
-			wakeup_state = so->so_state;
 		}
 	}
 
@@ -1680,6 +1663,7 @@ soshutdown(struct socket *so, int how)
 void
 sorestart(struct socket *so)
 {
+
 	/*
 	 * An application has called close() on an fd on which another
 	 * of its threads has called a socket system call.
@@ -1689,10 +1673,9 @@ sorestart(struct socket *so)
 	 * Any other fd will block again on the 2nd syscall.
 	 */
 	solock(so);
-	so->so_state |= SS_RESTARTSYS;
-	cv_broadcast(>so_cv);
-	cv_broadcast(>so_snd.sb_cv);
-	cv_broadcast(>so_rcv.sb_cv);
+	cv_fdrestart(>so_cv);
+	cv_fdrestart(>so_snd.sb_cv);
+	cv_fdrestart(>so_rcv.sb_cv);
 	sounlock(so);
 }
 

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.208 src/sys/kern/uipc_syscalls.c:1.209
--- src/sys/kern/uipc_syscalls.c:1.208	Wed Oct  4 22:17:09 2023
+++ src/sys/kern/uipc_syscalls.c	Fri Oct 13 18:50:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.208 2023/10/04 22:17:09 ad Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.209 2023/10/13 18:50:39 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2023 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.208 2023/10/04 22:17:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.209 2023/10/13 18:50:39 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -175,7 +175,6 @@ do_sys_accept(struct lwp *l, int sock, s
 	file_t		*fp, *fp2;
 	int		error, fd;
 	struct socket	*so, *so2;
-	short		wakeup_state = 0;
 
 	if ((fp = fd_getfile(sock)) == NULL)
 		return EBADF;
@@ -211,15 +210,10 @@ do_sys_accept(struct lwp *l, int sock, s
 			so->so_error = ECONNABORTED;
 			break;
 		}
-		if (wakeup_state & SS_RESTARTSYS) {
-			error = ERESTART;
-			goto bad;
-		}
 		error = sowait(so, true, 0);
 		if (error) {
 			goto bad;
 		

CVS commit: [netbsd-10] src/sys/dev/pci/ixgbe

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:55:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-10]: ix_txrx.c ixgbe.c ixgbe.h
ixgbe_82599.c ixgbe_api.c ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h
ixgbe_x540.c ixgbe_x550.c ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #407):

sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.47
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.28
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.60
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.31
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.32
sys/dev/pci/ixgbe/ixv.c: revision 1.187
sys/dev/pci/ixgbe/ixv.c: revision 1.188
sys/dev/pci/ixgbe/ixv.c: revision 1.189
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.18
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.24
sys/dev/pci/ixgbe/ixgbe.c: revision 1.334
sys/dev/pci/ixgbe/ixgbe.c: revision 1.335
sys/dev/pci/ixgbe/ixgbe.c: revision 1.336
sys/dev/pci/ixgbe/ixgbe.c: revision 1.337
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.103
sys/dev/pci/ixgbe/ixgbe.c: revision 1.338
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.59
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.14
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.15
sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.29
sys/dev/pci/ixgbe/ixgbe_bypass.h: revision 1.5
sys/dev/pci/ixgbe/ixgbe.h: revision 1.90
sys/dev/pci/ixgbe/ixgbe.h: revision 1.91
sys/dev/pci/ixgbe/ixgbe.h: revision 1.92
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.46

ixg(4): Remove unused and old function. No functional change.
 - From FreeBSD's ix-3.3.32.

ixg(4): Add 82599 LS once again.
 - From:
FreeBSD: 9228ac3a69c4c7401a743e6465e118101a2beeb0
DPDK:549ccd3dc01539e060597b503f2b65b272de3347
 - This was removed 5 years ago. From the commit message:
   > Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
   > was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and
   > removed in ix-3.3.6.tar.gz.

ixg(4): Filter out spurious link up indication
 - Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
   to filter out spurious link up indication by transceiver with no fiber
   cable connected.
 - From FreeBSD:
 In-tree: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c
 Out of tree: ix-3.3.33.

ixgbe: Simplify definitions. No functional change.
 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.

ixgbe: Modify error message of wrong TX/RX descriptor size.
  - Based from FreeBSD ix-3.3.35. I think ix-3.3.35's RING_INCREMENT(== 32)
is wrong. It should be 8(DBA_ALIGN / sizeof(union ixgbe_adv_[tr]x_desc)).
Linux also uses 8.

ixgbe: Remove NO_82599_SUPPORT and NO_X540_SUPPORT support. NFCI.
 From FreeBSD ix-3.3.35. Note that this file is not used in NetBSD.

ixgbe: Enable interrupt after setting IFF_RUNNING. Same as FreeBSD x-3.3.35.

ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).


To generate a diff of this commit:
cvs rdiff -u -r1.100.4.2 -r1.100.4.3 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.324.2.3 -r1.324.2.4 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.86.4.2 -r1.86.4.3 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.29.4.1 -r1.29.4.2 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.43.4.2 -r1.43.4.3 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.16.4.1 -r1.16.4.2 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.12 -r1.12.4.1 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c
cvs rdiff -u -r1.55.4.3 -r1.55.4.4 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.26.4.1 -r1.26.4.2 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.183.4.2 -r1.183.4.3 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.100.4.2 src/sys/dev/pci/ixgbe/ix_txrx.c:1.100.4.3
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.100.4.2	Fri Oct 13 18:16:51 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Oct 13 18:55:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.100.4.2 2023/10/13 18:16:51 martin Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.100.4.3 2023/10/13 18:55:12 martin Exp $ */
 
 /**
 
@@ -64,7 

CVS commit: src/sys

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:48:56 UTC 2023

Modified Files:
src/sys/kern: kern_condvar.c kern_sleepq.c
src/sys/rump/librump/rumpkern: locks.c locks_up.c
src/sys/sys: condvar.h lwp.h

Log Message:
Add cv_fdrestart() (better name suggestions welcome):

Like cv_broadcast(), but make any LWPs that share the same file descriptor
table as the caller return ERESTART when resuming.  Used to dislodge LWPs
waiting for I/O that prevent a file descriptor from being closed, without
upsetting access to the file (not descriptor) made from another direction.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.83 -r1.84 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.86 -r1.87 src/sys/rump/librump/rumpkern/locks.c
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/locks_up.c
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/condvar.h
cvs rdiff -u -r1.227 -r1.228 src/sys/sys/lwp.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/kern/kern_condvar.c
diff -u src/sys/kern/kern_condvar.c:1.59 src/sys/kern/kern_condvar.c:1.60
--- src/sys/kern/kern_condvar.c:1.59	Thu Oct 12 23:51:05 2023
+++ src/sys/kern/kern_condvar.c	Fri Oct 13 18:48:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_condvar.c,v 1.59 2023/10/12 23:51:05 ad Exp $	*/
+/*	$NetBSD: kern_condvar.c,v 1.60 2023/10/13 18:48:56 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2019, 2020, 2023
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.59 2023/10/12 23:51:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.60 2023/10/13 18:48:56 ad Exp $");
 
 #include 
 #include 
@@ -543,6 +543,43 @@ cv_wakeup_all(kcondvar_t *cv)
 }
 
 /*
+ * cv_fdrestart:
+ *
+ *	Like cv_broadcast(), but make any LWPs that share the same file
+ *	descriptor table as the caller return ERESTART when resuming.  Used
+ *	to dislodge LWPs waiting for I/O that prevent a file descriptor from
+ *	being closed, without upsetting access to the file (not descriptor)
+ *	made from another direction.  Rarely used thus no fast path
+ *	provided.
+ */
+void
+cv_fdrestart(kcondvar_t *cv)
+{
+	sleepq_t *sq;
+	kmutex_t *mp;
+	lwp_t *l;
+
+	KASSERT(cv_is_valid(cv));
+
+	if (LIST_EMPTY(CV_SLEEPQ(cv)))
+		return;
+
+	mp = sleepq_hashlock(cv);
+	sq = CV_SLEEPQ(cv);
+	while ((l = LIST_FIRST(sq)) != NULL) {
+		KASSERT(l->l_sleepq == sq);
+		KASSERT(l->l_mutex == mp);
+		KASSERT(l->l_wchan == cv);
+		/* l_fd stable at this point so no special locking needed. */
+		if (l->l_fd == curlwp->l_fd) {
+			l->l_flag |= LW_RESTART;
+			sleepq_remove(sq, l, false);
+		}
+	}
+	mutex_spin_exit(mp);
+}
+
+/*
  * cv_has_waiters:
  *
  *	For diagnostic assertions: return non-zero if a condition

Index: src/sys/kern/kern_sleepq.c
diff -u src/sys/kern/kern_sleepq.c:1.83 src/sys/kern/kern_sleepq.c:1.84
--- src/sys/kern/kern_sleepq.c:1.83	Sun Oct  8 13:37:26 2023
+++ src/sys/kern/kern_sleepq.c	Fri Oct 13 18:48:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sleepq.c,v 1.83 2023/10/08 13:37:26 ad Exp $	*/
+/*	$NetBSD: kern_sleepq.c,v 1.84 2023/10/13 18:48:56 ad Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2009, 2019, 2020, 2023
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.83 2023/10/08 13:37:26 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.84 2023/10/13 18:48:56 ad Exp $");
 
 #include 
 #include 
@@ -341,7 +341,7 @@ sleepq_uncatch(lwp_t *l)
 int
 sleepq_block(int timo, bool catch_p, syncobj_t *syncobj, int nlocks)
 {
-	const int mask = LW_CANCELLED|LW_WEXIT|LW_WCORE|LW_PENDSIG;
+	const int mask = LW_CANCELLED|LW_WEXIT|LW_WCORE|LW_PENDSIG|LW_RESTART;
 	int error = 0, sig, flag;
 	struct proc *p;
 	lwp_t *l = curlwp;
@@ -358,16 +358,20 @@ sleepq_block(int timo, bool catch_p, syn
 	 * while we are sleeping.  It is independent from LW_SINTR because
 	 * we don't want to leave LW_SINTR set when the LWP is not asleep.
 	 */
+	flag = l->l_flag;
 	if (catch_p) {
-		if ((l->l_flag & (LW_CANCELLED|LW_WEXIT|LW_WCORE)) != 0) {
-			l->l_flag &= ~LW_CANCELLED;
-			error = EINTR;
-			early = true;
-		} else if ((l->l_flag & LW_PENDSIG) != 0 && sigispending(l, 0))
-			early = true;
-		l->l_flag |= LW_CATCHINTR;
+		if ((flag & mask) != 0) {
+			if ((flag & (LW_CANCELLED|LW_WEXIT|LW_WCORE)) != 0) {
+l->l_flag = flag & ~LW_CANCELLED;
+error = EINTR;
+early = true;
+			} else if ((flag & LW_PENDSIG) != 0 &&
+			sigispending(l, 0))
+early = true;
+		}
+		l->l_flag = (flag | LW_CATCHINTR) & ~LW_RESTART;
 	} else
-		l->l_flag &= ~LW_CATCHINTR;
+		l->l_flag = flag & ~(LW_CATCHINTR | LW_RESTART);
 
 	if (early) {
 		/* lwp_unsleep() will release the lock */
@@ -435,7 +439,8 @@ sleepq_block(int timo, bool catch_p, syn
 			(sig = issignal(l)) != 0)
 error = sleepq_sigtoerror(l, sig);
 			mutex_exit(p->p_lock);
-		}
+		} else if ((flag & 

CVS commit: [netbsd-10] src/sys/dev/pci/ixgbe

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:55:12 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-10]: ix_txrx.c ixgbe.c ixgbe.h
ixgbe_82599.c ixgbe_api.c ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h
ixgbe_x540.c ixgbe_x550.c ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #407):

sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.47
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.28
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.60
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.31
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.32
sys/dev/pci/ixgbe/ixv.c: revision 1.187
sys/dev/pci/ixgbe/ixv.c: revision 1.188
sys/dev/pci/ixgbe/ixv.c: revision 1.189
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.18
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.24
sys/dev/pci/ixgbe/ixgbe.c: revision 1.334
sys/dev/pci/ixgbe/ixgbe.c: revision 1.335
sys/dev/pci/ixgbe/ixgbe.c: revision 1.336
sys/dev/pci/ixgbe/ixgbe.c: revision 1.337
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.103
sys/dev/pci/ixgbe/ixgbe.c: revision 1.338
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.59
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.14
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.15
sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.29
sys/dev/pci/ixgbe/ixgbe_bypass.h: revision 1.5
sys/dev/pci/ixgbe/ixgbe.h: revision 1.90
sys/dev/pci/ixgbe/ixgbe.h: revision 1.91
sys/dev/pci/ixgbe/ixgbe.h: revision 1.92
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.46

ixg(4): Remove unused and old function. No functional change.
 - From FreeBSD's ix-3.3.32.

ixg(4): Add 82599 LS once again.
 - From:
FreeBSD: 9228ac3a69c4c7401a743e6465e118101a2beeb0
DPDK:549ccd3dc01539e060597b503f2b65b272de3347
 - This was removed 5 years ago. From the commit message:
   > Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
   > was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and
   > removed in ix-3.3.6.tar.gz.

ixg(4): Filter out spurious link up indication
 - Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
   to filter out spurious link up indication by transceiver with no fiber
   cable connected.
 - From FreeBSD:
 In-tree: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c
 Out of tree: ix-3.3.33.

ixgbe: Simplify definitions. No functional change.
 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.

ixgbe: Modify error message of wrong TX/RX descriptor size.
  - Based from FreeBSD ix-3.3.35. I think ix-3.3.35's RING_INCREMENT(== 32)
is wrong. It should be 8(DBA_ALIGN / sizeof(union ixgbe_adv_[tr]x_desc)).
Linux also uses 8.

ixgbe: Remove NO_82599_SUPPORT and NO_X540_SUPPORT support. NFCI.
 From FreeBSD ix-3.3.35. Note that this file is not used in NetBSD.

ixgbe: Enable interrupt after setting IFF_RUNNING. Same as FreeBSD x-3.3.35.

ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).


To generate a diff of this commit:
cvs rdiff -u -r1.100.4.2 -r1.100.4.3 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.324.2.3 -r1.324.2.4 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.86.4.2 -r1.86.4.3 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.29.4.1 -r1.29.4.2 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.43.4.2 -r1.43.4.3 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.16.4.1 -r1.16.4.2 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.12 -r1.12.4.1 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c
cvs rdiff -u -r1.55.4.3 -r1.55.4.4 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.26.4.1 -r1.26.4.2 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.183.4.2 -r1.183.4.3 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:50:39 UTC 2023

Modified Files:
src/sys/kern: uipc_socket.c uipc_syscalls.c
src/sys/sys: socketvar.h

Log Message:
Use cv_fdrestart() to implement fo_restart.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.165 -r1.166 src/sys/sys/socketvar.h

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



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:47:08 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1913 (Intel 82599 LS and Pericom(Diodes) PCIe switches added)


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.28 -r1.1281.2.29 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.28 -r1.1280.2.29 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:48:56 UTC 2023

Modified Files:
src/sys/kern: kern_condvar.c kern_sleepq.c
src/sys/rump/librump/rumpkern: locks.c locks_up.c
src/sys/sys: condvar.h lwp.h

Log Message:
Add cv_fdrestart() (better name suggestions welcome):

Like cv_broadcast(), but make any LWPs that share the same file descriptor
table as the caller return ERESTART when resuming.  Used to dislodge LWPs
waiting for I/O that prevent a file descriptor from being closed, without
upsetting access to the file (not descriptor) made from another direction.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.83 -r1.84 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.86 -r1.87 src/sys/rump/librump/rumpkern/locks.c
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/locks_up.c
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/condvar.h
cvs rdiff -u -r1.227 -r1.228 src/sys/sys/lwp.h

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



CVS commit: src/regress/sys/kern/dislodgefd

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:46:22 UTC 2023

Added Files:
src/regress/sys/kern/dislodgefd: Makefile dislodgefd.c

Log Message:
A dumb test that calling close() on a pipe/socket fd dislodges another
thread in the same process waiting for I/O on the fd.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/regress/sys/kern/dislodgefd/Makefile \
src/regress/sys/kern/dislodgefd/dislodgefd.c

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

Added files:

Index: src/regress/sys/kern/dislodgefd/Makefile
diff -u /dev/null src/regress/sys/kern/dislodgefd/Makefile:1.1
--- /dev/null	Fri Oct 13 18:46:22 2023
+++ src/regress/sys/kern/dislodgefd/Makefile	Fri Oct 13 18:46:22 2023
@@ -0,0 +1,9 @@
+#	$NetBSD: Makefile,v 1.1 2023/10/13 18:46:22 ad Exp $
+
+NOMAN=		# defined
+
+PROG=		dislodgefd
+WARNS?=		4
+LDADD=		-lpthread
+
+.include 
Index: src/regress/sys/kern/dislodgefd/dislodgefd.c
diff -u /dev/null src/regress/sys/kern/dislodgefd/dislodgefd.c:1.1
--- /dev/null	Fri Oct 13 18:46:22 2023
+++ src/regress/sys/kern/dislodgefd/dislodgefd.c	Fri Oct 13 18:46:22 2023
@@ -0,0 +1,80 @@
+/*	$NetBSD: dislodgefd.c,v 1.1 2023/10/13 18:46:22 ad Exp $	*/
+
+/*-
+ * Copyright (c) 2023 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+pthread_barrier_t	barrier;
+int			fds[2];
+
+static void *
+reader(void *cookie)
+{
+	char buf[1];
+
+	(void)pthread_barrier_wait();
+	printf("reader(): commencing read, this should error out... after 1s\n");
+	if (read(fds[0], buf, sizeof(buf)) == -1)
+		err(1, "read");
+
+	printf("reader(): read terminated without error??\n");
+	return NULL;
+}
+
+int
+main(int argc, char *argv[])
+{
+	pthread_t pt;
+
+	if (argc > 1 && strcmp(argv[1], "pipe") == 0) {
+		if (pipe(fds))
+			err(1, "pipe");
+	} else {
+		if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0)
+			err(1, "socketpair");
+	}
+	pthread_barrier_init(, NULL, 2);
+	if (pthread_create(, NULL, reader, NULL)) {
+		errx(1, "pthread_create failed");
+	}
+	(void)pthread_barrier_wait();
+	sleep(1);
+	printf("main(): closing the reader side fd..\n");
+	close(fds[0]);
+	printf("main(): sleeping again for a bit..\n");
+	sleep(1);
+	printf("main(): exiting.\n");
+	return 0;
+}



CVS commit: src/regress/sys/kern/dislodgefd

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:46:22 UTC 2023

Added Files:
src/regress/sys/kern/dislodgefd: Makefile dislodgefd.c

Log Message:
A dumb test that calling close() on a pipe/socket fd dislodges another
thread in the same process waiting for I/O on the fd.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/regress/sys/kern/dislodgefd/Makefile \
src/regress/sys/kern/dislodgefd/dislodgefd.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/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:44:59 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1913):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.28 -r1.1289.2.29 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1289.2.28 src/sys/dev/pci/pcidevs:1.1289.2.29
--- src/sys/dev/pci/pcidevs:1.1289.2.28	Fri Oct 13 17:54:46 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 18:44:59 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.28 2023/10/13 17:54:46 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.29 2023/10/13 18:44:59 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4302,6 +4302,7 @@ product INTEL I350_DA4	 	0x1546	I350 Qua
 product INTEL 82599_SFP_SF_QP	0x154a	82599 10 GbE Controller
 product INTEL XL710_VF		0x154c	XL710 Ethernet Virtual Function
 product INTEL 82599_SFP_SF2	0x154d	82599 (SFP+) 10 GbE Controller
+product INTEL 82599_LS		0x154f	82599 LS 10G Ethernet
 product INTEL 82599EN_SFP	0x1557	82599 10 GbE Controller
 product INTEL 82599_QSFP_SF_QP	0x1558	X520 10 GbE QSFP+
 product INTEL I218_V		0x1559	I218-V Ethernet Connection
@@ -8805,7 +8806,21 @@ product PERICOM PI7C21P100	0x01a7	PI7C21
 product PERICOM PI7C9X20303UL	0x0303	PI7C9X20303UL 3port 3lane PCIe switch
 product PERICOM PI7C9X20505GP	0x0505	PI7C9X20505GP 5port 5lane PCIe switch
 product PERICOM PI7C9X20508GP	0x0508	PI7C9X20508GP 5port 8lane PCIe switch
+product PERICOM PI7C9X2G303EL	0x2303	PI7C9X2G303EL 3port 3lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EL	0x2304	PI7C9X2G304EL 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G308GP	0x2308	PI7C9X2G308GP 3port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G312GP	0x2312	PI7C9X2G312GP 3port 12lane PCIe Gen2 switch
 product PERICOM PI7C9X2G404SL	0x2404	PI7C9X2G404SL 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G608GP	0x2608	PI7C9X2G608GP 6port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G612GP	0x2612	PI7C9X2G612GP 6port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G912GP	0x2912	PI7C9X2G912GP 9port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G808PR	0x8608	PI7C9X2G808PR 8port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EV	0xb304	PI7C9X2G304EV 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G404EV	0xb404	PI7C9X2G404EV 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X3G808GP	0xc008	PI7C9X3G808GP 8port 8lane PCIe Gen3 switch
+product PERICOM PI7C9X3G816GP	0xc016	PI7C9X3G816GP 8port 16lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1224GP	0xc124	PI7C9X3G1224GP 12port 24lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1632GP	0xc232	PI7C9X3G1632GP 16port 32lane PCIe Gen3 switch
 product PERICOM PI7C8140A	0x8140	PI7C8140A 2 port PCI-PCI Bridge
 product PERICOM PI7C8148	0x8148	PI7C8148 Asynchronous 2 port PCI-PCI Bridge
 product PERICOM PI7C8152	0x8152	PI7C8152 2 port PCI-PCI Bridge



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:44:59 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1913):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.28 -r1.1289.2.29 src/sys/dev/pci/pcidevs

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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:42:51 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1750 (Intel 82599 LS and Pericom(Diodes) PCIe switches added)


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.19 -r1.1371.2.20 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.19 -r1.1370.2.20 src/sys/dev/pci/pcidevs_data.h

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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:41:17 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1750):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.19 -r1.1383.2.20 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1383.2.19 src/sys/dev/pci/pcidevs:1.1383.2.20
--- src/sys/dev/pci/pcidevs:1.1383.2.19	Fri Oct 13 17:50:40 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 18:41:17 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1383.2.19 2023/10/13 17:50:40 martin Exp $
+$NetBSD: pcidevs,v 1.1383.2.20 2023/10/13 18:41:17 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4304,6 +4304,7 @@ product INTEL I350_DA4	 	0x1546	I350 Qua
 product INTEL 82599_SFP_SF_QP	0x154a	82599 10 GbE Controller
 product INTEL XL710_VF		0x154c	XL710 Ethernet Virtual Function
 product INTEL 82599_SFP_SF2	0x154d	82599 (SFP+) 10 GbE Controller
+product INTEL 82599_LS		0x154f	82599 LS 10G Ethernet
 product INTEL 82599EN_SFP	0x1557	82599 10 GbE Controller
 product INTEL 82599_QSFP_SF_QP	0x1558	X520 10 GbE QSFP+
 product INTEL I218_V		0x1559	I218-V Ethernet Connection
@@ -8807,7 +8808,21 @@ product PERICOM PI7C21P100	0x01a7	PI7C21
 product PERICOM PI7C9X20303UL	0x0303	PI7C9X20303UL 3port 3lane PCIe switch
 product PERICOM PI7C9X20505GP	0x0505	PI7C9X20505GP 5port 5lane PCIe switch
 product PERICOM PI7C9X20508GP	0x0508	PI7C9X20508GP 5port 8lane PCIe switch
+product PERICOM PI7C9X2G303EL	0x2303	PI7C9X2G303EL 3port 3lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EL	0x2304	PI7C9X2G304EL 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G308GP	0x2308	PI7C9X2G308GP 3port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G312GP	0x2312	PI7C9X2G312GP 3port 12lane PCIe Gen2 switch
 product PERICOM PI7C9X2G404SL	0x2404	PI7C9X2G404SL 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G608GP	0x2608	PI7C9X2G608GP 6port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G612GP	0x2612	PI7C9X2G612GP 6port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G912GP	0x2912	PI7C9X2G912GP 9port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G808PR	0x8608	PI7C9X2G808PR 8port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EV	0xb304	PI7C9X2G304EV 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G404EV	0xb404	PI7C9X2G404EV 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X3G808GP	0xc008	PI7C9X3G808GP 8port 8lane PCIe Gen3 switch
+product PERICOM PI7C9X3G816GP	0xc016	PI7C9X3G816GP 8port 16lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1224GP	0xc124	PI7C9X3G1224GP 12port 24lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1632GP	0xc232	PI7C9X3G1632GP 16port 32lane PCIe Gen3 switch
 product PERICOM PI7C8140A	0x8140	PI7C8140A 2 port PCI-PCI Bridge
 product PERICOM PI7C8148	0x8148	PI7C8148 Asynchronous 2 port PCI-PCI Bridge
 product PERICOM PI7C8152	0x8152	PI7C8152 2 port PCI-PCI Bridge



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:41:17 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1750):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.19 -r1.1383.2.20 src/sys/dev/pci/pcidevs

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:39:14 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #406 (Intel 82599 LS and Pericom(Diodes) PCIe switches added)


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.8 -r1.1452.2.9 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.8 -r1.1451.2.9 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:37:28 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #406):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.7 -r1.1471.2.8 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1471.2.7 src/sys/dev/pci/pcidevs:1.1471.2.8
--- src/sys/dev/pci/pcidevs:1.1471.2.7	Fri Oct 13 17:46:26 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 18:37:28 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1471.2.7 2023/10/13 17:46:26 martin Exp $
+$NetBSD: pcidevs,v 1.1471.2.8 2023/10/13 18:37:28 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4307,6 +4307,7 @@ product INTEL I350_DA4	 	0x1546	I350 Qua
 product INTEL 82599_SFP_SF_QP	0x154a	82599 10 GbE Controller
 product INTEL XL710_VF		0x154c	XL710 Ethernet Virtual Function
 product INTEL 82599_SFP_SF2	0x154d	82599 (SFP+) 10 GbE Controller
+product INTEL 82599_LS		0x154f	82599 LS 10G Ethernet
 product INTEL 82599EN_SFP	0x1557	82599 10 GbE Controller
 product INTEL 82599_QSFP_SF_QP	0x1558	X520 10 GbE QSFP+
 product INTEL I218_V		0x1559	I218-V Ethernet Connection
@@ -8818,7 +8819,21 @@ product PERICOM PI7C21P100	0x01a7	PI7C21
 product PERICOM PI7C9X20303UL	0x0303	PI7C9X20303UL 3port 3lane PCIe switch
 product PERICOM PI7C9X20505GP	0x0505	PI7C9X20505GP 5port 5lane PCIe switch
 product PERICOM PI7C9X20508GP	0x0508	PI7C9X20508GP 5port 8lane PCIe switch
+product PERICOM PI7C9X2G303EL	0x2303	PI7C9X2G303EL 3port 3lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EL	0x2304	PI7C9X2G304EL 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G308GP	0x2308	PI7C9X2G308GP 3port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G312GP	0x2312	PI7C9X2G312GP 3port 12lane PCIe Gen2 switch
 product PERICOM PI7C9X2G404SL	0x2404	PI7C9X2G404SL 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G608GP	0x2608	PI7C9X2G608GP 6port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G612GP	0x2612	PI7C9X2G612GP 6port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G912GP	0x2912	PI7C9X2G912GP 9port 12lane PCIe Gen2 switch
+product PERICOM PI7C9X2G808PR	0x8608	PI7C9X2G808PR 8port 8lane PCIe Gen2 switch
+product PERICOM PI7C9X2G304EV	0xb304	PI7C9X2G304EV 3port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X2G404EV	0xb404	PI7C9X2G404EV 4port 4lane PCIe Gen2 switch
+product PERICOM PI7C9X3G808GP	0xc008	PI7C9X3G808GP 8port 8lane PCIe Gen3 switch
+product PERICOM PI7C9X3G816GP	0xc016	PI7C9X3G816GP 8port 16lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1224GP	0xc124	PI7C9X3G1224GP 12port 24lane PCIe Gen3 switch
+product PERICOM PI7C9X3G1632GP	0xc232	PI7C9X3G1632GP 16port 32lane PCIe Gen3 switch
 product PERICOM PI7C8140A	0x8140	PI7C8140A 2 port PCI-PCI Bridge
 product PERICOM PI7C8148	0x8148	PI7C8148 Asynchronous 2 port PCI-PCI Bridge
 product PERICOM PI7C8152	0x8152	PI7C8152 2 port PCI-PCI Bridge



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:37:28 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #406):

sys/dev/pci/pcidevs: revision 1.1493
sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.7 -r1.1471.2.8 src/sys/dev/pci/pcidevs

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



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:32:39 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: if_bypass.c if_fdir.c if_sriov.c
ix_txrx.c ixgbe.c ixgbe.h ixgbe_api.h ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_fdir.h ixgbe_netmap.c ixgbe_netmap.h
ixgbe_osdep.c ixgbe_sriov.h ixgbe_type.h ixgbe_x550.c ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1912):

sys/dev/pci/ixgbe/if_bypass.c   1.10
sys/dev/pci/ixgbe/if_fdir.c 1.6 via patch
sys/dev/pci/ixgbe/if_sriov.c1.18 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.102 via patch
sys/dev/pci/ixgbe/ixgbe.c   1.333,1.339 via patch
sys/dev/pci/ixgbe/ixgbe.h   1.89
sys/dev/pci/ixgbe/ixgbe_api.h   1.17
sys/dev/pci/ixgbe/ixgbe_common.h1.17
sys/dev/pci/ixgbe/ixgbe_bypass.h1.4
sys/dev/pci/ixgbe/ixgbe_common.c1.45
sys/dev/pci/ixgbe/ixgbe_fdir.h  1.5
sys/dev/pci/ixgbe/ixgbe_netmap.h1.3
sys/dev/pci/ixgbe/ixgbe_netmap.c1.6
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.9
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.6
sys/dev/pci/ixgbe/ixgbe_type.h  1.58
sys/dev/pci/ixgbe/ixgbe_x550.c  1.27
sys/dev/pci/ixgbe/ixv.c 1.186 via patch

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
- struct adapter *adapter -> struct ixgbe_softc *sc
- master -> primary
- black -> block

ixg(4): Whitespace. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.7 -r1.2.4.8 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.1.4.4 -r1.1.4.5 src/sys/dev/pci/ixgbe/if_fdir.c \
src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.1.4.8 -r1.1.4.9 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.24.2.28 -r1.24.2.29 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.88.2.56 -r1.88.2.57 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.24.6.27 -r1.24.6.28 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.9.8.5 -r1.9.8.6 src/sys/dev/pci/ixgbe/ixgbe_api.h
cvs rdiff -u -r1.13.2.14 -r1.13.2.15 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.7.8.6 -r1.7.8.7 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.1.4.5 -r1.1.4.6 src/sys/dev/pci/ixgbe/ixgbe_fdir.h \
src/sys/dev/pci/ixgbe/ixgbe_netmap.c
cvs rdiff -u -r1.1.4.3 -r1.1.4.4 src/sys/dev/pci/ixgbe/ixgbe_netmap.h
cvs rdiff -u -r1.1.12.6 -r1.1.12.7 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.1.4.6 -r1.1.4.7 src/sys/dev/pci/ixgbe/ixgbe_sriov.h
cvs rdiff -u -r1.22.2.19 -r1.22.2.20 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.5.6.12 -r1.5.6.13 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.56.2.41 -r1.56.2.42 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/rump/librump/rumpkern

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:23:54 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Rump: sleepq_remove(): don't unlock the sleepq.  Spotted by hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/sleepq.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/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.27 src/sys/rump/librump/rumpkern/sleepq.c:1.28
--- src/sys/rump/librump/rumpkern/sleepq.c:1.27	Sun Oct  8 13:23:05 2023
+++ src/sys/rump/librump/rumpkern/sleepq.c	Fri Oct 13 18:23:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.27 2023/10/08 13:23:05 ad Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.28 2023/10/13 18:23:54 ad Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.27 2023/10/08 13:23:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.28 2023/10/13 18:23:54 ad Exp $");
 
 #include 
 #include 
@@ -150,7 +150,7 @@ void
 sleepq_remove(sleepq_t *sq, struct lwp *l, bool wakeup)
 {
 
-	sleepq_unsleep(l, true);
+	sleepq_unsleep(l, false);
 }
 
 /*



CVS commit: src/sys/rump/librump/rumpkern

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:23:54 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Rump: sleepq_remove(): don't unlock the sleepq.  Spotted by hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/sleepq.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/pci/ixgbe

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:20:30 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: if_bypass.c if_fdir.c if_sriov.c
ix_txrx.c ixgbe.c ixgbe.h ixgbe_api.h ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_fdir.h ixgbe_netmap.c ixgbe_netmap.h
ixgbe_osdep.c ixgbe_sriov.h ixgbe_type.h ixgbe_x550.c ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1749):

sys/dev/pci/ixgbe/if_bypass.c   1.10
sys/dev/pci/ixgbe/if_fdir.c 1.6 via patch
sys/dev/pci/ixgbe/if_sriov.c1.18 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.102 via patch
sys/dev/pci/ixgbe/ixgbe.c   1.333,1.339 via patch
sys/dev/pci/ixgbe/ixgbe.h   1.89
sys/dev/pci/ixgbe/ixgbe_api.h   1.17
sys/dev/pci/ixgbe/ixgbe_common.h1.17
sys/dev/pci/ixgbe/ixgbe_bypass.h1.4
sys/dev/pci/ixgbe/ixgbe_common.c1.45
sys/dev/pci/ixgbe/ixgbe_fdir.h  1.5
sys/dev/pci/ixgbe/ixgbe_netmap.h1.3
sys/dev/pci/ixgbe/ixgbe_netmap.c1.6
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.9
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.6
sys/dev/pci/ixgbe/ixgbe_type.h  1.58
sys/dev/pci/ixgbe/ixgbe_x550.c  1.27
sys/dev/pci/ixgbe/ixv.c 1.186 via patch

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
- struct adapter *adapter -> struct ixgbe_softc *sc
- master -> primary
- black -> block

ixg(4): Whitespace. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.4.8.3 -r1.4.8.4 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.2.8.1 -r1.2.8.2 src/sys/dev/pci/ixgbe/if_fdir.c
cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.54.2.12 -r1.54.2.13 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.199.2.27 -r1.199.2.28 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.56.2.10 -r1.56.2.11 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/dev/pci/ixgbe/ixgbe_api.h
cvs rdiff -u -r1.1.14.2 -r1.1.14.3 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.25.2.7 -r1.25.2.8 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/sys/dev/pci/ixgbe/ixgbe_fdir.h
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/pci/ixgbe/ixgbe_netmap.c
cvs rdiff -u -r1.1.14.1 -r1.1.14.2 src/sys/dev/pci/ixgbe/ixgbe_netmap.h
cvs rdiff -u -r1.4.8.4 -r1.4.8.5 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.3.8.2 -r1.3.8.3 src/sys/dev/pci/ixgbe/ixgbe_sriov.h
cvs rdiff -u -r1.41.2.9 -r1.41.2.10 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.15.2.6 -r1.15.2.7 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.125.2.22 -r1.125.2.23 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: [netbsd-10] src/sys/dev/pci/ixgbe

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:16:51 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-10]: if_bypass.c if_fdir.c if_sriov.c
ix_txrx.c ixgbe.c ixgbe.h ixgbe_api.h ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_fdir.h ixgbe_netmap.c ixgbe_netmap.h
ixgbe_osdep.c ixgbe_sriov.h ixgbe_type.h ixgbe_x550.c ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #405):

sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.27
sys/dev/pci/ixgbe/ixgbe_fdir.h: revision 1.5
sys/dev/pci/ixgbe/ixv.c: revision 1.186
sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.9
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.17
sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.17
sys/dev/pci/ixgbe/ixgbe.h: revision 1.89
sys/dev/pci/ixgbe/if_fdir.c: revision 1.6
sys/dev/pci/ixgbe/if_sriov.c: revision 1.18
sys/dev/pci/ixgbe/ixgbe.c: revision 1.333
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.102
sys/dev/pci/ixgbe/ixgbe.c: revision 1.339
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.58
sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.6
sys/dev/pci/ixgbe/if_bypass.c: revision 1.10
sys/dev/pci/ixgbe/ixgbe_bypass.h: revision 1.4
sys/dev/pci/ixgbe/ixgbe_netmap.h: revision 1.3
sys/dev/pci/ixgbe/ixgbe_netmap.c: revision 1.6
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.45

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
- struct adapter *adapter -> struct ixgbe_softc *sc
- master -> primary
- black -> block

ixg(4): Whitespace. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.5 -r1.5.14.1 src/sys/dev/pci/ixgbe/if_fdir.c
cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.100.4.1 -r1.100.4.2 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.324.2.2 -r1.324.2.3 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.86.4.1 -r1.86.4.2 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/dev/pci/ixgbe/ixgbe_api.h \
src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.43.4.1 -r1.43.4.2 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/dev/pci/ixgbe/ixgbe_fdir.h
cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/dev/pci/ixgbe/ixgbe_netmap.c \
src/sys/dev/pci/ixgbe/ixgbe_sriov.h
cvs rdiff -u -r1.2 -r1.2.14.1 src/sys/dev/pci/ixgbe/ixgbe_netmap.h
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.26 -r1.26.4.1 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.183.4.1 -r1.183.4.2 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: [netbsd-10] src/etc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:04:49 UTC 2023

Modified Files:
src/etc/defaults [netbsd-10]: rc.conf
src/etc/rc.d [netbsd-10]: npf

Log Message:
Pull up following revision(s) (requested by abs in ticket #404):

etc/rc.d/npf: revision 1.8
etc/defaults/rc.conf: revision 1.167

Add support to npf_rules to rc.conf
- Allows overriding default from /etc/npf.conf
- Indicate rules file used in output
- Drop check for file presence in script - rely on npf exiting with error


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.2 -r1.162.2.3 src/etc/defaults/rc.conf
cvs rdiff -u -r1.7 -r1.7.6.1 src/etc/rc.d/npf

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.162.2.2 src/etc/defaults/rc.conf:1.162.2.3
--- src/etc/defaults/rc.conf:1.162.2.2	Mon Oct  2 13:26:04 2023
+++ src/etc/defaults/rc.conf	Fri Oct 13 18:04:49 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.162.2.2 2023/10/02 13:26:04 martin Exp $
+#	$NetBSD: rc.conf,v 1.162.2.3 2023/10/13 18:04:49 martin Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -181,7 +181,7 @@ securelevel=""	# securelevel to set 
 ifconfig_wait_dad_flags="-w 15 -W 5"
 
 mdnsd=NO
-npf=NO
+npf=NO			npf_rules="/etc/npf.conf"
 npfd=NO			npfd_flags=""
 ipfilter=NO		ipfilter_flags=""	# uses /etc/ipf.conf
 ipnat=NO	# uses /etc/ipnat.conf

Index: src/etc/rc.d/npf
diff -u src/etc/rc.d/npf:1.7 src/etc/rc.d/npf:1.7.6.1
--- src/etc/rc.d/npf:1.7	Tue Sep  8 12:52:18 2020
+++ src/etc/rc.d/npf	Fri Oct 13 18:04:49 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: npf,v 1.7 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: npf,v 1.7.6.1 2023/10/13 18:04:49 martin Exp $
 #
 # Public Domain.
 #
@@ -14,8 +14,6 @@ $_rc_subr_loaded . /etc/rc.subr
 name="npf"
 rcvar=$name
 
-config="/etc/npf.conf"
-
 start_cmd="npf_start"
 stop_cmd="npf_stop"
 
@@ -23,19 +21,11 @@ reload_cmd="npf_reload"
 status_cmd="npf_status"
 extra_commands="reload status"
 
-npf_cfg_check()
-{
-	if [ ! -f ${config} ]; then
-		warn "${config} is not readable; failed."
-		exit 1
-	fi
-}
 
 npf_start()
 {
-	echo "Enabling NPF."
-	npf_cfg_check
-	/sbin/npfctl reload
+	echo "Enabling NPF $npf_rules"
+	/sbin/npfctl reload "$npf_rules"
 
 	# The npf_boot script has enabled npf already.
 	if [ "$autoboot" != "yes" ]; then
@@ -52,9 +42,8 @@ npf_stop()
 
 npf_reload()
 {
-	echo "Reloading NPF ruleset."
-	npf_cfg_check
-	/sbin/npfctl reload
+	echo "Reloading NPF ruleset $npf_rules"
+	/sbin/npfctl reload "$npf_rules"
 }
 
 npf_status()



CVS commit: [netbsd-10] src/etc

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:04:49 UTC 2023

Modified Files:
src/etc/defaults [netbsd-10]: rc.conf
src/etc/rc.d [netbsd-10]: npf

Log Message:
Pull up following revision(s) (requested by abs in ticket #404):

etc/rc.d/npf: revision 1.8
etc/defaults/rc.conf: revision 1.167

Add support to npf_rules to rc.conf
- Allows overriding default from /etc/npf.conf
- Indicate rules file used in output
- Drop check for file presence in script - rely on npf exiting with error


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.2 -r1.162.2.3 src/etc/defaults/rc.conf
cvs rdiff -u -r1.7 -r1.7.6.1 src/etc/rc.d/npf

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



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:02:02 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: ahcisata_pci.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1911):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.38.8.1 -r1.38.8.2 src/sys/dev/pci/ahcisata_pci.c

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

Modified files:

Index: src/sys/dev/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.38.8.1 src/sys/dev/pci/ahcisata_pci.c:1.38.8.2
--- src/sys/dev/pci/ahcisata_pci.c:1.38.8.1	Tue Dec 18 18:26:23 2018
+++ src/sys/dev/pci/ahcisata_pci.c	Fri Oct 13 18:02:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.38.8.1 2018/12/18 18:26:23 martin Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.38.8.2 2023/10/13 18:02:02 martin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.38.8.1 2018/12/18 18:26:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.38.8.2 2023/10/13 18:02:02 martin Exp $");
 
 #include 
 #include 
@@ -194,6 +194,8 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_12,
 	AHCI_PCI_QUIRK_FORCE },
+	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1062_JMB575,
+	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA,
 	AHCI_PCI_QUIRK_FORCE },
 };



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:02:02 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: ahcisata_pci.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1911):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.38.8.1 -r1.38.8.2 src/sys/dev/pci/ahcisata_pci.c

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



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:00:42 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by abs in ticket #1748):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/dev/pci/ahcisata_pci.c

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

Modified files:

Index: src/sys/dev/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.55.4.2 src/sys/dev/pci/ahcisata_pci.c:1.55.4.3
--- src/sys/dev/pci/ahcisata_pci.c:1.55.4.2	Tue Jan 21 15:19:51 2020
+++ src/sys/dev/pci/ahcisata_pci.c	Fri Oct 13 18:00:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.55.4.2 2020/01/21 15:19:51 martin Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.55.4.3 2023/10/13 18:00:42 martin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55.4.2 2020/01/21 15:19:51 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55.4.3 2023/10/13 18:00:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -202,6 +202,8 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_12,
 	AHCI_PCI_QUIRK_FORCE },
+	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1062_JMB575,
+	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA,
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801JI_SATA_AHCI,



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 18:00:42 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by abs in ticket #1748):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:59:34 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: ahcisata_pci.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #403):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.68.2.2 -r1.68.2.3 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:59:34 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: ahcisata_pci.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #403):

sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device


To generate a diff of this commit:
cvs rdiff -u -r1.68.2.2 -r1.68.2.3 src/sys/dev/pci/ahcisata_pci.c

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

Modified files:

Index: src/sys/dev/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.68.2.2 src/sys/dev/pci/ahcisata_pci.c:1.68.2.3
--- src/sys/dev/pci/ahcisata_pci.c:1.68.2.2	Mon Sep 11 14:39:21 2023
+++ src/sys/dev/pci/ahcisata_pci.c	Fri Oct 13 17:59:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.68.2.2 2023/09/11 14:39:21 martin Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.68.2.3 2023/10/13 17:59:33 martin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.68.2.2 2023/09/11 14:39:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.68.2.3 2023/10/13 17:59:33 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -198,6 +198,8 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_12,
 	AHCI_PCI_QUIRK_FORCE },
+	{ PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1062_JMB575,
+	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA,
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA_AHCI,



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:57:27 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1911 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.27 -r1.1281.2.28 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.27 -r1.1280.2.28 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:57:27 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1911 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.27 -r1.1281.2.28 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.27 -r1.1280.2.28 src/sys/dev/pci/pcidevs_data.h

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



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:54:46 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #1911):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.27 -r1.1289.2.28 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1289.2.27 src/sys/dev/pci/pcidevs:1.1289.2.28
--- src/sys/dev/pci/pcidevs:1.1289.2.27	Mon Aug 21 12:37:34 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 17:54:46 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.27 2023/08/21 12:37:34 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.28 2023/10/13 17:54:46 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1510,6 +1510,7 @@ product ASMEDIA ASM1061_01	0x0601	ASM106
 product ASMEDIA ASM1061_02	0x0602	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_11	0x0611	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_12	0x0612	ASM1061 AHCI SATA III Controller
+product ASMEDIA ASM1062_JMB575	0x0624	ASM1062 + JMB575 Port Multiplier
 product ASMEDIA ASM106X		0x0625	ASM106x AHCI SATA III Controller
 product	ASMEDIA	ASM1042		0x1042	ASM1042 USB 3.0 Host Controller
 product ASMEDIA ASM1083		0x1080	ASM1083/1085 PCIe-PCI Bridge



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:54:46 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #1911):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.27 -r1.1289.2.28 src/sys/dev/pci/pcidevs

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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:52:45 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1748 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.18 -r1.1371.2.19 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.18 -r1.1370.2.19 src/sys/dev/pci/pcidevs_data.h

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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:52:45 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1748 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.18 -r1.1371.2.19 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.18 -r1.1370.2.19 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:50:41 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #1748):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.18 -r1.1383.2.19 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1383.2.18 src/sys/dev/pci/pcidevs:1.1383.2.19
--- src/sys/dev/pci/pcidevs:1.1383.2.18	Mon Aug 21 12:32:25 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 17:50:40 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1383.2.18 2023/08/21 12:32:25 martin Exp $
+$NetBSD: pcidevs,v 1.1383.2.19 2023/10/13 17:50:40 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1510,6 +1510,7 @@ product ASMEDIA ASM1061_01	0x0601	ASM106
 product ASMEDIA ASM1061_02	0x0602	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_11	0x0611	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_12	0x0612	ASM1061 AHCI SATA III Controller
+product ASMEDIA ASM1062_JMB575	0x0624	ASM1062 + JMB575 Port Multiplier
 product ASMEDIA ASM106X		0x0625	ASM106x AHCI SATA III Controller
 product	ASMEDIA	ASM1042		0x1042	ASM1042 USB 3.0 Host Controller
 product ASMEDIA ASM1083		0x1080	ASM1083/1085 PCIe-PCI Bridge



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

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:50:41 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #1748):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1383.2.18 -r1.1383.2.19 src/sys/dev/pci/pcidevs

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:49:14 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #403 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.7 -r1.1452.2.8 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.7 -r1.1451.2.8 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:49:14 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #403 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier)


To generate a diff of this commit:
cvs rdiff -u -r1.1452.2.7 -r1.1452.2.8 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1451.2.7 -r1.1451.2.8 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:46:26 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #403):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.6 -r1.1471.2.7 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1471.2.6 src/sys/dev/pci/pcidevs:1.1471.2.7
--- src/sys/dev/pci/pcidevs:1.1471.2.6	Sun Oct  8 13:02:08 2023
+++ src/sys/dev/pci/pcidevs	Fri Oct 13 17:46:26 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1471.2.6 2023/10/08 13:02:08 martin Exp $
+$NetBSD: pcidevs,v 1.1471.2.7 2023/10/13 17:46:26 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1510,6 +1510,7 @@ product ASMEDIA ASM1061_01	0x0601	ASM106
 product ASMEDIA ASM1061_02	0x0602	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_11	0x0611	ASM1061 AHCI SATA III Controller
 product ASMEDIA ASM1061_12	0x0612	ASM1061 AHCI SATA III Controller
+product ASMEDIA ASM1062_JMB575	0x0624	ASM1062 + JMB575 Port Multiplier
 product ASMEDIA ASM106X		0x0625	ASM106x AHCI SATA III Controller
 product	ASMEDIA	ASM1042		0x1042	ASM1042 USB 3.0 Host Controller
 product ASMEDIA ASM1083		0x1080	ASM1083/1085 PCIe-PCI Bridge



CVS commit: [netbsd-10] src/sys/dev/pci

2023-10-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct 13 17:46:26 UTC 2023

Modified Files:
src/sys/dev/pci [netbsd-10]: pcidevs

Log Message:
Pull up following revision(s) (requested by abs in ticket #403):

sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier


To generate a diff of this commit:
cvs rdiff -u -r1.1471.2.6 -r1.1471.2.7 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/arch/luna68k

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:35:14 UTC 2023

Modified Files:
src/sys/arch/luna68k/conf: GENERIC INSTALL majors.luna68k
src/sys/arch/luna68k/dev/xplx: xplx.asm

Log Message:
Remove trailing spaces and TAB.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/luna68k/conf/GENERIC
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/luna68k/conf/INSTALL
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/conf/majors.luna68k
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/dev/xplx/xplx.asm

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



CVS commit: src/sys/arch/luna68k

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:35:14 UTC 2023

Modified Files:
src/sys/arch/luna68k/conf: GENERIC INSTALL majors.luna68k
src/sys/arch/luna68k/dev/xplx: xplx.asm

Log Message:
Remove trailing spaces and TAB.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/luna68k/conf/GENERIC
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/luna68k/conf/INSTALL
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/conf/majors.luna68k
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/dev/xplx/xplx.asm

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/luna68k/conf/GENERIC
diff -u src/sys/arch/luna68k/conf/GENERIC:1.136 src/sys/arch/luna68k/conf/GENERIC:1.137
--- src/sys/arch/luna68k/conf/GENERIC:1.136	Sun Feb 12 14:50:40 2023
+++ src/sys/arch/luna68k/conf/GENERIC	Fri Oct 13 16:35:14 2023
@@ -1,7 +1,7 @@
-# $NetBSD: GENERIC,v 1.136 2023/02/12 14:50:40 abs Exp $
+# $NetBSD: GENERIC,v 1.137 2023/10/13 16:35:14 tsutsui Exp $
 #
 # GENERIC machine description file
-# 
+#
 # This machine description file is used to generate the default NetBSD
 # kernel.  The generic kernel does not include all options, subsystems
 # and device drivers, but should be useful for most applications.
@@ -22,7 +22,7 @@ include 	"arch/luna68k/conf/std.luna68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.136 $"
+#ident 		"GENERIC-$Revision: 1.137 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer"
 	# See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for

Index: src/sys/arch/luna68k/conf/INSTALL
diff -u src/sys/arch/luna68k/conf/INSTALL:1.35 src/sys/arch/luna68k/conf/INSTALL:1.36
--- src/sys/arch/luna68k/conf/INSTALL:1.35	Sun Aug  7 02:52:27 2022
+++ src/sys/arch/luna68k/conf/INSTALL	Fri Oct 13 16:35:14 2023
@@ -1,7 +1,7 @@
-# $NetBSD: INSTALL,v 1.35 2022/08/07 02:52:27 simonb Exp $
+# $NetBSD: INSTALL,v 1.36 2023/10/13 16:35:14 tsutsui Exp $
 #
 # config for installation ramdisk kernel
-# 
+#
 include 	"arch/luna68k/conf/std.luna68k"
 
 makeoptions	COPTS="-Os -fno-unwind-tables"	# Optimise for space.

Index: src/sys/arch/luna68k/conf/majors.luna68k
diff -u src/sys/arch/luna68k/conf/majors.luna68k:1.25 src/sys/arch/luna68k/conf/majors.luna68k:1.26
--- src/sys/arch/luna68k/conf/majors.luna68k:1.25	Fri Jun 10 21:42:23 2022
+++ src/sys/arch/luna68k/conf/majors.luna68k	Fri Oct 13 16:35:14 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.luna68k,v 1.25 2022/06/10 21:42:23 tsutsui Exp $
+#	$NetBSD: majors.luna68k,v 1.26 2023/10/13 16:35:14 tsutsui Exp $
 #
 # Device majors for luna68k
 #
@@ -45,5 +45,5 @@ device-major	audio		char 42			audio
 #device-major	obsolete	char 98			obsolete (nsmb)
 
 # Majors up to 143 are reserved for machine-dependent drivers.
-# New machine-independent driver majors are assigned in 
+# New machine-independent driver majors are assigned in
 # sys/conf/majors.

Index: src/sys/arch/luna68k/dev/xplx/xplx.asm
diff -u src/sys/arch/luna68k/dev/xplx/xplx.asm:1.1 src/sys/arch/luna68k/dev/xplx/xplx.asm:1.2
--- src/sys/arch/luna68k/dev/xplx/xplx.asm:1.1	Fri Jun 10 21:42:24 2022
+++ src/sys/arch/luna68k/dev/xplx/xplx.asm	Fri Oct 13 16:35:14 2023
@@ -117,7 +117,7 @@
 ;
 ;  +4.b STAT_RESET
 ;ファームウェア転送で 0 にされる。
-;リセット位置の実行のたびに +1 
+;リセット位置の実行のたびに +1
 ;すなわち何もなければ 1 になっている。
 ;  +5.3 align
 ;  +8.w PRT0_TIMER
@@ -1491,7 +1491,7 @@ PAM_DRIVER_MAP:
 	DW	136		;CYCLE_CLK
 	DB	36		;REPT_CLK
 	DB	38		;REPT_MAX
-	
+
 
 
 PAM_DRIVER_MAP_LEN:	.EQU	$-PAM_DRIVER_MAP



CVS commit: src/sys/arch/luna68k/stand/boot

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:30:01 UTC 2023

Modified Files:
src/sys/arch/luna68k/stand/boot: bmd.c

Log Message:
Fix spelling. From OpenBSD/luna88k.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/stand/boot/bmd.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/luna68k/stand/boot/bmd.c
diff -u src/sys/arch/luna68k/stand/boot/bmd.c:1.8 src/sys/arch/luna68k/stand/boot/bmd.c:1.9
--- src/sys/arch/luna68k/stand/boot/bmd.c:1.8	Sun Jun 30 05:04:49 2019
+++ src/sys/arch/luna68k/stand/boot/bmd.c	Fri Oct 13 16:30:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bmd.c,v 1.8 2019/06/30 05:04:49 tsutsui Exp $	*/
+/*	$NetBSD: bmd.c,v 1.9 2023/10/13 16:30:01 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -471,7 +471,7 @@ bmdclear(void)
 
 
 /*
- *  charactor operation routines
+ *  character operation routines
  */
 
 static void



CVS commit: src/sys/arch/luna68k/stand/boot

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:30:01 UTC 2023

Modified Files:
src/sys/arch/luna68k/stand/boot: bmd.c

Log Message:
Fix spelling. From OpenBSD/luna88k.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/stand/boot/bmd.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/luna68k/stand/boot

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:10:24 UTC 2023

Modified Files:
src/sys/arch/luna68k/stand/boot: ufs_disksubr.c

Log Message:
Fix typo.  From OpenBSD/luna88k.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/luna68k/stand/boot/ufs_disksubr.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/luna68k/stand/boot/ufs_disksubr.c
diff -u src/sys/arch/luna68k/stand/boot/ufs_disksubr.c:1.6 src/sys/arch/luna68k/stand/boot/ufs_disksubr.c:1.7
--- src/sys/arch/luna68k/stand/boot/ufs_disksubr.c:1.6	Mon May 17 19:31:38 2021
+++ src/sys/arch/luna68k/stand/boot/ufs_disksubr.c	Fri Oct 13 16:10:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_disksubr.c,v 1.6 2021/05/17 19:31:38 mrg Exp $	*/
+/*	$NetBSD: ufs_disksubr.c,v 1.7 2023/10/13 16:10:24 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -85,7 +85,7 @@
 
 /*
  * Attempt to read a disk label from a device
- * using the indicated stategy routine.
+ * using the indicated strategy routine.
  * The label must be partly set up before this:
  * secpercyl and anything required in the strategy routine
  * (e.g., sector size) must be filled in before calling us.



CVS commit: src/sys/arch/luna68k/stand/boot

2023-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 13 16:10:24 UTC 2023

Modified Files:
src/sys/arch/luna68k/stand/boot: ufs_disksubr.c

Log Message:
Fix typo.  From OpenBSD/luna88k.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/luna68k/stand/boot/ufs_disksubr.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/kern

2023-10-13 Thread Taylor R Campbell
> Date: Fri, 13 Oct 2023 17:52:07 +0900
> From: Rin Okuyama 
> 
> It would be really nice if we can find some systematical/reliable methods to
> figure out files that really depends on struct syncobj, e.g.. I tried
> ctfdump(1) to
> *.o for kernel modules, but I cannot extract information better than
> ``grep syncobj.h .depend''...

The attached patch removes all use of sys/syncobj.h outside .c files
under sys, so we can be reasonably confident userland programs --
except for crash(8), which is kind of special -- are unaffected.

However, I'm going to hold off on committing this until the tree's
sleepq issues are fixed so our testbed can run again.
>From 7e9e2af19ecc6f4262b928da8a97a49d171c8072 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell 
Date: Fri, 13 Oct 2023 11:04:20 +
Subject: [PATCH] sys/lwp.h: Nix sys/syncobj.h dependency.

Remove it in ddb/db_syncobj.h too.

New sys/wchan.h defines wchan_t so that users need not pull in
sys/syncobj.h to get it.

Sprinkle #include  in .c files where it is now needed.
---
 sys/ddb/db_syncobj.h  |  2 +-
 sys/kern/kern_condvar.c   |  1 +
 sys/kern/kern_ktrace.c|  1 +
 sys/kern/kern_lwp.c   |  1 +
 sys/kern/kern_mutex.c |  1 +
 sys/kern/kern_rwlock.c|  1 +
 sys/kern/kern_sleepq.c|  1 +
 sys/kern/kern_turnstile.c |  1 +
 sys/kern/sys_lwp.c|  1 +
 sys/kern/sys_select.c |  1 +
 sys/sys/lwp.h |  2 +-
 sys/sys/sleepq.h  |  2 +-
 sys/sys/sleeptab.h|  6 +-
 sys/sys/syncobj.h |  4 ++--
 sys/sys/wchan.h   | 37 +
 15 files changed, 56 insertions(+), 6 deletions(-)
 create mode 100644 sys/sys/wchan.h

diff --git a/sys/ddb/db_syncobj.h b/sys/ddb/db_syncobj.h
index 2c2ad89ba177..dc7594f5163e 100644
--- a/sys/ddb/db_syncobj.h
+++ b/sys/ddb/db_syncobj.h
@@ -29,7 +29,7 @@
 #ifndef_DDB_DB_SYNCOBJ_H
 #define_DDB_DB_SYNCOBJ_H
 
-#include 
+#include 
 
 struct lwp;
 struct syncobj;
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index 478c4a35ff2b..c25282e1beb3 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -45,6 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.59 2023/10/12 
23:51:05 ad Exp $")
 #include 
 #include 
 #include 
+#include 
 
 /*
  * Accessors for the private contents of the kcondvar_t data type.
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 5ad5272af7d8..812be0c2c9ca 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -77,6 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.182 2022/07/01 
01:07:56 riastradh
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/sys/kern/kern_lwp.c b/sys/kern/kern_lwp.c
index 77e43242f0f9..971e0180f1f6 100644
--- a/sys/kern/kern_lwp.c
+++ b/sys/kern/kern_lwp.c
@@ -253,6 +253,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.265 2023/10/05 
19:41:06 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 810ea121a0bd..640909bc533e 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.110 2023/09/23 
18:48:04 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index 88db7d507b4d..96312874a069 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -62,6 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.74 2023/10/04 
20:39:35 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/sys/kern/kern_sleepq.c b/sys/kern/kern_sleepq.c
index e9d39445f75b..bb43e78f6f6b 100644
--- a/sys/kern/kern_sleepq.c
+++ b/sys/kern/kern_sleepq.c
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.83 2023/10/08 
13:37:26 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 /*
  * for sleepq_abort:
diff --git a/sys/kern/kern_turnstile.c b/sys/kern/kern_turnstile.c
index 0cd8886cb6b5..85bdf946c325 100644
--- a/sys/kern/kern_turnstile.c
+++ b/sys/kern/kern_turnstile.c
@@ -68,6 +68,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.53 
2023/10/08 13:23:05 ad Exp $
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /*
diff --git a/sys/kern/sys_lwp.c b/sys/kern/sys_lwp.c
index c71cf1e823d6..108d40641e38 100644
--- a/sys/kern/sys_lwp.c
+++ b/sys/kern/sys_lwp.c
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.87 2023/10/08 
13:23:05 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/sys/kern/sys_select.c b/sys/kern/sys_select.c
index 9719d220e319..16962505663c 100644
--- a/sys/kern/sys_select.c
+++ b/sys/kern/sys_select.c
@@ -106,6 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.64 2023/10/08 
13:23:05 ad Exp $");
 #include 
 #include 
 #include 
+#include 
 
 /* Flags for lwp::l_selflag. */
 #defineSEL_RESET   0   /* awoken, interrupted, or not yet 

Re: CVS commit: src/sys

2023-10-13 Thread Taylor R Campbell
> Date: Tue, 10 Oct 2023 18:58:29 +
> From: Andrew Doran 
> 
> On Tue, Oct 10, 2023 at 06:00:57PM +0200, J. Hannken-Illjes wrote:
> 
> > > cvs rdiff -u -r1.63 -r1.64 src/sys/kern/sys_select.c
> > 
> > -sleepq_unsleep(l, false);
> > +sleepq_remove(l->l_sleepq, l, true);
> > }
> >}
> >mutex_spin_exit(lock);
> > 
> > Looks like sleepq_remove() unlocks l->l_mutex == lock and
> > then mutex_spin_exit(lock) will unlock an unlocked mutex.
> [...]
> Did you encounter a problem?

Yes, this appears to be breaking hundreds of automatic tests, which is
getting in the way of all kernel testing.

https://mail-index.netbsd.org/current-users/2023/10/13/msg044522.html
https://mail-index.netbsd.org/current-users/2023/10/13/msg044523.html
https://mail-index.netbsd.org/current-users/2023/10/13/msg044524.html

Enough breakage has happened over several days that bracket is unable
to discern which changes have broken which tests now:

https://mail-index.netbsd.org/current-users/2023/10/13/msg044525.html
https://mail-index.netbsd.org/current-users/2023/10/13/msg044526.html

Please fix immediately or back out.


Re: CVS commit: src/sys/kern

2023-10-13 Thread Rin Okuyama
On Thu, Oct 12, 2023 at 8:23 PM Taylor R Campbell
 wrote:
>
> > Date: Thu, 12 Oct 2023 17:06:02 +0900
> > From: Rin Okuyama 
> >
> > On Thu, Oct 5, 2023 at 5:39 AM Andrew Doran  wrote:
> > >
> > > Module Name:src
> > > Committed By:   ad
> > > Date:   Wed Oct  4 20:39:35 UTC 2023
> > >
> > > Modified Files:
> > > src/sys/kern: kern_rwlock.c kern_turnstile.c
> > >
> > > Log Message:
> > > Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
> > > more informative than "tstile".
> >
> > Cool! Can I send a pull up request to netbsd-10?
>
> Not sure -- it would depend on this commit to introduce struct
> syncobj::sobj_name:
>
> https://mail-index.netbsd.org/source-changes/2023/07/17/msg146058.html
>
> This is a potential kernel ABI change.  I didn't investigate to
> determine whether it would be safe to pull up.

Thanks, I didn't notice that. It should be too risky to pull these up
just before RC1.
I withdraw this proposal.

PS
It would be really nice if we can find some systematical/reliable methods to
figure out files that really depends on struct syncobj, e.g.. I tried
ctfdump(1) to
*.o for kernel modules, but I cannot extract information better than
``grep syncobj.h .depend''...

Thanks,
rin