CVS commit: src/tests/kernel

2016-12-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Dec  3 07:23:08 UTC 2016

Modified Files:
src/tests/kernel: t_ptrace_wait.c

Log Message:
Add new tests lwpinfo1 in t_ptrace_wait* and lwpinfo2 under HAVE_PID guard

lwpinfo1:
Verify baic LWPINFO call for single thread (PT_TRACE_ME)

lwpinfo2:
Verify baic LWPINFO call for single thread (PT_ATTACH from tracer)

Both tests are marked as expected failure PR kern/51685:
ptrace(2): Signal does not set PL_EVENT_SIGNAL in
(struct ptrace_lwpinfo.)pl_event

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/kernel/t_ptrace_wait.c

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

Modified files:

Index: src/tests/kernel/t_ptrace_wait.c
diff -u src/tests/kernel/t_ptrace_wait.c:1.37 src/tests/kernel/t_ptrace_wait.c:1.38
--- src/tests/kernel/t_ptrace_wait.c:1.37	Thu Dec  1 20:11:17 2016
+++ src/tests/kernel/t_ptrace_wait.c	Sat Dec  3 07:23:08 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.37 2016/12/01 20:11:17 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.38 2016/12/03 07:23:08 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.37 2016/12/01 20:11:17 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.38 2016/12/03 07:23:08 kamil Exp $");
 
 #include 
 #include 
@@ -4620,6 +4620,227 @@ ATF_TC_BODY(kill2, tc)
 	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
 }
 
+ATF_TC(lwpinfo1);
+ATF_TC_HEAD(lwpinfo1, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify baic LWPINFO call for single thread (PT_TRACE_ME)");
+}
+
+ATF_TC_BODY(lwpinfo1, tc)
+{
+	const int exitval = 5;
+	const int sigval = SIGSTOP;
+	pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	struct ptrace_lwpinfo info = {0};
+
+	/*
+	 * ptrace(2): Signal does not set PL_EVENT_SIGNAL in
+	 * (struct ptrace_lwpinfo.)pl_event
+	 */
+	atf_tc_expect_fail("PR kern/51685");
+
+	printf("Before forking process PID=%d\n", getpid());
+	child = atf_utils_fork();
+	if (child == 0) {
+		printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		printf("Before raising %s from child\n", strsignal(sigval));
+		FORKEE_ASSERT(raise(sigval) == 0);
+
+		printf("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_stopped(status, sigval);
+
+	printf("Before calling ptrace(2) with PT_LWPINFO for child\n");
+	ATF_REQUIRE(ptrace(PT_LWPINFO, child, , sizeof(info)) != -1);
+
+	printf("Assert that there exists a thread\n");
+	ATF_REQUIRE(info.pl_lwpid > 0);
+
+	printf("Assert that lwp thread %d received event PL_EVENT_SIGNAL\n",
+	info.pl_lwpid);
+	ATF_REQUIRE_EQ_MSG(info.pl_event, PL_EVENT_SIGNAL,
+	"Received event %d != expected event %d",
+	info.pl_event, PL_EVENT_SIGNAL);
+
+	printf("Before calling ptrace(2) with PT_LWPINFO for child\n");
+	ATF_REQUIRE(ptrace(PT_LWPINFO, child, , sizeof(info)) != -1);
+
+	printf("Assert that there are no more lwp threads in child\n");
+	ATF_REQUIRE_EQ(info.pl_lwpid, 0);
+
+	printf("Before resuming the child process where it left off and "
+	"without signal to be sent\n");
+	ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_exited(status, exitval);
+
+	printf("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
+}
+
+#if defined(TWAIT_HAVE_PID)
+ATF_TC(lwpinfo2);
+ATF_TC_HEAD(lwpinfo2, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify baic LWPINFO call for single thread (PT_ATTACH from "
+	"tracer)");
+}
+
+ATF_TC_BODY(lwpinfo2, tc)
+{
+	int fds_totracee[2], fds_totracer[2], fds_fromtracer[2];
+	int rv;
+	const int exitval_tracee = 5;
+	const int exitval_tracer = 10;
+	pid_t tracee, tracer, wpid;
+	uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	struct ptrace_lwpinfo info = {0};
+
+	/*
+	 * ptrace(2): Signal does not set PL_EVENT_SIGNAL in
+	 * (struct ptrace_lwpinfo.)pl_event
+	 */
+	atf_tc_expect_fail("PR kern/51685");
+
+	printf("Spawn tracee\n");
+	ATF_REQUIRE(pipe(fds_totracee) == 0);
+	tracee = atf_utils_fork();
+	if (tracee == 0) {
+		FORKEE_ASSERT(close(fds_totracee[1]) == 0);
+
+		/* Wait for message from the parent */
+		rv = read(fds_totracee[0], , sizeof(msg));
+		FORKEE_ASSERT(rv == sizeof(msg));
+
+		_exit(exitval_tracee);
+	}
+	ATF_REQUIRE(close(fds_totracee[0]) == 0);
+
+	printf("Spawn 

CVS commit: src/tests/kernel

2016-12-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Dec  3 07:23:08 UTC 2016

Modified Files:
src/tests/kernel: t_ptrace_wait.c

Log Message:
Add new tests lwpinfo1 in t_ptrace_wait* and lwpinfo2 under HAVE_PID guard

lwpinfo1:
Verify baic LWPINFO call for single thread (PT_TRACE_ME)

lwpinfo2:
Verify baic LWPINFO call for single thread (PT_ATTACH from tracer)

Both tests are marked as expected failure PR kern/51685:
ptrace(2): Signal does not set PL_EVENT_SIGNAL in
(struct ptrace_lwpinfo.)pl_event

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tests/kernel/t_ptrace_wait.c

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



CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Sat Dec  3 06:38:29 UTC 2016

Added Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm2_common.c

Log Message:
pull out some function(s) used by both XAA and EXA


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c

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

Added files:

Index: xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c
diff -u /dev/null xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c:1.1
--- /dev/null	Sat Dec  3 06:38:29 2016
+++ xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c	Sat Dec  3 06:38:29 2016
@@ -0,0 +1,174 @@
+/*
+ * Copyright 1997-2001 by Alan Hourihane, Wigan, England.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Alan Hourihane not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Alan Hourihane makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Authors:  Alan Hourihane, 
+ *   Dirk Hohndel, 
+ *   Stefan Dirsch, 
+ *   Mark Vojkovich, 
+ *   Michel Dänzer, 
+ *
+ * this work is sponsored by S.u.S.E. GmbH, Fuerth, Elsa GmbH, Aachen and
+ * Siemens Nixdorf Informationssysteme
+ * 
+ * Permedia 2 accelerated options.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+#include "xf86Pci.h"
+
+#include "glint_regs.h"
+#include "glint.h"
+
+#if DEBUG
+# define TRACE_ENTER(str)   ErrorF("pm2_common: " str " %d\n",pScrn->scrnIndex)
+# define TRACE_EXIT(str)ErrorF("pm2_common: " str " done\n")
+# define TRACE(str) ErrorF("pm2_common trace: " str "\n")
+#else
+# define TRACE_ENTER(str)
+# define TRACE_EXIT(str)
+# define TRACE(str)
+#endif
+
+void
+Permedia2InitializeEngine(ScrnInfoPtr pScrn)
+{
+GLINTPtr pGlint = GLINTPTR(pScrn);
+
+/* Initialize the Accelerator Engine to defaults */
+
+TRACE_ENTER("Permedia2InitializeEngine");
+
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	ScissorMode);
+GLINT_SLOW_WRITE_REG(UNIT_ENABLE,	FBWriteMode);
+GLINT_SLOW_WRITE_REG(0, 		dXSub);
+GLINT_SLOW_WRITE_REG(GWIN_DisableLBUpdate,   GLINTWindow);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	DitherMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	AlphaBlendMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	ColorDDAMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	TextureColorMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	TextureAddressMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	PMTextureReadMode);
+GLINT_SLOW_WRITE_REG(pGlint->pprod,	LBReadMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	AlphaBlendMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	TexelLUTMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	YUVMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	DepthMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	RouterMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	FogMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	AntialiasMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	AlphaTestMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	StencilMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	AreaStippleMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	LogicalOpMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	DepthMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	StatisticMode);
+GLINT_SLOW_WRITE_REG(0x400,		FilterMode);
+GLINT_SLOW_WRITE_REG(0x,	FBHardwareWriteMask);
+GLINT_SLOW_WRITE_REG(0x,	FBSoftwareWriteMask);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	RasterizerMode);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	GLINTDepth);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	FBSourceOffset);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	FBPixelOffset);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	LBSourceOffset);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	WindowOrigin);
+GLINT_SLOW_WRITE_REG(UNIT_DISABLE,	FBWindowBase);
+

CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Sat Dec  3 06:38:29 UTC 2016

Added Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm2_common.c

Log Message:
pull out some function(s) used by both XAA and EXA


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c

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



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 04:06:25 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
move alpha to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.991 -r1.992 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.991 src/share/mk/bsd.own.mk:1.992
--- src/share/mk/bsd.own.mk:1.991	Fri Dec  2 21:18:38 2016
+++ src/share/mk/bsd.own.mk	Fri Dec  2 23:06:25 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.991 2016/12/03 02:18:38 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.992 2016/12/03 04:06:25 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -145,6 +145,7 @@ EXTERNAL_GDB_SUBDIR=		/does/not/exist
 # What binutils is used?
 #
 .if \
+${MACHINE} == "alpha" || \
 ${MACHINE_ARCH} == "i386" || \
 ${MACHINE_CPU} == "m68k" || \
 ${MACHINE_ARCH} == "mips64el" || \



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 04:06:25 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
move alpha to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.991 -r1.992 src/share/mk/bsd.own.mk

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



CVS commit: src/usr.bin/systat

2016-12-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Dec  3 03:26:27 UTC 2016

Modified Files:
src/usr.bin/systat: main.c systat.1

Log Message:
add a basic "-b" option - that outputs one display and exits.
inspired by "top -b".  still requires a curses-capable output
without some fairly significant internal restructuring.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/systat/main.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/systat/systat.1

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

Modified files:

Index: src/usr.bin/systat/main.c
diff -u src/usr.bin/systat/main.c:1.50 src/usr.bin/systat/main.c:1.51
--- src/usr.bin/systat/main.c:1.50	Sat Oct 22 22:02:55 2016
+++ src/usr.bin/systat/main.c	Sat Dec  3 03:26:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.50 2016/10/22 22:02:55 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.51 2016/12/03 03:26:27 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: main.c,v 1.50 2016/10/22 22:02:55 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.51 2016/12/03 03:26:27 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -96,6 +96,7 @@ main(int argc, char **argv)
 	const char *all;
 	struct clockinfo clk;
 	size_t len;
+	int bflag = 0;
 
 	all = "all";
 	egid = getegid();
@@ -120,6 +121,9 @@ main(int argc, char **argv)
 			if ((turns = atoi(optarg)) <= 0)
 errx(1, "turns <= 0.");
 			break;
+		case 'b':
+			bflag = !bflag;
+			break;
 		case '?':
 		default:
 			usage();
@@ -226,9 +230,12 @@ main(int argc, char **argv)
 	dellave = 0.0;
 
 	display(0);
-	noecho();
-	cbreak();
-	keyboard();
+	if (!bflag) {
+		noecho();
+		cbreak();
+		keyboard();
+	} else
+		die(0);
 	/*NOTREACHED*/
 }
 

