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

2016-12-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Dec  4 03:38:58 UTC 2016

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

Log Message:
Add dbregs_dr[0123]_trap_variable in arch/amd64/t_ptrace_wait*

Add new preliminary tests for testing that CPU Debug Registers can be used
to trap on a variable (write operation).

dbregs_dr0_trap_variable:
Verify that setting trap with DR0 triggers SIGTRAP

dbregs_dr1_trap_variable:
Verify that setting trap with DR1 triggers SIGTRAP

dbregs_dr2_trap_variable:
Verify that setting trap with DR2 triggers SIGTRAP

dbregs_dr3_trap_variable:
Verify that setting trap with DR3 triggers SIGTRAP

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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.3 src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.4
--- src/tests/kernel/arch/amd64/t_ptrace_wait.c:1.3	Sat Dec  3 01:41:15 2016
+++ src/tests/kernel/arch/amd64/t_ptrace_wait.c	Sun Dec  4 03:38:58 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.3 2016/12/03 01:41:15 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.4 2016/12/04 03:38:58 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.3 2016/12/03 01:41:15 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.4 2016/12/04 03:38:58 kamil Exp $");
 
 #include 
 #include 
@@ -53,6 +53,38 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.3 
 
 #include "../../t_ptrace_wait.h"
 
+
+union u {
+	long raw;
+	struct {
+		long local_dr0_breakpoint : 1;	/* 0 */
+		long global_dr0_breakpoint : 1;	/* 1 */
+		long local_dr1_breakpoint : 1;	/* 2 */
+		long global_dr1_breakpoint : 1;	/* 3 */
+		long local_dr2_breakpoint : 1;	/* 4 */
+		long global_dr2_breakpoint : 1;	/* 5 */
+		long local_dr3_breakpoint : 1;	/* 6 */
+		long global_dr3_breakpoint : 1;	/* 7 */
+		long local_exact_breakpt : 1;	/* 8 */
+		long global_exact_breakpt : 1;	/* 9 */
+		long reserved_10 : 1;		/* 10 */
+		long rest_trans_memory : 1;	/* 11 */
+		long reserved_12 : 1;		/* 12 */
+		long general_detect_enable : 1;	/* 13 */
+		long reserved_14 : 1;		/* 14 */
+		long reserved_15 : 1;		/* 15 */
+		long condition_dr0 : 2;		/* 16-17 */
+		long len_dr0 : 2;		/* 18-19 */
+		long condition_dr1 : 2;		/* 20-21 */
+		long len_dr1 : 2;		/* 22-23 */
+		long condition_dr2 : 2;		/* 24-25 */
+		long len_dr2 : 2;		/* 26-27 */
+		long condition_dr3 : 2;		/* 28-29 */
+		long len_dr3 : 2;		/* 30-31 */
+	} bits;
+};
+
+
 #if defined(HAVE_DBREGS)
 ATF_TC(dbregs_print);
 ATF_TC_HEAD(dbregs_print, tc)
@@ -89,7 +121,7 @@ ATF_TC_BODY(dbregs_print, tc)
 	printf("Before calling %s() for the child\n", TWAIT_FNAME);
 	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
 
-	validate_status_stopped(status, sigval);
+	validate_status_stopped(status, sigval);	
 
 	printf("Call GETDBREGS for the child process\n");
 	ATF_REQUIRE(ptrace(PT_GETDBREGS, child, , 0) != -1);
@@ -1192,6 +1224,450 @@ ATF_TC_BODY(dbregs_preserve_dr3_continue
 }
 #endif
 
