CVS commit: src/tools/gdb

2020-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 02:14:49 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb
Added Files:
src/tools/gdb: mknative-gdb.old

Log Message:
Save the mknative-gdb for 8.3 and prepare the mknative-gdb for 10.x


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tools/gdb/mknative-gdb
cvs rdiff -u -r0 -r1.1 src/tools/gdb/mknative-gdb.old

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.8 src/tools/gdb/mknative-gdb:1.9
--- src/tools/gdb/mknative-gdb:1.8	Tue May 28 21:56:06 2019
+++ src/tools/gdb/mknative-gdb	Wed Sep 16 22:14:48 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.9 2020/09/17 02:14:48 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -71,12 +71,12 @@ get_gdb_libreadline () {
 	mkdir -p $_TOP/$_READLINE/arch/$_MACHINE_SUBDIR
 
 	{
-		getvars readline/Makefile \
+		getvars readline/readline/Makefile \
 			CCFLAGS OBJECTS
 	} | write_mk $_READLINE/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_READLINE/arch/$_MACHINE_SUBDIR/config.h \
-		<$_TMPDIR/readline/config.h
+		<$_TMPDIR/readline/readline/config.h
 }
 
 # gdb/lib/libdecnumber #
@@ -91,7 +91,7 @@ get_gdb_libdecnumber () {
 	write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/config.h \
-		<$_TMPDIR/readline/config.h
+		<$_TMPDIR/readline/readline/config.h
 
 	write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/gstdint.h \
 		< $_TMPDIR/libdecnumber/gstdint.h
@@ -101,7 +101,8 @@ get_gdb_libdecnumber () {
 
 get_gdb_libgdb () {
 	local _GDBP=$_GDB/lib/libgdb
-	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/build-gnulib
+	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gnulib/import
+	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gdbsupport/import
 
 	{
 		getvars gdb/Makefile \
@@ -109,6 +110,7 @@ get_gdb_libgdb () {
 	} | sed -e s@arch/@@g -e s@cli/@@g -e s@common/agent@common-agent@ \
 		-e s@common/@@g -e s@compile/@@g -e s@guile/@@g -e s@mi/@@g \
 		-e s@nat/@@g -e s@python/@@g -e s@target/@@g \
+		-e s@dwarf2/@@g -e s@unittests/@@g \
 		-e s@tui/@@g | write_mk $_GDBP/arch/$_MACHINE_SUBDIR/defs.mk
 
 #	getvars gdb/gdbserver/Makefile \
@@ -116,17 +118,35 @@ get_gdb_libgdb () {
 #		| write_mk $_GDB/bin/gdb/arch/$_MACHINE_SUBDIR/gdbserver.mk
 
 	for i in config.h version.c init.c \
-	xml-builtin.c build-gnulib/config.h jit-reader.h
+	xml-builtin.c jit-reader.h
 	do
 	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \
 		< $_TMPDIR/gdb/$i
 	done
+	
+	for i in gnulib/config.h gdbsupport/config.h \
+	gnulib/import/alloca.h gnulib/import/ctype.h \
+	gnulib/import/dirent.h gnulib/import/fcntl.h \
+	gnulib/import/fnmatch.h gnulib/import/glob.h \
+	gnulib/import/inttypes.h gnulib/import/limits.h \
+	gnulib/import/locale.h gnulib/import/math.h \
+	gnulib/import/signal.h gnulib/import/stdint.h \
+	gnulib/import/stdio.h gnulib/import/stdlib.h \
+	gnulib/import/string.h gnulib/import/time.h \
+	gnulib/import/unistd.h gnulib/import/wchar.h \
+	gnulib/import/wctype.h
+	do
+	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \
+		< $_TMPDIR/$i
+	done
 
 	for f in nm tm xm; do
-		if [ -f $_TMPDIR/gdb/$f.h ]; then 
-			ls -l $_TMPDIR/gdb/$f.h | sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' \
-| write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h
+		if [ ! -f $_TMPDIR/gdb/$f.h ]; then 
+			continue
 		fi
+		ls -l $_TMPDIR/gdb/$f.h | \
+			sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' | \
+			write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h
 	done
 
 	local _LIBSIM=$_GDB/lib/libsim

Added files:

Index: src/tools/gdb/mknative-gdb.old
diff -u /dev/null src/tools/gdb/mknative-gdb.old:1.1
--- /dev/null	Wed Sep 16 22:14:49 2020
+++ src/tools/gdb/mknative-gdb.old	Wed Sep 16 22:14:48 2020
@@ -0,0 +1,174 @@
+#!/bin/sh
+#	$NetBSD: mknative-gdb.old,v 1.1 2020/09/17 02:14:48 christos Exp $
+#
+# Shell script for generating all the constants needed for a native
+# platform build of src/external/gpl3/gdb
+#
+
+# initialise
+
+_TMPDIR=$2
+_TOP=$3
+_PLATFORM=$4
+_MACHINE_SUBDIR=$5
+_VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
+_GDB=external/gpl3/gdb
+
+. $_TOP/tools/gcc/mknative.common
+
+# gdb/lib/libbfd #
+
+get_gdb_libbfd () {
+	local _BFD=$_GDB/lib/libbfd
+	mkdir -p $_TOP/$_BFD/arch/$_MACHINE_SUBDIR
+
+	{
+		getvars bfd/Makefile \
+			libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \
+			INCLUDES TDEFAULTS
+	} | write_mk $_BFD/arch/$_MACHINE_SUBDIR/defs.mk
+
+	for i in bfd-in3.h bfd_stdint.h config.h bfd.h bfdver.h targmatch.h 
+	do
+	write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i
+	done
+}
+
+# gdb/lib/libopcodes #
+
+get_gdb_libopcodes () {
+	local _OPCODES=$_GDB/lib/libopcodes
+	

CVS commit: src/external/gpl3/gdb/dist/gdb

2020-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 02:12:31 UTC 2020

Added Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c

Log Message:
Add back accidentally missed file


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.16 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c

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

Added files:

Index: src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u /dev/null src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.16
--- /dev/null	Wed Sep 16 22:12:31 2020
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Wed Sep 16 22:12:31 2020
@@ -0,0 +1,791 @@
+/* Native-dependent code for NetBSD.
+
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see .  */
+
+#include "defs.h"
+
+#include "nbsd-nat.h"
+#include "nat/netbsd-nat.h"
+#include "gdbthread.h"
+#include "nbsd-tdep.h"
+#include "inferior.h"
+#include "gdbarch.h"
+
+#include 
+#include 
+#include 
+#include 
+
+/* Return the name of a file that can be opened to get the symbols for
+   the child process identified by PID.  */
+
+char *
+nbsd_nat_target::pid_to_exec_file (int pid)
+{
+  return const_cast (netbsd_nat::pid_to_exec_file (pid));
+}
+
+/* Return the current directory for the process identified by PID.  */
+
+static std::string
+nbsd_pid_to_cwd (int pid)
+{
+  char buf[PATH_MAX];
+  size_t buflen;
+  int mib[4] = {CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_CWD};
+  buflen = sizeof (buf);
+  if (sysctl (mib, ARRAY_SIZE (mib), buf, , NULL, 0))
+return "";
+  return buf;
+}
+
+/* Return the kinfo_proc2 structure for the process identified by PID.  */
+
+static bool
+nbsd_pid_to_kinfo_proc2 (pid_t pid, struct kinfo_proc2 *kp)
+{
+  gdb_assert (kp != nullptr);
+
+  size_t size = sizeof (*kp);
+  int mib[6] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, pid,
+		static_cast (size), 1};
+  return !sysctl (mib, ARRAY_SIZE (mib), kp, , NULL, 0);
+}
+
+/* Return the command line for the process identified by PID.  */
+
+static gdb::unique_xmalloc_ptr
+nbsd_pid_to_cmdline (int pid)
+{
+  int mib[4] = {CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_ARGV};
+
+  size_t size = 0;
+  if (::sysctl (mib, ARRAY_SIZE (mib), NULL, , NULL, 0) == -1 || size == 0)
+return nullptr;
+
+  gdb::unique_xmalloc_ptr args (XNEWVAR (char, size));
+
+  if (::sysctl (mib, ARRAY_SIZE (mib), args.get (), , NULL, 0) == -1
+  || size == 0)
+return nullptr;
+
+  /* Arguments are returned as a flattened string with NUL separators.
+ Join the arguments with spaces to form a single string.  */
+  for (size_t i = 0; i < size - 1; i++)
+if (args[i] == '\0')
+  args[i] = ' ';
+  args[size - 1] = '\0';
+
+  return args;
+}
+
+/* Return true if PTID is still active in the inferior.  */
+
+bool
+nbsd_nat_target::thread_alive (ptid_t ptid)
+{
+  return netbsd_nat::thread_alive (ptid);
+}
+
+/* Return the name assigned to a thread by an application.  Returns
+   the string in a static buffer.  */
+
+const char *
+nbsd_nat_target::thread_name (struct thread_info *thr)
+{
+  ptid_t ptid = thr->ptid;
+  return netbsd_nat::thread_name (ptid);
+}
+
+/* Implement the "post_attach" target_ops method.  */
+
+static void
+nbsd_add_threads (nbsd_nat_target *target, pid_t pid)
+{
+  auto fn
+= [] (ptid_t ptid)
+  {
+	if (!in_thread_list (target, ptid))
+	  {
+	if (inferior_ptid.lwp () == 0)
+	  thread_change_ptid (target, inferior_ptid, ptid);
+	else
+	  add_thread (target, ptid);
+	  }
+  };
+
+  netbsd_nat::for_each_thread (pid, fn);
+}
+
+/* Implement the "post_startup_inferior" target_ops method.  */
+
+void
+nbsd_nat_target::post_startup_inferior (ptid_t ptid)
+{
+  netbsd_nat::enable_proc_events (ptid.pid ());
+}
+
+/* Implement the "post_attach" target_ops method.  */
+
+void
+nbsd_nat_target::post_attach (int pid)
+{
+  netbsd_nat::enable_proc_events (pid);
+  nbsd_add_threads (this, pid);
+}
+
+/* Implement the "update_thread_list" target_ops method.  */
+
+void
+nbsd_nat_target::update_thread_list ()
+{
+  delete_exited_threads ();
+}
+
+/* Convert PTID to a string.  */
+
+std::string
+nbsd_nat_target::pid_to_str (ptid_t ptid)
+{
+  int lwp = ptid.lwp ();
+
+  if (lwp != 0)
+{
+  pid_t pid = ptid.pid ();
+
+  return string_printf ("LWP %d of process 

CVS commit: src/sys/dev/scsipi

2020-09-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Sep 17 01:19:41 UTC 2020

Modified Files:
src/sys/dev/scsipi: scsiconf.c scsipi_base.c

Log Message:
Some misspelling-in-comments fixes for scsipi


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.186 -r1.187 src/sys/dev/scsipi/scsipi_base.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/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.288 src/sys/dev/scsipi/scsiconf.c:1.289
--- src/sys/dev/scsipi/scsiconf.c:1.288	Sat Jul 11 14:31:46 2020
+++ src/sys/dev/scsipi/scsiconf.c	Thu Sep 17 01:19:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.289 2020/09/17 01:19:41 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.289 2020/09/17 01:19:41 jakllsch Exp $");
 
 #include 
 #include 
@@ -401,7 +401,7 @@ scsi_probe_bus(struct scsibus_softc *sc,
 
 	/*
 	 * Some HBAs provide an abstracted view of the bus; give them an
-	 * oppertunity to re-scan it before we do.
+	 * opportunity to re-scan it before we do.
 	 */
 	scsipi_adapter_ioctl(chan, SCBUSIOLLSCAN, NULL, 0, curproc);
 
@@ -809,10 +809,10 @@ scsi_probe_device(struct scsibus_softc *
 	int locs[SCSIBUSCF_NLOCS];
 
 	/*
-	 * Assume no more luns to search after this one.
+	 * Assume no more LUNs to search after this one.
 	 * If we successfully get Inquiry data and after
 	 * merging quirks we find we can probe for more
-	 * luns, we will.
+	 * LUNs, we will.
 	 */
 	docontinue = 0;
 
@@ -893,7 +893,7 @@ scsi_probe_device(struct scsibus_softc *
 		break;
 	}
 
-	/* Let the adapter driver handle the device separatley if it wants. */
+	/* Let the adapter driver handle the device separately if it wants. */
 	if (chan->chan_adapter->adapt_accesschk != NULL &&
 	(*chan->chan_adapter->adapt_accesschk)(periph, _inqbuf))
 		goto bad;

Index: src/sys/dev/scsipi/scsipi_base.c
diff -u src/sys/dev/scsipi/scsipi_base.c:1.186 src/sys/dev/scsipi/scsipi_base.c:1.187
--- src/sys/dev/scsipi/scsipi_base.c:1.186	Mon Apr 13 00:27:17 2020
+++ src/sys/dev/scsipi/scsipi_base.c	Thu Sep 17 01:19:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsipi_base.c,v 1.186 2020/04/13 00:27:17 chs Exp $	*/
+/*	$NetBSD: scsipi_base.c,v 1.187 2020/09/17 01:19:41 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.186 2020/04/13 00:27:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.187 2020/09/17 01:19:41 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -871,7 +871,7 @@ scsipi_print_cdb(struct scsipi_generic *
  *	Look at the returned sense and act on the error, determining
  *	the unix error number to pass back.  (0 = report no error)
  *
- *	NOTE: If we return ERESTART, we are expected to haved
+ *	NOTE: If we return ERESTART, we are expected to have
  *	thawed the device!
  *
  *	THIS IS THE DEFAULT ERROR HANDLER FOR SCSI DEVICES.
@@ -1208,7 +1208,7 @@ scsipi_inquire(struct scsipi_periph *per
 	 * If we request more data than the device can provide, it SHOULD just
 	 * return a short response.  However, some devices error with an
 	 * ILLEGAL REQUEST sense code, and yet others have even more special
-	 * failture modes (such as the GL641USB flash adapter, which goes loony
+	 * failure modes (such as the GL641USB flash adapter, which goes loony
 	 * and sends corrupted CRCs).  To work around this, and to bring our
 	 * behavior more in line with other OSes, we do a shorter inquiry,
 	 * covering all the SCSI-2 information, first, and then request more
@@ -1395,7 +1395,7 @@ scsipi_mode_select_big(struct scsipi_per
 /*
  * scsipi_get_opcodeinfo:
  *
- * query the device for supported commends and their timeout
+ * query the device for supported commands and their timeout
  * building a timeout lookup table if timeout information is available.
  */
 void
@@ -1514,7 +1514,7 @@ scsipi_get_opcodeinfo(struct scsipi_peri
 
 /*
  * scsipi_update_timeouts:
- * 	Overide timeout value if device/config provided
+ * 	Override timeout value if device/config provided
  *  timeouts are available.
  */
 static void
@@ -1665,9 +1665,9 @@ scsipi_done(struct scsipi_xfer *xs)
 		/*
 		 * If it's a polling job, just return, to unwind the
 		 * call graph.  We don't need to restart the queue,
-		 * because pollings jobs are treated specially, and
+		 * because polling jobs are treated specially, and
 		 * are really only used during crash dumps anyway
-		 * (XXX or during boot-time autconfiguration of
+		 * (XXX or during boot-time autoconfiguration of
 		 * 

CVS commit: src/sys/arch/alpha

2020-09-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep 17 00:48:57 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: interrupt.c locore.s
src/sys/arch/alpha/include: intr.h

Log Message:
Reduce the __HAVE_FAST_SOFTINTS #ifdef perimeter.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/alpha/include/intr.h

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

Modified files:

Index: src/sys/arch/alpha/alpha/interrupt.c
diff -u src/sys/arch/alpha/alpha/interrupt.c:1.85 src/sys/arch/alpha/alpha/interrupt.c:1.86
--- src/sys/arch/alpha/alpha/interrupt.c:1.85	Wed Sep 16 04:07:32 2020
+++ src/sys/arch/alpha/alpha/interrupt.c	Thu Sep 17 00:48:56 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $");
 
 #include 
 #include 
@@ -450,7 +450,9 @@ badaddr_read(void *addr, size_t size, vo
 	return (rv);
 }
 
-#ifdef __HAVE_FAST_SOFTINTS
+/*
+ * Fast soft interrupt support.
+ */
 
 #define	SOFTINT_CLOCK_MASK	__BIT(SOFTINT_CLOCK)
 #define	SOFTINT_BIO_MASK	__BIT(SOFTINT_BIO)
@@ -468,6 +470,8 @@ badaddr_read(void *addr, size_t size, vo
 #define	SOFTINTS_ELIGIBLE(ipl)		\
 	((ALPHA_ALL_SOFTINTS << ((ipl) << 1)) & ALPHA_ALL_SOFTINTS)
 
+#ifdef __HAVE_FAST_SOFTINTS
+
 /* Validate some assumptions the code makes. */
 __CTASSERT(SOFTINT_TO_IPL(SOFTINT_CLOCK) == ALPHA_PSL_IPL_SOFT_LO);
 __CTASSERT(SOFTINT_TO_IPL(SOFTINT_BIO) == ALPHA_PSL_IPL_SOFT_LO);
@@ -522,6 +526,17 @@ softint_init_md(lwp_t * const l, u_int c
 	*machdep = si_bit;
 }
 
+#else /* ! __HAVE_FAST_SOFTINTS */
+
+/* Temporary stub for alpha_softint_switchto(). */
+void
+softint_dispatch(struct lwp * const pinned __unused, int const s __unused)
+{
+	panic("softint_dispatch");
+}
+
+#endif /* __HAVE_FAST_SOFTINTS */
+
 /*
  * Helper macro.
  *
@@ -547,6 +562,7 @@ softint_init_md(lwp_t * const l, u_int c
 void
 alpha_softint_dispatch(int const ipl)
 {
+#ifdef __HAVE_FAST_SOFTINTS
 	struct lwp * const l = curlwp;
 	struct cpu_info * const ci = l->l_cpu;
 	unsigned long ssir;
@@ -564,9 +580,11 @@ alpha_softint_dispatch(int const ipl)
 		DOSOFTINT(BIO);
 		DOSOFTINT(CLOCK);
 	}
+#else
+	panic("alpha_softint_dispatch");
+#endif /* __HAVE_FAST_SOFTINTS */
 }
 
-#endif /* __HAVE_FAST_SOFTINTS */
 
 /*
  * spllower:
@@ -578,12 +596,10 @@ void
 spllower(int const ipl)
 {
 
-#ifdef __HAVE_FAST_SOFTINTS
 	if (ipl < ALPHA_PSL_IPL_SOFT_HI && curcpu()->ci_ssir) {
 		(void) alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH);
 		alpha_softint_dispatch(ipl);
 	}
-#endif /* __HAVE_FAST_SOFTINTS */
 	(void) alpha_pal_swpipl(ipl);
 }
 

Index: src/sys/arch/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.133 src/sys/arch/alpha/alpha/locore.s:1.134
--- src/sys/arch/alpha/alpha/locore.s:1.133	Wed Sep 16 04:07:32 2020
+++ src/sys/arch/alpha/alpha/locore.s	Thu Sep 17 00:48:56 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.133 2020/09/16 04:07:32 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.134 2020/09/17 00:48:56 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.133 2020/09/16 04:07:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.134 2020/09/17 00:48:56 thorpej Exp $");
 
 #include "assym.h"
 
@@ -256,13 +256,11 @@ LEAF(exception_return, 1)			/* XXX shoul
 	GET_CURLWP
 	mov	v0, s0/* s0 = curlwp */
 
-#ifdef __HAVE_FAST_SOFTINTS
 	/* see if a soft interrupt is pending. */
 2:	ldq	t1, L_CPU(s0)			/* t1 = curlwp->l_cpu */
 	ldq	t1, CPU_INFO_SSIR(t1)		/* soft int pending? */
 	bne	t1, 6f/* yes */
 	/* no */
-#endif /* __HAVE_FAST_SOFTINTS */
 
 	/* --- END inline spllower() --- */
 
@@ -291,7 +289,6 @@ LEAF(exception_return, 1)			/* XXX shoul
 	.set at
 	/* NOTREACHED */
 
-#ifdef __HAVE_FAST_SOFTINTS
 	/* We've got a softint */
 6:	ldiq	a0, ALPHA_PSL_IPL_HIGH
 	call_pal PAL_OSF1_swpipl
@@ -303,7 +300,6 @@ LEAF(exception_return, 1)			/* XXX shoul
 	mov	s2, a0
 	call_pal PAL_OSF1_swpipl
 	br	2b
-#endif /* __HAVE_FAST_SOFTINTS */
 
 	/* We've got an AST */
 7:	stl	zero, L_MD_ASTPENDING(s0)	/* no AST pending */
@@ -655,7 +651,6 @@ LEAF(savectx, 1)
 
 /**/
 
-#ifdef __HAVE_FAST_SOFTINTS
 /*
  * void alpha_softint_switchto(struct lwp *current, int ipl, struct lwp *next)
  * Switch away from the current LWP to the specified softint LWP, and
@@ -755,7 

CVS commit: src/external/gpl3/gcc/lib/libsupc++

2020-09-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep 16 21:24:30 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libsupc++: Makefile.common

Log Message:
fix dependencies for bits/largefile-config.h.  the .cc files don't
depend on it, the outputs of those do.  should fix build issue
reported by otis@.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc/lib/libsupc++/Makefile.common

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

Modified files:

Index: src/external/gpl3/gcc/lib/libsupc++/Makefile.common
diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.17 src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.18
--- src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.17	Wed Sep  9 09:52:16 2020
+++ src/external/gpl3/gcc/lib/libsupc++/Makefile.common	Wed Sep 16 21:24:30 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.17 2020/09/09 09:52:16 mrg Exp $
+#	$NetBSD: Makefile.common,v 1.18 2020/09/16 21:24:30 mrg Exp $
 
 DIST=		${GCCDIST}
 GNUHOSTDIST=	${DIST}
@@ -78,7 +78,9 @@ COPTS.${_f}+=	-std=gnu++1z
 COPTS.${_f}+=	-std=gnu++17 -fimplicit-templates
 .endfor
 
-dir.cc ops.cc fs_dir.cc fs_ops.cc: bits/largefile-config.h
+.for _f in dir ops fs_dir fs_ops
+${_f}.o ${_f}.d ${_f}.pico ${_f}.po: bits/largefile-config.h
+.endfor
 
 bits/largefile-config.h:
 	mkdir -p bits



CVS commit: src/sys/arch/aarch64

2020-09-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 16 18:26:15 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c
src/sys/arch/aarch64/include: vmparam.h

Log Message:
G/C AARCH64_KMEMORY_BASE


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/include/vmparam.h

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.47 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.48
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.47	Wed Sep 16 18:24:57 2020
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Wed Sep 16 18:26:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.47 2020/09/16 18:24:57 skrll Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.48 2020/09/16 18:26:15 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.47 2020/09/16 18:24:57 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.48 2020/09/16 18:26:15 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -216,7 +216,6 @@ cpu_kernel_vm_init(uint64_t memory_start
  *   0x_bfff__  End of direct mapped
  *   0x___  Start of direct mapped
  *  = AARCH64_KSEG_START
- *  = AARCH64_KMEMORY_BASE
  *
  * Hole: 0xfffe___
  *   0x0001___

Index: src/sys/arch/aarch64/include/vmparam.h
diff -u src/sys/arch/aarch64/include/vmparam.h:1.12 src/sys/arch/aarch64/include/vmparam.h:1.13
--- src/sys/arch/aarch64/include/vmparam.h:1.12	Wed Jul  8 08:20:05 2020
+++ src/sys/arch/aarch64/include/vmparam.h	Wed Sep 16 18:26:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.12 2020/07/08 08:20:05 skrll Exp $ */
+/* $NetBSD: vmparam.h,v 1.13 2020/09/16 18:26:15 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -173,7 +173,6 @@
 #define AARCH64_KSEG_SIZE	(1UL << 46)	/* 64TB */
 #define AARCH64_KSEG_START	AARCH64_KSEG_MASK
 #define AARCH64_KSEG_END	(AARCH64_KSEG_START + AARCH64_KSEG_SIZE)
-#define AARCH64_KMEMORY_BASE	AARCH64_KSEG_MASK
 #define AARCH64_KVA_P(va)	(((vaddr_t) (va) & AARCH64_KSEG_MASK) != 0)
 #define AARCH64_PA_TO_KVA(pa)	((vaddr_t) ((pa) | AARCH64_KSEG_START))
 #define AARCH64_KVA_TO_PA(va)	((paddr_t) ((va) & ~AARCH64_KSEG_MASK))



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Sep 16 18:24:58 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c

Log Message:
Fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/aarch64/aarch64/aarch64_machdep.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/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.46 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.47
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.46	Sun Aug  2 06:58:16 2020
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Wed Sep 16 18:24:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.46 2020/08/02 06:58:16 maxv Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.47 2020/09/16 18:24:57 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.46 2020/08/02 06:58:16 maxv Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.47 2020/09/16 18:24:57 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -205,15 +205,15 @@ cpu_kernel_vm_init(uint64_t memory_start
  *   0x__ffe0_  End of KVA
  *  = VM_MAX_KERNEL_ADDRESS
  *
- *   0x_ffc0_0???_  End of kernel
+ *   0x_c000_0???_  End of kernel
  *  = _end[]
- *   0x_ffc0_00??_  Start of kernel
+ *   0x_c000_00??_  Start of kernel
  *  = __kernel_text[]
  *
- *   0x_ffc0__  Kernel base address & start of KVA
+ *   0x_c000__  Kernel base address & start of KVA
  *  = VM_MIN_KERNEL_ADDRESS
  *
- *   0x_ffbf__  End of direct mapped
+ *   0x_bfff__  End of direct mapped
  *   0x___  Start of direct mapped
  *  = AARCH64_KSEG_START
  *  = AARCH64_KMEMORY_BASE



CVS commit: src/external/mit/xorg/lib

2020-09-16 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Sep 16 18:19:24 UTC 2020

Modified Files:
src/external/mit/xorg/lib: libmesa.mk
src/external/mit/xorg/lib/libGL: Makefile
src/external/mit/xorg/lib/libglapi: Makefile

Log Message:
disable use of ELF TLS in Mesa/libGL

this is an optimization that primarily benefits linux/glibc -
most other systems have this disabled. in netbsd we've tried to
patch around it to make things work, but there still appears to be
some edge cases where libGL mysteriously crashes.

discussed on tech-x11 some time ago. already in place in pkgsrc.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/mit/xorg/lib/libmesa.mk
cvs rdiff -u -r1.29 -r1.30 src/external/mit/xorg/lib/libGL/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/lib/libglapi/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libmesa.mk
diff -u src/external/mit/xorg/lib/libmesa.mk:1.11 src/external/mit/xorg/lib/libmesa.mk:1.12
--- src/external/mit/xorg/lib/libmesa.mk:1.11	Sun Feb 23 02:03:19 2020
+++ src/external/mit/xorg/lib/libmesa.mk	Wed Sep 16 18:19:23 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: libmesa.mk,v 1.11 2020/02/23 02:03:19 joerg Exp $
+#	$NetBSD: libmesa.mk,v 1.12 2020/09/16 18:19:23 nia Exp $
 #
 # Consumer of this Makefile should set MESA_SRC_MODULES.
 
@@ -526,7 +526,6 @@ CPPFLAGS+=	\
 	-DHAVE_LIBDRM -DGLX_USE_DRM \
 	-DGLX_INDIRECT_RENDERING \
 	-DGLX_DIRECT_RENDERING \
-	-DGLX_USE_TLS \
 	-DHAVE_X11_PLATFORM \
 	-DHAVE_DRM_PLATFORM \
 	-DENABLE_SHADER_CACHE \

Index: src/external/mit/xorg/lib/libGL/Makefile
diff -u src/external/mit/xorg/lib/libGL/Makefile:1.29 src/external/mit/xorg/lib/libGL/Makefile:1.30
--- src/external/mit/xorg/lib/libGL/Makefile:1.29	Sun Mar 29 21:06:03 2020
+++ src/external/mit/xorg/lib/libGL/Makefile	Wed Sep 16 18:19:23 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2020/03/29 21:06:03 maya Exp $
+#	$NetBSD: Makefile,v 1.30 2020/09/16 18:19:23 nia Exp $
 
 .include 
 
@@ -180,7 +180,7 @@ CPPFLAGS+=	\
 	-DHAVE_FUNC_ATTRIBUTE_NORETURN=1 -DHAVE_ENDIAN_H=1 -DHAVE_DLADDR=1 \
 	-DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 \
 	-DHAVE_PTHREAD=1 -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 \
-	-DHAVE_TIMESPEC_GET -DGLX_USE_TLS
+	-DHAVE_TIMESPEC_GET
 
 .include "../asm.mk"
 
@@ -224,7 +224,7 @@ PKGCONFIG_SED_FLAGS= \
 	s,@GL_PKGCONF_LIB@,GL,; \
 	s,@GL_PC_LIB_PRIV@,-lm -lpthread -pthread,; \
 	s,@GL_PC_CFLAGS@,,; \
-	s,@GLX_TLS@,yes,"
+	s,@GLX_TLS@,no,"
 
 
 CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format -Wno-constant-conversion \

Index: src/external/mit/xorg/lib/libglapi/Makefile
diff -u src/external/mit/xorg/lib/libglapi/Makefile:1.7 src/external/mit/xorg/lib/libglapi/Makefile:1.8
--- src/external/mit/xorg/lib/libglapi/Makefile:1.7	Sun Feb 23 02:02:32 2020
+++ src/external/mit/xorg/lib/libglapi/Makefile	Wed Sep 16 18:19:24 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2020/02/23 02:02:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.8 2020/09/16 18:19:24 nia Exp $
 
 .include 
 
@@ -68,7 +68,6 @@ CPPFLAGS+=	\
 	-DGLX_USE_DRM \
 	-DGLX_INDIRECT_RENDERING \
 	-DGLX_DIRECT_RENDERING \
-	-DGLX_USE_TLS \
 	-DHAVE_X11_PLATFORM \
 	-DHAVE_DRM_PLATFORM \
 	-DENABLE_SHADER_CACHE \



CVS commit: src/sys/dev/pci

2020-09-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 16 15:04:58 UTC 2020

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

Log Message:
 Use 12K for packet buffer for jumbo frame on PCH2 and newer.

XXX Note that Linux Use 14K.


To generate a diff of this commit:
cvs rdiff -u -r1.688 -r1.689 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.688 src/sys/dev/pci/if_wm.c:1.689
--- src/sys/dev/pci/if_wm.c:1.688	Wed Sep 16 15:04:01 2020
+++ src/sys/dev/pci/if_wm.c	Wed Sep 16 15:04:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.688 2020/09/16 15:04:01 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.689 2020/09/16 15:04:57 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.688 2020/09/16 15:04:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.689 2020/09/16 15:04:57 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -4873,7 +4873,8 @@ wm_reset(struct wm_softc *sc)
 	case WM_T_PCH_LPT:
 	case WM_T_PCH_SPT:
 	case WM_T_PCH_CNP:
-		sc->sc_pba = PBA_26K;
+		sc->sc_pba = sc->sc_ethercom.ec_if.if_mtu > 1500 ?
+		PBA_12K : PBA_26K;
 		break;
 	default:
 		sc->sc_pba = sc->sc_ethercom.ec_if.if_mtu > 8192 ?



CVS commit: src/sys/dev

2020-09-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 16 15:04:02 UTC 2020

Modified Files:
src/sys/dev/mii: inbmphyreg.h
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
 Add a workaround for jumbo frame on PCH2 and newer. Tested by chs@.

- Add wm_lv_jumbo_workaround_ich8lan() and use it. From FreeBSD.

  XXX For KUMCTRLSTA_OFFSET_HD_CTRL register modification, it's doubtful.
  FreeBSD and Linux do the same thing that they set the same value on both
  jumbo frame's enable case and the disable case. It seems the default value
  is 0x0b0c and it's not changed on the enable case, so it might be a bug
  on the enable case or the modification is not required.

- Rename I219_UNKNOWN1 to I82579_UNKNOWN1.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/mii/inbmphyreg.h
cvs rdiff -u -r1.687 -r1.688 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/pci/if_wmreg.h

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

Modified files:

Index: src/sys/dev/mii/inbmphyreg.h
diff -u src/sys/dev/mii/inbmphyreg.h:1.19 src/sys/dev/mii/inbmphyreg.h:1.20
--- src/sys/dev/mii/inbmphyreg.h:1.19	Wed Dec 11 07:33:55 2019
+++ src/sys/dev/mii/inbmphyreg.h	Wed Sep 16 15:04:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: inbmphyreg.h,v 1.19 2019/12/11 07:33:55 msaitoh Exp $	*/
+/*	$NetBSD: inbmphyreg.h,v 1.20 2020/09/16 15:04:01 msaitoh Exp $	*/
 /***
 Copyright (c) 2001-2015, Intel Corporation 
 All rights reserved.
@@ -136,6 +136,8 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #define	BM_PORT_GEN_CFG		BME1000_REG(BM_PORT_CTRL_PAGE, 17)
 
+#define	I82579_DFT_CTRL		BME1000_REG(BM_PORT_CTRL_PAGE, 20)
+
 #define	CV_SMB_CTRL		BME1000_REG(BM_PORT_CTRL_PAGE, 23)
 #define	CV_SMB_CTRL_FORCE_SMBUS	__BIT(0)
 
@@ -180,7 +182,8 @@ POSSIBILITY OF SUCH DAMAGE.
 #define HV_MUX_DATA_CTRL_FORCE_SPEED	(1 << 2)
 #define HV_MUX_DATA_CTRL_GEN_TO_MAC	(1 << 10)
 
-#define I219_UNKNOWN1		BME1000_REG(776, 20)
+#define I82579_UNKNOWN1		BME1000_REG(776, 20)
+#define I82579_TX_PTR_GAP	0x1f
 
 #define I218_ULP_CONFIG1	BME1000_REG(779, 16)
 #define I218_ULP_CONFIG1_START		__BIT(0)

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.687 src/sys/dev/pci/if_wm.c:1.688
--- src/sys/dev/pci/if_wm.c:1.687	Tue Sep 15 08:39:04 2020
+++ src/sys/dev/pci/if_wm.c	Wed Sep 16 15:04:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.687 2020/09/15 08:39:04 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.688 2020/09/16 15:04:01 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.687 2020/09/15 08:39:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.688 2020/09/16 15:04:01 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1016,6 +1016,8 @@ static int	wm_kmrn_lock_loss_workaround_
 static void	wm_gig_downshift_workaround_ich8lan(struct wm_softc *);
 static int	wm_hv_phy_workarounds_ich8lan(struct wm_softc *);
 static void	wm_copy_rx_addrs_to_phy_ich8lan(struct wm_softc *);
+static void	wm_copy_rx_addrs_to_phy_ich8lan_locked(struct wm_softc *);
+static int	wm_lv_jumbo_workaround_ich8lan(struct wm_softc *, bool);
 static int	wm_lv_phy_workarounds_ich8lan(struct wm_softc *);
 static int	wm_k1_workaround_lpt_lp(struct wm_softc *, bool);
 static int	wm_k1_gig_workaround_hv(struct wm_softc *, int);
@@ -3802,7 +3804,7 @@ wm_set_filter(struct wm_softc *sc)
 	struct ether_multistep step;
 	bus_addr_t mta_reg;
 	uint32_t hash, reg, bit;
-	int i, size, ralmax;
+	int i, size, ralmax, rv;
 
 	DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n",
 		device_xname(sc->sc_dev), __func__));
@@ -3928,6 +3930,17 @@ wm_set_filter(struct wm_softc *sc)
 	sc->sc_rctl |= RCTL_MPE;
 
  setit:
+	if (sc->sc_type >= WM_T_PCH2) {
+		if (((ec->ec_capabilities & ETHERCAP_JUMBO_MTU) != 0)
+		&& (ifp->if_mtu > ETHERMTU))
+			rv = wm_lv_jumbo_workaround_ich8lan(sc, true);
+		else
+			rv = wm_lv_jumbo_workaround_ich8lan(sc, false);
+		if (rv != 0)
+			device_printf(sc->sc_dev,
+			"Failed to do workaround for jumbo frame.\n");
+	}
+
 	CSR_WRITE(sc, WMREG_RCTL, sc->sc_rctl);
 }
 
@@ -9312,7 +9325,7 @@ wm_linkintr_gmii(struct wm_softc *sc, ui
 	return;
 
 rv = sc->phy.readreg_locked(dev, 2,
-I219_UNKNOWN1, );
+I82579_UNKNOWN1, );
 if (rv) {
 	sc->phy.release(sc);
 	return;
@@ -9323,7 +9336,7 @@ wm_linkintr_gmii(struct wm_softc *sc, ui
 	data &= ~(0x3ff << 2);
 	data |= (0x18 << 2);
 	rv = sc->phy.writereg_locked(dev,
-	2, I219_UNKNOWN1, data);
+	2, I82579_UNKNOWN1, data);
 }
 sc->phy.release(sc);
 if (rv)
@@ -9334,7 +9347,7 @@ wm_linkintr_gmii(struct wm_softc *sc, ui
 	return;
 
 rv = sc->phy.writereg_locked(dev, 2,
-I219_UNKNOWN1, 0xc023);
+I82579_UNKNOWN1, 0xc023);
 sc->phy.release(sc);
 	

CVS commit: src/doc

2020-09-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep 16 13:47:00 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note ND changes for ARP and RFC 7048.


To generate a diff of this commit:
cvs rdiff -u -r1.2738 -r1.2739 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2738 src/doc/CHANGES:1.2739
--- src/doc/CHANGES:1.2738	Sun Sep 13 03:03:57 2020
+++ src/doc/CHANGES	Wed Sep 16 13:47:00 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2738 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2739 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -281,3 +281,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	iavf(4): Add driver for Intel Ethernet Adaptive Virtual Function
 		[yamaguchi 20200908]
 	gcc(1): Install TSan for 64bit CPUs. [kamil 20200913]
+	network: IPv6 Neighor Detection is now address agnostic
+		and is used by ARP. RFC 7048 is included. [roy 20200916]



CVS commit: src/sys/sys

2020-09-16 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Sep 16 13:42:05 UTC 2020

Modified Files:
src/sys/sys: param.h

Log Message:
9.99.73 welcomes SIOCGNBRINFO


To generate a diff of this commit:
cvs rdiff -u -r1.675 -r1.676 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.675 src/sys/sys/param.h:1.676
--- src/sys/sys/param.h:1.675	Fri Aug 28 07:29:12 2020
+++ src/sys/sys/param.h	Wed Sep 16 13:42:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.675 2020/08/28 07:29:12 ozaki-r Exp $	*/
+/*	$NetBSD: param.h,v 1.676 2020/09/16 13:42:05 roy Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999007200	/* NetBSD 9.99.72 */
+#define	__NetBSD_Version__	999007300	/* NetBSD 9.99.73 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-8] src/doc

2020-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 16 13:32:11 UTC 2020

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

Log Message:
Ticket #1605


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 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.35 src/doc/CHANGES-8.3:1.1.2.36
--- src/doc/CHANGES-8.3:1.1.2.35	Sun Sep 13 12:17:25 2020
+++ src/doc/CHANGES-8.3	Wed Sep 16 13:32:11 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.35 2020/09/13 12:17:25 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.36 2020/09/16 13:32:11 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1051,3 +1051,8 @@ sys/netinet/tcp_input.c1.420
 	PR/kern 55567: fix the data-only fast path.
 	[kardel, ticket #1604]
 
+sys/dev/ic/mpt_netbsd.c1.37
+
+	mpt(4) may eroneously report a limit of zero devices.
+	[mlelstv, ticket #1605]
+



CVS commit: [netbsd-9] src/doc

2020-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 16 13:30:42 UTC 2020

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

Log Message:
Ticket #1085


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-9.1

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.1
diff -u src/doc/CHANGES-9.1:1.1.2.111 src/doc/CHANGES-9.1:1.1.2.112
--- src/doc/CHANGES-9.1:1.1.2.111	Sun Sep 13 15:52:02 2020
+++ src/doc/CHANGES-9.1	Wed Sep 16 13:30:42 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.111 2020/09/13 15:52:02 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.112 2020/09/16 13:30:42 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -4980,3 +4980,8 @@ crypto/external/bsd/openssl/dist/crypto/
 	openssl 1.1.1e merge.
 	[tsutsui, ticket #1084]
 
+sys/dev/ic/mpt_netbsd.c1.37
+
+	mpt(4) may eroneously report a limit of zero devices.
+	[mlelstv, ticket #1085]
+



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

2020-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 16 13:31:20 UTC 2020

Modified Files:
src/sys/dev/ic [netbsd-8]: mpt_netbsd.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1605):

sys/dev/ic/mpt_netbsd.c: revision 1.37

max_devices is a 8bit value and zero is interpreted as 256. This value
can be reported by an mpt device emulated by VMware ESXi.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.10.1 src/sys/dev/ic/mpt_netbsd.c

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

Modified files:

Index: src/sys/dev/ic/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.33 src/sys/dev/ic/mpt_netbsd.c:1.33.10.1
--- src/sys/dev/ic/mpt_netbsd.c:1.33	Mon May  2 19:18:29 2016
+++ src/sys/dev/ic/mpt_netbsd.c	Wed Sep 16 13:31:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpt_netbsd.c,v 1.33 2016/05/02 19:18:29 christos Exp $	*/
+/*	$NetBSD: mpt_netbsd.c,v 1.33.10.1 2020/09/16 13:31:20 martin Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.33 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.33.10.1 2020/09/16 13:31:20 martin Exp $");
 
 #include "bio.h"
 
@@ -151,7 +151,7 @@ mpt_scsipi_attach(mpt_softc_t *mpt)
 	chan->chan_channel = 0;
 	chan->chan_flags = 0;
 	chan->chan_nluns = 8;
-	chan->chan_ntargets = mpt->mpt_max_devices;
+	chan->chan_ntargets = mpt->mpt_max_devices ? mpt->mpt_max_devices : 256;
 	chan->chan_id = mpt->mpt_ini_id;
 
 	/*



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

2020-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep 16 13:29:53 UTC 2020

Modified Files:
src/sys/dev/ic [netbsd-9]: mpt_netbsd.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1085):

sys/dev/ic/mpt_netbsd.c: revision 1.37

max_devices is a 8bit value and zero is interpreted as 256. This value
can be reported by an mpt device emulated by VMware ESXi.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.2.1 src/sys/dev/ic/mpt_netbsd.c

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

Modified files:

Index: src/sys/dev/ic/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.36 src/sys/dev/ic/mpt_netbsd.c:1.36.2.1
--- src/sys/dev/ic/mpt_netbsd.c:1.36	Wed May  8 06:32:01 2019
+++ src/sys/dev/ic/mpt_netbsd.c	Wed Sep 16 13:29:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $	*/
+/*	$NetBSD: mpt_netbsd.c,v 1.36.2.1 2020/09/16 13:29:53 martin Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.36.2.1 2020/09/16 13:29:53 martin Exp $");
 
 #include "bio.h"
 
@@ -150,7 +150,7 @@ mpt_scsipi_attach(mpt_softc_t *mpt)
 	chan->chan_channel = 0;
 	chan->chan_flags = 0;
 	chan->chan_nluns = 8;
-	chan->chan_ntargets = mpt->mpt_max_devices;
+	chan->chan_ntargets = mpt->mpt_max_devices ? mpt->mpt_max_devices : 256;
 	chan->chan_id = mpt->mpt_ini_id;
 
 	/*



CVS commit: src/external/mit/xorg/lib/libX11

2020-09-16 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Sep 16 10:02:22 UTC 2020

Modified Files:
src/external/mit/xorg/lib/libX11: Makefile.libx11

Log Message:
someone pointed out it makes sense to load the exact libXcursor version


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/mit/xorg/lib/libX11/Makefile.libx11

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

Modified files:

Index: src/external/mit/xorg/lib/libX11/Makefile.libx11
diff -u src/external/mit/xorg/lib/libX11/Makefile.libx11:1.20 src/external/mit/xorg/lib/libX11/Makefile.libx11:1.21
--- src/external/mit/xorg/lib/libX11/Makefile.libx11:1.20	Tue Sep 15 23:34:16 2020
+++ src/external/mit/xorg/lib/libX11/Makefile.libx11	Wed Sep 16 10:02:22 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libx11,v 1.20 2020/09/15 23:34:16 nia Exp $
+#	$NetBSD: Makefile.libx11,v 1.21 2020/09/16 10:02:22 nia Exp $
 
 LIB=	X11
 .PATH:	${X11SRCDIR.${LIB}}/src
@@ -423,7 +423,7 @@ SETID_DEFINES=		-DHASSETUGID
 SHM_DEFINES=		-DHAS_SHM
 SOCK_DEFINES=		-DBSD44SOCKETS
 TRANS_INCLUDES=		-I${X11SRCDIR.xtrans}
-XCURSOR_DEFINES=	-DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so\"
+XCURSOR_DEFINES=	-DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so.2\"
 XDMAUTHDEFS=		-DHASXDMAUTH
 XF86BIGFONT_DEFINES=	-DXF86BIGFONT
 XKB_DEFINES=		-DXKB



CVS commit: src/distrib/notes/common

2020-09-16 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Sep 16 09:58:37 UTC 2020

Modified Files:
src/distrib/notes/common: contents

Log Message:
ancient ARM stuff


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/distrib/notes/common/contents

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

Modified files:

Index: src/distrib/notes/common/contents
diff -u src/distrib/notes/common/contents:1.182 src/distrib/notes/common/contents:1.183
--- src/distrib/notes/common/contents:1.182	Fri Aug  7 00:43:48 2020
+++ src/distrib/notes/common/contents	Wed Sep 16 09:58:37 2020
@@ -1,6 +1,6 @@
-.\"	$NetBSD: contents,v 1.182 2020/08/07 00:43:48 snj Exp $
+.\"	$NetBSD: contents,v 1.183 2020/09/16 09:58:37 nia Exp $
 .\"
-.\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1999-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -567,34 +567,6 @@ You
 install the kernel that matches your hardware.
 .\}
 .el \{\
-.ie \n[evbarm] \{\
-.It Sy kern-INTEGRATOR
-(see below)
-.It Sy kern-IQ80310
-(see below)
-.It Sy kern-IQ80321
-(see below)
-.It Sy kern-MV2120
-(see below)
-.It Sy kern-SHEEVAPLUG
-(see below)
-.It Sy kern-TEAMASA_NPWR
-.Pp
-These sets contain a
-.Nx*M
-\*V
-kernel, named
-.Pa /netbsd .
-Some of these sets also contain a binary format kernel named
-.Pa /netbsd.bin
-and an S-record format kernel named
-.Pa /netbsd.srec
-that your firmware may need to boot.
-You
-.Em must
-install the kernel that matches your hardware.
-.\}
-.el \{\
 .ie \n[mac68k] \{\
 .It Sy kern-GENERIC
 This set contains a