Index: src/usr.bin/systat/systat.1
diff -u src/usr.bin/systat/systat.1:1.46 src/usr.bin/systat/systat.1:1.47
--- src/usr.bin/systat/systat.1:1.46	Wed Aug  3 13:09:43 2016
+++ src/usr.bin/systat/systat.1	Sat Dec  3 03:26:27 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: systat.1,v 1.46 2016/08/03 13:09:43 wiz Exp $
+.\"	$NetBSD: systat.1,v 1.47 2016/12/03 03:26:27 mrg Exp $
 .\"
 .\" Copyright (c) 1985, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)systat.1	8.2 (Berkeley) 12/30/93
 .\"
-.Dd August 2, 2016
+.Dd November 16, 2016
 .Dt SYSTAT 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd display system statistics in a full-screen view
 .Sh SYNOPSIS
 .Nm
-.Op Fl n
+.Op Fl bn
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Op Fl t Ar turns
@@ -94,6 +94,8 @@ Extract the name list from
 .Ar system
 instead of the default
 .Pa /netbsd .
+.It Fl b
+Show the chosen display once and exit.
 .It Fl n
 Do not resolve IP addresses into string hostnames
 .Pq FQDNs
@@ -626,3 +628,8 @@ The
 .Ic vmstat
 display looks out of place because it is (it was added in as
 a separate display from what used to be a different program).
+.Pp
+The
+.Fl b
+option requires a real terminal and could be converted to
+simply output to standard output.



CVS commit: src/usr.bin/systat

2016-12-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Dec  3 03:26:27 UTC 2016

Modified Files:
src/usr.bin/systat: main.c systat.1

Log Message:
add a basic "-b" option - that outputs one display and exits.
inspired by "top -b".  still requires a curses-capable output
without some fairly significant internal restructuring.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/systat/main.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/systat/systat.1

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



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 02:18:38 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch mips64 to new binutils and gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.990 -r1.991 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.990 src/share/mk/bsd.own.mk:1.991
--- src/share/mk/bsd.own.mk:1.990	Fri Dec  2 12:54:35 2016
+++ src/share/mk/bsd.own.mk	Fri Dec  2 21:18:38 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.990 2016/12/02 17:54:35 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.991 2016/12/03 02:18:38 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -131,13 +131,7 @@ USE_SSP?=	yes
 #
 # What GDB is used?
 #
-.if \
-${MACHINE_ARCH} == "mips64el" || \
-${MACHINE_ARCH} == "mips64eb"
-HAVE_GDB?=	710
-.else
 HAVE_GDB?=	712
-.endif
 
 .if ${HAVE_GDB} == 712
 EXTERNAL_GDB_SUBDIR=		gdb
@@ -153,6 +147,8 @@ EXTERNAL_GDB_SUBDIR=		/does/not/exist
 .if \
 ${MACHINE_ARCH} == "i386" || \
 ${MACHINE_CPU} == "m68k" || \
+${MACHINE_ARCH} == "mips64el" || \
+${MACHINE_ARCH} == "mips64eb" || \
 ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "vax"
 HAVE_BINUTILS?=	227



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 02:18:38 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch mips64 to new binutils and gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.990 -r1.991 src/share/mk/bsd.own.mk

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



CVS commit: src/tests/kernel/arch/amd64

2016-12-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Dec  3 01:41:15 UTC 2016

Modified Files:
src/tests/kernel/arch/amd64: t_ptrace_wait.c

Log Message:
Define new tests for CPU Debug Registers in t_ptrace_wait{,3,4,6,id,pid}

Rename dbregs1 to dbregs_print
Rename dbregs[2345] to dbregs_preserve_dr[0123]

Add new tests dbregs_preserve_dr[0123]_yield.

dbregs_preserve_dr0_yield:
 Verify that setting DR0 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr1_yield:
 Verify that setting DR1 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr2_yield:
 Verify that setting DR2 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr3_yield:
 Verify that setting DR3 is preserved across ptrace(2) calls with
 scheduler yield

Add new tests dbregs_preserve_dr[0123]_continued.

dbregs_preserve_dr0_continued:
Verify that setting DR0 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr1_continued:
Verify that setting DR1 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr2_continued:
Verify that setting DR2 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr3_continued:
Verify that setting DR3 is preserved across ptrace(2) calls and with
continued child

Use more meaningful names for these tests as they are MD specific and
testing precise functionality. Also there will be a growing number of
tests in this category and prefixing everything with plain dbregs and
trailing with a number cannot be verbose.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/arch/amd64/t_ptrace_wait.c

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

Modified files:

Index: src/tests/kernel/arch/amd64/t_ptrace_wait.c
diff -u src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.2 src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.3
--- src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.2	Fri Dec  2 06:49:00 2016
+++ src/tests/kernel/arch/amd64/t_ptrace_wait.c	Sat Dec  3 01:41:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.2 2016/12/02 06:49:00 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.3 2016/12/03 01:41:15 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.2 2016/12/02 06:49:00 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.3 2016/12/03 01:41:15 kamil Exp $");
 
 #include 
 #include 
@@ -39,6 +39,7 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.2 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,14 +54,14 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.2 
 #include "../../t_ptrace_wait.h"
 
 #if defined(HAVE_DBREGS)
-ATF_TC(dbregs1);
-ATF_TC_HEAD(dbregs1, tc)
+ATF_TC(dbregs_print);
+ATF_TC_HEAD(dbregs_print, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Verify plain PT_GETDBREGS with printing Debug Registers");
 }
 