+#if defined(HAVE_DBREGS)
+ATF_TC(dbregs_dr0_trap_variable);
+ATF_TC_HEAD(dbregs_dr0_trap_variable, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Verify that setting trap with DR0 triggers SIGTRAP");
+}
+
+ATF_TC_BODY(dbregs_dr0_trap_variable, tc)
+{
+	const int exitval = 5;
+	const int sigval = SIGSTOP;
+	pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	struct dbreg r1;
+	struct dbreg r2;
+	/* Number of available CPU Debug Registers on AMD64 */
+	const size_t len = 16;
+	size_t i;
+	volatile int watchme;
+	union u dr7;
+
+	dr7.raw = 0;
+	dr7.bits.global_dr0_breakpoint = 1;
+	dr7.bits.condition_dr0 = 3;	/* 0b11 -- break on data write */
+	dr7.bits.len_dr0 = 3;		/* 0b11 -- 4 bytes */
+
+	printf("Assert that known number of Debug Registers (%zu) is valid\n",
+	len);
+	ATF_REQUIRE_EQ(__arraycount(r1.dbregs), len);
+	ATF_REQUIRE_EQ(__arraycount(r2.dbregs), len);
+
+	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);
+
+		watchme = 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("Call GETDBREGS for 

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

2016-12-03 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Dec  4 03:38:58 UTC 2016

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

Log Message:
Add dbregs_dr[0123]_trap_variable in arch/amd64/t_ptrace_wait*

Add new preliminary tests for testing that CPU Debug Registers can be used
to trap on a variable (write operation).

dbregs_dr0_trap_variable:
Verify that setting trap with DR0 triggers SIGTRAP

dbregs_dr1_trap_variable:
Verify that setting trap with DR1 triggers SIGTRAP

dbregs_dr2_trap_variable:
Verify that setting trap with DR2 triggers SIGTRAP

dbregs_dr3_trap_variable:
Verify that setting trap with DR3 triggers SIGTRAP

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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/sys/kern

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 22:28:16 UTC 2016

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

Log Message:
Add missing ktrkuser


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/kern/uipc_syscalls.c

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

Modified files:

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.183 src/sys/kern/uipc_syscalls.c:1.184
--- src/sys/kern/uipc_syscalls.c:1.183	Tue Sep 13 03:01:08 2016
+++ src/sys/kern/uipc_syscalls.c	Sat Dec  3 17:28:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.183 2016/09/13 07:01:08 martin Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.184 2016/12/03 22:28:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.183 2016/09/13 07:01:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.184 2016/12/03 22:28:16 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -1511,6 +1511,7 @@ sockargs_sb(struct sockaddr_big *sb, con
 	if (error)
 		return error;
 
+	ktrkuser(mbuftypes[MT_SONAME], sb, buflen);
 #if BYTE_ORDER != BIG_ENDIAN
 	/*
 	 * 4.3BSD compat thing - need to stay, since bind(2),



CVS commit: src/sys/kern

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 22:28:16 UTC 2016

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

Log Message:
Add missing ktrkuser


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/kern/uipc_syscalls.c

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



CVS commit: src/doc

2016-12-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec  3 19:15:27 UTC 2016

Modified Files:
src/doc: CHANGES

Log Message:
Mention luna68k HD647180X I/O processor support.


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

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



CVS commit: src/doc

2016-12-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec  3 19:15:27 UTC 2016

Modified Files:
src/doc: CHANGES

Log Message:
Mention luna68k HD647180X I/O processor support.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2213 src/doc/CHANGES:1.2214
--- src/doc/CHANGES:1.2213	Thu Nov 24 05:50:15 2016
+++ src/doc/CHANGES	Sat Dec  3 19:15:27 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2213 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2214 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -399,3 +399,5 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	wpa: Import wpa_supplicant and hostapd 2.6. [christos 20161121]
 	ntp: Import ntp 4.2.8p9. [christos 20161121]
 	zoneinfo: Import tzdata2016j.  [kre 20161124]
+	luna68k: Preliminary support for LUNA's HD647180X I/O processor
+		(a.k.a. XP). [tsutsui 20161203]



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:18:12 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
newline


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/tc/tcu.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/tc/tcu.c
diff -u src/sys/dev/tc/tcu.c:1.3 src/sys/dev/tc/tcu.c:1.4
--- src/sys/dev/tc/tcu.c:1.3	Sat Dec  3 18:12:50 2016
+++ src/sys/dev/tc/tcu.c	Sat Dec  3 18:18:12 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $ */
+/* $NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $ */
 
 /*-
  * Copyright (c) 2016, Felix Deichmann
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $");
 
 #include 
 #include 
@@ -143,7 +143,7 @@ tcu_attach(device_t parent, device_t sel
 
 	if ((cfg & TCU_CFG_S1_1) != 0 && ta->ta_busspeed != TC_SPEED_12_5_MHZ)
 		aprint_error_dev(self, "warning: switch S1-1 asserted with "
-		"clock != 12.5 MHz");
+		"clock != 12.5 MHz\n");
 
 #if NSLHCI_TCU > 0
 	/* Attach slhci. */



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:18:12 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
newline


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/tc/tcu.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/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:12:50 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Print warning for problematic switch configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/tc/tcu.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/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:12:50 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Print warning for problematic switch configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/tc/tcu.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/tc/tcu.c
diff -u src/sys/dev/tc/tcu.c:1.2 src/sys/dev/tc/tcu.c:1.3
--- src/sys/dev/tc/tcu.c:1.2	Tue Sep 13 16:54:26 2016
+++ src/sys/dev/tc/tcu.c	Sat Dec  3 18:12:50 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $ */
+/* $NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $ */
 
 /*-
  * Copyright (c) 2016, Felix Deichmann
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $");
 
 #include 
 #include 
@@ -54,6 +54,10 @@ __KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.2 
 
 #define TCU_CFG		0x0
 #define   TCU_CFG_RUN	__BIT(7)	/* write-only */
+#define   TCU_CFG_S1_1	__BIT(3)	/* read-only */
+#define   TCU_CFG_S1_2	__BIT(2)	/* read-only */
+#define   TCU_CFG_S1_3	__BIT(1)	/* read-only */
+#define   TCU_CFG_S1_4	__BIT(0)	/* read-only */
 #define TCU_GPIO_DIR	0x4
 #define TCU_GPIO_IN	0x8
 #define TCU_GPIO_OUT	0xc
@@ -137,6 +141,10 @@ tcu_attach(device_t parent, device_t sel
 	"\0", cfg);
 	aprint_normal_dev(self, "config %s\n", buf);
 
+	if ((cfg & TCU_CFG_S1_1) != 0 && ta->ta_busspeed != TC_SPEED_12_5_MHZ)
+		aprint_error_dev(self, "warning: switch S1-1 asserted with "
+		"clock != 12.5 MHz");
+
 #if NSLHCI_TCU > 0
 	/* Attach slhci. */
 	(void)config_found_ia(self, "tcu", aux, tcu_print);



CVS commit: src

2016-12-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec  3 17:38:02 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: md.luna68k
src/etc/etc.luna68k: MAKEDEV.conf
src/sys/arch/luna68k/conf: GENERIC files.luna68k majors.luna68k
src/sys/arch/luna68k/include: Makefile
src/sys/arch/luna68k/luna68k: mainbus.c
Added Files:
src/sys/arch/luna68k/dev: xp.c
src/sys/arch/luna68k/include: xpio.h

Log Message:
Preliminary support for LUNA's HD647180X I/O processor (a.k.a. XP).

Demonstrated as "PSG tunes / PCM wav player on LUNA"
(using Z80 PSG/PCM drivers ported from NEC PC-6001)
at OSC2016 Kyoto and OSC2016 Hiroshima:
 http://mail-index.netbsd.org/netbsd-advocacy/2016/08/01/msg000712.html
 http://mail-index.netbsd.org/netbsd-advocacy/2016/11/29/msg000724.html


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/comp/md.luna68k
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.luna68k/MAKEDEV.conf
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/luna68k/conf/GENERIC
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/luna68k/conf/files.luna68k
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/luna68k/conf/majors.luna68k
cvs rdiff -u -r0 -r1.1 src/sys/arch/luna68k/dev/xp.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/luna68k/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/luna68k/include/xpio.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/luna68k/luna68k/mainbus.c

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



CVS commit: src

2016-12-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec  3 17:38:02 UTC 2016

Modified Files:
src/distrib/sets/lists/comp: md.luna68k
src/etc/etc.luna68k: MAKEDEV.conf
src/sys/arch/luna68k/conf: GENERIC files.luna68k majors.luna68k
src/sys/arch/luna68k/include: Makefile
src/sys/arch/luna68k/luna68k: mainbus.c
Added Files:
src/sys/arch/luna68k/dev: xp.c
src/sys/arch/luna68k/include: xpio.h

Log Message:
Preliminary support for LUNA's HD647180X I/O processor (a.k.a. XP).

Demonstrated as "PSG tunes / PCM wav player on LUNA"
(using Z80 PSG/PCM drivers ported from NEC PC-6001)
at OSC2016 Kyoto and OSC2016 Hiroshima:
 http://mail-index.netbsd.org/netbsd-advocacy/2016/08/01/msg000712.html
 http://mail-index.netbsd.org/netbsd-advocacy/2016/11/29/msg000724.html


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/comp/md.luna68k
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.luna68k/MAKEDEV.conf
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/luna68k/conf/GENERIC
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/luna68k/conf/files.luna68k
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/luna68k/conf/majors.luna68k
cvs rdiff -u -r0 -r1.1 src/sys/arch/luna68k/dev/xp.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/luna68k/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/luna68k/include/xpio.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/luna68k/luna68k/mainbus.c

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

Modified files:

Index: src/distrib/sets/lists/comp/md.luna68k
diff -u src/distrib/sets/lists/comp/md.luna68k:1.20 src/distrib/sets/lists/comp/md.luna68k:1.21
--- src/distrib/sets/lists/comp/md.luna68k:1.20	Thu Dec 24 14:16:46 2015
+++ src/distrib/sets/lists/comp/md.luna68k	Sat Dec  3 17:38:02 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.luna68k,v 1.20 2015/12/24 14:16:46 christos Exp $
+# $NetBSD: md.luna68k,v 1.21 2016/12/03 17:38:02 tsutsui Exp $
 ./usr/include/ieeefp.hcomp-c-include
 ./usr/include/luna68kcomp-c-include
 ./usr/include/luna68k/_G_config.h		comp-obsolete		obsolete
@@ -52,3 +52,4 @@
 ./usr/include/luna68k/varargs.h			comp-obsolete		obsolete
 ./usr/include/luna68k/vmparam.h			comp-c-include
 ./usr/include/luna68k/wchar_limits.h		comp-c-include
+./usr/include/luna68k/xpio.h			comp-c-include

Index: src/etc/etc.luna68k/MAKEDEV.conf
diff -u src/etc/etc.luna68k/MAKEDEV.conf:1.8 src/etc/etc.luna68k/MAKEDEV.conf:1.9
--- src/etc/etc.luna68k/MAKEDEV.conf:1.8	Mon Jan 14 09:15:57 2013
+++ src/etc/etc.luna68k/MAKEDEV.conf	Sat Dec  3 17:38:02 2016
@@ -1,9 +1,10 @@
-# $NetBSD: MAKEDEV.conf,v 1.8 2013/01/14 09:15:57 tsutsui Exp $
+# $NetBSD: MAKEDEV.conf,v 1.9 2016/12/03 17:38:02 tsutsui Exp $
 
 all_md)
 	makedev ttya sd0 sd1 sd2 sd3 cd0 cd1 st0 st1
 	makedev wscons
 	makedev scsibus0 scsibus1
+	makedev xp
 	;;
 
 tty[ab])