-ATF_TC_BODY(dbregs1, tc)
+ATF_TC_BODY(dbregs_print, tc)
 {
 	const int exitval = 5;
 	const int sigval = SIGSTOP;
@@ -112,14 +113,14 @@ ATF_TC_BODY(dbregs1, tc)
 #endif
 
 #if defined(HAVE_DBREGS)
-ATF_TC(dbregs2);
-ATF_TC_HEAD(dbregs2, tc)
+ATF_TC(dbregs_preserve_dr0);
+ATF_TC_HEAD(dbregs_preserve_dr0, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Verify that setting DR0 is preserved across ptrace(2) calls");
 }
 
-ATF_TC_BODY(dbregs2, tc)
+ATF_TC_BODY(dbregs_preserve_dr0, tc)
 {
 	const int exitval = 5;
 	const int sigval = SIGSTOP;
@@ -196,14 +197,14 @@ ATF_TC_BODY(dbregs2, tc)
 #endif
 
 #if defined(HAVE_DBREGS)
-ATF_TC(dbregs3);
-ATF_TC_HEAD(dbregs3, tc)
+ATF_TC(dbregs_preserve_dr1);
+ATF_TC_HEAD(dbregs_preserve_dr1, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Verify that setting DR1 is preserved across ptrace(2) calls");
 }
 
-ATF_TC_BODY(dbregs3, tc)
+ATF_TC_BODY(dbregs_preserve_dr1, tc)
 {
 	const int exitval = 5;
 	const int sigval = SIGSTOP;
@@ -280,14 +281,14 @@ ATF_TC_BODY(dbregs3, tc)
 #endif
 
 #if defined(HAVE_DBREGS)
-ATF_TC(dbregs4);
-ATF_TC_HEAD(dbregs4, tc)
+ATF_TC(dbregs_preserve_dr2);
+ATF_TC_HEAD(dbregs_preserve_dr2, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Verify that setting DR2 is preserved across ptrace(2) calls");
 }
 
-ATF_TC_BODY(dbregs4, tc)
+ATF_TC_BODY(dbregs_preserve_dr2, tc)
 {
 	const int exitval = 5;
 	const int sigval = SIGSTOP;
@@ -364,14 +365,14 @@ ATF_TC_BODY(dbregs4, tc)
 #endif
 
 #if defined(HAVE_DBREGS)
-ATF_TC(dbregs5);
-ATF_TC_HEAD(dbregs5, tc)
+ATF_TC(dbregs_preserve_dr3);
+ATF_TC_HEAD(dbregs_preserve_dr3, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"Verify that setting DR3 is preserved across ptrace(2) calls");
 }
 
-ATF_TC_BODY(dbregs5, tc)
+ATF_TC_BODY(dbregs_preserve_dr3, tc)
 {
 	const int exitval = 5;
 	const int sigval = SIGSTOP;
@@ -447,16 +448,771 @@ ATF_TC_BODY(dbregs5, tc)
 }
 #endif
 
+#if 

CVS commit: src/tests/kernel/arch/amd64

2016-12-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Dec  3 01:41:15 UTC 2016

Modified Files:
src/tests/kernel/arch/amd64: t_ptrace_wait.c

Log Message:
Define new tests for CPU Debug Registers in t_ptrace_wait{,3,4,6,id,pid}

Rename dbregs1 to dbregs_print
Rename dbregs[2345] to dbregs_preserve_dr[0123]

Add new tests dbregs_preserve_dr[0123]_yield.

dbregs_preserve_dr0_yield:
 Verify that setting DR0 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr1_yield:
 Verify that setting DR1 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr2_yield:
 Verify that setting DR2 is preserved across ptrace(2) calls with
 scheduler yield

dbregs_preserve_dr3_yield:
 Verify that setting DR3 is preserved across ptrace(2) calls with
 scheduler yield

Add new tests dbregs_preserve_dr[0123]_continued.

dbregs_preserve_dr0_continued:
Verify that setting DR0 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr1_continued:
Verify that setting DR1 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr2_continued:
Verify that setting DR2 is preserved across ptrace(2) calls and with
continued child

dbregs_preserve_dr3_continued:
Verify that setting DR3 is preserved across ptrace(2) calls and with
continued child

Use more meaningful names for these tests as they are MD specific and
testing precise functionality. Also there will be a growing number of
tests in this category and prefixing everything with plain dbregs and
trailing with a number cannot be verbose.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/arch/amd64/t_ptrace_wait.c

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



CVS commit: src/external/gpl3/gdb/lib/libgdb/arch

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 00:41:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h defs.mk init.c

Log Message:
regen mips64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/init.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c

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/gdb/lib/libgdb/arch/mips64eb/config.h
diff -u src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h:1.10 src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h:1.11
--- src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h:1.10	Mon Oct 17 00:15:36 2016
+++ src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h	Fri Dec  2 19:41:07 2016
@@ -582,7 +582,7 @@
 /* #undef HAVE_WAIT_H */
 
 /* Define to 1 if you have the `wborder' function. */
-#define HAVE_WBORDER 1
+/* #undef HAVE_WBORDER */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_WINDOWS_H */
@@ -594,7 +594,7 @@
 #define HAVE_WORKING_VFORK 1
 
 /* Define to 1 if you have the `wresize' function. */
-#define HAVE_WRESIZE 1
+/* #undef HAVE_WRESIZE */
 
 /* Define to 1 if you have the `XML_StopParser' function. */
 /* #undef HAVE_XML_STOPPARSER */
Index: src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk
diff -u src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk:1.10 src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk:1.11
--- src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk:1.10	Mon Oct 17 00:15:36 2016
+++ src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk	Fri Dec  2 19:41:07 2016
@@ -2,6 +2,6 @@
 # Generated from: NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
-G_INTERNAL_CFLAGS=-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS-I. -I${GNUHOSTDIST}/gdb -I${GNUHOSTDIST}/gdb/common -I${GNUHOSTDIST}/gdb/config  -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I${GNUHOSTDIST}/gdb/../include/opcode -I${GNUHOSTDIST}/gdb/../opcodes/.. -I${GNUHOSTDIST}/gdb/../readline/.. -I${GNUHOSTDIST}/gdb/../zlib  -I../bfd -I${GNUHOSTDIST}/gdb/../bfd -I${GNUHOSTDIST}/gdb/../include -I../libdecnumber -I${GNUHOSTDIST}/gdb/../libdecnumber  -I./../intl -I${GNUHOSTDIST}/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral 
-G_LIBGDB_OBS=mips-tdep.o mipsnbsd-tdep.o solib-svr4.o nbsd-tdep.o ser-base.o ser-unix.o ser-pipe.o ser-tcp.o fork-child.o inf-ptrace.o nbsd-nat.o mipsnbsd-nat.o  nbsd-thread.o bsd-kvm.o  remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o  remote-notif.o ctf.o tracefile.o tracefile-tfile.o  cli-dump.o  cli-decode.o cli-script.o cli-cmds.o cli-setshow.o  cli-logging.o  cli-interp.o cli-utils.o mi-out.o mi-console.o  mi-cmds.o mi-cmd-catch.o mi-cmd-env.o  mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o  mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o  mi-cmd-info.o mi-interp.o  mi-main.o mi-parse.o mi-getopt.o tui-command.o  tui-data.o  tui-disasm.o  tui-file.o  tui-hooks.o  tui-interp.o  tui-io.o  tui-layout.o  tui-out.o  tui-regs.o  tui-source.o  tui-stack.o  tui-win.o  tui-windata.o  tui-wingeneral.o  tui-winsource.o  tui.o python.o guile.o elfread.o stap-probe.o dtrace-probe.o posix-hdep.o posix-strerror.o c-exp.o  cp-name-parser.o  ada-exp.o  jv-exp.o  d
 -exp.o f-exp.o go-exp.o m2-exp.o p-exp.o rust-exp.o  version.o  annotate.o  addrmap.o  auto-load.o auxv.o  agent.o  bfd-target.o  blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o  break-catch-syscall.o  findvar.o regcache.o cleanups.o  charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o  source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o  block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o  linespec.o dictionary.o namespace.o  location.o infcall.o  infcmd.o infrun.o  expprint.o environ.o stack.o tid-parse.o thread.o thread-fsm.o  exceptions.o  extension.o  filesystem.o  filestuff.o  inf-child.o  interps.o  minidebug.o  main.o  macrotab.o macrocmd.o macroexp.o macroscope.o  mi-common.o  event-loop.o event-top.o inf-loop.o completer.o  gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o  osabi.o copying.o  memattr.o mem-break.o target.o 

CVS commit: src/external/gpl3/gdb/lib/libgdb/arch

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 00:41:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h defs.mk init.c

Log Message:
regen mips64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/init.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c

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



CVS commit: src/external/gpl3/binutils

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 00:40:48 UTC 2016

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb: bfd.h bfdver.h
config.h defs.mk
src/external/gpl3/binutils/lib/libbfd/arch/mips64el: bfd.h bfdver.h
config.h defs.mk
src/external/gpl3/binutils/lib/libopcodes/arch/mips64eb: config.h
src/external/gpl3/binutils/lib/libopcodes/arch/mips64el: config.h
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb: config.h
defs.mk
src/external/gpl3/binutils/usr.bin/common/arch/mips64el: config.h
defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/mips64eb: config.h
src/external/gpl3/binutils/usr.bin/gas/arch/mips64el: config.h
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb: gconfig.h
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64el: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb: config.h
src/external/gpl3/binutils/usr.bin/ld/arch/mips64el: config.h

Log Message:
regen mips64


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h \
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h \
src/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h

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/binutils/lib/libbfd/arch/mips64eb/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h:1.7 src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h:1.8
--- src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h:1.7	Sat Mar 26 04:52:22 2016
+++ src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h	Fri Dec  2 19:40:47 2016
@@ -11,7 +11,7 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2016 Free Software Foundation, Inc.
 
Contributed by Cygnus Support.
 
@@ -522,7 +522,6 @@ extern void warn_deprecated (const char 
 #define bfd_get_file_flags(abfd) ((abfd)->flags)
 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
 #define bfd_has_map(abfd) ((abfd)->has_armap)
 #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
 
@@ -914,6 +913,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
   (bfd *, struct bfd_link_info *);
 
+extern void bfd_elf32_arm_keep_private_stub_output_sections
+  (struct bfd_link_info *);
+
 /* ELF ARM mapping symbol support.  */
 #define BFD_ARM_SPECIAL_SYM_TYPE_MAP	(1 << 0)
 #define BFD_ARM_SPECIAL_SYM_TYPE_TAG	(1 << 1)
@@ -945,7 +947,8 @@ extern void elf32_arm_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bfd_boolean elf32_arm_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+   struct bfd_section * (*) (const char *, struct bfd_section *,
+			 struct bfd_section *, unsigned int),
void (*) (void));
 extern bfd_boolean elf32_arm_build_stubs
   (struct bfd_link_info *);
@@ -958,13 +961,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c
 extern 

CVS commit: src/external/gpl3/binutils

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 00:40:48 UTC 2016

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb: bfd.h bfdver.h
config.h defs.mk
src/external/gpl3/binutils/lib/libbfd/arch/mips64el: bfd.h bfdver.h
config.h defs.mk
src/external/gpl3/binutils/lib/libopcodes/arch/mips64eb: config.h
src/external/gpl3/binutils/lib/libopcodes/arch/mips64el: config.h
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb: config.h
defs.mk
src/external/gpl3/binutils/usr.bin/common/arch/mips64el: config.h
defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/mips64eb: config.h
src/external/gpl3/binutils/usr.bin/gas/arch/mips64el: config.h
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb: gconfig.h
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64el: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb: config.h
src/external/gpl3/binutils/usr.bin/ld/arch/mips64el: config.h

Log Message:
regen mips64


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h \
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h \
src/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h \
src/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h

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



CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Dec  2 23:16:07 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm3_exa.c

Log Message:
change license since much of the actual acceleration code was adapted from
pm3_accel.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c
diff -u xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c:1.1 xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c:1.2
--- xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c:1.1	Fri Dec  2 22:58:26 2016
+++ xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c	Fri Dec  2 23:16:07 2016
@@ -1,32 +1,38 @@
-/* $NetBSD: pm3_exa.c,v 1.1 2016/12/02 22:58:26 macallan Exp $ */
+/* $NetBSD: pm3_exa.c,v 1.2 2016/12/02 23:16:07 macallan Exp $ */
+
 /*
  * Copyright (c) 2016 Michael Lorenz
  * All rights reserved.
+ */
+
+/* much of this is based on pm3_accel.c, therefore... */
+/*
+ * Copyright 2000-2001 by Sven Luther .
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Sven Luther not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Sven Luther makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
  *
- *- Redistributions of source code must retain the above copyright
- *  notice, this list of conditions and the following disclaimer.
- *- 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.
+ * SVEN LUTHER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SVEN LUTHER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
- * COPYRIGHT HOLDERS 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.
+ * Authors:  Sven Luther, 
+ *   Alan Hourihane, 
  *
+ * this work is sponsored by Appian Graphics.
+ * 
+ * Permedia 3 accelerated options.
  */
 
 #ifdef HAVE_CONFIG_H



CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Dec  2 23:16:07 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm3_exa.c

Log Message:
change license since much of the actual acceleration code was adapted from
pm3_accel.c


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c

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



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-glint

2016-12-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec  2 22:59:17 UTC 2016

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-glint: Makefile

Log Message:
build pm3_exa


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/mit/xorg/server/drivers/xf86-video-glint/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/server/drivers/xf86-video-glint/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile:1.11 src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile:1.12
--- src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile:1.11	Sun Jun  2 07:41:35 2013
+++ src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile	Fri Dec  2 22:59:17 2016
@@ -1,12 +1,13 @@
-#	$NetBSD: Makefile,v 1.11 2013/06/02 07:41:35 mrg Exp $
+#	$NetBSD: Makefile,v 1.12 2016/12/02 22:59:17 macallan Exp $
 
 DRIVER=		xf86-video-glint
 DRIVER_NAME=	glint_drv
 
 SRCS=		glint_dga.c glint_driver.c glint_shadow.c
-SRCS+=		IBMramdac.c pm2_accel.c pm2_dac.c pm2ramdac.c pm2v_dac.c
-SRCS+=		pm2_video.c pm2vramdac.c pm3_accel.c pm3_dac.c pm3_video.c
-SRCS+=		pm_accel.c pm_dac.c sx_accel.c TIramdac.c tx_accel.c tx_dac.c
+SRCS+=		IBMramdac.c pm2_accel.c pm2_common.c pm2_dac.c pm2_exa.c 
+SRCS+=		pm2ramdac.c pm2v_dac.c pm2_video.c pm2vramdac.c pm3_accel.c
+SRCS+=		pm3_dac.c pm3_exa.c pm3_video.c pm_accel.c pm_dac.c 
+SRCS+=		sx_accel.c TIramdac.c tx_accel.c tx_dac.c
 MAN=		glint.4
 
 .if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc"



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-glint

2016-12-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Dec  2 22:59:17 UTC 2016

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-glint: Makefile

Log Message:
build pm3_exa


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile

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



CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Dec  2 22:58:26 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-glint/dist/src: glint.h glint_driver.c
pm2_accel.c pm3_accel.c pm3_regs.h
Added Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm3_exa.c

Log Message:
add crude but working EXA support for Permedia 3


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/glint.h
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-glint/dist/src/pm2_accel.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_accel.c \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_regs.h
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-glint/dist/src/glint.h
diff -u xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.1.1.4 xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.2
--- xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.1.1.4	Sun Jun  2 07:25:12 2013
+++ xsrc/external/mit/xf86-video-glint/dist/src/glint.h	Fri Dec  2 22:58:26 2016
@@ -38,6 +38,8 @@
 #ifdef HAVE_XAA_H
 #include "xaa.h"
 #endif
+#include "exa.h"
+
 #include "xf86fbman.h"
 #include "xf86RamDac.h"
 #include "xf86cmap.h"
@@ -148,6 +150,9 @@ typedef struct {
 #ifdef HAVE_XAA_H
 XAAInfoRecPtr	AccelInfoRec;
 #endif
+ExaDriverPtr 	pExa;
+int			srcoff;
+
 CloseScreenProcPtr	CloseScreen;
 ScreenBlockHandlerProcPtr BlockHandler;
 GCPtr		CurrentGC;
@@ -240,6 +245,7 @@ void Permedia3Restore(ScrnInfoPtr pScrn,
 void Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
 Bool Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode, GLINTRegPtr pReg);
 Bool Permedia3AccelInit(ScreenPtr pScreen);
+Bool Pm3InitEXA(ScreenPtr pScreen);
 void Permedia3InitializeEngine(ScrnInfoPtr pScrn);
 void Permedia3EnableOffscreen(ScreenPtr pScreen);
 void Permedia3Sync(ScrnInfoPtr pScrn);

Index: xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c
diff -u xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.7 xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.8
--- xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.7	Tue Aug 16 01:27:46 2016
+++ xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c	Fri Dec  2 22:58:26 2016
@@ -941,6 +941,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
  * The first thing we should figure out is the depth, bpp, etc.
  * We support both 24bpp and 32bpp layouts, so indicate that.
  */
+#ifndef __NetBSD__
 if (FBDevProbed) {
 	int default_depth, fbbpp;
 	
@@ -951,7 +952,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 	default_depth = fbdevHWGetDepth(pScrn,);
 	if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp,0))
 		return FALSE;
-} else {
+} else
+#endif /* __NetBSD__ */
+{
 	if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support24bppFb | Support32bppFb 
 	 	/*| SupportConvert32to24 | PreferConvert32to24*/))
 		return FALSE;
@@ -1068,6 +1071,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 			((pScrn->mask.blue - 1) << 0);
 }
 
+#ifndef __NetBSD__
 /* Check whether to use the FBDev stuff and fill in the rest of pScrn */
 if (xf86ReturnOptValBool(pGlint->Options, OPTION_FBDEV, FALSE)) {
 	if (!FBDevProbed && !xf86LoadSubModule(pScrn, "fbdevhw"))
@@ -1089,7 +1093,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 	pScrn->LeaveVT		= fbdevHWLeaveVTWeak();
 	pScrn->ValidMode	= fbdevHWValidModeWeak();
 	
-} else {
+} else
+#endif /* !__NetBSD__ */
+{
 	/* Only use FBDev if requested */
 	pGlint->FBDev = FALSE;
 from = X_PROBED;
@@ -1460,10 +1466,12 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 		}
 	GLINTUnmapMem(pScrn);
 	}
-} else {
+}
+#ifndef __NetBSD__
+ else {
 	pScrn->videoRam = fbdevHWGetVidmem(pScrn)/1024;
 }
-
+#endif /* !__NetBSD__ */
 pGlint->FbMapSize = pScrn->videoRam * 1024;
 
 /* OVERRIDE videoRam/FbMapSize, for Multiply connected chips to GAMMA */
@@ -2000,10 +2008,12 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 			  LOOKUP_BEST_REFRESH);
 }
 
+#ifndef __NetBSD__
 if (i < 1 && pGlint->FBDev) {
 	fbdevHWUseBuildinMode(pScrn);
 	i = 1;
 }
+#endif /* !__NetBSD__ */
 
 if (i == -1) {
 	GLINTFreeRec(pScrn);
@@ -2248,6 +2258,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 }
 
 /* Load XAA if needed */
+#ifdef HAVE_XAA_H
 if (!pGlint->NoAccel) {
 	if (!xf86LoadSubModule(pScrn, "xaa")) {
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
@@ -2255,6 +2266,16 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag
 	pGlint->ShadowFB = 1;
 	}
 }
+#else
+if (!pGlint->NoAccel) {
+	if 

CVS commit: xsrc/external/mit/xf86-video-glint/dist/src

2016-12-02 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Dec  2 22:58:26 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-glint/dist/src: glint.h glint_driver.c
pm2_accel.c pm3_accel.c pm3_regs.h
Added Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm3_exa.c

Log Message:
add crude but working EXA support for Permedia 3


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/glint.h
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-glint/dist/src/pm2_accel.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_accel.c \
xsrc/external/mit/xf86-video-glint/dist/src/pm3_regs.h
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/xf86-video-glint/dist/src/pm3_exa.c

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



CVS commit: src/bin/ps

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 21:59:03 UTC 2016

Modified Files:
src/bin/ps: extern.h print.c ps.1 ps.c ps.h

Log Message:
provide a tree like display with -d, from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/ps/extern.h
cvs rdiff -u -r1.125 -r1.126 src/bin/ps/print.c
cvs rdiff -u -r1.105 -r1.106 src/bin/ps/ps.1
cvs rdiff -u -r1.86 -r1.87 src/bin/ps/ps.c
cvs rdiff -u -r1.28 -r1.29 src/bin/ps/ps.h

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

Modified files:

Index: src/bin/ps/extern.h
diff -u src/bin/ps/extern.h:1.37 src/bin/ps/extern.h:1.38
--- src/bin/ps/extern.h:1.37	Mon Nov 28 03:21:10 2016
+++ src/bin/ps/extern.h	Fri Dec  2 16:59:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.37 2016/11/28 08:21:10 rin Exp $	*/
+/*	$NetBSD: extern.h,v 1.38 2016/12/02 21:59:03 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -46,54 +46,54 @@ extern VAR var[];
 extern VARLIST displaylist;
 extern VARLIST sortlist;
 
-void	 command(void *, VARENT *, enum mode);
-void	 cpuid(void *, VARENT *, enum mode);
-void	 cputime(void *, VARENT *, enum mode);
+void	 command(struct pinfo *, VARENT *, enum mode);
+void	 cpuid(struct pinfo *, VARENT *, enum mode);
+void	 cputime(struct pinfo *, VARENT *, enum mode);
 void	 donlist(void);
 void	 donlist_sysctl(void);
 void	 fmt_puts(char *, int *);
 void	 fmt_putc(int, int *);
-void	 elapsed(void *, VARENT *, enum mode);
+void	 elapsed(struct pinfo *, VARENT *, enum mode);
 double	 getpcpu(const struct kinfo_proc2 *);
 double	 getpmem(const struct kinfo_proc2 *);
-void	 gname(void *, VARENT *, enum mode);
-void	 groups(void *, VARENT *, enum mode);
-void	 groupnames(void *, VARENT *, enum mode);
-void	 lcputime(void *, VARENT *, enum mode);
-void	 logname(void *, VARENT *, enum mode);
-void	 longtname(void *, VARENT *, enum mode);
-void	 lname(void *, VARENT *, enum mode);
-void	 lstarted(void *, VARENT *, enum mode);
-void	 lstate(void *, VARENT *, enum mode);
-void	 maxrss(void *, VARENT *, enum mode);
+void	 gname(struct pinfo *, VARENT *, enum mode);
+void	 groups(struct pinfo *, VARENT *, enum mode);
+void	 groupnames(struct pinfo *, VARENT *, enum mode);
+void	 lcputime(struct pinfo *, VARENT *, enum mode);
+void	 logname(struct pinfo *, VARENT *, enum mode);
+void	 longtname(struct pinfo *, VARENT *, enum mode);
+void	 lname(struct pinfo *, VARENT *, enum mode);
+void	 lstarted(struct pinfo *, VARENT *, enum mode);
+void	 lstate(struct pinfo *, VARENT *, enum mode);
+void	 maxrss(struct pinfo *, VARENT *, enum mode);
 void	 nlisterr(struct nlist *);
-void	 p_rssize(void *, VARENT *, enum mode);
-void	 pagein(void *, VARENT *, enum mode);
+void	 p_rssize(struct pinfo *, VARENT *, enum mode);
+void	 pagein(struct pinfo *, VARENT *, enum mode);
 void	 parsefmt(const char *);
 void	 parsefmt_insert(const char *, VARENT **);
 void	 parsesort(const char *);
 VARENT * varlist_find(VARLIST *, const char *);
-void	 emul(void *, VARENT *, enum mode);
-void	 pcpu(void *, VARENT *, enum mode);
-void	 pmem(void *, VARENT *, enum mode);
-void	 pnice(void *, VARENT *, enum mode);
-void	 pri(void *, VARENT *, enum mode);
+void	 emul(struct pinfo *, VARENT *, enum mode);
+void	 pcpu(struct pinfo *, VARENT *, enum mode);
+void	 pmem(struct pinfo *, VARENT *, enum mode);
+void	 pnice(struct pinfo *, VARENT *, enum mode);
+void	 pri(struct pinfo *, VARENT *, enum mode);
 void	 printheader(void);
-void	 putimeval(void *, VARENT *, enum mode);
-void	 pvar(void *, VARENT *, enum mode);
-void	 rgname(void *, VARENT *, enum mode);
-void	 rssize(void *, VARENT *, enum mode);
-void	 runame(void *, VARENT *, enum mode);
+void	 putimeval(struct pinfo *, VARENT *, enum mode);
+void	 pvar(struct pinfo *, VARENT *, enum mode);
+void	 rgname(struct pinfo *, VARENT *, enum mode);
+void	 rssize(struct pinfo *, VARENT *, enum mode);
+void	 runame(struct pinfo *, VARENT *, enum mode);
 void	 showkey(void);
-void	 started(void *, VARENT *, enum mode);
-void	 state(void *, VARENT *, enum mode);
-void	 svgname(void *, VARENT *, enum mode);
-void	 svuname(void *, VARENT *, enum mode);
-void	 tdev(void *, VARENT *, enum mode);
-void	 tname(void *, VARENT *, enum mode);
-void	 tsize(void *, VARENT *, enum mode);
-void	 ucomm(void *, VARENT *, enum mode);
-void	 uname(void *, VARENT *, enum mode);
-void	 uvar(void *, VARENT *, enum mode);
-void	 vsize(void *, VARENT *, enum mode);
-void	 wchan(void *, VARENT *, enum mode);
+void	 started(struct pinfo *, VARENT *, enum mode);
+void	 state(struct pinfo *, VARENT *, enum mode);
+void	 svgname(struct pinfo *, VARENT *, enum mode);
+void	 svuname(struct pinfo *, VARENT *, enum mode);
+void	 tdev(struct pinfo *, VARENT *, enum mode);
+void	 tname(struct pinfo *, VARENT *, enum mode);
+void	 tsize(struct pinfo *, VARENT *, enum mode);
+void	 ucomm(struct pinfo *, VARENT *, enum mode);
+void	 uname(struct pinfo 

CVS commit: src/bin/ps

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 21:59:03 UTC 2016

Modified Files:
src/bin/ps: extern.h print.c ps.1 ps.c ps.h

Log Message:
provide a tree like display with -d, from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/ps/extern.h
cvs rdiff -u -r1.125 -r1.126 src/bin/ps/print.c
cvs rdiff -u -r1.105 -r1.106 src/bin/ps/ps.1
cvs rdiff -u -r1.86 -r1.87 src/bin/ps/ps.c
cvs rdiff -u -r1.28 -r1.29 src/bin/ps/ps.h

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



CVS commit: src/lib/librumphijack

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 20:53:37 UTC 2016

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
fix test lib/librumphijack/t_sh/runscript
(handle F_DUPFD_CLOEXEC that the shell is now using)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/lib/librumphijack/hijack.c

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



CVS commit: src/lib/librumphijack

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 20:53:37 UTC 2016

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
fix test lib/librumphijack/t_sh/runscript
(handle F_DUPFD_CLOEXEC that the shell is now using)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.120 src/lib/librumphijack/hijack.c:1.121
--- src/lib/librumphijack/hijack.c:1.120	Thu Aug 11 05:48:57 2016
+++ src/lib/librumphijack/hijack.c	Fri Dec  2 15:53:36 2016
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.120 2016/08/11 09:48:57 kre Exp $	*/
+/*  $NetBSD: hijack.c,v 1.121 2016/12/02 20:53:36 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include 
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.120 2016/08/11 09:48:57 kre Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.121 2016/12/02 20:53:36 christos Exp $");
 #endif
 
 #include 
@@ -987,7 +987,6 @@ fd_rump2host_withdup(int fd)
 static int
 fd_host2rump(int fd)
 {
-
 	if (!isdup2d(fd))
 		return fd - hijack_fdoff;
 	else
@@ -1381,6 +1380,7 @@ fcntl(int fd, int cmd, ...)
 	DPRINTF(("fcntl -> %d (cmd %d)\n", fd, cmd));
 
 	switch (cmd) {
+	case F_DUPFD_CLOEXEC:	/* Ignore CLOEXEC bit for now */
 	case F_DUPFD:
 		va_start(ap, cmd);
 		minfd = va_arg(ap, int);



CVS commit: src/lib/libexecinfo

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 19:25:19 UTC 2016

Modified Files:
src/lib/libexecinfo: unwind.h

Log Message:
Add unwind action type and constants


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libexecinfo/unwind.h

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

Modified files:

Index: src/lib/libexecinfo/unwind.h
diff -u src/lib/libexecinfo/unwind.h:1.3 src/lib/libexecinfo/unwind.h:1.4
--- src/lib/libexecinfo/unwind.h:1.3	Wed Oct 22 12:30:21 2014
+++ src/lib/libexecinfo/unwind.h	Fri Dec  2 14:25:19 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: unwind.h,v 1.3 2014/10/22 16:30:21 christos Exp $	*/
+/*	$NetBSD: unwind.h,v 1.4 2016/12/02 19:25:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,9 +34,16 @@ __BEGIN_DECLS
 struct _Unwind_Context;
 struct _Unwind_Exception;
 typedef int _Unwind_Reason_Code;
+typedef int _Unwind_Action;
 typedef void *_Unwind_Ptr;
 typedef long _Unwind_Word;
 
+#define	_UA_SEARCH_PHASE	0x01
+#define	_UA_CLEANUP_PHASE	0x02
+#define	_UA_HANDLER_FRAME 	0x04
+#define	_UA_FORCE_UNWIND	0x08
+#define	_UA_END_OF_STACK 	0x10
+
 #define	_URC_NO_REASON			0
 #define	_URC_FOREIGN_EXCEPTION_CAUGHT	1
 #define	_URC_FATAL_PHASE2_ERROR		2



CVS commit: src/lib/libexecinfo

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 19:25:19 UTC 2016

Modified Files:
src/lib/libexecinfo: unwind.h

Log Message:
Add unwind action type and constants


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libexecinfo/unwind.h

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



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:54:35 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch m68k to new binutils and gdb


To generate a diff of this commit:
cvs rdiff -u -r1.989 -r1.990 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.989 src/share/mk/bsd.own.mk:1.990
--- src/share/mk/bsd.own.mk:1.989	Sun Nov 27 13:53:05 2016
+++ src/share/mk/bsd.own.mk	Fri Dec  2 12:54:35 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.989 2016/11/27 18:53:05 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.990 2016/12/02 17:54:35 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -132,7 +132,6 @@ USE_SSP?=	yes
 # What GDB is used?
 #
 .if \
-${MACHINE_CPU} == "m68k" || \
 ${MACHINE_ARCH} == "mips64el" || \
 ${MACHINE_ARCH} == "mips64eb"
 HAVE_GDB?=	710
@@ -153,6 +152,7 @@ EXTERNAL_GDB_SUBDIR=		/does/not/exist
 #
 .if \
 ${MACHINE_ARCH} == "i386" || \
+${MACHINE_CPU} == "m68k" || \
 ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "vax"
 HAVE_BINUTILS?=	227



CVS commit: src/share/mk

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:54:35 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch m68k to new binutils and gdb


To generate a diff of this commit:
cvs rdiff -u -r1.989 -r1.990 src/share/mk/bsd.own.mk

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



CVS commit: src/external/gpl3/binutils

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:53:51 UTC 2016

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/m68k: bfd.h bfdver.h
config.h
src/external/gpl3/binutils/lib/libopcodes/arch/m68k: config.h
src/external/gpl3/binutils/usr.bin/common/arch/m68k: config.h defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/m68k: config.h
src/external/gpl3/binutils/usr.bin/gprof/arch/m68k: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/m68k: config.h

Log Message:
regen m68k


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h

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



CVS commit: src/external/gpl3/binutils

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:53:51 UTC 2016

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/m68k: bfd.h bfdver.h
config.h
src/external/gpl3/binutils/lib/libopcodes/arch/m68k: config.h
src/external/gpl3/binutils/usr.bin/common/arch/m68k: config.h defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/m68k: config.h
src/external/gpl3/binutils/usr.bin/gprof/arch/m68k: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/m68k: config.h

Log Message:
regen m68k


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h

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/binutils/lib/libbfd/arch/m68k/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h:1.6 src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h:1.7
--- src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h:1.6	Fri Jan 29 12:30:23 2016
+++ src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h	Fri Dec  2 12:53:50 2016
@@ -11,7 +11,7 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2016 Free Software Foundation, Inc.
 
Contributed by Cygnus Support.
 
@@ -522,7 +522,6 @@ extern void warn_deprecated (const char 
 #define bfd_get_file_flags(abfd) ((abfd)->flags)
 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
 #define bfd_has_map(abfd) ((abfd)->has_armap)
 #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
 
@@ -914,6 +913,9 @@ extern bfd_boolean bfd_elf32_arm_get_bfd
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
   (bfd *, struct bfd_link_info *);
 
+extern void bfd_elf32_arm_keep_private_stub_output_sections
+  (struct bfd_link_info *);
+
 /* ELF ARM mapping symbol support.  */
 #define BFD_ARM_SPECIAL_SYM_TYPE_MAP	(1 << 0)
 #define BFD_ARM_SPECIAL_SYM_TYPE_TAG	(1 << 1)
@@ -945,7 +947,8 @@ extern void elf32_arm_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bfd_boolean elf32_arm_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int),
+   struct bfd_section * (*) (const char *, struct bfd_section *,
+			 struct bfd_section *, unsigned int),
void (*) (void));
 extern bfd_boolean elf32_arm_build_stubs
   (struct bfd_link_info *);