Index: src/sys/arch/luna68k/conf/GENERIC
diff -u src/sys/arch/luna68k/conf/GENERIC:1.119 src/sys/arch/luna68k/conf/GENERIC:1.120
--- src/sys/arch/luna68k/conf/GENERIC:1.119	Sun Nov 16 16:01:41 2014
+++ src/sys/arch/luna68k/conf/GENERIC	Sat Dec  3 17:38:02 2016
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.119 2014/11/16 16:01:41 manu Exp $
+# $NetBSD: GENERIC,v 1.120 2016/12/03 17:38:02 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/luna68k/conf/std.luna68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.119 $"
+#ident 		"GENERIC-$Revision: 1.120 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -163,6 +163,9 @@ spc1	at mainbus0		# 2nd SCSI on LUNA-II
 # framebuffer
 fb0	at mainbus0		# 16 or 256 pseudo color
 
+# HD647180X I/O processor
+xp0	at mainbus0
+
 # Workstation Console attachments
 wsdisplay*	at fb?
 wskbd*		at ws? console ? mux 1

Index: src/sys/arch/luna68k/conf/files.luna68k
diff -u src/sys/arch/luna68k/conf/files.luna68k:1.24 src/sys/arch/luna68k/conf/files.luna68k:1.25
--- src/sys/arch/luna68k/conf/files.luna68k:1.24	Sun Jul 20 11:14:56 2014
+++ src/sys/arch/luna68k/conf/files.luna68k	Sat Dec  3 17:38:02 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: files.luna68k,v 1.24 2014/07/20 11:14:56 tsutsui Exp $
+#	$NetBSD: files.luna68k,v 1.25 2016/12/03 17:38:02 tsutsui Exp $
 #
 maxpartitions 8
 maxusers 2 8 64
@@ -43,6 +43,11 @@ device siotty: tty
 attach siotty at sio
 file arch/luna68k/dev/siotty.c		siotty needs-flag
 
+# HD647180X I/O processor
+device xp
+attach xp at mainbus
+file arch/luna68k/dev/xp.c		xp
+
 device ws: wskbddev,wsmousedev
 attach ws at sio
 file arch/luna68k/dev/lunaws.c		ws

Index: src/sys/arch/luna68k/conf/majors.luna68k
diff -u src/sys/arch/luna68k/conf/majors.luna68k:1.20 src/sys/arch/luna68k/conf/majors.luna68k:1.21
--- src/sys/arch/luna68k/conf/majors.luna68k:1.20	Thu Jun 30 20:09:32 2011
+++ src/sys/arch/luna68k/conf/majors.luna68k	Sat Dec  3 17:38:02 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.luna68k,v 1.20 2011/06/30 

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

2016-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Dec  3 16:41:34 UTC 2016

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

Log Message:
there is no pm2_exa.c yet


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
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.12 src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile:1.13
--- src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile:1.12	Fri Dec  2 22:59:17 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-glint/Makefile	Sat Dec  3 16:41:34 2016
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.12 2016/12/02 22:59:17 macallan Exp $
+#	$NetBSD: Makefile,v 1.13 2016/12/03 16:41:34 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_common.c pm2_dac.c pm2_exa.c 
+SRCS+=		IBMramdac.c pm2_accel.c pm2_common.c pm2_dac.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



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

2016-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Dec  3 16:41:34 UTC 2016

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

Log Message:
there is no pm2_exa.c yet


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
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: src

2016-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Dec  3 16:38:15 UTC 2016

Modified Files:
src/distrib/sets/lists/xserver: md.macppc md.sparc64
src/external/mit/xorg/server/drivers: Makefile

Log Message:
- build glint driver on macppc
- reenable it on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/distrib/sets/lists/xserver/md.macppc
cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/xserver/md.sparc64
cvs rdiff -u -r1.92 -r1.93 src/external/mit/xorg/server/drivers/Makefile

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

Modified files:

Index: src/distrib/sets/lists/xserver/md.macppc
diff -u src/distrib/sets/lists/xserver/md.macppc:1.73 src/distrib/sets/lists/xserver/md.macppc:1.74
--- src/distrib/sets/lists/xserver/md.macppc:1.73	Sat Sep 24 21:57:38 2016
+++ src/distrib/sets/lists/xserver/md.macppc	Sat Dec  3 16:38:15 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.macppc,v 1.73 2016/09/24 21:57:38 mrg Exp $
+# $NetBSD: md.macppc,v 1.74 2016/12/03 16:38:15 macallan Exp $
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -31,6 +31,8 @@
 ./usr/X11R7/lib/modules/drivers/ati_drv.so.6		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/chips_drv.so.1		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/glint_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/glint_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/imstt_drv.so		-unknown-	obsolete
 ./usr/X11R7/lib/modules/drivers/imstt_drv.so.1		-unknown-	obsolete
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so		-unknown-	xorg
@@ -205,6 +207,7 @@
 ./usr/X11R7/man/html4/ati.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/chips.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/exa.html-unknown-	html,xorg
+./usr/X11R7/man/html4/glint.html			-unknown-	html,xorg
 ./usr/X11R7/man/html4/imstt.html			-unknown-	obsolete
 ./usr/X11R7/man/html4/kbd.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/mga.html-unknown-	html,xorg
@@ -226,6 +229,7 @@
 ./usr/X11R7/man/man4/ati.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/chips.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/exa.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/glint.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/imstt.4-unknown-	obsolete
 ./usr/X11R7/man/man4/kbd.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/mga.4-unknown-	.man,xorg

Index: src/distrib/sets/lists/xserver/md.sparc64
diff -u src/distrib/sets/lists/xserver/md.sparc64:1.62 src/distrib/sets/lists/xserver/md.sparc64:1.63
--- src/distrib/sets/lists/xserver/md.sparc64:1.62	Sat Sep 24 21:57:38 2016
+++ src/distrib/sets/lists/xserver/md.sparc64	Sat Dec  3 16:38:15 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.62 2016/09/24 21:57:38 mrg Exp $	x11
+# $NetBSD: md.sparc64,v 1.63 2016/12/03 16:38:15 macallan Exp $	x11
 ./usr/X11R7/bin/X	-unknown-	xorg
 ./usr/X11R7/bin/Xorg	-unknown-	xorg
 ./usr/X11R7/bin/cvt	-unknown-	xorg
@@ -31,10 +31,8 @@
 ./usr/X11R7/lib/modules/drivers/ag10e_drv.so.0		-unknown-	xorg,xorg_server_ver=118,obsolete
 ./usr/X11R7/lib/modules/drivers/ati_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/ati_drv.so.6		-unknown-	xorg
-./usr/X11R7/lib/modules/drivers/glint_drv.so		-unknown-	xorg,xorg_server_ver=110
-./usr/X11R7/lib/modules/drivers/glint_drv.so		-unknown-	xorg,xorg_server_ver=118,obsolete
-./usr/X11R7/lib/modules/drivers/glint_drv.so.1		-unknown-	xorg,xorg_server_ver=110
-./usr/X11R7/lib/modules/drivers/glint_drv.so.1		-unknown-	xorg,xorg_server_ver=118,obsolete
+./usr/X11R7/lib/modules/drivers/glint_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/glint_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/kbd_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/mach64_drv.so		-unknown-	xorg
@@ -187,8 +185,7 @@
 ./usr/X11R7/man/cat4/ag10e.0-unknown-	.cat,xorg,xorg_server_ver=118,obsolete
 ./usr/X11R7/man/cat4/ati.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/exa.0-unknown-	.cat,xorg
-./usr/X11R7/man/cat4/glint.0-unknown-	.cat,xorg,xorg_server_ver=110
-./usr/X11R7/man/cat4/glint.0-unknown-	.cat,xorg,xorg_server_ver=118,obsolete
+./usr/X11R7/man/cat4/glint.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/kbd.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mga.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/mousedrv.0-unknown-	.cat,xorg
@@ -212,8 +209,7 @@
 ./usr/X11R7/man/html4/ag10e.html			-unknown-	html,xorg,xorg_server_ver=118,obsolete
 ./usr/X11R7/man/html4/ati.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/exa.html-unknown-	html,xorg