@@ -958,13 +961,6 @@ extern bfd_boolean elf32_arm_fix_exidx_c
 extern bfd_boolean elf32_tic6x_fix_exidx_coverage
 (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
-/* PowerPC @tls opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tls_transform
-  (unsigned int, unsigned int);
-/* PowerPC @tprel opcode transform/validate.  */
-extern unsigned int _bfd_elf_ppc_at_tprel_transform
-  (unsigned int, unsigned int);
-
 extern void bfd_elf64_aarch64_init_maps
   (bfd *);
 
@@ -972,10 +968,10 @@ extern void bfd_elf32_aarch64_init_maps
   (bfd *);
 
 extern void bfd_elf64_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 extern void bfd_elf32_aarch64_set_options
-  (bfd *, struct bfd_link_info *, int, int, int, int, int);
+  (bfd *, struct bfd_link_info *, int, int, int, int, int, int);
 
 /* ELF AArch64 mapping symbol support.  */
 #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP	(1 << 0)
@@ -1436,6 +1432,9 @@ typedef struct bfd_section
  when memory read flag isn't set. */
 #define SEC_COFF_NOREAD 0x4000
 
+  /* Indicate that section has the no read flag set.  */
+#define SEC_ELF_NOREAD 0x8000
+
   /*  End of section flags.  */
 
   /* Some internal packed boolean fields.  */
@@ -1502,7 +1501,7 @@ typedef struct bfd_section
   information.  */
   bfd_vma lma;
 
-  /* The size of the section in octets, as it will be output.
+  /* The size of the section in *octets*, as it 

CVS commit: src/external/gpl3/gdb/lib/libgdb/arch/m68k

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:51:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/m68k: config.h defs.mk init.c

Log Message:
regen m68k


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/m68k/init.c

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/gdb/lib/libgdb/arch/m68k/config.h
diff -u src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h:1.6 src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h:1.7
--- src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h:1.6	Mon Oct 17 13:38:07 2016
+++ src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h	Fri Dec  2 12:51:07 2016
@@ -582,7 +582,7 @@
 /* #undef HAVE_WAIT_H */
 
 /* Define to 1 if you have the `wborder' function. */
-#define HAVE_WBORDER 1
+/* #undef HAVE_WBORDER */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_WINDOWS_H */
@@ -594,7 +594,7 @@
 #define HAVE_WORKING_VFORK 1
 
 /* Define to 1 if you have the `wresize' function. */
-#define HAVE_WRESIZE 1
+/* #undef HAVE_WRESIZE */
 
 /* Define to 1 if you have the `XML_StopParser' function. */
 /* #undef HAVE_XML_STOPPARSER */

Index: src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk
diff -u src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk:1.8 src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk:1.9
--- src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk:1.8	Mon Oct 17 13:38:07 2016
+++ src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk	Fri Dec  2 12:51:07 2016
@@ -2,6 +2,6 @@
 # Generated from: NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp 
 #
-G_INTERNAL_CFLAGS=-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS-I. -I${GNUHOSTDIST}/gdb -I${GNUHOSTDIST}/gdb/common -I${GNUHOSTDIST}/gdb/config  -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I${GNUHOSTDIST}/gdb/../include/opcode -I${GNUHOSTDIST}/gdb/../opcodes/.. -I${GNUHOSTDIST}/gdb/../readline/.. -I${GNUHOSTDIST}/gdb/../zlib  -I../bfd -I${GNUHOSTDIST}/gdb/../bfd -I${GNUHOSTDIST}/gdb/../include -I../libdecnumber -I${GNUHOSTDIST}/gdb/../libdecnumber  -I./../intl -I${GNUHOSTDIST}/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral 
-G_LIBGDB_OBS=m68k-tdep.o m68kbsd-tdep.o solib-svr4.o ser-base.o ser-unix.o ser-pipe.o ser-tcp.o nbsd-nat.o m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o  nbsd-thread.o  remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o  remote-notif.o ctf.o tracefile.o tracefile-tfile.o  cli-dump.o  cli-decode.o cli-script.o cli-cmds.o cli-setshow.o  cli-logging.o  cli-interp.o cli-utils.o mi-out.o mi-console.o  mi-cmds.o mi-cmd-catch.o mi-cmd-env.o  mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o  mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o  mi-cmd-info.o mi-interp.o  mi-main.o mi-parse.o mi-getopt.o tui-command.o  tui-data.o  tui-disasm.o  tui-file.o  tui-hooks.o  tui-interp.o  tui-io.o  tui-layout.o  tui-out.o  tui-regs.o  tui-source.o  tui-stack.o  tui-win.o  tui-windata.o  tui-wingeneral.o  tui-winsource.o  tui.o python.o guile.o elfread.o stap-probe.o dtrace-probe.o posix-hdep.o posix-strerror.o c-exp.o  cp-name-parser.o  ada-exp.o  jv-exp.o  d-exp.o f-exp.o
  go-exp.o m2-exp.o p-exp.o rust-exp.o  version.o  annotate.o  addrmap.o  auto-load.o auxv.o  agent.o  bfd-target.o  blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o  break-catch-syscall.o  findvar.o regcache.o cleanups.o  charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o  source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o  block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o  linespec.o dictionary.o namespace.o  location.o infcall.o  infcmd.o infrun.o  expprint.o environ.o stack.o tid-parse.o thread.o thread-fsm.o  exceptions.o  extension.o  filesystem.o  filestuff.o  inf-child.o  interps.o  minidebug.o  main.o  macrotab.o macrocmd.o macroexp.o macroscope.o  mi-common.o  event-loop.o event-top.o inf-loop.o completer.o  gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o  osabi.o copying.o  memattr.o mem-break.o target.o target-dcache.o parse.o language.o  build-id.o buildsym.o  findcmd.o  std-regs.o  signals-state-save-res
 tore.o  signals.o  exec.o reverse.o  bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o  dbxread.o coffread.o coff-pe-read.o  dwarf2read.o mipsread.o stabsread.o corefile.o  dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o  

CVS commit: src/external/gpl3/gdb/lib/libgdb/arch/m68k

2016-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  2 17:51:07 UTC 2016

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/m68k: config.h defs.mk init.c

Log Message:
regen m68k


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libgdb/arch/m68k/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/m68k/init.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/x68k/x68k

2016-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec  2 12:43:07 UTC 2016

Modified Files:
src/sys/arch/x68k/x68k: machdep.c

Log Message:
Fix crashdump on machines with EXTENDED_MEMORY.

PR port-x68k/51663 from Rin Okuyama.


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/x68k/x68k/machdep.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/x68k/x68k

2016-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec  2 12:43:07 UTC 2016

Modified Files:
src/sys/arch/x68k/x68k: machdep.c

Log Message:
Fix crashdump on machines with EXTENDED_MEMORY.

PR port-x68k/51663 from Rin Okuyama.


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/x68k/x68k/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/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.193 src/sys/arch/x68k/x68k/machdep.c:1.194
--- src/sys/arch/x68k/x68k/machdep.c:1.193	Tue Jun 14 07:51:10 2016
+++ src/sys/arch/x68k/x68k/machdep.c	Fri Dec  2 12:43:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.193 2016/06/14 07:51:10 isaki Exp $	*/
+/*	$NetBSD: machdep.c,v 1.194 2016/12/02 12:43:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.193 2016/06/14 07:51:10 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.194 2016/12/02 12:43:07 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -553,7 +553,10 @@ cpu_init_kcore_hdr(void)
 {
 	cpu_kcore_hdr_t *h = _kcore_hdr;
 	struct m68k_kcore_hdr *m = >un._m68k;
-	int i;
+	psize_t size;
+#ifdef EXTENDED_MEMORY
+	int i, seg;
+#endif
 
 	memset(_kcore_hdr, 0, sizeof(cpu_kcore_hdr));
 
@@ -602,14 +605,20 @@ cpu_init_kcore_hdr(void)
 	/*
 	 * X68k has multiple RAM segments on some models.
 	 */
-	m->ram_segs[0].start = lowram;
-	m->ram_segs[0].size = mem_size - lowram;
-	for (i = 1; i < vm_nphysseg; i++) {
-		m->ram_segs[i].start =
-		ctob(VM_PHYSMEM_PTR(i)->start);
-		m->ram_segs[i].size  =
-		ctob(VM_PHYSMEM_PTR(i)->end - VM_PHYSMEM_PTR(i)->start);
+	size = phys_basemem_seg.end - phys_basemem_seg.start;
+	m->ram_segs[0].start = phys_basemem_seg.start;
+	m->ram_segs[0].size  = size;
+#ifdef EXTENDED_MEMORY
+	seg = 1;
+	for (i = 0; i < EXTMEM_SEGS; i++) {
+		size = phys_extmem_seg[i].end - phys_extmem_seg[i].start;
+		if (size == 0)
+			continue;
+		m->ram_segs[seg].start = phys_extmem_seg[i].start;
+		m->ram_segs[seg].size  = size;
+		seg++;
 	}
+#endif
 }
 
 /*



CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 12:14:37 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r294578:
- Fixup SFP module insertion on the 82599 when insertion happens after
  the system is booted and running. Add PHY detection logic to
  ixgbe_handle_mod() and add locking to ixgbe_handle_msf() as well.
  FreeBSD r293334.
- Fix ix advertise value after media change. When ifconfig sets media then the
  values displayed by the advertise_speed value are invalidated.
  Fix this by setting the bits correctly including setting advertise to 0 for
  media = auto. FreeBSD r294578.
- Some others (e.g. LRO(not used by NetBSD)).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.27 -r1.28 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.8 src/sys/dev/pci/ixgbe/ix_txrx.c:1.9
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.8	Fri Dec  2 10:42:04 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec  2 12:14:37 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ix_txrx.c,v 1.8 2016/12/02 10:42:04 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 292751 2015-12-26 17:27:48Z bz $*/
+/*$NetBSD: ix_txrx.c,v 1.9 2016/12/02 12:14:37 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -821,6 +821,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, 
 		l3d = mtod(mp, char *) + ehdrlen;
 
 	switch (etype) {
+#ifdef INET
 	case ETHERTYPE_IP:
 		ip = (struct ip *)(l3d);
 		ip_hlen = ip->ip_hl << 2;
@@ -829,12 +830,15 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, 
 		KASSERT((mp->m_pkthdr.csum_flags & M_CSUM_IPv4) == 0 ||
 		ip->ip_sum == 0);
 		break;
+#endif
+#ifdef INET6
 	case ETHERTYPE_IPV6:
 		ip6 = (struct ip6_hdr *)(l3d);
 		ip_hlen = sizeof(struct ip6_hdr);
 		ipproto = ip6->ip6_nxt;
 		type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV6;
 		break;
+#endif
 	default:
 		break;
 	}

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.50 src/sys/dev/pci/ixgbe/ixgbe.c:1.51
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.50	Fri Dec  2 11:56:55 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Dec  2 12:14:37 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.50 2016/12/02 11:56:55 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 294578 2016-01-22 17:03:32Z smh $*/
+/*$NetBSD: ixgbe.c,v 1.51 2016/12/02 12:14:37 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -2033,10 +2033,16 @@ ixgbe_media_change(struct ifnet * ifp)
 
 	hw->mac.autotry_restart = TRUE;
 	hw->mac.ops.setup_link(hw, speed, TRUE);
-	adapter->advertise =
-		((speed & IXGBE_LINK_SPEED_10GB_FULL) << 2) |
-		((speed & IXGBE_LINK_SPEED_1GB_FULL) << 1) |
-		((speed & IXGBE_LINK_SPEED_100_FULL) << 0);
+	if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) {
+		adapter->advertise = 0;
+	} else {
+		if ((speed & IXGBE_LINK_SPEED_10GB_FULL) != 0)
+			adapter->advertise |= 1 << 2;
+		if ((speed & IXGBE_LINK_SPEED_1GB_FULL) != 0)
+			adapter->advertise |= 1 << 1;
+		if ((speed & IXGBE_LINK_SPEED_100_FULL) != 0)
+			adapter->advertise |= 1 << 0;
+	}
 
 	return (0);
 
@@ -3066,18 +3072,8 @@ ixgbe_config_link(struct adapter *adapte
 	sfp = ixgbe_is_sfp(hw);
 
 	if (sfp) { 
-		void *ip;
-
-		if (hw->phy.multispeed_fiber) {
-			hw->mac.ops.setup_sfp(hw);
-			ixgbe_enable_tx_laser(hw);
-			ip = adapter->msf_si;
-		} else {
-			ip = adapter->mod_si;
-		}
-
 		kpreempt_disable();
-		softint_schedule(ip);
+		softint_schedule(adapter->mod_si);
 		kpreempt_enable();
 	} else {
 		if (hw->mac.ops.check_link)
@@ -3885,23 +3881,66 @@ ixgbe_handle_mod(void *context)
 {
 	struct adapter  *adapter = context;
 	struct ixgbe_hw *hw = >hw;
+	enum ixgbe_phy_type orig_type = hw->phy.type;
 	device_t	dev = adapter->dev;
 	u32 err;
 
+	IXGBE_CORE_LOCK(adapter);
+
+	/* Check to see if the PHY type changed */
+	if (hw->phy.ops.identify) {
+		hw->phy.type = ixgbe_phy_unknown;
+		hw->phy.ops.identify(hw);
+	}
+
+	if (hw->phy.type != orig_type) {
+		device_printf(dev, "Detected phy_type %d\n", hw->phy.type);
+
+		if (hw->phy.type == ixgbe_phy_none) {
+			hw->phy.sfp_type = ixgbe_sfp_type_unknown;
+			goto out;
+		}
+
+		/* Try to do the initialization that was skipped before */
+		if (hw->phy.ops.init)
+			hw->phy.ops.init(hw);
+		if (hw->phy.ops.reset)
+			hw->phy.ops.reset(hw);
+	}
+
 	err = 

CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 12:14:37 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r294578:
- Fixup SFP module insertion on the 82599 when insertion happens after
  the system is booted and running. Add PHY detection logic to
  ixgbe_handle_mod() and add locking to ixgbe_handle_msf() as well.
  FreeBSD r293334.
- Fix ix advertise value after media change. When ifconfig sets media then the
  values displayed by the advertise_speed value are invalidated.
  Fix this by setting the bits correctly including setting advertise to 0 for
  media = auto. FreeBSD r294578.
- Some others (e.g. LRO(not used by NetBSD)).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.27 -r1.28 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/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 11:56:55 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
Fix ix{gbe,v}_set_sysctlvalue().


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.26 -r1.27 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/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 11:56:55 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
Fix ix{gbe,v}_set_sysctlvalue().


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.26 -r1.27 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/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.49 src/sys/dev/pci/ixgbe/ixgbe.c:1.50
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.49	Fri Dec  2 10:46:58 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Dec  2 11:56:55 2016
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.49 2016/12/02 10:46:58 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.50 2016/12/02 11:56:55 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -4816,9 +4816,9 @@ ixgbe_set_sysctl_value(struct adapter *a
 		return;
 	}
 	if (sysctl_createv(log, 0, , ,
-	CTLFLAG_READWRITE|CTLFLAG_IMMEDIATE, CTLTYPE_INT,
+	CTLFLAG_READWRITE, CTLTYPE_INT,
 	name, SYSCTL_DESCR(description),
-		NULL, value, limit, 0, CTL_CREATE, CTL_EOL) != 0)
+		NULL, 0, limit, 0, CTL_CREATE, CTL_EOL) != 0)
 		aprint_error_dev(dev, "could not create sysctl\n");
 	*limit = value;
 }

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.26 src/sys/dev/pci/ixgbe/ixv.c:1.27
--- src/sys/dev/pci/ixgbe/ixv.c:1.26	Fri Dec  2 10:42:04 2016
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Dec  2 11:56:55 2016
@@ -31,7 +31,7 @@
 
 **/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.26 2016/12/02 10:42:04 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.27 2016/12/02 11:56:55 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -2194,9 +2194,9 @@ ixv_set_sysctl_value(struct adapter *ada
 		return;
 	}
 	if (sysctl_createv(log, 0, , ,
-	CTLFLAG_READWRITE|CTLFLAG_IMMEDIATE, CTLTYPE_INT,
+	CTLFLAG_READWRITE, CTLTYPE_INT,
 	name, SYSCTL_DESCR(description),
-	NULL, 0, limit, CTL_CREATE, CTL_EOL) != 0)
+	NULL, 0, limit, 0, CTL_CREATE, CTL_EOL) != 0)
 		aprint_error_dev(dev, "could not create sysctl\n");
 	*limit = value;
 }