-./usr/X11R7/man/html4/glint.html			-unknown-	html,xorg,xorg_server_ver=110
-./usr/X11R7/man/html4/glint.html			-unknown-	html,xorg,xorg_server_ver=118,obsolete
+./usr/X11R7/man/html4/glint.html			-unknown-	

CVS commit: src

2016-12-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sat Dec  3 16:38:15 UTC 2016

Modified Files:
src/distrib/sets/lists/xserver: md.macppc md.sparc64
src/external/mit/xorg/server/drivers: Makefile

Log Message:
- build glint driver on macppc
- reenable it on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/distrib/sets/lists/xserver/md.macppc
cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/xserver/md.sparc64
cvs rdiff -u -r1.92 -r1.93 src/external/mit/xorg/server/drivers/Makefile

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-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:02:10 UTC 2016

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

Log Message:
switch sparc/sparc64 to binutils 227


To generate a diff of this commit:
cvs rdiff -u -r1.992 -r1.993 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/share/mk

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:02:10 UTC 2016

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

Log Message:
switch sparc/sparc64 to binutils 227


To generate a diff of this commit:
cvs rdiff -u -r1.992 -r1.993 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.992 src/share/mk/bsd.own.mk:1.993
--- src/share/mk/bsd.own.mk:1.992	Fri Dec  2 23:06:25 2016
+++ src/share/mk/bsd.own.mk	Sat Dec  3 11:02:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.992 2016/12/03 04:06:25 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.993 2016/12/03 16:02:10 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -150,6 +150,8 @@ EXTERNAL_GDB_SUBDIR=		/does/not/exist
 ${MACHINE_CPU} == "m68k" || \
 ${MACHINE_ARCH} == "mips64el" || \
 ${MACHINE_ARCH} == "mips64eb" || \
+${MACHINE} == "sparc" || \
+${MACHINE} == "sparc64" || \
 ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "vax"
 HAVE_BINUTILS?=	227



CVS commit: src/external/gpl3/binutils

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:01:19 UTC 2016

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

Log Message:
switch alpha/sparc/sparc64 to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc64/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-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:01:19 UTC 2016

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

Log Message:
switch alpha/sparc/sparc64 to new binutils


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc64/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/alpha/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h:1.6 src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h:1.7
--- src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h:1.6	Fri Jan 29 12:30:22 2016
+++ src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h	Sat Dec  3 11:01:18 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) 

CVS commit: src/sys/arch/sparc/conf

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:00:10 UTC 2016

Modified Files:
src/sys/arch/sparc/conf: Makefile.sparc

Log Message:
struct cpu_info is varible size when page_size is not fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc/conf/Makefile.sparc

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/sparc/conf/Makefile.sparc
diff -u src/sys/arch/sparc/conf/Makefile.sparc:1.94 src/sys/arch/sparc/conf/Makefile.sparc:1.95
--- src/sys/arch/sparc/conf/Makefile.sparc:1.94	Sat Feb 27 14:26:13 2016
+++ src/sys/arch/sparc/conf/Makefile.sparc	Sat Dec  3 11:00:10 2016
@@ -1,4 +1,4 @@
-# 	$NetBSD: Makefile.sparc,v 1.94 2016/02/27 19:26:13 joerg Exp $
+# 	$NetBSD: Makefile.sparc,v 1.95 2016/12/03 16:00:10 christos Exp $
 
 # Makefile for NetBSD
 #