CVS commit: src/sys/dev/pci

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:48:11 UTC 2016

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
Add ixgbe_osdep.c.


To generate a diff of this commit:
cvs rdiff -u -r1.384 -r1.385 src/sys/dev/pci/files.pci

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/files.pci
diff -u src/sys/dev/pci/files.pci:1.384 src/sys/dev/pci/files.pci:1.385
--- src/sys/dev/pci/files.pci:1.384	Thu Dec  1 06:56:28 2016
+++ src/sys/dev/pci/files.pci	Fri Dec  2 10:48:11 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.384 2016/12/01 06:56:28 msaitoh Exp $
+#	$NetBSD: files.pci,v 1.385 2016/12/02 10:48:11 msaitoh Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -677,6 +677,7 @@ file	dev/pci/ixgbe/ixgbe_x550.c	ixg | ix
 file	dev/pci/ixgbe/ixgbe_api.c	ixg | ixv
 file	dev/pci/ixgbe/ixgbe_common.c	ixg | ixv
 file	dev/pci/ixgbe/ixgbe_mbx.c	ixg | ixv
+file	dev/pci/ixgbe/ixgbe_osdep.c	ixg | ixv
 file	dev/pci/ixgbe/ixgbe_phy.c	ixg | ixv
 file	dev/pci/ixgbe/ixgbe_vf.c	ixg | ixv
 



CVS commit: src/sys/dev/pci

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:48:11 UTC 2016

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
Add ixgbe_osdep.c.


To generate a diff of this commit:
cvs rdiff -u -r1.384 -r1.385 src/sys/dev/pci/files.pci

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



CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:46:58 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
- Add missing pmf_device_deregister() in ixgbe_detach()
- Remove extra newline from an sysctl description.
- Fix dmesg output when the number of PCIe lane can't get.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ixgbe.h

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



CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:46:58 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
- Add missing pmf_device_deregister() in ixgbe_detach()
- Remove extra newline from an sysctl description.
- Fix dmesg output when the number of PCIe lane can't get.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ixgbe.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/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.48 src/sys/dev/pci/ixgbe/ixgbe.c:1.49
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.48	Fri Dec  2 10:42:04 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Dec  2 10:46:58 2016
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.48 2016/12/02 10:42:04 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.49 2016/12/02 10:46:58 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -700,6 +700,8 @@ ixgbe_detach(device_t dev, int flags)
 	}
 #endif /* PCI_IOV */
 
+	pmf_device_deregister(dev);
+
 	ether_ifdetach(adapter->ifp);
 	/* Stop the adapter */
 	IXGBE_CORE_LOCK(adapter);
@@ -3706,13 +3708,13 @@ ixgbe_get_slot_info(struct adapter *adap
 	mac->ops.set_lan_id(hw);
 
 display:
-	device_printf(dev,"PCI Express Bus: Speed %s %s\n",
+	device_printf(dev,"PCI Express Bus: Speed %s Width %s\n",
 	((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s":
 	(hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s":
 	(hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s":"Unknown"),
-	(hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" :
-	(hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" :
-	(hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" :
+	(hw->bus.width == ixgbe_bus_width_pcie_x8) ? "x8" :
+	(hw->bus.width == ixgbe_bus_width_pcie_x4) ? "x4" :
+	(hw->bus.width == ixgbe_bus_width_pcie_x1) ? "x1" :
 	("Unknown"));
 
 	if ((hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) &&

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.16 src/sys/dev/pci/ixgbe/ixgbe.h:1.17
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.16	Fri Dec  2 10:42:04 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Dec  2 10:46:58 2016
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 292674 2015-12-23 22:45:17Z sbruno $*/
-/*$NetBSD: ixgbe.h,v 1.16 2016/12/02 10:42:04 msaitoh Exp $*/
+/*$NetBSD: ixgbe.h,v 1.17 2016/12/02 10:46:58 msaitoh Exp $*/
 
 
 #ifndef _IXGBE_H_
@@ -677,7 +677,7 @@ struct adapter {
 	"\t0x1 - advertise 100M\n" \
 	"\t0x2 - advertise 1G\n" \
 	"\t0x4 - advertise 10G\n\n" \
-	"\t100M is only supported on certain 10GBaseT adapters.\n"
+	"\t100M is only supported on certain 10GBaseT adapters."
 
 #define IXGBE_SYSCTL_DESC_SET_FC \
 	"\nSet flow control mode using these values:\n" \



CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:42:04 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82598.c
ixgbe_82599.c ixgbe_api.c ixgbe_api.h ixgbe_common.c ixgbe_dcb.c
ixgbe_mbx.h ixgbe_osdep.h ixgbe_phy.c ixgbe_phy.h ixgbe_type.h
ixgbe_vf.c ixgbe_x540.c ixgbe_x550.c ixgbe_x550.h ixv.c
Added Files:
src/sys/dev/pci/ixgbe: ixgbe_osdep.c
Removed Files:
src/sys/dev/pci/ixgbe: LICENSE README

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r292674:
- Add X552 SFP+ and X550T single port.
- Bug fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 src/sys/dev/pci/ixgbe/LICENSE
cvs rdiff -u -r1.2 -r0 src/sys/dev/pci/ixgbe/README
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/ix_txrx.c \
src/sys/dev/pci/ixgbe/ixgbe_82598.c src/sys/dev/pci/ixgbe/ixgbe_phy.h
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/ixgbe/ixgbe.h \
src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_82599.c \
src/sys/dev/pci/ixgbe/ixgbe_api.c src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_api.h \
src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/ixgbe_common.c \
src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_x550.c \
src/sys/dev/pci/ixgbe/ixgbe_x550.h
cvs rdiff -u -r1.25 -r1.26 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.7 src/sys/dev/pci/ixgbe/ix_txrx.c:1.8
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.7	Fri Dec  2 10:34:23 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec  2 10:42:04 2016
@@ -58,8 +58,11 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 289238 2015-10-13 17:34:18Z sbruno $*/
-/*$NetBSD: ix_txrx.c,v 1.7 2016/12/02 10:34:23 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 292674 2015-12-23 22:45:17Z sbruno $*/
+/*$NetBSD: ix_txrx.c,v 1.8 2016/12/02 10:42:04 msaitoh Exp $*/
+
+#include "opt_inet.h"
+#include "opt_inet6.h"
 
 #include "ixgbe.h"
 
@@ -98,48 +101,6 @@ static bool ixgbe_rsc_enable = FALSE;
 static int atr_sample_rate = 20;
 #endif
 
-/* Shared PCI config read/write */
-u16
-ixgbe_read_pci_cfg(struct ixgbe_hw *hw, u32 reg)
-{
-	switch (reg % 4) {
-	case 0:
-		return pci_conf_read(hw->back->pc, hw->back->tag, reg) &
-		__BITS(15, 0);
-	case 2:
-		return __SHIFTOUT(pci_conf_read(hw->back->pc, hw->back->tag,
-		reg - 2), __BITS(31, 16));
-	default:
-		panic("%s: invalid register (%" PRIx32, __func__, reg); 
-		break;
-	}
-}
-
-void
-ixgbe_write_pci_cfg(struct ixgbe_hw *hw, u32 reg, u16 value)
-{
-	pcireg_t old;
-
-	switch (reg % 4) {
-	case 0:
-		old = pci_conf_read(hw->back->pc, hw->back->tag, reg) &
-		__BITS(31, 16);
-		pci_conf_write(hw->back->pc, hw->back->tag, reg, value | old);
-		break;
-	case 2:
-		old = pci_conf_read(hw->back->pc, hw->back->tag, reg - 2) &
-		__BITS(15, 0);
-		pci_conf_write(hw->back->pc, hw->back->tag, reg - 2,
-		__SHIFTIN(value, __BITS(31, 16)) | old);
-		break;
-	default:
-		panic("%s: invalid register (%" PRIx32, __func__, reg); 
-		break;
-	}
-
-	return;
-}
-
 /*
  *  Local Function prototypes
  */
@@ -246,8 +207,8 @@ ixgbe_start(struct ifnet *ifp)
 #else /* ! IXGBE_LEGACY_TX */
 
 /*
-** Multiqueue Transmit driver
-**
+** Multiqueue Transmit Entry Point
+** (if_transmit function)
 */
 int
 ixgbe_mq_start(struct ifnet *ifp, struct mbuf *m)
@@ -267,13 +228,22 @@ ixgbe_mq_start(struct ifnet *ifp, struct
 	 * If everything is setup correctly, it should be the
 	 * same bucket that the current CPU we're on is.
 	 */
+#if __FreeBSD_version < 1100054
+	if (m->m_flags & M_FLOWID) {
+#else
 	if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
+#endif
 #ifdef	RSS
 		if (rss_hash2bucket(m->m_pkthdr.flowid,
-		M_HASHTYPE_GET(m), _id) == 0)
+		M_HASHTYPE_GET(m), _id) == 0) {
 			/* TODO: spit out something if bucket_id > num_queues? */
 			i = bucket_id % adapter->num_queues;
-		else
+#ifdef IXGBE_DEBUG
+			if (bucket_id > adapter->num_queues)
+if_printf(ifp, "bucket_id (%d) > num_queues "
+"(%d)\n", bucket_id, adapter->num_queues);
+#endif
+		} else
 #endif
 			i = m->m_pkthdr.flowid % adapter->num_queues;
 	} else
@@ -489,6 +459,7 @@ 

CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:42:04 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82598.c
ixgbe_82599.c ixgbe_api.c ixgbe_api.h ixgbe_common.c ixgbe_dcb.c
ixgbe_mbx.h ixgbe_osdep.h ixgbe_phy.c ixgbe_phy.h ixgbe_type.h
ixgbe_vf.c ixgbe_x540.c ixgbe_x550.c ixgbe_x550.h ixv.c
Added Files:
src/sys/dev/pci/ixgbe: ixgbe_osdep.c
Removed Files:
src/sys/dev/pci/ixgbe: LICENSE README

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r292674:
- Add X552 SFP+ and X550T single port.
- Bug fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 src/sys/dev/pci/ixgbe/LICENSE
cvs rdiff -u -r1.2 -r0 src/sys/dev/pci/ixgbe/README
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/ix_txrx.c \
src/sys/dev/pci/ixgbe/ixgbe_82598.c src/sys/dev/pci/ixgbe/ixgbe_phy.h
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/ixgbe/ixgbe.h \
src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_82599.c \
src/sys/dev/pci/ixgbe/ixgbe_api.c src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_api.h \
src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/ixgbe_common.c \
src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_x550.c \
src/sys/dev/pci/ixgbe/ixgbe_x550.h
cvs rdiff -u -r1.25 -r1.26 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/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:34:23 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r289238:
- Add support for sysctl knobs to live tune the per interrupt rx/tx packet
  processing limits in ixgbe(4)
- Some others (netmap, etc.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.24 -r1.25 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/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:34:23 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r289238:
- Add support for sysctl knobs to live tune the per interrupt rx/tx packet
  processing limits in ixgbe(4)
- Some others (netmap, etc.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.24 -r1.25 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.6 src/sys/dev/pci/ixgbe/ix_txrx.c:1.7
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.6	Fri Dec  2 10:24:31 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec  2 10:34:23 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 285528 2015-07-14 09:13:18Z hiren $*/
-/*$NetBSD: ix_txrx.c,v 1.6 2016/12/02 10:24:31 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 289238 2015-10-13 17:34:18Z sbruno $*/
+/*$NetBSD: ix_txrx.c,v 1.7 2016/12/02 10:34:23 msaitoh Exp $*/
 
 #include "ixgbe.h"
 
@@ -267,11 +267,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct
 	 * If everything is setup correctly, it should be the
 	 * same bucket that the current CPU we're on is.
 	 */
-#if __FreeBSD_version < 1100054
-	if (m->m_flags & M_FLOWID) {
-#else
 	if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
-#endif
 #ifdef	RSS
 		if (rss_hash2bucket(m->m_pkthdr.flowid,
 		M_HASHTYPE_GET(m), _id) == 0)
@@ -1028,7 +1024,7 @@ ixgbe_txeof(struct tx_ring *txr)
 	struct adapter		*adapter = txr->adapter;
 	struct ifnet		*ifp = adapter->ifp;
 	u32			work, processed = 0;
-	u16			limit = txr->process_limit;
+	u32			limit = adapter->tx_process_limit;
 	struct ixgbe_tx_buf	*buf;
 	union ixgbe_adv_tx_desc *txd;
 
@@ -1818,7 +1814,7 @@ ixgbe_rxeof(struct ix_queue *que)
 #endif /* LRO */
 	int			i, nextp, processed = 0;
 	u32			staterr = 0;
-	u16			count = rxr->process_limit;
+	u32			count = adapter->rx_process_limit;
 	union ixgbe_adv_rx_desc	*cur;
 	struct ixgbe_rx_buf	*rbuf, *nbuf;
 #ifdef RSS

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.46 src/sys/dev/pci/ixgbe/ixgbe.c:1.47
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.46	Fri Dec  2 10:24:31 2016
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Dec  2 10:34:23 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 285590 2015-07-15 00:35:50Z pkelsey $*/
-/*$NetBSD: ixgbe.c,v 1.46 2016/12/02 10:24:31 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 289238 2015-10-13 17:34:18Z sbruno $*/
+/*$NetBSD: ixgbe.c,v 1.47 2016/12/02 10:34:23 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -198,6 +198,8 @@ static void	ixgbe_add_device_sysctls(str
 static void ixgbe_add_hw_stats(struct adapter *);
 
 /* Sysctl handlers */
+static void	ixgbe_set_sysctl_value(struct adapter *, const char *,
+		const char *, int *, int);
 static int	ixgbe_set_flowcntl(SYSCTLFN_PROTO);
 static int	ixgbe_set_advertise(SYSCTLFN_PROTO);
 static int	ixgbe_sysctl_thermal_test(SYSCTLFN_PROTO);
@@ -449,6 +451,11 @@ ixgbe_attach(device_t parent, device_t d
 	aprint_normal(": %s, Version - %s\n",
 	ixgbe_strings[ent->index], ixgbe_driver_version);
 
+#ifdef DEV_NETMAP
+	adapter->init_locked = ixgbe_init_locked;
+	adapter->stop_locked = ixgbe_stop;
+#endif
+
 	/* Core Lock Init*/
 	IXGBE_CORE_LOCK_INIT(adapter, device_xname(dev));
 
@@ -465,6 +472,15 @@ ixgbe_attach(device_t parent, device_t d
 		goto err_out;
 	}
 
+	/* Sysctls for limiting the amount of work done in the taskqueues */
+	ixgbe_set_sysctl_value(adapter, "rx_processing_limit",
+	"max number of rx packets to process",
+	>rx_process_limit, ixgbe_rx_process_limit);
+
+	ixgbe_set_sysctl_value(adapter, "tx_processing_limit",
+	"max number of tx packets to process",
+	>tx_process_limit, ixgbe_tx_process_limit);
+
 	/* Do descriptor calc and sanity checks */
 	if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
 	ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) {
@@ -687,6 +703,8 @@ ixgbe_detach(device_t dev, int flags)
 	}
 #endif /* PCI_IOV */
 
+	pmf_device_deregister(dev);
+
 	/* Stop the adapter */
 	IXGBE_CORE_LOCK(adapter);
 	ixgbe_setup_low_power_mode(adapter);
@@ -3033,9 +3051,6 @@ ixgbe_initialize_transmit_units(struct a
 		/* Cache the tail address */
 		txr->tail = 

CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:24:31 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r285590:
- Fix igxbe SRIOV VF (if_ixv) initialization bugs.  The MAC address for
  an if_ixv instance can now set at creation time, and the receive ring
  tail pointer is correctly initialized (previously, things still worked
  because the receive ring tail pointer was being fixed up as a side
  effect of other activity).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.23 -r1.24 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.5 src/sys/dev/pci/ixgbe/ix_txrx.c:1.6
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.5	Fri Dec  2 10:21:43 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec  2 10:24:31 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 283881 2015-06-01 17:15:25Z jfv $*/
-/*$NetBSD: ix_txrx.c,v 1.5 2016/12/02 10:21:43 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 285528 2015-07-14 09:13:18Z hiren $*/
+/*$NetBSD: ix_txrx.c,v 1.6 2016/12/02 10:24:31 msaitoh Exp $*/
 
 #include "ixgbe.h"
 
@@ -1985,52 +1985,62 @@ ixgbe_rxeof(struct ix_queue *que)
 ixgbe_rx_checksum(staterr, sendmp, ptype,
    >stats.pf);
 			}
-#if __FreeBSD_version >= 80
-#ifdef RSS
-			sendmp->m_pkthdr.flowid =
-			le32toh(cur->wb.lower.hi_dword.rss);
-#if __FreeBSD_version < 1100054
-			sendmp->m_flags |= M_FLOWID;
-#endif
-			switch (pkt_info & IXGBE_RXDADV_RSSTYPE_MASK) {
-			case IXGBE_RXDADV_RSSTYPE_IPV4_TCP:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_TCP_IPV4);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV4:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_IPV4);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6_TCP:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_TCP_IPV6);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6_EX:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_IPV6_EX);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_IPV6);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6_TCP_EX:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_TCP_IPV6_EX);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV4_UDP:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV4);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6_UDP:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6);
-break;
-			case IXGBE_RXDADV_RSSTYPE_IPV6_UDP_EX:
-M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6_EX);
-break;
-			default:
+#if 0 /* FreeBSD */
+/*
+ * In case of multiqueue, we have RXCSUM.PCSD bit set
+ * and never cleared. This means we have RSS hash
+ * available to be used.   
+ */
+if (adapter->num_queues > 1) {
+sendmp->m_pkthdr.flowid =
+le32toh(cur->wb.lower.hi_dword.rss);
+switch (pkt_info & IXGBE_RXDADV_RSSTYPE_MASK) {  
+case IXGBE_RXDADV_RSSTYPE_IPV4:
+M_HASHTYPE_SET(sendmp,
+M_HASHTYPE_RSS_IPV4);
+break;
+case IXGBE_RXDADV_RSSTYPE_IPV4_TCP:
+M_HASHTYPE_SET(sendmp,
+M_HASHTYPE_RSS_TCP_IPV4);
+break;
+case IXGBE_RXDADV_RSSTYPE_IPV6:
+M_HASHTYPE_SET(sendmp,
+M_HASHTYPE_RSS_IPV6);
+break;
+case IXGBE_RXDADV_RSSTYPE_IPV6_TCP:
+M_HASHTYPE_SET(sendmp,
+M_HASHTYPE_RSS_TCP_IPV6);
+break;
+case IXGBE_RXDADV_RSSTYPE_IPV6_EX:
+M_HASHTYPE_SET(sendmp,
+M_HASHTYPE_RSS_IPV6_EX);
+break;
+case 

CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:24:31 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r285590:
- Fix igxbe SRIOV VF (if_ixv) initialization bugs.  The MAC address for
  an if_ixv instance can now set at creation time, and the receive ring
  tail pointer is correctly initialized (previously, things still worked
  because the receive ring tail pointer was being fixed up as a side
  effect of other activity).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.23 -r1.24 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/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:21:43 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r283881:
- SRIOV support (not enabled because NetBSD doesn't support it).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.22 -r1.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.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.4 src/sys/dev/pci/ixgbe/ix_txrx.c:1.5
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.4	Thu Dec  1 06:56:28 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec  2 10:21:43 2016
@@ -58,8 +58,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 282289 2015-04-30 22:53:27Z erj $*/
-/*$NetBSD: ix_txrx.c,v 1.4 2016/12/01 06:56:28 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 283881 2015-06-01 17:15:25Z jfv $*/
+/*$NetBSD: ix_txrx.c,v 1.5 2016/12/02 10:21:43 msaitoh Exp $*/
 
 #include "ixgbe.h"
 
@@ -614,7 +614,6 @@ ixgbe_setup_transmit_ring(struct tx_ring
 {
 	struct adapter *adapter = txr->adapter;
 	struct ixgbe_tx_buf *txbuf;
-	int i;
 #ifdef DEV_NETMAP
 	struct netmap_adapter *na = NA(adapter->ifp);
 	struct netmap_slot *slot;
@@ -637,7 +636,7 @@ ixgbe_setup_transmit_ring(struct tx_ring
 
 	/* Free any existing tx buffers. */
 txbuf = txr->tx_buffers;
-	for (i = 0; i < txr->num_desc; i++, txbuf++) {
+	for (int i = 0; i < txr->num_desc; i++, txbuf++) {
 		if (txbuf->m_head != NULL) {
 			bus_dmamap_sync(txr->txtag->dt_dmat, txbuf->map,
 			0, txbuf->m_head->m_pkthdr.len,
@@ -659,7 +658,8 @@ ixgbe_setup_transmit_ring(struct tx_ring
 		 */
 		if (slot) {
 			int si = netmap_idx_n2k(>tx_rings[txr->me], i);
-			netmap_load_map(na, txr->txtag, txbuf->map, NMB(na, slot + si));
+			netmap_load_map(na, txr->txtag,
+			txbuf->map, NMB(na, slot + si));
 		}
 #endif /* DEV_NETMAP */
 		/* Clear the EOP descriptor pointer */
@@ -812,8 +812,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, 
 	if ((mtag = VLAN_OUTPUT_TAG(ec, mp)) != NULL) {
 		vtag = htole16(VLAN_TAG_VALUE(mtag) & 0x);
 		vlan_macip_lens |= (vtag << IXGBE_ADVTXD_VLAN_SHIFT);
-	}
-	else if (!IXGBE_IS_X550VF(adapter) && (offload == FALSE))
+	} else if (!IXGBE_IS_X550VF(adapter) && (offload == FALSE))
 		return (0);
 
 	/*
@@ -1415,7 +1414,7 @@ ixgbe_allocate_receive_buffers(struct rx
 	struct	adapter 	*adapter = rxr->adapter;
 	device_t 		dev = adapter->dev;
 	struct ixgbe_rx_buf 	*rxbuf;
-	int 	i, bsize, error;
+	int 	bsize, error;
 
 	bsize = sizeof(struct ixgbe_rx_buf) * rxr->num_desc;
 	if (!(rxr->rx_buffers =
@@ -1437,7 +1436,7 @@ ixgbe_allocate_receive_buffers(struct rx
 		goto fail;
 	}
 
-	for (i = 0; i < rxr->num_desc; i++, rxbuf++) {
+	for (int i = 0; i < rxr->num_desc; i++, rxbuf++) {
 		rxbuf = >rx_buffers[i];
 		error = ixgbe_dmamap_create(rxr->ptag, 0, >pmap);
 		if (error) {
@@ -1459,9 +1458,8 @@ static void 
 ixgbe_free_receive_ring(struct rx_ring *rxr)
 { 
 	struct ixgbe_rx_buf   *rxbuf;
-	int i;
 
-	for (i = 0; i < rxr->num_desc; i++) {
+	for (int i = 0; i < rxr->num_desc; i++) {
 		rxbuf = >rx_buffers[i];
 		if (rxbuf->buf != NULL) {
 			bus_dmamap_sync(rxr->ptag->dt_dmat, rxbuf->pmap,
@@ -2231,6 +2229,9 @@ ixgbe_allocate_queues(struct adapter *ad
 	struct rx_ring	*rxr;
 	int rsize, tsize, error = IXGBE_SUCCESS;
 	int txconf = 0, rxconf = 0;
+#ifdef PCI_IOV
+	enum ixgbe_iov_mode iov_mode;
+#endif
 
 /* First allocate the top level queue structs */
 if (!(adapter->queues =
@@ -2263,6 +2264,12 @@ ixgbe_allocate_queues(struct adapter *ad
 	tsize = roundup2(adapter->num_tx_desc *
 	sizeof(union ixgbe_adv_tx_desc), DBA_ALIGN);
 
+#ifdef PCI_IOV
+	iov_mode = ixgbe_get_iov_mode(adapter);
+	adapter->pool = ixgbe_max_vfs(iov_mode);
+#else
+	adapter->pool = 0;
+#endif
 	/*
 	 * Now set up the TX queues, txconf is needed to handle the
 	 * possibility that things fail midcourse and we need to
@@ -2272,7 +2279,11 @@ ixgbe_allocate_queues(struct adapter *ad
 		/* Set up some basics */
 		txr = >tx_rings[i];
 		txr->adapter = adapter;
+#ifdef PCI_IOV
+		txr->me = ixgbe_pf_que_index(iov_mode, i);
+#else
 		txr->me = i;
+#endif
 		txr->num_desc = adapter->num_tx_desc;
 
 		/* Initialize the TX side lock */
@@ -2319,7 +2330,11 @@ ixgbe_allocate_queues(struct adapter *ad
 		rxr = >rx_rings[i];
 		/* Set up some basics */
 		rxr->adapter = adapter;
+#ifdef PCI_IOV
+		rxr->me = 

CVS commit: src/sys/dev/pci/ixgbe

2016-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec  2 10:21:43 UTC 2016

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_mbx.h ixgbe_vf.c
ixv.c

Log Message:
Update ixg(4) and ixv(4) up to FreeBSD r283881:
- SRIOV support (not enabled because NetBSD doesn't support it).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.22 -r1.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.