@@ -39,6 +39,7 @@ CFLAGS+=	${${ACTIVE_CC} == "clang":? -Qu
 AFLAGS+=	-x assembler-with-cpp
 AFLAGS+=	-Wa,-Av8
 AFLAGS+=	${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
+COPTS.kern_timeout.c += -Wno-stack-protector
 
 ##
 ## (3) libkern and compat



CVS commit: src/sys/arch/sparc/conf

2016-12-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  3 16:00:10 UTC 2016

Modified Files:
src/sys/arch/sparc/conf: Makefile.sparc

Log Message:
struct cpu_info is varible size when page_size is not fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc/conf/Makefile.sparc

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



CVS commit: src/distrib/sets/lists/base

2016-12-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Dec  3 15:18:41 UTC 2016

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
Directories are unconditional and hence must be untagged.


To generate a diff of this commit:
cvs rdiff -u -r1.1140 -r1.1141 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1140 src/distrib/sets/lists/base/mi:1.1141
--- src/distrib/sets/lists/base/mi:1.1140	Thu Nov 24 05:47:33 2016
+++ src/distrib/sets/lists/base/mi	Sat Dec  3 15:18:41 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1140 2016/11/24 05:47:33 kre Exp $
+# $NetBSD: mi,v 1.1141 2016/12/03 15:18:41 riastradh Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -5121,7 +5121,7 @@
 ./usr/share/sysinst/catalog/sysinstmsgs.es	base-util-share		obsolete
 ./usr/share/sysinst/catalog/sysinstmsgs.fr	base-util-share		obsolete
 ./usr/share/sysinst/catalog/sysinstmsgs.pl	base-util-share		obsolete
-./usr/share/tabsetbase-util-share		share
+./usr/share/tabsetbase-util-share
 ./usr/share/tabset/3101base-util-share		share
 ./usr/share/tabset/9837base-util-share		share
 ./usr/share/tabset/aabase-util-share		share



CVS commit: src/distrib/sets/lists/base

2016-12-03 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Dec  3 15:18:41 UTC 2016

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
Directories are unconditional and hence must be untagged.


To generate a diff of this commit:
cvs rdiff -u -r1.1140 -r1.1141 src/distrib/sets/lists/base/mi

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



CVS commit: [netbsd-7] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:35:48 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets #1275, #1276, #1277 and #1279


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-7.1

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



CVS commit: [netbsd-7] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:35:48 UTC 2016

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
Tickets #1275, #1276, #1277 and #1279


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-7.1

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

Modified files:

Index: src/doc/CHANGES-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.122 src/doc/CHANGES-7.1:1.1.2.123
--- src/doc/CHANGES-7.1:1.1.2.122	Mon Nov 21 07:32:13 2016
+++ src/doc/CHANGES-7.1	Sat Dec  3 12:35:48 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.122 2016/11/21 07:32:13 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.123 2016/12/03 12:35:48 martin Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -6913,3 +6913,34 @@ etc/rc.d/rtadvd	1.9
 Don't fail to start if rtadvd's config file doesn't exist.
 	[kre, ticket #1274]
 
+sys/arch/mips/include/vmparam.h			1.57
+
+	1TB is enough UVA for anyone... plus not all MIPS cpus can support
+	more.
+	[mrg, ticket #1275]
+
+sys/uvm/pmap/pmap_segtab.c			1.4 (via patch)
+	Fix the start index generation in pmap_segtab_release() to
+	ensure it fits in the actual array.
+	[mrg, ticket #1275]
+
+sbin/scsictl/scsictl.81.27-1.30
+sbin/scsictl/scsictl.c1.39
+sys/dev/scsipi/scsi_disk.h			1.32
+
+	Add "getrealloc" and "setrealloc" commands to get/set automatic
+	reallocation parameters/enables for error recovery, similar to
+	{get,set}cache.
+	[flxd, ticket #1276]
+
+sys/external/bsd/drm2/drm/drm_vma_manager.c	1.5
+
+	Lock the manager and not just the node for inserting/removing nodes.
+	[maya, ticket #1277]
+
+sys/net/if_vlan.c1.92
+
+	Don't check parent capabilities when a parent interface hasn't been
+	assigned.
+	[joerg, ticket #1279]
+



CVS commit: [netbsd-7] src/sys/net

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:34:23 UTC 2016

Modified Files:
src/sys/net [netbsd-7]: if_vlan.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1279):
sys/net/if_vlan.c: revision 1.92
Don't check parent capabilities when a parent interface hasn't been
assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.3 -r1.70.2.4 src/sys/net/if_vlan.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/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.70.2.3 src/sys/net/if_vlan.c:1.70.2.4
--- src/sys/net/if_vlan.c:1.70.2.3	Thu Apr 23 19:23:45 2015
+++ src/sys/net/if_vlan.c	Sat Dec  3 12:34:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.70.2.3 2015/04/23 19:23:45 snj Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.70.2.4 2016/12/03 12:34:23 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.70.2.3 2015/04/23 19:23:45 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.70.2.4 2016/12/03 12:34:23 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -550,6 +550,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
 	case SIOCSIFCAP:
 		ifcr = data;
 		/* make sure caps are enabled on parent */
+		if (ifv->ifv_p == NULL) {
+			error = EINVAL;
+			break;
+		}
 		if ((ifv->ifv_p->if_capenable & ifcr->ifcr_capenable) !=
 		ifcr->ifcr_capenable) {
 			error = EINVAL;



CVS commit: [netbsd-7] src/sys/net

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:34:23 UTC 2016

Modified Files:
src/sys/net [netbsd-7]: if_vlan.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1279):
sys/net/if_vlan.c: revision 1.92
Don't check parent capabilities when a parent interface hasn't been
assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.3 -r1.70.2.4 src/sys/net/if_vlan.c

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



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:33:56 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1279


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-7.0.3

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

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.9 src/doc/CHANGES-7.0.3:1.1.2.10
--- src/doc/CHANGES-7.0.3:1.1.2.9	Sat Dec  3 12:24:27 2016
+++ src/doc/CHANGES-7.0.3	Sat Dec  3 12:33:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.9 2016/12/03 12:24:27 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.10 2016/12/03 12:33:56 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -141,3 +141,9 @@ sys/external/bsd/drm2/drm/drm_vma_manage
 	Lock the manager and not just the node for inserting/removing nodes.
 	[maya, ticket #1277]
 
+sys/net/if_vlan.c1.92
+
+	Don't check parent capabilities when a parent interface hasn't been
+	assigned.
+	[joerg, ticket #1279]
+



CVS commit: [netbsd-7-0] src/sys/net

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:33:12 UTC 2016

Modified Files:
src/sys/net [netbsd-7-0]: if_vlan.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1279):
sys/net/if_vlan.c: revision 1.92
Don't check parent capabilities when a parent interface hasn't been
assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.3 -r1.70.2.3.2.1 src/sys/net/if_vlan.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/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.70.2.3 src/sys/net/if_vlan.c:1.70.2.3.2.1
--- src/sys/net/if_vlan.c:1.70.2.3	Thu Apr 23 19:23:45 2015
+++ src/sys/net/if_vlan.c	Sat Dec  3 12:33:12 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.70.2.3 2015/04/23 19:23:45 snj Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.70.2.3.2.1 2016/12/03 12:33:12 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.70.2.3 2015/04/23 19:23:45 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.70.2.3.2.1 2016/12/03 12:33:12 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -550,6 +550,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
 	case SIOCSIFCAP:
 		ifcr = data;
 		/* make sure caps are enabled on parent */
+		if (ifv->ifv_p == NULL) {
+			error = EINVAL;
+			break;
+		}
 		if ((ifv->ifv_p->if_capenable & ifcr->ifcr_capenable) !=
 		ifcr->ifcr_capenable) {
 			error = EINVAL;



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:33:56 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1279


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-7.0.3

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



CVS commit: [netbsd-7-0] src/sys/net

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:33:12 UTC 2016

Modified Files:
src/sys/net [netbsd-7-0]: if_vlan.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1279):
sys/net/if_vlan.c: revision 1.92
Don't check parent capabilities when a parent interface hasn't been
assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.3 -r1.70.2.3.2.1 src/sys/net/if_vlan.c

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



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:24:28 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1277


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.0.3

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



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/drm

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:24:50 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/drm [netbsd-7]: drm_vma_manager.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1277):
sys/external/bsd/drm2/drm/drm_vma_manager.c: revision 1.5
Lock the manager and not just the node for inserting/removing nodes
should fix/help PR kern/50349: radeondrmkms vt-switching crash
ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.1.4.2 -r1.1.4.3 \
src/sys/external/bsd/drm2/drm/drm_vma_manager.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/external/bsd/drm2/drm/drm_vma_manager.c
diff -u src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.2 src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.3
--- src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.2	Sun Jul  5 21:29:26 2015
+++ src/sys/external/bsd/drm2/drm/drm_vma_manager.c	Sat Dec  3 12:24:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_vma_manager.c,v 1.1.4.2 2015/07/05 21:29:26 snj Exp $	*/
+/*	$NetBSD: drm_vma_manager.c,v 1.1.4.3 2016/12/03 12:24:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.1.4.2 2015/07/05 21:29:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.1.4.3 2016/12/03 12:24:50 martin Exp $");
 
 #include 
 #include 
@@ -176,10 +176,10 @@ drm_vma_offset_add(struct drm_vma_offset
 	node->von_startpage = startpage;
 	node->von_npages = npages;
 
-	rw_enter(>von_lock, RW_WRITER);
+	rw_enter(>vom_lock, RW_WRITER);
 	collision = rb_tree_insert_node(>vom_nodes, node);
 	KASSERT(collision == node);
-	rw_exit(>von_lock);
+	rw_exit(>vom_lock);
 
 	return 0;
 }
@@ -192,9 +192,9 @@ drm_vma_offset_remove(struct drm_vma_off
 	if (node->von_npages == 0)
 		return;
 
-	rw_enter(>von_lock, RW_WRITER);
+	rw_enter(>vom_lock, RW_WRITER);
 	rb_tree_remove_node(>vom_nodes, node);
-	rw_exit(>von_lock);
+	rw_exit(>vom_lock);
 
 	vmem_free(mgr->vom_vmem, node->von_startpage, node->von_npages);
 



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/drm

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:24:50 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/drm [netbsd-7]: drm_vma_manager.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1277):
sys/external/bsd/drm2/drm/drm_vma_manager.c: revision 1.5
Lock the manager and not just the node for inserting/removing nodes
should fix/help PR kern/50349: radeondrmkms vt-switching crash
ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.1.4.2 -r1.1.4.3 \
src/sys/external/bsd/drm2/drm/drm_vma_manager.c

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



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:24:28 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1277


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.0.3

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

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.8 src/doc/CHANGES-7.0.3:1.1.2.9
--- src/doc/CHANGES-7.0.3:1.1.2.8	Sat Dec  3 12:06:56 2016
+++ src/doc/CHANGES-7.0.3	Sat Dec  3 12:24:27 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.8 2016/12/03 12:06:56 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.9 2016/12/03 12:24:27 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -136,3 +136,8 @@ sys/uvm/pmap/pmap_segtab.c			1.4 (via pa
 	ensure it fits in the actual array.
 	[mrg, ticket #1275]
 
+sys/external/bsd/drm2/drm/drm_vma_manager.c	1.5
+
+	Lock the manager and not just the node for inserting/removing nodes.
+	[maya, ticket #1277]
+



CVS commit: [netbsd-7-0] src/sys/external/bsd/drm2/drm

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:23:57 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/drm [netbsd-7-0]: drm_vma_manager.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1277):
sys/external/bsd/drm2/drm/drm_vma_manager.c: revision 1.5
Lock the manager and not just the node for inserting/removing nodes
should fix/help PR kern/50349: radeondrmkms vt-switching crash
ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.1.4.2 -r1.1.4.2.2.1 \
src/sys/external/bsd/drm2/drm/drm_vma_manager.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/external/bsd/drm2/drm/drm_vma_manager.c
diff -u src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.2 src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.2.2.1
--- src/sys/external/bsd/drm2/drm/drm_vma_manager.c:1.1.4.2	Sun Jul  5 21:29:26 2015
+++ src/sys/external/bsd/drm2/drm/drm_vma_manager.c	Sat Dec  3 12:23:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_vma_manager.c,v 1.1.4.2 2015/07/05 21:29:26 snj Exp $	*/
+/*	$NetBSD: drm_vma_manager.c,v 1.1.4.2.2.1 2016/12/03 12:23:57 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.1.4.2 2015/07/05 21:29:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.1.4.2.2.1 2016/12/03 12:23:57 martin Exp $");
 
 #include 
 #include 
@@ -176,10 +176,10 @@ drm_vma_offset_add(struct drm_vma_offset
 	node->von_startpage = startpage;
 	node->von_npages = npages;
 
-	rw_enter(>von_lock, RW_WRITER);
+	rw_enter(>vom_lock, RW_WRITER);
 	collision = rb_tree_insert_node(>vom_nodes, node);
 	KASSERT(collision == node);
-	rw_exit(>von_lock);
+	rw_exit(>vom_lock);
 
 	return 0;
 }
@@ -192,9 +192,9 @@ drm_vma_offset_remove(struct drm_vma_off
 	if (node->von_npages == 0)
 		return;
 
-	rw_enter(>von_lock, RW_WRITER);
+	rw_enter(>vom_lock, RW_WRITER);
 	rb_tree_remove_node(>vom_nodes, node);
-	rw_exit(>von_lock);
+	rw_exit(>vom_lock);
 
 	vmem_free(mgr->vom_vmem, node->von_startpage, node->von_npages);
 



CVS commit: [netbsd-7-0] src/sys/external/bsd/drm2/drm

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:23:57 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/drm [netbsd-7-0]: drm_vma_manager.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #1277):
sys/external/bsd/drm2/drm/drm_vma_manager.c: revision 1.5
Lock the manager and not just the node for inserting/removing nodes
should fix/help PR kern/50349: radeondrmkms vt-switching crash
ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.1.4.2 -r1.1.4.2.2.1 \
src/sys/external/bsd/drm2/drm/drm_vma_manager.c

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



CVS commit: [netbsd-7] src

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:20:32 UTC 2016

Modified Files:
src/sbin/scsictl [netbsd-7]: scsictl.8 scsictl.c
src/sys/dev/scsipi [netbsd-7]: scsi_disk.h

Log Message:
Pull up following revision(s) (requested by flxd in ticket #1276):
sys/dev/scsipi/scsi_disk.h: revision 1.32
sbin/scsictl/scsictl.8: revision 1.27-1.30
sbin/scsictl/scsictl.c: revision 1.39
Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit
supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@
Bump date for previous.
Use more and more appropriate markup while here.
Add crossreference to scsi(4) per note in PR 9627.
Whitespace, sort.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.6.1 src/sbin/scsictl/scsictl.8
cvs rdiff -u -r1.37 -r1.37.8.1 src/sbin/scsictl/scsictl.c
cvs rdiff -u -r1.31 -r1.31.138.1 src/sys/dev/scsipi/scsi_disk.h

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

Modified files:

Index: src/sbin/scsictl/scsictl.8
diff -u src/sbin/scsictl/scsictl.8:1.26 src/sbin/scsictl/scsictl.8:1.26.6.1
--- src/sbin/scsictl/scsictl.8:1.26	Fri Mar 29 21:46:32 2013
+++ src/sbin/scsictl/scsictl.8	Sat Dec  3 12:20:32 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: scsictl.8,v 1.26 2013/03/29 21:46:32 christos Exp $
+.\"	$NetBSD: scsictl.8,v 1.26.6.1 2016/12/03 12:20:32 martin Exp $
 .\"
 .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 29, 2013
+.Dd November 19, 2016
 .Dt SCSICTL 8
 .Os
 .Sh NAME
@@ -60,10 +60,8 @@ will be decoded by
 and displayed to the standard output.
 .Sh DEVICE COMMANDS
 The following commands are supported for SCSI devices:
-.Pp
-.Nm debug
-.Ar level
-.Pp
+.Bl -tag -width flushcacheXX
+.It Cm debug Ar level
 Set the debugging level for the given device; the following flags are
 supported:
 .Pp
@@ -80,24 +78,13 @@ Device specific debugging.
 .Pp
 This option is only supported with kernels compiled with
 .Dv SCSIPI_DEBUG .
-.Pp
-.Nm defects
-.Op primary
-.Op grown
-.Op block|byte|physical
-.Pp
+.It Cm defects Oo primary Oc Oo grown Oc Oo block|byte|physical Oc
 Read the primary and/or grown defect lists from the specified device
 in block, byte from index, or physical sector format.
 The default is to return both the primary and grown defect lists
 in physical sector format.
 This command is only supported on direct access devices.
-.Pp
-.Nm format
-.Oo blocksize
-.Oo immediate
-.Oc
-.Oc
-.Pp
+.It Cm format Oo blocksize Oo immediate Oc Oc
 (Low level) format the named device.
 If the optional
 .Li blocksize
@@ -132,73 +119,47 @@ This associated sense data has a progres
 how far the format is progressing.
 Note well that most SCSI disk drives prior to
 a few years ago do not support this option.
-.Pp
-.Nm identify
-.Pp
+.It Cm identify
 Identify the specified device, displaying the device's SCSI
 bus, target, and lun, as well as the device's vendor, product,
 and revision strings.
-.Pp
-.Nm reassign
-.Ar blkno
-.Oo blkno Oo ...
-.Oc
-.Oc
-.Pp
+.Cm It reassign Ar blkno Oo blkno Oo ... Oc Oc
 Issues a
 .Li REASSIGN BLOCKS
 command to the device, adding the specified blocks to the
 grown defect list.
 This command is only supported on direct access devices.
-.Pp
-.Nm release
-.Pp
+.It Cm release
 Send a
 .Dq RELEASE
 command to the device to release a reservation on it.
-.Pp
-.Nm reserve
-.Pp
+.It Cm reserve
 Send a
 .Dq RESERVE
 command to the device to place a reservation on it.
-.Pp
-.Nm reset
-.Pp
+.It Cm reset
 Reset the device.
 This command is only supported for devices which support the
 .Li SCIOCRESET
 ioctl.
-.Pp
-.Nm start
-.Pp
+.It Cm start
 Send a
 .Dq START
 command to the device.
 This is useful typically only for disk devices.
-.Pp
-.Nm stop
-.Pp
+.It Cm stop
 Send a
 .Dq STOP
 command to the device.
 This is useful typically only for disk devices.
-.Pp
-.Nm tur
-.Pp
+.It Cm tur
 Send a
 .Dq TEST UNIT READY
 command to the device.
 This is useful for generating current device status.
-.Pp
-.Nm getcache
-.Pp
+.It Cm getcache
 Returns basic cache parameters for the device.
-.Pp
-.Nm setcache
-.Ar none|r|w|rw
-.Op Ar save
-.Pp
+.It Cm setcache Ar none|r|w|rw Op Ar save
 Set basic cache parameters for the device.
 The cache may be disabled
 .Pq none ,
@@ -212,32 +173,39 @@ If the drive's cache parameters are sava
 .Ar save
 after the cache enable state will cause the parameters to be saved in
 non-volatile storage.
-.Pp
-.Nm flushcache
-.Pp
+.It Cm flushcache
 Explicitly flushes the write cache.
-.Pp
-.Nm setspeed
-.Ar speed
-.Pp
+.It Cm setspeed Ar speed
 Set 

CVS commit: [netbsd-7] src

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:20:32 UTC 2016

Modified Files:
src/sbin/scsictl [netbsd-7]: scsictl.8 scsictl.c
src/sys/dev/scsipi [netbsd-7]: scsi_disk.h

Log Message:
Pull up following revision(s) (requested by flxd in ticket #1276):
sys/dev/scsipi/scsi_disk.h: revision 1.32
sbin/scsictl/scsictl.8: revision 1.27-1.30
sbin/scsictl/scsictl.c: revision 1.39
Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit
supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@
Bump date for previous.
Use more and more appropriate markup while here.
Add crossreference to scsi(4) per note in PR 9627.
Whitespace, sort.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.6.1 src/sbin/scsictl/scsictl.8
cvs rdiff -u -r1.37 -r1.37.8.1 src/sbin/scsictl/scsictl.c
cvs rdiff -u -r1.31 -r1.31.138.1 src/sys/dev/scsipi/scsi_disk.h

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



CVS commit: [netbsd-7] src/sys

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:08:36 UTC 2016

Modified Files:
src/sys/arch/mips/include [netbsd-7]: vmparam.h
src/sys/uvm/pmap [netbsd-7]: pmap_segtab.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1275):
sys/arch/mips/include/vmparam.h: revision 1.57
sys/uvm/pmap/pmap_segtab.c: revision 1.4
1TB is enough UVA for anyone... plus not all cpus can support more.
fix the start index generation in pmap_segtab_release() to
ensure it fits in the actual array.  fixes N64 binaries from
triggering later panic.  move the panic check itself into a
common function that is called from a couple of new places too.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.4.1 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/uvm/pmap/pmap_segtab.c

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



CVS commit: [netbsd-7] src/sys

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:08:36 UTC 2016

Modified Files:
src/sys/arch/mips/include [netbsd-7]: vmparam.h
src/sys/uvm/pmap [netbsd-7]: pmap_segtab.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1275):
sys/arch/mips/include/vmparam.h: revision 1.57
sys/uvm/pmap/pmap_segtab.c: revision 1.4
1TB is enough UVA for anyone... plus not all cpus can support more.
fix the start index generation in pmap_segtab_release() to
ensure it fits in the actual array.  fixes N64 binaries from
triggering later panic.  move the panic check itself into a
common function that is called from a couple of new places too.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.4.1 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/uvm/pmap/pmap_segtab.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/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.52 src/sys/arch/mips/include/vmparam.h:1.52.4.1
--- src/sys/arch/mips/include/vmparam.h:1.52	Sat Jan 25 15:16:50 2014
+++ src/sys/arch/mips/include/vmparam.h	Sat Dec  3 12:08:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.52 2014/01/25 15:16:50 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.52.4.1 2016/12/03 12:08:36 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -152,7 +152,7 @@
  */
 #define VM_MIN_ADDRESS		((vaddr_t)0x)
 #ifdef _LP64
-#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << (4*PGSHIFT-8))
+#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << 40)
 #ifdef ENABLE_MIPS_16KB_PAGE
 #define VM_MAXUSER_ADDRESS	mips_vm_maxuser_address
 #else

Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.1 src/sys/uvm/pmap/pmap_segtab.c:1.1.14.1
--- src/sys/uvm/pmap/pmap_segtab.c:1.1	Wed Oct  3 00:51:46 2012
+++ src/sys/uvm/pmap/pmap_segtab.c	Sat Dec  3 12:08:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.1.14.1 2016/12/03 12:08:36 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1.14.1 2016/12/03 12:08:36 martin Exp $");
 
 /*
  *	Manages physical address maps.
@@ -190,7 +190,9 @@ pmap_segtab_release(pmap_t pmap, pmap_se
 {
 	pmap_segtab_t *stp = *stp_p;
 
-	for (size_t i = va / vinc; i < PMAP_SEGTABSIZE; i++, va += vinc) {
+	for (size_t i = (va / vinc) & (PMAP_SEGTABSIZE - 1);
+	 i < PMAP_SEGTABSIZE;
+	 i++, va += vinc) {
 #ifdef _LP64
 		if (vinc > NBSEG) {
 			if (stp->seg_seg[i] != NULL) {



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:06:56 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1275


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-7.0.3

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



CVS commit: [netbsd-7-0] src/doc

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 12:06:56 UTC 2016

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Note ticket #1275


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-7.0.3

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

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.7 src/doc/CHANGES-7.0.3:1.1.2.8
--- src/doc/CHANGES-7.0.3:1.1.2.7	Mon Nov 21 07:24:40 2016
+++ src/doc/CHANGES-7.0.3	Sat Dec  3 12:06:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.7 2016/11/21 07:24:40 snj Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.8 2016/12/03 12:06:56 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -125,3 +125,14 @@ etc/rc.d/rtadvd	1.9
 	Don't fail to start if rtadvd's config file doesn't exist.
 	[kre, ticket #1274]
 
+sys/arch/mips/include/vmparam.h			1.57
+
+	1TB is enough UVA for anyone... plus not all MIPS cpus can support
+	more.
+	[mrg, ticket #1275]
+
+sys/uvm/pmap/pmap_segtab.c			1.4 (via patch)
+	Fix the start index generation in pmap_segtab_release() to
+	ensure it fits in the actual array.
+	[mrg, ticket #1275]
+



CVS commit: [netbsd-7-0] src/sys

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 11:43:14 UTC 2016

Modified Files:
src/sys/arch/mips/include [netbsd-7-0]: vmparam.h
src/sys/uvm/pmap [netbsd-7-0]: pmap_segtab.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1275):
sys/arch/mips/include/vmparam.h: revision 1.57
sys/uvm/pmap/pmap_segtab.c: revision 1.4
1TB is enough UVA for anyone... plus not all cpus can support more.
fix the start index generation in pmap_segtab_release() to
ensure it fits in the actual array.  fixes N64 binaries from
triggering later panic.  move the panic check itself into a
common function that is called from a couple of new places too.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.8.1 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.18.1 src/sys/uvm/pmap/pmap_segtab.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/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.52 src/sys/arch/mips/include/vmparam.h:1.52.8.1
--- src/sys/arch/mips/include/vmparam.h:1.52	Sat Jan 25 15:16:50 2014
+++ src/sys/arch/mips/include/vmparam.h	Sat Dec  3 11:43:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.52 2014/01/25 15:16:50 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.52.8.1 2016/12/03 11:43:13 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -152,7 +152,7 @@
  */
 #define VM_MIN_ADDRESS		((vaddr_t)0x)
 #ifdef _LP64
-#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << (4*PGSHIFT-8))
+#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << 40)
 #ifdef ENABLE_MIPS_16KB_PAGE
 #define VM_MAXUSER_ADDRESS	mips_vm_maxuser_address
 #else

Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.1 src/sys/uvm/pmap/pmap_segtab.c:1.1.18.1
--- src/sys/uvm/pmap/pmap_segtab.c:1.1	Wed Oct  3 00:51:46 2012
+++ src/sys/uvm/pmap/pmap_segtab.c	Sat Dec  3 11:43:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.1.18.1 2016/12/03 11:43:13 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1.18.1 2016/12/03 11:43:13 martin Exp $");
 
 /*
  *	Manages physical address maps.
@@ -190,7 +190,9 @@ pmap_segtab_release(pmap_t pmap, pmap_se
 {
 	pmap_segtab_t *stp = *stp_p;
 
-	for (size_t i = va / vinc; i < PMAP_SEGTABSIZE; i++, va += vinc) {
+	for (size_t i = (va / vinc) & (PMAP_SEGTABSIZE - 1);
+	 i < PMAP_SEGTABSIZE;
+	 i++, va += vinc) {
 #ifdef _LP64
 		if (vinc > NBSEG) {
 			if (stp->seg_seg[i] != NULL) {



CVS commit: [netbsd-7-0] src/sys

2016-12-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec  3 11:43:14 UTC 2016

Modified Files:
src/sys/arch/mips/include [netbsd-7-0]: vmparam.h
src/sys/uvm/pmap [netbsd-7-0]: pmap_segtab.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1275):
sys/arch/mips/include/vmparam.h: revision 1.57
sys/uvm/pmap/pmap_segtab.c: revision 1.4
1TB is enough UVA for anyone... plus not all cpus can support more.
fix the start index generation in pmap_segtab_release() to
ensure it fits in the actual array.  fixes N64 binaries from
triggering later panic.  move the panic check itself into a
common function that is called from a couple of new places too.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.8.1 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.18.1 src/sys/uvm/pmap/pmap_segtab.c

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



CVS commit: src/sys/lib/libsa

2016-12-03 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Dec  3 09:20:55 UTC 2016

Modified Files:
src/sys/lib/libsa: loadfile.h loadfile_elf32.c

Log Message:
Fix a wrong flag and KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libsa/loadfile.h
cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libsa/loadfile_elf32.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/lib/libsa/loadfile.h
diff -u src/sys/lib/libsa/loadfile.h:1.12 src/sys/lib/libsa/loadfile.h:1.13
--- src/sys/lib/libsa/loadfile.h:1.12	Wed Aug 25 16:30:01 2010
+++ src/sys/lib/libsa/loadfile.h	Sat Dec  3 09:20:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadfile.h,v 1.12 2010/08/25 16:30:01 christos Exp $	 */
+/*	$NetBSD: loadfile.h,v 1.13 2016/12/03 09:20:55 maxv Exp $	 */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -34,36 +34,36 @@
  */
 #define MARK_START	0
 #define MARK_ENTRY	1
-#define	MARK_DATA	2
-#define	MARK_NSYM	3
+#define MARK_DATA	2
+#define MARK_NSYM	3
 #define MARK_SYM	4
-#define	MARK_END	5
-#define	MARK_MAX	6
+#define MARK_END	5
+#define MARK_MAX	6
 
 /*
  * Bit flags for sections to load
  */
-#define	LOAD_TEXT	0x0001
-#define	LOAD_TEXTA	0x0002
-#define	LOAD_DATA	0x0004
-#define	LOAD_BSS	0x0008
-#define	LOAD_SYM	0x0010
-#define	LOAD_HDR	0x0020
+#define LOAD_TEXT	0x0001
+#define LOAD_TEXTA	0x0002
+#define LOAD_DATA	0x0004
+#define LOAD_BSS	0x0008
+#define LOAD_SYM	0x0010
+#define LOAD_HDR	0x0020
 #define LOAD_NOTE	0x0040
 #define LOAD_ALL	0x007f
 #define LOAD_MINIMAL	0x002f
 #define LOAD_BACKWARDS	0x0050
 
-#define	COUNT_TEXT	0x0100
-#define	COUNT_TEXTA	0x0200
-#define	COUNT_DATA	0x0400
-#define	COUNT_BSS	0x0800
-#define	COUNT_SYM	0x1000
-#define	COUNT_HDR	0x2000
+#define COUNT_TEXT	0x0100
+#define COUNT_TEXTA	0x0200
+#define COUNT_DATA	0x0400
+#define COUNT_BSS	0x0800
+#define COUNT_SYM	0x1000
+#define COUNT_HDR	0x2000
 #define COUNT_ALL	0x3f00
 
-int	loadfile(const char *, u_long *, int);
-int	fdloadfile(int fd, u_long *, int);
+int loadfile(const char *, u_long *, int);
+int fdloadfile(int fd, u_long *, int);
 
 #ifndef MACHINE_LOADFILE_MACHDEP
 #define MACHINE_LOADFILE_MACHDEP "machine/loadfile_machdep.h"
@@ -72,23 +72,23 @@ int	fdloadfile(int fd, u_long *, int);
 
 #ifdef BOOT_ECOFF
 #include 
-int	loadfile_coff(int, struct ecoff_exechdr *, u_long *, int);
+int loadfile_coff(int, struct ecoff_exechdr *, u_long *, int);
 #endif
 
 #if defined(BOOT_ELF32) || defined(BOOT_ELF64)
 #include 
 #ifdef BOOT_ELF32
-int	loadfile_elf32(int, Elf32_Ehdr *, u_long *, int);
+int loadfile_elf32(int, Elf32_Ehdr *, u_long *, int);
 #endif
 #ifdef BOOT_ELF64
-int	loadfile_elf64(int, Elf64_Ehdr *, u_long *, int);
+int loadfile_elf64(int, Elf64_Ehdr *, u_long *, int);
 #endif
 #endif /* BOOT_ELF32 || BOOT_ELF64 */
 
 #ifdef BOOT_AOUT
 #include 
-int	loadfile_aout(int, struct exec *, u_long *, int);
+int loadfile_aout(int, struct exec *, u_long *, int);
 #endif
 
-extern uint32_t	netbsd_version;
+extern uint32_t netbsd_version;
 extern u_int netbsd_elf_class;

Index: src/sys/lib/libsa/loadfile_elf32.c
diff -u src/sys/lib/libsa/loadfile_elf32.c:1.32 src/sys/lib/libsa/loadfile_elf32.c:1.33
--- src/sys/lib/libsa/loadfile_elf32.c:1.32	Wed Aug 31 16:22:37 2016
+++ src/sys/lib/libsa/loadfile_elf32.c	Sat Dec  3 09:20:55 2016
@@ -1,6 +1,6 @@
-/* $NetBSD: loadfile_elf32.c,v 1.32 2016/08/31 16:22:37 martin Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.33 2016/12/03 09:20:55 maxv Exp $ */
 
-/*-
+/*
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
@@ -255,6 +255,10 @@ externalize_shdr(Elf_Byte bo, Elf_Shdr *
 #define	externalize_shdr(bo, shdr)	/* nothing */
 #endif /* _STANDALONE */
 
+#define IS_TEXT(p)	(p.p_flags & PF_X)
+#define IS_DATA(p)	(p.p_flags & PF_W)
+#define IS_BSS(p)	(p.p_filesz < p.p_memsz)
+
 int
 ELFNAMEEND(loadfile)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
 {
@@ -268,9 +272,9 @@ ELFNAMEEND(loadfile)(int fd, Elf_Ehdr *e
 	u_long offset = marks[MARK_START];
 	ssize_t nr;
 	struct __packed {
-		Elf_Nhdr	nh;
-		uint8_t		name[ELF_NOTE_NETBSD_NAMESZ + 1];
-		uint8_t		desc[ELF_NOTE_NETBSD_DESCSZ];
+		Elf_Nhdr nh;
+		uint8_t name[ELF_NOTE_NETBSD_NAMESZ + 1];
+		uint8_t desc[ELF_NOTE_NETBSD_DESCSZ];
 	} note;
 	char *shstr = NULL;
 	size_t shstrsz = 0;
@@ -315,16 +319,10 @@ ELFNAMEEND(loadfile)(int fd, Elf_Ehdr *e
 		(phdr[i].p_flags & (PF_W|PF_X)) == 0)
 			continue;
 
-#define IS_TEXT(p)	(p.p_flags & PF_X)
-#define IS_DATA(p)	(p.p_flags & PF_W)
-#define IS_BSS(p)	(p.p_filesz < p.p_memsz)
-		/*
-		 * XXX: Assume first address is lowest
-		 */
 		if ((IS_TEXT(phdr[i]) && (flags & LOAD_TEXT)) ||
 		(IS_DATA(phdr[i]) && (flags & LOAD_DATA))) {
-
 		loadseg:
+			/* XXX: Assume first address is lowest */
 			if (marks[MARK_DATA] == 0 && IS_DATA(phdr[i]))
 marks[MARK_DATA] = LOADADDR(phdr[i].p_vaddr);
 
@@ -347,10 +345,9 @@ ELFNAMEEND(loadfile)(int fd, 

CVS commit: src/sys/lib/libsa

2016-12-03 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Dec  3 09:20:55 UTC 2016

Modified Files:
src/sys/lib/libsa: loadfile.h loadfile_elf32.c

Log Message:
Fix a wrong flag and KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libsa/loadfile.h
cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libsa/loadfile_elf32.c

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