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

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec 19 07:44:56 UTC 2019

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

Log Message:
G/C kasan_shadow_map call in pmap_enter

pmap_growkernel calls kasan_shadow_map for KVA


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.55 src/sys/arch/aarch64/aarch64/pmap.c:1.56
--- src/sys/arch/aarch64/aarch64/pmap.c:1.55	Wed Dec 18 11:10:24 2019
+++ src/sys/arch/aarch64/aarch64/pmap.c	Thu Dec 19 07:44:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.55 2019/12/18 11:10:24 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.56 2019/12/19 07:44:56 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.55 2019/12/18 11:10:24 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.56 2019/12/19 07:44:56 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -1681,10 +1681,6 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	opte = atomic_swap_64(ptep, 0);
 	need_sync_icache = (prot & VM_PROT_EXECUTE);
 
-	if (!user) {
-		kasan_shadow_map((void *)va, PAGE_SIZE);
-	}
-
 	/* for lock ordering for pg and opg */
 	pgs[0] = pg;
 	pgs[1] = NULL;



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

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec 19 07:44:56 UTC 2019

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

Log Message:
G/C kasan_shadow_map call in pmap_enter

pmap_growkernel calls kasan_shadow_map for KVA


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/aarch64/aarch64/pmap.c

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



Re: CVS commit: src

2019-12-18 Thread Maxime Villard

Answering quickly:

Le 18/12/2019 à 21:24, Taylor R Campbell a écrit :

Module Name:src
Committed By:   maxv
Date:   Wed Dec 18 07:37:19 UTC 2019

Log Message:
Retire filemon, discussed on tech-kern@.


Please refrain from taking unilateral actions such as things you don't
like without reasonable discussion.


I think you meant to say "REMOVING things you don't like". I removed it
after quick discussion, and taking into account the fact that filemon
was completely killed by secteam with no discussion either.


- Nobody skimming tech-kern by subject line would reasonably expect
   that a thread titled `[filemon] CVS commit: htdocs/support/security'
   is the place to find a proposal of deletion on 18h notice.


See below


- Nothing in the thread was actually a proposal for discussion -- just
   an announcement that you have taken a unilateral decision to remove
   it.


The first paragraph of the first email of this thread is literally a
question I'm asking to other people. "announcement of unilateral decision"
is about as dishonest and mischaracterizing as it can get. Disappointing,
but not unexpected.


- And since the module is gone and the pseudo-device is disabled by
   default, no unilateral emergency action is warranted, even it turns
   out under discussion that there is community consensus that filemon
   should be removed from the tree.


Maybe it could have occurred to you that it is precisely because this
feature has been completely killed already that I moved forward and
deleted it, after very quick discussion indeed? But see below


Please revert the filemon deletion and ensure the tree builds within
the next 24h.


I have reverted the bmake change, because Maya's concern (about diff
against FreeBSD) is legitimate, at least for the time being.


If you want to see filemon deleted, you can raise the subject _after_
you have reverted the commits.


You mean like, following the removal procedure core has already failed to
abide by in the past? In fact, maybe we should agree once and for all on
the actual procedure, and ALL accept to abide by it, INCLUDING core. What
do you think?

In the meantime, I have absolutely no intent to reinstate filemon. You can
reinstate it if you want, but it should come as no surprise to you in the
near future that filemon, after whatever "necessary" discussion or different
forms of bureaucratic idiocy you want to throw at it, will be deleted almost
as fast as it came back from the attic. Especially considering the emails
sent from the other people since I proceeded.

Maxime


CVS commit: src/usr.bin/make

2019-12-18 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Dec 19 07:14:07 UTC 2019

Modified Files:
src/usr.bin/make: Makefile compat.c make.1 meta.c

Log Message:
Revert the filemon removal in bmake, as pointed out by maya we do care
about not introducing divergence with FreeBSD, and the cost of unused
is acceptable here.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/make/Makefile
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/make/compat.c
cvs rdiff -u -r1.275 -r1.276 src/usr.bin/make/make.1
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/make/meta.c

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



CVS commit: src/usr.bin/make

2019-12-18 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Dec 19 07:14:07 UTC 2019

Modified Files:
src/usr.bin/make: Makefile compat.c make.1 meta.c

Log Message:
Revert the filemon removal in bmake, as pointed out by maya we do care
about not introducing divergence with FreeBSD, and the cost of unused
is acceptable here.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/make/Makefile
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/make/compat.c
cvs rdiff -u -r1.275 -r1.276 src/usr.bin/make/make.1
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/make/meta.c

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

Modified files:

Index: src/usr.bin/make/Makefile
diff -u src/usr.bin/make/Makefile:1.64 src/usr.bin/make/Makefile:1.65
--- src/usr.bin/make/Makefile:1.64	Wed Dec 18 07:37:19 2019
+++ src/usr.bin/make/Makefile	Thu Dec 19 07:14:07 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.64 2019/12/18 07:37:19 maxv Exp $
+#	$NetBSD: Makefile,v 1.65 2019/12/19 07:14:07 maxv Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
 PROG=	make
@@ -17,6 +17,10 @@ USE_META ?= yes
 .if ${USE_META:tl} != "no"
 SRCS+=	meta.c
 CPPFLAGS+= -DUSE_META
+FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
+.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
+COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
+.endif
 .endif
 
 .PATH:	${.CURDIR}/lst.lib

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.108 src/usr.bin/make/compat.c:1.109
--- src/usr.bin/make/compat.c:1.108	Wed Dec 18 07:37:19 2019
+++ src/usr.bin/make/compat.c	Thu Dec 19 07:14:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.108 2019/12/18 07:37:19 maxv Exp $	*/
+/*	$NetBSD: compat.c,v 1.109 2019/12/19 07:14:07 maxv Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.108 2019/12/18 07:37:19 maxv Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.109 2019/12/19 07:14:07 maxv Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.108 2019/12/18 07:37:19 maxv Exp $");
+__RCSID("$NetBSD: compat.c,v 1.109 2019/12/19 07:14:07 maxv Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -426,6 +426,11 @@ again:
 		status = WSTOPSIG(reason);		/* stopped */
 	} else if (WIFEXITED(reason)) {
 		status = WEXITSTATUS(reason);		/* exited */
+#if defined(USE_META) && defined(USE_FILEMON_ONCE)
+		if (useMeta) {
+		meta_cmd_finish(NULL);
+		}
+#endif
 		if (status != 0) {
 		if (DEBUG(ERROR)) {
 		fprintf(debug_file, "\n*** Failed target:  %s\n*** Failed command: ",

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.275 src/usr.bin/make/make.1:1.276
--- src/usr.bin/make/make.1:1.275	Wed Dec 18 07:37:19 2019
+++ src/usr.bin/make/make.1	Thu Dec 19 07:14:07 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.275 2019/12/18 07:37:19 maxv Exp $
+.\"	$NetBSD: make.1,v 1.276 2019/12/19 07:14:07 maxv Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd December 17, 2019
+.Dd February 16, 2019
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -883,7 +883,10 @@ into "compat" mode.
 Puts
 .Nm
 into "meta" mode, where meta files are created for each target
-to capture the command run.
+to capture the command run, the output generated and if
+.Xr filemon 4
+is available, the system calls which are of interest to
+.Nm .
 The captured output can be very useful when diagnosing errors.
 .It Pa curdirOk= Ar bf
 Normally
@@ -971,6 +974,13 @@ by appending their names to
 is re-exported whenever
 .Ql Va .MAKEOVERRIDES
 is modified.
+.It Va .MAKE.PATH_FILEMON
+If
+.Nm
+was built with
+.Xr filemon 4
+support, this is set to the path of the device node.
+This allows makefiles to test for this support.
 .It Va .MAKE.PID
 The process-id of
 .Nm .

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.72 src/usr.bin/make/meta.c:1.73
--- src/usr.bin/make/meta.c:1.72	Wed Dec 18 10:30:23 2019
+++ src/usr.bin/make/meta.c	Thu Dec 19 07:14:07 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.72 2019/12/18 10:30:23 martin Exp $ */
+/*  $NetBSD: meta.c,v 1.73 2019/12/19 07:14:07 maxv Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -46,6 +46,13 @@
 #include "make.h"
 #include "job.h"
 
+#ifdef HAVE_FILEMON_H
+# include 
+#endif
+#if !defined(USE_FILEMON) && defined(FILEMON_SET_FD)
+# define USE_FILEMON
+#endif
+
 static BuildMon Mybm;			/* for compat */
 static Lst metaBailiwick;		/* our scope of control */
 static char *metaBailiwickStr;		/* string storage for the list */
@@ -93,6 +100,100 @@ extern char**environ;
 #endif
 
 /*
+ * Filemon is a kernel module which snoops certain syscalls.
+ *
+ * C chdir
+ * E exec
+ * F [v]fork

CVS commit: src/sys/arch/arm/dts

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:52:29 UTC 2019

Modified Files:
src/sys/arch/arm/dts: rk3399-rockpro64.dts

Log Message:
add template bits for optional eDP panel on RockPro64


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/dts/rk3399-rockpro64.dts

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/arm/dts/rk3399-rockpro64.dts
diff -u src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.9 src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.10
--- src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.9	Sat Nov 16 13:24:25 2019
+++ src/sys/arch/arm/dts/rk3399-rockpro64.dts	Thu Dec 19 00:52:29 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399-rockpro64.dts,v 1.9 2019/11/16 13:24:25 jmcneill Exp $ */
+/* $NetBSD: rk3399-rockpro64.dts,v 1.10 2019/12/19 00:52:29 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -46,9 +46,117 @@
 		pinctrl-0 = <_pwr_en>;
 		regulator-name = "vcc3v3_pcie";
 	};
+
+	backlight: lcd-backlight {
+		compatible = "pwm-backlight";
+		pwms = < 0 25000 0>;
+		brightness-levels = <
+			  0   1   2   3   4   5   6   7
+			  8   9  10  11  12  13  14  15
+			 16  17  18  19  20  21  22  23
+			 24  25  26  27  28  29  30  31
+			 32  33  34  35  36  37  38  39
+			 40  41  42  43  44  45  46  47
+			 48  49  50  51  52  53  54  55
+			 56  57  58  59  60  61  62  63
+			 64  65  66  67  68  69  70  71
+			 72  73  74  75  76  77  78  79
+			 80  81  82  83  84  85  86  87
+			 88  89  90  91  92  93  94  95
+			 96  97  98  99 100 101 102 103
+			104 105 106 107 108 109 110 111
+			112 113 114 115 116 117 118 119
+			120 121 122 123 124 125 126 127
+			128 129 130 131 132 133 134 135
+			136 137 138 139 140 141 142 143
+			144 145 146 147 148 149 150 151
+			152 153 154 155 156 157 158 159
+			160 161 162 163 164 165 166 167
+			168 169 170 171 172 173 174 175
+			176 177 178 179 180 181 182 183
+			184 185 186 187 188 189 190 191
+			192 193 194 195 196 197 198 199
+			200 201 202 203 204 205 206 207
+			208 209 210 211 212 213 214 215
+			216 217 218 219 220 221 222 223
+			224 225 226 227 228 229 230 231
+			232 233 234 235 236 237 238 239
+			240 241 242 243 244 245 246 247
+			248 249 250 251 252 253 254 255>;
+		default-brightness-level = <200>;
+		status = "disabled";
+	};
+
+	edp_panel: edp-panel {
+		compatible = "simple-panel";
+		backlight = <>;
+		power-supply = <_s0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <_panel_en>;
+		enable-gpios = < RK_PA0 GPIO_ACTIVE_HIGH>;
+		prepare-delay-ms = <20>;
+		enable-delay-ms = <20>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+reg = <0>;
+#address-cells = <1>;
+#size-cells = <0>;
+
+panel_in_edp: endpoint@0 {
+	reg = <0>;
+	remote-endpoint = <_out_panel>;
+};
+			};
+		};
+	};
+
+	edp@ff97 {
+		ports {
+			edp_out: port@1 {
+reg = <1>;
+#address-cells = <1>;
+#size-cells = <0>;
+
+edp_out_panel: endpoint@0 {
+	reg = <0>;
+	remote-endpoint = <_in_edp>;
+};
+			};
+		};
+	};
+
+#if 0
+	edp@ff97 {
+		status = "okay";
+	};
+
+	edp-panel {
+		status = "okay";
+	};
+
+	pwm@ff42 {
+		status = "okay";
+	};
+
+	lcd-backlight {
+		status = "okay";
+	};
+#endif
+
 };
 
  {
+	lcd_panel {
+		edp_panel_en: edp-panel-en {
+			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO _pull_none>;
+		};
+	};
+
 	pcie {
 		pcie_pwr_en: pcie-pwr-en {
 			rockchip,pins =



CVS commit: src/sys/arch/arm/dts

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:52:29 UTC 2019

Modified Files:
src/sys/arch/arm/dts: rk3399-rockpro64.dts

Log Message:
add template bits for optional eDP panel on RockPro64


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/dts/rk3399-rockpro64.dts

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



CVS commit: src/sys/arch/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:42:12 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: rk_pwm.c

Log Message:
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_pwm.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/arm/rockchip/rk_pwm.c
diff -u src/sys/arch/arm/rockchip/rk_pwm.c:1.2 src/sys/arch/arm/rockchip/rk_pwm.c:1.3
--- src/sys/arch/arm/rockchip/rk_pwm.c:1.2	Fri Oct 18 06:51:02 2019
+++ src/sys/arch/arm/rockchip/rk_pwm.c	Thu Dec 19 00:42:12 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_pwm.c,v 1.2 2019/10/18 06:51:02 skrll Exp $ */
+/* $NetBSD: rk_pwm.c,v 1.3 2019/12/19 00:42:12 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.2 2019/10/18 06:51:02 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.3 2019/12/19 00:42:12 jakllsch Exp $");
 
 #include 
 #include 
@@ -132,6 +132,10 @@ static int
 rk_pwm_get_config(pwm_tag_t pwm, struct pwm_config *conf)
 {
 	struct rk_pwm_softc * const sc = device_private(pwm->pwm_dev);
+
+#if 0
+	/* XXX may be useful someday */
+
 	uint32_t ctrl, period, duty;
 	u_int div;
 
@@ -153,6 +157,9 @@ rk_pwm_get_config(pwm_tag_t pwm, struct 
 	conf->polarity = (ctrl & CTRL_DUTY_POL) ? PWM_ACTIVE_HIGH : PWM_ACTIVE_LOW;
 conf->period = (u_int)(((uint64_t)period * 10) / rate);
 conf->duty_cycle = (u_int)(((uint64_t)duty * 10) / rate);
+#else
+	*conf = sc->sc_conf;
+#endif
 
 	return 0;
 }



CVS commit: src/sys/arch/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:42:12 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: rk_pwm.c

Log Message:
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_pwm.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/evbarm/conf

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:36:26 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
enable panel at fdt drivers


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/evbarm/conf/GENERIC64

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



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

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:36:26 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
enable panel at fdt drivers


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/evbarm/conf/GENERIC64

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/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.117 src/sys/arch/evbarm/conf/GENERIC64:1.118
--- src/sys/arch/evbarm/conf/GENERIC64:1.117	Thu Dec 19 00:28:34 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Thu Dec 19 00:36:26 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.117 2019/12/19 00:28:34 jakllsch Exp $
+#	$NetBSD: GENERIC64,v 1.118 2019/12/19 00:36:26 jakllsch Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -440,6 +440,7 @@ hdmicec*	at hdmicecbus?
 anxdp*		at fdt?			# Analogix-based (e)DP
 anxedp*		at iic?			# Analogix eDP TX
 dispcon*	at fdt?			# Display connector devices
+panel*		at fdt?			# Display panels
 dwhdmi* 	at fdt?			# Designware HDMI TX
 rkdrm*		at fdt? pass 5		# Rockchip DRM master
 rkfb*		at rkdrm?		# Rockchip DRM framebuffer



CVS commit: src/sys/dev/fdt

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:35:01 UTC 2019

Modified Files:
src/sys/dev/fdt: files.fdt
Added Files:
src/sys/dev/fdt: fdt_panel.c

Log Message:
Add another panel@fdt driver, this time for DRM-style panels.

To do: migrate away from other panel driver.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/fdt_panel.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/fdt/files.fdt

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



CVS commit: src/sys/dev/fdt

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:35:01 UTC 2019

Modified Files:
src/sys/dev/fdt: files.fdt
Added Files:
src/sys/dev/fdt: fdt_panel.c

Log Message:
Add another panel@fdt driver, this time for DRM-style panels.

To do: migrate away from other panel driver.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/fdt_panel.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/fdt/files.fdt

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/fdt/files.fdt
diff -u src/sys/dev/fdt/files.fdt:1.48 src/sys/dev/fdt/files.fdt:1.49
--- src/sys/dev/fdt/files.fdt:1.48	Sun Nov 17 19:30:42 2019
+++ src/sys/dev/fdt/files.fdt	Thu Dec 19 00:35:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.48 2019/11/17 19:30:42 jmcneill Exp $
+# $NetBSD: files.fdt,v 1.49 2019/12/19 00:35:01 jakllsch Exp $
 
 include	"external/bsd/libfdt/conf/files.libfdt"
 
@@ -45,6 +45,9 @@ device	panel: fdt_port
 attach	panel at fdt with fdt_panel
 file	dev/fdt/panel_fdt.c			fdt_panel
 
+attach	panel at fdt with panel_fdt: drmkms
+file	dev/fdt/fdt_panel.c			panel_fdt
+
 device	dispcon: fdt_port, drmkms, ddc_read_edid
 attach	dispcon at fdt with dispcon_hdmi
 file	dev/fdt/hdmi_connector.c		dispcon_hdmi

Added files:

Index: src/sys/dev/fdt/fdt_panel.c
diff -u /dev/null src/sys/dev/fdt/fdt_panel.c:1.1
--- /dev/null	Thu Dec 19 00:35:01 2019
+++ src/sys/dev/fdt/fdt_panel.c	Thu Dec 19 00:35:01 2019
@@ -0,0 +1,163 @@
+/* $NetBSD: fdt_panel.c,v 1.1 2019/12/19 00:35:01 jakllsch Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jonathan A. Kollasch 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: fdt_panel.c,v 1.1 2019/12/19 00:35:01 jakllsch Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+static const char * const compatible[] = {
+	"simple-panel",
+	NULL
+};
+
+struct panel_fdt_softc {
+	device_t			sc_dev;
+	struct fdt_device_ports		sc_ports;
+	struct drm_panel		sc_panel;
+	struct fdtbus_gpio_pin *	sc_enable;
+	struct fdtbus_regulator *	sc_regulator;
+};
+
+#define	to_panel_fdt(x)	container_of(x, struct panel_fdt_softc, sc_panel)
+
+static int
+panel_fdt_enable(struct drm_panel * panel)
+{
+	struct panel_fdt_softc * const sc = to_panel_fdt(panel);
+
+if (sc->sc_enable) {
+		fdtbus_gpio_write(sc->sc_enable, true);
+}
+
+	if (!cold)
+		kpause("panele", false, mstohz(200), NULL);
+
+	return 0;
+}
+
+static int
+panel_fdt_prepare(struct drm_panel * panel)
+{
+	struct panel_fdt_softc * const sc = to_panel_fdt(panel);
+
+if (sc->sc_regulator) {
+fdtbus_regulator_enable(sc->sc_regulator);
+}
+
+	if (cold)
+		delay(21);
+	else
+		kpause("panelp", false, mstohz(210), NULL);
+
+	return 0;
+}
+
+static const struct drm_panel_funcs panel_fdt_funcs = {
+	.disable = NULL,
+	.enable = panel_fdt_enable,
+	.get_modes = NULL,
+	.get_timings = NULL,
+	.prepare = panel_fdt_prepare,
+	.unprepare = NULL,
+};
+
+static int
+panel_fdt_ep_activate(device_t dev, struct fdt_endpoint *ep, bool activate)
+{
+	struct fdt_endpoint *rep = fdt_endpoint_remote(ep);
+
+	if (fdt_endpoint_port_index(ep) != 0)
+		return EINVAL;
+
+	if (fdt_endpoint_type(rep) != EP_DRM_ENCODER)
+		return EINVAL;
+
+	return 0;
+}
+
+static void *
+panel_fdt_ep_get_data(device_t dev, struct fdt_endpoint *ep)
+{
+	struct panel_fdt_softc * const sc = device_private(dev);
+
+	return >sc_panel;
+}
+
+static int
+panel_fdt_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct fdt_attach_args * const faa = aux;
+
+	return 

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

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:28:35 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
add anxdp(4)


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/evbarm/conf/GENERIC64

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/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.116 src/sys/arch/evbarm/conf/GENERIC64:1.117
--- src/sys/arch/evbarm/conf/GENERIC64:1.116	Mon Dec  9 04:51:04 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Thu Dec 19 00:28:34 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.116 2019/12/09 04:51:04 riastradh Exp $
+#	$NetBSD: GENERIC64,v 1.117 2019/12/19 00:28:34 jakllsch Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -437,6 +437,7 @@ tegracec0	at fdt?			# NVIDIA Tegra HDMI 
 hdmicec*	at hdmicecbus?
 
 # Display
+anxdp*		at fdt?			# Analogix-based (e)DP
 anxedp*		at iic?			# Analogix eDP TX
 dispcon*	at fdt?			# Display connector devices
 dwhdmi* 	at fdt?			# Designware HDMI TX



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

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:28:35 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
add anxdp(4)


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: src/sys/arch/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:25:59 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: files.rockchip
Added Files:
src/sys/arch/arm/rockchip: rk_anxdp.c

Log Message:
add Rockchip (RK3399) glue for Analogix DisplayPort core


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/rockchip/files.rockchip
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/rockchip/rk_anxdp.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/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:25:59 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: files.rockchip
Added Files:
src/sys/arch/arm/rockchip: rk_anxdp.c

Log Message:
add Rockchip (RK3399) glue for Analogix DisplayPort core


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/rockchip/files.rockchip
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/rockchip/rk_anxdp.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/arm/rockchip/files.rockchip
diff -u src/sys/arch/arm/rockchip/files.rockchip:1.22 src/sys/arch/arm/rockchip/files.rockchip:1.23
--- src/sys/arch/arm/rockchip/files.rockchip:1.22	Sat Nov 16 13:24:03 2019
+++ src/sys/arch/arm/rockchip/files.rockchip	Thu Dec 19 00:25:58 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rockchip,v 1.22 2019/11/16 13:24:03 jmcneill Exp $
+#	$NetBSD: files.rockchip,v 1.23 2019/12/19 00:25:58 jakllsch Exp $
 #
 # Configuration info for Rockchip family SoCs
 #
@@ -103,6 +103,10 @@ file	arch/arm/rockchip/rk_vop.c		rk_vop
 attach	dwhdmi at fdt with rk_dwhdmi
 file	arch/arm/rockchip/rk_dwhdmi.c		rk_dwhdmi
 
+# DP/eDP (Analogix-based)
+attach	anxdp at fdt with rk_anxdp
+file	arch/arm/rockchip/rk_anxdp.c		rk_anxdp
+
 # I2S/PCM controller
 device	rki2s	
 attach  rki2s at fdt with rk_i2s

Added files:

Index: src/sys/arch/arm/rockchip/rk_anxdp.c
diff -u /dev/null src/sys/arch/arm/rockchip/rk_anxdp.c:1.1
--- /dev/null	Thu Dec 19 00:25:59 2019
+++ src/sys/arch/arm/rockchip/rk_anxdp.c	Thu Dec 19 00:25:59 2019
@@ -0,0 +1,296 @@
+/* $NetBSD: rk_anxdp.c,v 1.1 2019/12/19 00:25:59 jakllsch Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jonathan A. Kollasch 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: rk_anxdp.c,v 1.1 2019/12/19 00:25:59 jakllsch Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#define	RK3399_GRF_SOC_CON20		0x6250
+#define  EDP_LCDC_SEL			__BIT(5)
+
+enum {
+	ANXDP_PORT_INPUT = 0,
+	ANXDP_PORT_OUTPUT = 1,
+};
+
+static const char * const compatible[] = {
+	"rockchip,rk3399-edp",
+	NULL
+};
+
+struct rk_anxdp_softc {
+	struct anxdp_softc	sc_base;
+	int			sc_phandle;
+
+	struct fdt_device_ports	sc_ports;
+	struct drm_encoder	sc_encoder;
+	struct drm_display_mode	sc_curmode;
+	struct syscon		*sc_grf;
+
+	bool			sc_activated;
+};
+
+#define	to_rk_anxdp_softc(x)	container_of(x, struct rk_anxdp_softc, sc_base)
+#define	to_rk_anxdp_encoder(x)	container_of(x, struct rk_anxdp_softc, sc_encoder)
+
+static void
+rk_anxdp_select_input(struct rk_anxdp_softc *sc, u_int crtc_index)
+{
+	const uint32_t write_mask = EDP_LCDC_SEL << 16;
+	const uint32_t write_val = crtc_index == 0 ? EDP_LCDC_SEL : 0;
+
+	syscon_lock(sc->sc_grf);
+	syscon_write_4(sc->sc_grf, RK3399_GRF_SOC_CON20, write_mask | write_val);
+	syscon_unlock(sc->sc_grf);
+}
+
+static bool
+rk_anxdp_encoder_mode_fixup(struct drm_encoder *encoder,
+const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
+{
+	return true;
+}
+
+static void
+rk_anxdp_encoder_mode_set(struct drm_encoder *encoder,
+struct drm_display_mode *mode, struct drm_display_mode *adjusted)
+{
+}
+
+static void
+rk_anxdp_encoder_enable(struct drm_encoder *encoder)
+{
+}
+
+static void
+rk_anxdp_encoder_disable(struct drm_encoder *encoder)
+{
+}
+
+static void
+rk_anxdp_encoder_prepare(struct drm_encoder *encoder)
+{
+	struct rk_anxdp_softc * const sc = to_rk_anxdp_encoder(encoder);
+	const u_int crtc_index = drm_crtc_index(encoder->crtc);
+
+	rk_anxdp_select_input(sc, crtc_index);

CVS commit: src/sys

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:23:57 UTC 2019

Modified Files:
src/sys/conf: files
Added Files:
src/sys/dev/ic: anx_dp.c anx_dp.h

Log Message:
add Analogix DisplayPort core driver


To generate a diff of this commit:
cvs rdiff -u -r1.1246 -r1.1247 src/sys/conf/files
cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/anx_dp.c src/sys/dev/ic/anx_dp.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/conf/files
diff -u src/sys/conf/files:1.1246 src/sys/conf/files:1.1247
--- src/sys/conf/files:1.1246	Wed Dec 18 07:37:18 2019
+++ src/sys/conf/files	Thu Dec 19 00:23:57 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1246 2019/12/18 07:37:18 maxv Exp $
+#	$NetBSD: files,v 1.1247 2019/12/19 00:23:57 jakllsch Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -1489,6 +1489,10 @@ device	dwhdmi: edid, videomode, drmkms, 
 file	dev/ic/dw_hdmi.c		dwhdmi
 file	dev/ic/dw_hdmi_phy.c		dwhdmi
 
+# Analogix DisplayPort
+device	anxdp: edid, videomode, drmkms, drmkms_i2c
+file	dev/ic/anx_dp.c			anxdp
+
 #
 # File systems
 #

Added files:

Index: src/sys/dev/ic/anx_dp.c
diff -u /dev/null src/sys/dev/ic/anx_dp.c:1.1
--- /dev/null	Thu Dec 19 00:23:57 2019
+++ src/sys/dev/ic/anx_dp.c	Thu Dec 19 00:23:57 2019
@@ -0,0 +1,1064 @@
+/* $NetBSD: anx_dp.c,v 1.1 2019/12/19 00:23:57 jakllsch Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jonathan A. Kollasch 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: anx_dp.c,v 1.1 2019/12/19 00:23:57 jakllsch Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#if ANXDP_AUDIO
+#include 
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define	ANXDP_DP_TX_VERSION	0x010
+#define	ANXDP_TX_SW_RESET	0x014
+#define	 RESET_DP_TX			__BIT(0)
+#define	ANXDP_FUNC_EN_1		0x018
+#define	 MASTER_VID_FUNC_EN_N		__BIT(7)
+#define	 RK_VID_CAP_FUNC_EN_N		__BIT(6)
+#define	 SLAVE_VID_FUNC_EN_N		__BIT(5)
+#define	 RK_VID_FIFO_FUNC_EN_N		__BIT(5)
+#define	 AUD_FIFO_FUNC_EN_N		__BIT(4)
+#define	 AUD_FUNC_EN_N			__BIT(3)
+#define	 HDCP_FUNC_EN_N			__BIT(2)
+#define	 CRC_FUNC_EN_N			__BIT(1)
+#define	 SW_FUNC_EN_N			__BIT(0)
+#define	ANXDP_FUNC_EN_2		0x01c
+#define	 SSC_FUNC_EN_N			__BIT(7)
+#define	 AUX_FUNC_EN_N			__BIT(2)
+#define	 SERDES_FIFO_FUNC_EN_N		__BIT(1)
+#define	 LS_CLK_DOMAIN_FUNC_EN_N	__BIT(0)
+#define	ANXDP_VIDEO_CTL_1	0x020
+#define	 VIDEO_EN			__BIT(7)
+#define	 VIDEO_MUTE			__BIT(6)
+#define	ANXDP_VIDEO_CTL_2	0x024
+#define	ANXDP_VIDEO_CTL_3	0x028
+#define	ANXDP_VIDEO_CTL_4	0x02c
+#define	ANXDP_VIDEO_CTL_8	0x03c
+#define	ANXDP_VIDEO_CTL_10	0x044
+#define	 F_SEL__BIT(4)
+#define	 SLAVE_I_SCAN_CFG		__BIT(2)
+#define	 SLAVE_VSYNC_P_CFG		__BIT(1)
+#define	 SLAVE_HSYNC_P_CFG		__BIT(0)
+#define	ANXDP_PLL_REG_1		0x0fc
+#define	 REF_CLK_24M			__BIT(0)
+#define	RKANXDP_PD		0x12c
+#define	 DP_INC_BG			__BIT(7)
+#define	 DP_EXP_PD			__BIT(6)
+#define	 DP_PHY_PD			__BIT(5)
+#define	 RK_AUX_PD			__BIT(5)
+#define	 AUX_PD__BIT(4)
+#define	 RK_PLL_PD			__BIT(4)
+#define	 CHx_PD(x)			__BIT(x)	/* 0<=x<=3 */
+#define  DP_ALL_PD			__BITS(7,0)
+#define	ANXDP_LANE_MAP		0x35c
+#define ANXDP_ANALOG_CTL_1	0x370
+#define	 TX_TERMINAL_CTRL_50_OHM	__BIT(4)
+#define ANXDP_ANALOG_CTL_2	0x374
+#define	 SEL_24M			__BIT(3)
+#define	 TX_DVDD_BIT_1_0625V		0x4
+#define ANXDP_ANALOG_CTL_3	0x378
+#define	 DRIVE_DVDD_BIT_1_0625V		(0x4 << 5)
+#define	 VCO_BIT_600_MICRO		(0x5 << 0)
+#define ANXDP_PLL_FILTER_CTL_1	0x37c
+#define	 PD_RING_OSC			__BIT(6)
+#define	 AUX_TERMINAL_CTRL_50_OHM	(2 << 4)
+#define	 TX_CUR1_2X			__BIT(2)
+#define	 

CVS commit: src/sys

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Dec 19 00:23:57 UTC 2019

Modified Files:
src/sys/conf: files
Added Files:
src/sys/dev/ic: anx_dp.c anx_dp.h

Log Message:
add Analogix DisplayPort core driver


To generate a diff of this commit:
cvs rdiff -u -r1.1246 -r1.1247 src/sys/conf/files
cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/anx_dp.c src/sys/dev/ic/anx_dp.h

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



Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-18 Thread Joerg Sonnenberger
On Wed, Dec 18, 2019 at 03:51:21PM -, Christos Zoulas wrote:
> In article <20191218152113.ga7...@bec.de>,
> Joerg Sonnenberger   wrote:
> >On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
> >> Module Name:   src
> >> Committed By:  christos
> >> Date:  Wed Dec 18 02:16:04 UTC 2019
> >> 
> >> Modified Files:
> >>src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
> >> 
> >> Log Message:
> >> Also disable ssp and fortify by default.
> >
> >Why?
> 
> Size reduction on install media. There are flags to turn it on.

Not all users of crunchgen are space constrained, so this seems like a
bad default to me.

Joerg


CVS commit: src/sys

2019-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 18 21:46:03 UTC 2019

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c
src/sys/stand/efiboot: boot.c efiboot.h efifdt.c efifdt.h exec.c
version

Log Message:
Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed.  It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in )
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed.  Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/stand/efiboot/efiboot.h
cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efifdt.c
cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efifdt.h
cvs rdiff -u -r1.11 -r1.12 src/sys/stand/efiboot/exec.c
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/version

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/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.64 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.65
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.64	Tue Jul 16 14:41:45 2019
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Wed Dec 18 21:46:03 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.64 2019/07/16 14:41:45 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.65 2019/12/18 21:46:03 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.64 2019/07/16 14:41:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.65 2019/12/18 21:46:03 riastradh Exp $");
 
 #include "opt_machdep.h"
 #include "opt_bootconfig.h"
@@ -64,6 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep.
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -117,6 +118,7 @@ u_long uboot_args[4] __attribute__((__se
 const uint8_t *fdt_addr_r __attribute__((__section__(".data")));
 
 static uint64_t initrd_start, initrd_end;
+static uint64_t rndseed_start, rndseed_end;
 
 #include 
 #include 
@@ -311,6 +313,10 @@ fdt_build_bootconfig(uint64_t mem_start,
 	if (initrd_size > 0)
 		fdt_memory_remove_range(initrd_start, initrd_size);
 
+	const uint64_t rndseed_size = rndseed_end - rndseed_start;
+	if (rndseed_size > 0)
+		fdt_memory_remove_range(rndseed_start, rndseed_size);
+
 	const int framebuffer = OF_finddevice("/chosen/framebuffer");
 	if (framebuffer >= 0) {
 		for (index = 0;
@@ -390,6 +396,65 @@ fdt_setup_initrd(void)
 #endif
 }
 
+static void
+fdt_probe_rndseed(uint64_t *pstart, uint64_t *pend)
+{
+	int chosen, len;
+	const void *start_data, *end_data;
+
+	*pstart = *pend = 0;
+	chosen = OF_finddevice("/chosen");
+	if (chosen < 0)
+		return;
+
+	start_data = fdtbus_get_prop(chosen, "netbsd,rndseed-start", );
+	end_data = fdtbus_get_prop(chosen, "netbsd,rndseed-end", NULL);
+	if (start_data == NULL || end_data == NULL)
+		return;
+
+	switch (len) {
+	case 4:
+		*pstart = be32dec(start_data);
+		*pend = be32dec(end_data);
+		break;
+	case 8:
+		*pstart = be64dec(start_data);
+		*pend = be64dec(end_data);
+		break;
+	default:
+		printf("Unsupported len %d for /chosen/rndseed-start\n", len);
+		return;
+	}
+}
+
+static void
+fdt_setup_rndseed(void)
+{
+	const uint64_t rndseed_size = rndseed_end - rndseed_start;
+	const paddr_t startpa = trunc_page(rndseed_start);
+	const paddr_t endpa = round_page(rndseed_end);
+	paddr_t pa;
+	vaddr_t va;
+	void *rndseed;
+
+	if (rndseed_size == 0)
+		return;
+
+	va = uvm_km_alloc(kernel_map, endpa - startpa, 0,
+	UVM_KMF_VAONLY | UVM_KMF_NOWAIT);
+	if (va == 0) {
+		printf("Failed to allocate VA for rndseed\n");
+		return;
+	}
+	rndseed = (void *)va;
+
+	for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE)
+		pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PROT_WRITE, 0);
+	pmap_update(pmap_kernel());
+
+	rnd_seed(rndseed, rndseed_size);
+}
+
 #ifdef EFI_RUNTIME
 static void
 fdt_map_efi_runtime(const char *prop, enum arm_efirt_mem_type type)
@@ -518,6 +583,9 @@ initarm(void *arg)
 	/* Parse ramdisk info */
 	

CVS commit: src/sys/arch

2019-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 18 21:45:44 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c
src/sys/arch/aarch64/include: machdep.h
src/sys/arch/arm/arm32: arm32_machdep.c
src/sys/arch/arm/include/arm32: machdep.h

Log Message:
New function cpu_startup_hook on arm.

Called at end of cpu_startup.  Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup.  Defined as a weak alias to a
function that does nothing, so optional.

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/machdep.h
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/include/arm32/machdep.h

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.34 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.35
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.34	Thu Nov 14 17:09:22 2019
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Wed Dec 18 21:45:43 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.34 2019/11/14 17:09:22 maxv Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.35 2019/12/18 21:45:43 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.34 2019/11/14 17:09:22 maxv Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.35 2019/12/18 21:45:43 riastradh Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -595,6 +595,14 @@ cpu_startup(void)
 
 	/* Hello! */
 	banner();
+
+	cpu_startup_hook();
+}
+
+__weak_alias(cpu_startup_hook,cpu_startup_default)
+void
+cpu_startup_default(void)
+{
 }
 
 /*

Index: src/sys/arch/aarch64/include/machdep.h
diff -u src/sys/arch/aarch64/include/machdep.h:1.8 src/sys/arch/aarch64/include/machdep.h:1.9
--- src/sys/arch/aarch64/include/machdep.h:1.8	Tue Jul 16 16:18:56 2019
+++ src/sys/arch/aarch64/include/machdep.h	Wed Dec 18 21:45:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.8 2019/07/16 16:18:56 skrll Exp $	*/
+/*	$NetBSD: machdep.h,v 1.9 2019/12/18 21:45:43 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -83,6 +83,9 @@ void uartputc(int);
 void parse_mi_bootargs(char *);
 void dumpsys(void);
 
+void cpu_startup_hook(void);
+void cpu_startup_default(void);
+
 struct trapframe;
 
 /* fault.c */

Index: src/sys/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.128 src/sys/arch/arm/arm32/arm32_machdep.c:1.129
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.128	Fri May 10 16:43:09 2019
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Wed Dec 18 21:45:44 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.128 2019/05/10 16:43:09 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.129 2019/12/18 21:45:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.128 2019/05/10 16:43:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.129 2019/12/18 21:45:44 riastradh Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -353,6 +353,14 @@ cpu_startup(void)
 #else
  	tf->tf_spsr = PSR_USR32_MODE;
 #endif
+
+	cpu_startup_hook();
+}
+
+__weak_alias(cpu_startup_hook,cpu_startup_default)
+void
+cpu_startup_default(void)
+{
 }
 
 /*

Index: src/sys/arch/arm/include/arm32/machdep.h
diff -u src/sys/arch/arm/include/arm32/machdep.h:1.29 src/sys/arch/arm/include/arm32/machdep.h:1.30
--- src/sys/arch/arm/include/arm32/machdep.h:1.29	Tue Jul 16 14:41:43 2019
+++ src/sys/arch/arm/include/arm32/machdep.h	Wed Dec 18 21:45:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.h,v 1.29 2019/07/16 14:41:43 skrll Exp $ */
+/* $NetBSD: machdep.h,v 1.30 2019/12/18 21:45:44 riastradh Exp $ */
 
 #ifndef _ARM32_MACHDEP_H_
 #define _ARM32_MACHDEP_H_
@@ -73,6 +73,9 @@ vaddr_t initarm(void *);
 struct pmap_devmap;
 struct boot_physmem;
 
+void cpu_startup_hook(void);
+void cpu_startup_default(void);
+
 static inline paddr_t
 aarch32_kern_vtophys(vaddr_t va)
 {



CVS commit: src/sys/arch

2019-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 18 21:45:44 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c
src/sys/arch/aarch64/include: machdep.h
src/sys/arch/arm/arm32: arm32_machdep.c
src/sys/arch/arm/include/arm32: machdep.h

Log Message:
New function cpu_startup_hook on arm.

Called at end of cpu_startup.  Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup.  Defined as a weak alias to a
function that does nothing, so optional.

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/machdep.h
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/include/arm32/machdep.h

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



CVS commit: src/sys

2019-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 18 21:46:03 UTC 2019

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c
src/sys/stand/efiboot: boot.c efiboot.h efifdt.c efifdt.h exec.c
version

Log Message:
Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed.  It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in )
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed.  Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/stand/efiboot/efiboot.h
cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efifdt.c
cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efifdt.h
cvs rdiff -u -r1.11 -r1.12 src/sys/stand/efiboot/exec.c
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/version

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



CVS commit: src/sys/uvm

2019-12-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Dec 18 20:38:14 UTC 2019

Modified Files:
src/sys/uvm: uvm_loan.c uvm_page.c

Log Message:
PR kern/54783: t_mmap crahes the kernel

- Fix various locking & sequencing errors with breaking loans.

- Don't call uvm_pageremove_tree() while holding pg->interlock as radixtree
  can take further locks when freeing nodes.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.205 -r1.206 src/sys/uvm/uvm_page.c

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



CVS commit: src/sys/uvm

2019-12-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Dec 18 20:38:14 UTC 2019

Modified Files:
src/sys/uvm: uvm_loan.c uvm_page.c

Log Message:
PR kern/54783: t_mmap crahes the kernel

- Fix various locking & sequencing errors with breaking loans.

- Don't call uvm_pageremove_tree() while holding pg->interlock as radixtree
  can take further locks when freeing nodes.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.205 -r1.206 src/sys/uvm/uvm_page.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/uvm/uvm_loan.c
diff -u src/sys/uvm/uvm_loan.c:1.91 src/sys/uvm/uvm_loan.c:1.92
--- src/sys/uvm/uvm_loan.c:1.91	Sun Dec 15 21:11:35 2019
+++ src/sys/uvm/uvm_loan.c	Wed Dec 18 20:38:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_loan.c,v 1.91 2019/12/15 21:11:35 ad Exp $	*/
+/*	$NetBSD: uvm_loan.c,v 1.92 2019/12/18 20:38:14 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.91 2019/12/15 21:11:35 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.92 2019/12/18 20:38:14 ad Exp $");
 
 #include 
 #include 
@@ -1121,7 +1121,7 @@ uvm_loanbreak(struct vm_page *uobjpage)
 	 * force a reload of the old page by clearing it from all
 	 * pmaps.
 	 * transfer dirtiness of the old page to the new page.
-	 * then lock pg->interlock to rename the pages.
+	 * then rename the pages.
 	 */
 
 	uvm_pagecopy(uobjpage, pg);	/* old -> new */
@@ -1143,14 +1143,6 @@ uvm_loanbreak(struct vm_page *uobjpage)
 	UVM_PAGE_OWN(uobjpage, NULL);
 
 	/*
-	 * replace uobjpage with new page.
-	 */
-
-	mutex_enter(>interlock);
-	uvm_pagereplace(uobjpage, pg);
-	mutex_exit(>interlock);
-
-	/*
 	 * if the page is no longer referenced by
 	 * an anon (i.e. we are breaking an O->K
 	 * loan), then remove it from any pageq's.
@@ -1159,6 +1151,12 @@ uvm_loanbreak(struct vm_page *uobjpage)
 		uvm_pagedequeue(uobjpage);
 
 	/*
+	 * replace uobjpage with new page.
+	 */
+
+	uvm_pagereplace(uobjpage, pg);
+
+	/*
 	 * at this point we have absolutely no
 	 * control over uobjpage
 	 */
@@ -1176,59 +1174,58 @@ uvm_loanbreak(struct vm_page *uobjpage)
 int
 uvm_loanbreak_anon(struct vm_anon *anon, struct uvm_object *uobj)
 {
-	struct vm_page *pg, *dequeuepg;
+	struct vm_page *newpg, *oldpg;
 
 	KASSERT(mutex_owned(anon->an_lock));
 	KASSERT(uobj == NULL || mutex_owned(uobj->vmobjlock));
 
 	/* get new un-owned replacement page */
-	pg = uvm_pagealloc(NULL, 0, NULL, 0);
-	if (pg == NULL) {
+	newpg = uvm_pagealloc(NULL, 0, NULL, 0);
+	if (newpg == NULL) {
 		return ENOMEM;
 	}
 
+	oldpg = anon->an_page;
+	if (uobj == NULL) {
+		/*
+		 * we were the lender (A->K); need to remove the page from
+		 * pageq's.
+		 */
+		uvm_pagedequeue(oldpg);
+	}
+
 	/* copy old -> new */
-	uvm_pagecopy(anon->an_page, pg);
+	uvm_pagecopy(oldpg, newpg);
 
 	/* force reload */
-	pmap_page_protect(anon->an_page, VM_PROT_NONE);
-	if (pg < anon->an_page) {
-		mutex_enter(>interlock);
-		mutex_enter(>an_page->interlock);
+	pmap_page_protect(oldpg, VM_PROT_NONE);
+	if (newpg < oldpg) {
+		mutex_enter(>interlock);
+		mutex_enter(>interlock);
 	} else {
-		mutex_enter(>an_page->interlock);
-		mutex_enter(>interlock);
+		mutex_enter(>interlock);
+		mutex_enter(>interlock);
 	}
-	anon->an_page->uanon = NULL;
+	oldpg->uanon = NULL;
 	/* in case we owned */
-	anon->an_page->flags &= ~PG_ANON;
+	oldpg->flags &= ~PG_ANON;
 
 	if (uobj) {
 		/* if we were receiver of loan */
-		anon->an_page->loan_count--;
-		dequeuepg = NULL;
-	} else {
-		/*
-		 * we were the lender (A->K); need to remove the page from
-		 * pageq's.
-		 */
-		dequeuepg = anon->an_page;
+		oldpg->loan_count--;
 	}
 
 	/* install new page in anon */
-	anon->an_page = pg;
-	pg->uanon = anon;
-	pg->flags |= PG_ANON;
-
-	mutex_exit(>interlock);
-	mutex_exit(>an_page->interlock);
-	uvm_pageactivate(pg);
-	if (dequeuepg != NULL) {
-		uvm_pagedequeue(anon->an_page);
-	}
+	anon->an_page = newpg;
+	newpg->uanon = anon;
+	newpg->flags |= PG_ANON;
+
+	mutex_exit(>interlock);
+	mutex_exit(>interlock);
+	uvm_pageactivate(newpg);
 
-	pg->flags &= ~(PG_BUSY|PG_FAKE);
-	UVM_PAGE_OWN(pg, NULL);
+	newpg->flags &= ~(PG_BUSY|PG_FAKE);
+	UVM_PAGE_OWN(newpg, NULL);
 
 	if (uobj) {
 		mutex_exit(uobj->vmobjlock);

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.205 src/sys/uvm/uvm_page.c:1.206
--- src/sys/uvm/uvm_page.c:1.205	Mon Dec 16 22:47:55 2019
+++ src/sys/uvm/uvm_page.c	Wed Dec 18 20:38:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.205 2019/12/16 22:47:55 ad Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.206 2019/12/18 20:38:14 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.205 2019/12/16 22:47:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: 

Re: CVS commit: src

2019-12-18 Thread Taylor R Campbell
> Module Name:src
> Committed By:   maxv
> Date:   Wed Dec 18 07:37:19 UTC 2019
> 
> Log Message:
> Retire filemon, discussed on tech-kern@.

Please refrain from taking unilateral actions such as things you don't
like without reasonable discussion.

- Nobody skimming tech-kern by subject line would reasonably expect
  that a thread titled `[filemon] CVS commit: htdocs/support/security'
  is the place to find a proposal of deletion on 18h notice.

- Nothing in the thread was actually a proposal for discussion -- just
  an announcement that you have taken a unilateral decision to remove
  it.

- And since the module is gone and the pseudo-device is disabled by
  default, no unilateral emergency action is warranted, even it turns
  out under discussion that there is community consensus that filemon
  should be removed from the tree.

Please revert the filemon deletion and ensure the tree builds within
the next 24h.  If you want to see filemon deleted, you can raise the
subject _after_ you have reverted the commits.

Thanks,
-Riastradh, on behalf of core.


CVS commit: [netbsd-9] src/doc

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:21:11 UTC 2019

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

Log Message:
Tickets #570 - #572


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.144 -r1.1.2.145 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.144 src/doc/CHANGES-9.0:1.1.2.145
--- src/doc/CHANGES-9.0:1.1.2.144	Tue Dec 17 16:14:25 2019
+++ src/doc/CHANGES-9.0	Wed Dec 18 20:21:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.144 2019/12/17 16:14:25 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.145 2019/12/18 20:21:11 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -7191,3 +7191,67 @@ sys/net/if.c	1.466
 	Protect network ioctls from non-authorized users.
 	[christos, ticket #569]
 
+sys/arch/amigappc/include/intr.h		1.27
+sys/arch/arm/at91/at91dbgu.c			1.17
+sys/arch/emips/ebus/ace_ebus.c			1.22
+sys/arch/emips/ebus/flash_ebus.c		1.22
+sys/arch/emips/emips/bus_space.c		1.3
+sys/arch/emips/include/loadfile_machdep.h	1.3
+sys/arch/emips/stand/common/bootinfo.c		1.2
+sys/arch/emips/stand/common/bootinfo.h		1.2
+sys/arch/emips/stand/common/bootxx.c		1.2
+sys/arch/emips/stand/common/prom_iface.c	1.7
+sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm 1.2
+sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm 1.2
+sys/arch/hpcarm/include/kloader.h		1.3
+sys/arch/ia64/ia64/bus_space.c			1.2
+sys/arch/ia64/include/bus.h			1.4
+sys/arch/mips/cavium/octeon_dma.c		1.3
+sys/arch/x68k/dev/intiovar.h			1.15
+sys/arch/x68k/dev/mfp.c1.27
+sys/arch/zaurus/include/kloader.h		1.3
+sys/compat/common/kern_time_30.c		1.8
+sys/compat/common/sysv_msg_50.c			1.5
+sys/compat/common/sysv_sem_50.c			1.5
+sys/compat/common/sysv_shm_50.c			1.5
+sys/compat/common/uipc_syscalls_50.c		1.10
+sys/compat/common/vfs_syscalls_50.c		1.24
+sys/compat/net/if.h1.5
+sys/compat/netbsd32/netbsd32_compat_16.c	1.3
+sys/compat/netbsd32/netbsd32_compat_50.c	1.43
+sys/compat/netbsd32/netbsd32_compat_50_sysv.c	1.3
+sys/compat/netbsd32/netbsd32_compat_60.c	1.5
+sys/compat/netinet6/in6_var.h			1.5
+sys/compat/ultrix/ultrix_exec.h			1.7
+sys/dev/ic/adv.c1.50
+sys/dev/ic/adv.h1.15
+sys/dev/ic/advlib.c1.29
+sys/dev/ic/advlib.h1.21
+sys/dev/ic/advmcode.c1.10
+sys/dev/ic/advmcode.h1.7
+sys/dev/ic/adw.c1.56
+sys/dev/ic/adw.h1.15
+sys/dev/ic/adwlib.c1.44
+sys/dev/ic/adwlib.h1.23
+sys/dev/ic/adwmcode.c1.18
+sys/dev/ic/adwmcode.h1.12
+sys/dev/raidframe/rf_compat50.c			1.13
+sys/dev/raidframe/rf_compat50.h			1.6
+sys/dev/usb/uberry.c1.16
+sys/dev/usb/uipad.c1.8
+
+	Remove clause 3 and 4 from TNF licenses.
+	[tsutsui, ticket #570]
+
+lib/libpthread/pthread_int.h			1.97
+
+	Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.
+	[joerg, ticket #571]
+
+lib/libc/gen/sysconf.c1.43
+sys/kern/uipc_sem.c1.56
+
+	PR 54619: Remove semaphore limit. Report no limit for getconf(3).
+	The ressource is naturally limited by the backing file descriptor.
+	[joerg, ticket #572]
+



CVS commit: [netbsd-9] src/doc

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:21:11 UTC 2019

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

Log Message:
Tickets #570 - #572


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.144 -r1.1.2.145 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:20:17 UTC 2019

Modified Files:
src/lib/libc/gen [netbsd-9]: sysconf.c
src/sys/kern [netbsd-9]: uipc_sem.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #572):

sys/kern/uipc_sem.c: revision 1.56
lib/libc/gen/sysconf.c: revision 1.43

PR 54619: Remove semaphore limit introduce as part of GSoC 2016 with
_SC_SEM_NSEMS_MAX. Report no limit for getconf(3). The ressource is
naturally limited by the backing file descriptor, so no separate limit
is necessary. Keep the accounting for debugging as it is part of the
sysctl ABI exposed by the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.16.1 src/lib/libc/gen/sysconf.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/kern/uipc_sem.c

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



CVS commit: [netbsd-9] src

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:20:17 UTC 2019

Modified Files:
src/lib/libc/gen [netbsd-9]: sysconf.c
src/sys/kern [netbsd-9]: uipc_sem.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #572):

sys/kern/uipc_sem.c: revision 1.56
lib/libc/gen/sysconf.c: revision 1.43

PR 54619: Remove semaphore limit introduce as part of GSoC 2016 with
_SC_SEM_NSEMS_MAX. Report no limit for getconf(3). The ressource is
naturally limited by the backing file descriptor, so no separate limit
is necessary. Keep the accounting for debugging as it is part of the
sysctl ABI exposed by the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.16.1 src/lib/libc/gen/sysconf.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/kern/uipc_sem.c

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

Modified files:

Index: src/lib/libc/gen/sysconf.c
diff -u src/lib/libc/gen/sysconf.c:1.41 src/lib/libc/gen/sysconf.c:1.41.16.1
--- src/lib/libc/gen/sysconf.c:1.41	Thu Aug  4 06:43:43 2016
+++ src/lib/libc/gen/sysconf.c	Wed Dec 18 20:20:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysconf.c,v 1.41 2016/08/04 06:43:43 christos Exp $	*/
+/*	$NetBSD: sysconf.c,v 1.41.16.1 2019/12/18 20:20:17 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)sysconf.c	8.2 (Berkeley) 3/20/94";
 #else
-__RCSID("$NetBSD: sysconf.c,v 1.41 2016/08/04 06:43:43 christos Exp $");
+__RCSID("$NetBSD: sysconf.c,v 1.41.16.1 2019/12/18 20:20:17 martin Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -422,7 +422,7 @@ yesno:		if (sysctl(mib, mib_len, ,
 	case _SC_TIMER_MAX:
 		return _POSIX_TIMER_MAX;
 	case _SC_SEM_NSEMS_MAX:
-		return _POSIX_SEM_NSEMS_MAX;
+		return LONG_MAX;
 	case _SC_CPUTIME:
 		return _POSIX_CPUTIME;
 	case _SC_THREAD_CPUTIME:

Index: src/sys/kern/uipc_sem.c
diff -u src/sys/kern/uipc_sem.c:1.55 src/sys/kern/uipc_sem.c:1.55.4.1
--- src/sys/kern/uipc_sem.c:1.55	Fri Mar  1 03:03:19 2019
+++ src/sys/kern/uipc_sem.c	Wed Dec 18 20:20:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_sem.c,v 1.55 2019/03/01 03:03:19 christos Exp $	*/
+/*	$NetBSD: uipc_sem.c,v 1.55.4.1 2019/12/18 20:20:17 martin Exp $	*/
 
 /*-
  * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.55 2019/03/01 03:03:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.55.4.1 2019/12/18 20:20:17 martin Exp $");
 
 #include 
 #include 
@@ -92,7 +92,6 @@ MODULE(MODULE_CLASS_MISC, ksem, NULL);
 
 #define	SEM_MAX_NAMELEN		NAME_MAX
 
-#define	SEM_NSEMS_MAX		256
 #define	KS_UNLINKED		0x01
 
 static kmutex_t		ksem_lock	__cacheline_aligned;
@@ -468,14 +467,7 @@ ksem_create(lwp_t *l, const char *name, 
 		len = 0;
 	}
 
-	u_int cnt;
-	uid_t uid = kauth_cred_getuid(l->l_cred);
-	if ((cnt = chgsemcnt(uid, 1)) > SEM_NSEMS_MAX) {
-		chgsemcnt(uid, -1);
-		if (kname != NULL)
-			kmem_free(kname, len);
-		return ENOSPC;
-	}
+	chgsemcnt(kauth_cred_getuid(l->l_cred), 1);
 
 	ks = kmem_zalloc(sizeof(ksem_t), KM_SLEEP);
 	mutex_init(>ks_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: [netbsd-9] src/lib/libpthread

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:18:20 UTC 2019

Modified Files:
src/lib/libpthread [netbsd-9]: pthread_int.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #571):

lib/libpthread/pthread_int.h: revision 1.97

Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.2.1 src/lib/libpthread/pthread_int.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/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.95 src/lib/libpthread/pthread_int.h:1.95.2.1
--- src/lib/libpthread/pthread_int.h:1.95	Tue Mar  5 01:35:52 2019
+++ src/lib/libpthread/pthread_int.h	Wed Dec 18 20:18:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.95 2019/03/05 01:35:52 christos Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.95.2.1 2019/12/18 20:18:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
 #define	PTHREAD_HIDE	/* nothing */
 #endif
 
-#define	PTHREAD__UNPARK_MAX	32
+#define	PTHREAD__UNPARK_MAX	128
 
 /*
  * The size of this structure needs to be no larger than struct



CVS commit: [netbsd-9] src/lib/libpthread

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:18:20 UTC 2019

Modified Files:
src/lib/libpthread [netbsd-9]: pthread_int.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #571):

lib/libpthread/pthread_int.h: revision 1.97

Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.2.1 src/lib/libpthread/pthread_int.h

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



CVS commit: [netbsd-9] src/sys

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:04:34 UTC 2019

Modified Files:
src/sys/arch/amigappc/include [netbsd-9]: intr.h
src/sys/arch/arm/at91 [netbsd-9]: at91dbgu.c
src/sys/arch/emips/ebus [netbsd-9]: ace_ebus.c flash_ebus.c
src/sys/arch/emips/emips [netbsd-9]: bus_space.c
src/sys/arch/emips/include [netbsd-9]: loadfile_machdep.h
src/sys/arch/emips/stand/common [netbsd-9]: bootinfo.c bootinfo.h
bootxx.c prom_iface.c
src/sys/arch/hpc/stand/hpcboot/arm [netbsd-9]: arm_pxa2x0_asm.asm
arm_sa1100_asm.asm
src/sys/arch/hpcarm/include [netbsd-9]: kloader.h
src/sys/arch/ia64/ia64 [netbsd-9]: bus_space.c
src/sys/arch/ia64/include [netbsd-9]: bus.h
src/sys/arch/mips/cavium [netbsd-9]: octeon_dma.c
src/sys/arch/x68k/dev [netbsd-9]: intiovar.h mfp.c
src/sys/arch/zaurus/include [netbsd-9]: kloader.h
src/sys/compat/common [netbsd-9]: kern_time_30.c sysv_msg_50.c
sysv_sem_50.c sysv_shm_50.c uipc_syscalls_50.c vfs_syscalls_50.c
src/sys/compat/net [netbsd-9]: if.h
src/sys/compat/netbsd32 [netbsd-9]: netbsd32_compat_16.c
netbsd32_compat_50.c netbsd32_compat_50_sysv.c netbsd32_compat_60.c
src/sys/compat/netinet6 [netbsd-9]: in6_var.h
src/sys/compat/ultrix [netbsd-9]: ultrix_exec.h
src/sys/dev/ic [netbsd-9]: adv.c adv.h advlib.c advlib.h advmcode.c
advmcode.h adw.c adw.h adwlib.c adwlib.h adwmcode.c adwmcode.h
src/sys/dev/raidframe [netbsd-9]: rf_compat50.c rf_compat50.h
src/sys/dev/usb [netbsd-9]: uberry.c uipad.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #570):

sys/compat/netbsd32/netbsd32_compat_50_sysv.c: revision 1.3
sys/dev/raidframe/rf_compat50.h: revision 1.6
sys/arch/emips/emips/bus_space.c: revision 1.3
sys/compat/net/if.h: revision 1.5
sys/arch/emips/stand/common/bootinfo.c: revision 1.2
sys/compat/common/sysv_msg_50.c: revision 1.5
sys/compat/common/kern_time_30.c: revision 1.8
sys/arch/emips/stand/common/bootinfo.h: revision 1.2
sys/arch/ia64/include/bus.h: revision 1.4
sys/arch/ia64/ia64/bus_space.c: revision 1.2
sys/compat/common/sysv_shm_50.c: revision 1.5
sys/dev/ic/adw.h: revision 1.15
sys/compat/common/uipc_syscalls_50.c: revision 1.10
sys/arch/emips/ebus/flash_ebus.c: revision 1.22
sys/dev/ic/adv.h: revision 1.15
sys/dev/ic/adwmcode.c: revision 1.18
sys/dev/ic/advlib.c: revision 1.29
sys/arch/hpcarm/include/kloader.h: revision 1.3
sys/dev/usb/uberry.c: revision 1.16
sys/compat/common/sysv_sem_50.c: revision 1.5
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.43
sys/dev/ic/advlib.h: revision 1.21
sys/dev/ic/adv.c: revision 1.50
sys/compat/netinet6/in6_var.h: revision 1.5
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm: revision 1.2
sys/arch/emips/include/loadfile_machdep.h: revision 1.3
sys/arch/emips/stand/common/prom_iface.c: revision 1.7
sys/dev/ic/adw.c: revision 1.56
sys/dev/ic/adwmcode.h: revision 1.12
sys/dev/ic/advmcode.c: revision 1.10
sys/arch/emips/ebus/ace_ebus.c: revision 1.22
sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.5
sys/dev/raidframe/rf_compat50.c: revision 1.13
sys/arch/x68k/dev/intiovar.h: revision 1.15
sys/dev/usb/uipad.c: revision 1.8
sys/arch/zaurus/include/kloader.h: revision 1.3
sys/arch/emips/stand/common/bootxx.c: revision 1.2
sys/dev/ic/adwlib.h: revision 1.23
sys/dev/ic/adwlib.c: revision 1.44
sys/compat/netbsd32/netbsd32_compat_16.c: revision 1.3
sys/arch/amigappc/include/intr.h: revision 1.27
sys/arch/x68k/dev/mfp.c: revision 1.27
sys/arch/arm/at91/at91dbgu.c: revision 1.17
sys/dev/ic/advmcode.h: revision 1.7
sys/compat/ultrix/ultrix_exec.h: revision 1.7
sys/compat/common/vfs_syscalls_50.c: revision 1.24
sys/arch/mips/cavium/octeon_dma.c: revision 1.3
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm: revision 1.2

Remove clause 3 and 4 from TNF licenses.
Ok'ed by martin@ in PR/54760.

Remove clause 3 and 4 leftovers from TNF licenses in more sources.
Confirmed by martin@ in PR/54760.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.58.1 src/sys/arch/amigappc/include/intr.h
cvs rdiff -u -r1.15 -r1.15.22.1 src/sys/arch/arm/at91/at91dbgu.c
cvs rdiff -u -r1.20.20.1 -r1.20.20.2 src/sys/arch/emips/ebus/ace_ebus.c
cvs rdiff -u -r1.20.8.1 -r1.20.8.2 src/sys/arch/emips/ebus/flash_ebus.c
cvs rdiff -u -r1.2 -r1.2.52.1 src/sys/arch/emips/emips/bus_space.c
cvs rdiff -u -r1.2 -r1.2.32.1 src/sys/arch/emips/include/loadfile_machdep.h
cvs rdiff -u -r1.1 -r1.1.66.1 

CVS commit: [netbsd-9] src/sys

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 20:04:34 UTC 2019

Modified Files:
src/sys/arch/amigappc/include [netbsd-9]: intr.h
src/sys/arch/arm/at91 [netbsd-9]: at91dbgu.c
src/sys/arch/emips/ebus [netbsd-9]: ace_ebus.c flash_ebus.c
src/sys/arch/emips/emips [netbsd-9]: bus_space.c
src/sys/arch/emips/include [netbsd-9]: loadfile_machdep.h
src/sys/arch/emips/stand/common [netbsd-9]: bootinfo.c bootinfo.h
bootxx.c prom_iface.c
src/sys/arch/hpc/stand/hpcboot/arm [netbsd-9]: arm_pxa2x0_asm.asm
arm_sa1100_asm.asm
src/sys/arch/hpcarm/include [netbsd-9]: kloader.h
src/sys/arch/ia64/ia64 [netbsd-9]: bus_space.c
src/sys/arch/ia64/include [netbsd-9]: bus.h
src/sys/arch/mips/cavium [netbsd-9]: octeon_dma.c
src/sys/arch/x68k/dev [netbsd-9]: intiovar.h mfp.c
src/sys/arch/zaurus/include [netbsd-9]: kloader.h
src/sys/compat/common [netbsd-9]: kern_time_30.c sysv_msg_50.c
sysv_sem_50.c sysv_shm_50.c uipc_syscalls_50.c vfs_syscalls_50.c
src/sys/compat/net [netbsd-9]: if.h
src/sys/compat/netbsd32 [netbsd-9]: netbsd32_compat_16.c
netbsd32_compat_50.c netbsd32_compat_50_sysv.c netbsd32_compat_60.c
src/sys/compat/netinet6 [netbsd-9]: in6_var.h
src/sys/compat/ultrix [netbsd-9]: ultrix_exec.h
src/sys/dev/ic [netbsd-9]: adv.c adv.h advlib.c advlib.h advmcode.c
advmcode.h adw.c adw.h adwlib.c adwlib.h adwmcode.c adwmcode.h
src/sys/dev/raidframe [netbsd-9]: rf_compat50.c rf_compat50.h
src/sys/dev/usb [netbsd-9]: uberry.c uipad.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #570):

sys/compat/netbsd32/netbsd32_compat_50_sysv.c: revision 1.3
sys/dev/raidframe/rf_compat50.h: revision 1.6
sys/arch/emips/emips/bus_space.c: revision 1.3
sys/compat/net/if.h: revision 1.5
sys/arch/emips/stand/common/bootinfo.c: revision 1.2
sys/compat/common/sysv_msg_50.c: revision 1.5
sys/compat/common/kern_time_30.c: revision 1.8
sys/arch/emips/stand/common/bootinfo.h: revision 1.2
sys/arch/ia64/include/bus.h: revision 1.4
sys/arch/ia64/ia64/bus_space.c: revision 1.2
sys/compat/common/sysv_shm_50.c: revision 1.5
sys/dev/ic/adw.h: revision 1.15
sys/compat/common/uipc_syscalls_50.c: revision 1.10
sys/arch/emips/ebus/flash_ebus.c: revision 1.22
sys/dev/ic/adv.h: revision 1.15
sys/dev/ic/adwmcode.c: revision 1.18
sys/dev/ic/advlib.c: revision 1.29
sys/arch/hpcarm/include/kloader.h: revision 1.3
sys/dev/usb/uberry.c: revision 1.16
sys/compat/common/sysv_sem_50.c: revision 1.5
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.43
sys/dev/ic/advlib.h: revision 1.21
sys/dev/ic/adv.c: revision 1.50
sys/compat/netinet6/in6_var.h: revision 1.5
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm: revision 1.2
sys/arch/emips/include/loadfile_machdep.h: revision 1.3
sys/arch/emips/stand/common/prom_iface.c: revision 1.7
sys/dev/ic/adw.c: revision 1.56
sys/dev/ic/adwmcode.h: revision 1.12
sys/dev/ic/advmcode.c: revision 1.10
sys/arch/emips/ebus/ace_ebus.c: revision 1.22
sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.5
sys/dev/raidframe/rf_compat50.c: revision 1.13
sys/arch/x68k/dev/intiovar.h: revision 1.15
sys/dev/usb/uipad.c: revision 1.8
sys/arch/zaurus/include/kloader.h: revision 1.3
sys/arch/emips/stand/common/bootxx.c: revision 1.2
sys/dev/ic/adwlib.h: revision 1.23
sys/dev/ic/adwlib.c: revision 1.44
sys/compat/netbsd32/netbsd32_compat_16.c: revision 1.3
sys/arch/amigappc/include/intr.h: revision 1.27
sys/arch/x68k/dev/mfp.c: revision 1.27
sys/arch/arm/at91/at91dbgu.c: revision 1.17
sys/dev/ic/advmcode.h: revision 1.7
sys/compat/ultrix/ultrix_exec.h: revision 1.7
sys/compat/common/vfs_syscalls_50.c: revision 1.24
sys/arch/mips/cavium/octeon_dma.c: revision 1.3
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm: revision 1.2

Remove clause 3 and 4 from TNF licenses.
Ok'ed by martin@ in PR/54760.

Remove clause 3 and 4 leftovers from TNF licenses in more sources.
Confirmed by martin@ in PR/54760.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.58.1 src/sys/arch/amigappc/include/intr.h
cvs rdiff -u -r1.15 -r1.15.22.1 src/sys/arch/arm/at91/at91dbgu.c
cvs rdiff -u -r1.20.20.1 -r1.20.20.2 src/sys/arch/emips/ebus/ace_ebus.c
cvs rdiff -u -r1.20.8.1 -r1.20.8.2 src/sys/arch/emips/ebus/flash_ebus.c
cvs rdiff -u -r1.2 -r1.2.52.1 src/sys/arch/emips/emips/bus_space.c
cvs rdiff -u -r1.2 -r1.2.32.1 src/sys/arch/emips/include/loadfile_machdep.h
cvs rdiff -u -r1.1 -r1.1.66.1 

CVS commit: src/sys/kern

2019-12-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Dec 18 19:40:34 UTC 2019

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

Log Message:
Passify rump build.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/kern_cpu.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/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.85 src/sys/kern/kern_cpu.c:1.86
--- src/sys/kern/kern_cpu.c:1.85	Tue Dec 17 00:59:14 2019
+++ src/sys/kern/kern_cpu.c	Wed Dec 18 19:40:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.85 2019/12/17 00:59:14 ad Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.86 2019/12/18 19:40:34 ad Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.85 2019/12/17 00:59:14 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.86 2019/12/18 19:40:34 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_cpu_ucode.h"
@@ -91,13 +91,13 @@ __KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v
  * verify that the claim is true. This will prevent them from getting out
  * of sync.
  */
+#ifndef _RUMPKERNEL /* XXX temporary */
 #ifdef __HAVE_CPU_DATA_FIRST
 CTASSERT(offsetof(struct cpu_info, ci_data) == 0);
 #else
 CTASSERT(offsetof(struct cpu_info, ci_data) != 0);
 #endif
 
-#ifndef _RUMPKERNEL /* XXX temporary */
 static void	cpu_xc_online(struct cpu_info *, void *);
 static void	cpu_xc_offline(struct cpu_info *, void *);
 



CVS commit: src/sys/kern

2019-12-18 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Dec 18 19:40:34 UTC 2019

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

Log Message:
Passify rump build.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/kern_cpu.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-input-keyboard/dist/src

2019-12-18 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Dec 18 19:37:40 UTC 2019

Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_KbdMap.c

Log Message:
add some missing translations for japanese keyboards
from Yasushi Oshima via PR54784


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.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-input-keyboard/dist/src

2019-12-18 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Wed Dec 18 19:37:40 UTC 2019

Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_KbdMap.c

Log Message:
add some missing translations for japanese keyboards
from Yasushi Oshima via PR54784


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.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-input-keyboard/dist/src/bsd_KbdMap.c
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.13 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.14
--- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.13	Fri Aug 25 21:27:34 2017
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c	Wed Dec 18 19:37:40 2019
@@ -581,20 +581,20 @@ static CARD8 wsXtMap[] = {
 	/* 109 */ KEY_NOTUSED,
 	/* 110 */ KEY_NOTUSED,
 	/* 111 */ KEY_NOTUSED,
-	/* 112 */ KEY_NOTUSED,
+	/* 112 */ KEY_HKTG,
 	/* 113 */ KEY_NOTUSED,
 	/* 114 */ KEY_NOTUSED,
-	/* 115 */ KEY_NOTUSED,
+	/* 115 */ KEY_BSlash2,
 	/* 116 */ KEY_NOTUSED,
 	/* 117 */ KEY_NOTUSED,
 	/* 118 */ KEY_NOTUSED,
 	/* 119 */ KEY_NOTUSED,
 	/* 120 */ KEY_NOTUSED,
-	/* 121 */ KEY_NOTUSED,
+	/* 121 */ KEY_XFER,
 	/* 122 */ KEY_NOTUSED,
-	/* 123 */ KEY_NOTUSED,
+	/* 123 */ KEY_NFER,
 	/* 124 */ KEY_NOTUSED,
-	/* 125 */ KEY_NOTUSED,
+	/* 125 */ KEY_Yen,
 	/* 126 */ KEY_NOTUSED,
 	/* 127 */ KEY_Pause,
 	/* 128 */ KEY_NOTUSED,



Re: CVS commit: src

2019-12-18 Thread Mateusz Guzik
On 12/18/19, m...@netbsd.org  wrote:
> On Wed, Dec 18, 2019 at 06:47:44AM -0500, Christos Zoulas wrote:
>> While there was no discussion, it is more efficient to have the
>> discussion
>> whether we should put it back or not (instead of putting it back first
>> and
>> having the discussion). Of course we should fix the build first since it
>> seems
>> to be broken.
>>
>> The reality of the situation is that the syscall race has been there for
>> months
>> and nobody has taken responsibility to fix it. The code is in version
>> control,
>> so someone should fix it first and then we can discuss if we should bring
>> it
>> back.
>
>
> I'd like to also publicly object to the removal of the code from bmake
> (I responded privately at first).
> FreeBSD has filemon, and I suspect it has more acceptance there, but
> maxv stated he will propose it.
> Sharing the code with FreeBSD is more than worth the 200 unused-by-us
> lines of code, and it's already optional.
> No rush though. Let's wait to see what they say.
>
> I have no objections to removing the kernel module.
>

filemon in FreeBSD was significantly reworked to make it stable and
reasonably performant, but I would not necessarily refer to it as
"accepted". Cursory look suggests many of the bugs which got fixed
there still linger in NetBSD's variant.

I don't know if the functionality provided for bmake is the right
approach to whatever it is used for. Assuming it makes sense, a
significantly better pick would be ktrace. Currently it exports more
data than bmake requires (and in a different format), but that should
be easily fixable. The only time consuming part would be makign ktrace
itself scale to multiple CPUs. I think working on that is a much better
use of time than beating filemon to production shape. In fact design
fixes would make it more ktrace-y (for instance actual per-process state
which is strongly tied to their liveness, as opposed to just storing a
pid somewhere and looking stuff up).

Note the work at hand can be done in a way where it is almost a drop-in
replacement. FreeBSD should follow suit.

-- 
Mateusz Guzik 


CVS commit: src/sys/arch/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Dec 18 18:40:19 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: rk3399_cru.c

Log Message:
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.

The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.

gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.

Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability.  This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/rockchip/rk3399_cru.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/arm/rockchip

2019-12-18 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Dec 18 18:40:19 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip: rk3399_cru.c

Log Message:
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.

The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.

gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.

Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability.  This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/rockchip/rk3399_cru.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/arm/rockchip/rk3399_cru.c
diff -u src/sys/arch/arm/rockchip/rk3399_cru.c:1.17 src/sys/arch/arm/rockchip/rk3399_cru.c:1.18
--- src/sys/arch/arm/rockchip/rk3399_cru.c:1.17	Tue Dec 17 17:51:12 2019
+++ src/sys/arch/arm/rockchip/rk3399_cru.c	Wed Dec 18 18:40:19 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_cru.c,v 1.17 2019/12/17 17:51:12 jakllsch Exp $ */
+/* $NetBSD: rk3399_cru.c,v 1.18 2019/12/18 18:40:19 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.17 2019/12/17 17:51:12 jakllsch Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.18 2019/12/18 18:40:19 jakllsch Exp $");
 
 #include 
 #include 
@@ -1030,6 +1030,10 @@ static const struct rk3399_init_param {
 	{ .clk = "clk_i2s0_mux",	.parent = "clk_i2s0_frac" },
 	{ .clk = "clk_i2s1_mux",	.parent = "clk_i2s1_frac" },
 	{ .clk = "clk_i2s2_mux",	.parent = "clk_i2s2_frac" },
+	{ .clk = "dclk_vop0_div",	.parent = "gpll" },
+	{ .clk = "dclk_vop1_div",	.parent = "gpll" },
+	{ .clk = "dclk_vop0",		.parent = "dclk_vop0_frac" },
+	{ .clk = "dclk_vop1",		.parent = "dclk_vop1_frac" },
 };
 
 static void



Re: CVS commit: src

2019-12-18 Thread maya
On Wed, Dec 18, 2019 at 06:47:44AM -0500, Christos Zoulas wrote:
> While there was no discussion, it is more efficient to have the discussion
> whether we should put it back or not (instead of putting it back first and
> having the discussion). Of course we should fix the build first since it seems
> to be broken.
> 
> The reality of the situation is that the syscall race has been there for 
> months
> and nobody has taken responsibility to fix it. The code is in version control,
> so someone should fix it first and then we can discuss if we should bring it
> back.


I'd like to also publicly object to the removal of the code from bmake
(I responded privately at first).
FreeBSD has filemon, and I suspect it has more acceptance there, but
maxv stated he will propose it.
Sharing the code with FreeBSD is more than worth the 200 unused-by-us
lines of code, and it's already optional.
No rush though. Let's wait to see what they say.

I have no objections to removing the kernel module.


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-18 Thread Christos Zoulas
In article <20191218152113.ga7...@bec.de>,
Joerg Sonnenberger   wrote:
>On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Wed Dec 18 02:16:04 UTC 2019
>> 
>> Modified Files:
>>  src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
>> 
>> Log Message:
>> Also disable ssp and fortify by default.
>
>Why?

Size reduction on install media. There are flags to turn it on.

christos



Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-18 Thread Joerg Sonnenberger
On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Dec 18 02:16:04 UTC 2019
> 
> Modified Files:
>   src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
> 
> Log Message:
> Also disable ssp and fortify by default.

Why?

Joerg


CVS commit: src/lib/libpthread

2019-12-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec 18 15:11:57 UTC 2019

Modified Files:
src/lib/libpthread: pthread_int.h

Log Message:
Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/lib/libpthread/pthread_int.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/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.96 src/lib/libpthread/pthread_int.h:1.97
--- src/lib/libpthread/pthread_int.h:1.96	Mon Dec 16 20:45:40 2019
+++ src/lib/libpthread/pthread_int.h	Wed Dec 18 15:11:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.96 2019/12/16 20:45:40 uwe Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.97 2019/12/18 15:11:57 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
 #define	PTHREAD_HIDE	/* nothing */
 #endif
 
-#define	PTHREAD__UNPARK_MAX	32
+#define	PTHREAD__UNPARK_MAX	128
 
 /*
  * The size of this structure needs to be no larger than struct



CVS commit: src/lib/libpthread

2019-12-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec 18 15:11:57 UTC 2019

Modified Files:
src/lib/libpthread: pthread_int.h

Log Message:
Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/lib/libpthread/pthread_int.h

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



CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2019-12-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 18 14:51:24 UTC 2019

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h

Log Message:
Fix compiler-rt build after removal of filemon

Cherry-pick [patched locally]:
[compiler-rt] Sync NetBSD ioctl definitions with 9.99.26

Document the minimal version supported to 9.0.

https://github.com/llvm/llvm-project/commit/e14ff22694c28b5e731502bfc30192b3208d4d8d


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h

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



CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2019-12-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 18 14:51:24 UTC 2019

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h

Log Message:
Fix compiler-rt build after removal of filemon

Cherry-pick [patched locally]:
[compiler-rt] Sync NetBSD ioctl definitions with 9.99.26

Document the minimal version supported to 9.0.

https://github.com/llvm/llvm-project/commit/e14ff22694c28b5e731502bfc30192b3208d4d8d


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.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/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.2 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.3
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.2	Wed Aug 14 00:51:48 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc	Wed Dec 18 14:51:24 2019
@@ -25,7 +25,7 @@ struct ioctl_desc {
   const char *name;
 };
 
-const unsigned ioctl_table_max = 1236;
+const unsigned ioctl_table_max = 1238;
 static ioctl_desc ioctl_table[ioctl_table_max];
 static unsigned ioctl_table_size = 0;
 
@@ -167,9 +167,6 @@ static void ioctl_table_fill() {
   _(FE_ENABLE_HIGH_LNB_VOLTAGE, READ, sizeof(int));
   _(FE_SET_FRONTEND_TUNE_MODE, READ, sizeof(unsigned int));
   _(FE_DISHNETWORK_SEND_LEGACY_CMD, READ, sizeof(unsigned long));
-  /* Entries from file: dev/filemon/filemon.h */
-  _(FILEMON_SET_FD, READWRITE, sizeof(int));
-  _(FILEMON_SET_PID, READWRITE, sizeof(int));
   /* Entries from file: dev/hdaudio/hdaudioio.h */
   _(HDAUDIO_FGRP_INFO, READWRITE, struct_plistref_sz);
   _(HDAUDIO_FGRP_GETCONFIG, READWRITE, struct_plistref_sz);
@@ -654,6 +651,7 @@ static void ioctl_table_fill() {
   _(NVMM_IOC_MACHINE_CONFIGURE, READ, struct_nvmm_ioc_machine_configure_sz);
   _(NVMM_IOC_VCPU_CREATE, READ, struct_nvmm_ioc_vcpu_create_sz);
   _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz);
+  _(NVMM_IOC_VCPU_CONFIGURE, READ, struct_nvmm_ioc_vcpu_configure_sz);
   _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz);
   _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz);
   _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz);
@@ -736,6 +734,7 @@ static void ioctl_table_fill() {
   _(IOC_NPF_SAVE, WRITE, struct_nvlist_ref_sz);
   _(IOC_NPF_RULE, READWRITE, struct_nvlist_ref_sz);
   _(IOC_NPF_CONN_LOOKUP, READWRITE, struct_nvlist_ref_sz);
+  _(IOC_NPF_TABLE_REPLACE, READWRITE, struct_nvlist_ref_sz);
   /* Entries from file: net/if_pppoe.h */
   _(PPPOESETPARMS, READ, struct_pppoediscparms_sz);
   _(PPPOEGETPARMS, READWRITE, struct_pppoediscparms_sz);
@@ -1404,8 +1403,11 @@ static void ioctl_table_fill() {
   _(SNDCTL_DSP_SETRECVOL, READ, sizeof(unsigned int));
   _(SNDCTL_DSP_SKIP, NONE, 0);
   _(SNDCTL_DSP_SILENCE, NONE, 0);
+  /* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */
+  _(FILEMON_SET_FD, READWRITE, sizeof(int));
+  _(FILEMON_SET_PID, READWRITE, sizeof(int));
 #undef _
-}
+} // NOLINT
 
 static bool ioctl_initialized = false;
 
Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.2 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.2	Wed Aug 14 00:51:48 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Wed Dec 18 14:51:24 2019
@@ -110,7 +110,12 @@
 #include 
 #include 
 #include 
+#if !__NetBSD_Prereq__(9,9,26)
 #include 
+#else
+#define FILEMON_SET_FD  _IOWR('S', 1, int)
+#define FILEMON_SET_PID _IOWR('S', 2, pid_t)
+#endif
 #include 
 #include 
 #include 
@@ -698,6 +703,7 @@ unsigned struct_nvmm_ioc_machine_configu
 sizeof(nvmm_ioc_machine_configure);
 unsigned struct_nvmm_ioc_vcpu_create_sz = sizeof(nvmm_ioc_vcpu_create);
 unsigned struct_nvmm_ioc_vcpu_destroy_sz = sizeof(nvmm_ioc_vcpu_destroy);
+unsigned struct_nvmm_ioc_vcpu_configure_sz = sizeof(nvmm_ioc_vcpu_configure);
 

CVS commit: src/etc/mtree

2019-12-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 18 14:44:16 UTC 2019

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Remove obsolete mtree entry of usr/share/examples/supfiles


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.206 src/etc/mtree/NetBSD.dist.base:1.207
--- src/etc/mtree/NetBSD.dist.base:1.206	Wed Dec 18 07:37:17 2019
+++ src/etc/mtree/NetBSD.dist.base	Wed Dec 18 14:44:16 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.206 2019/12/18 07:37:17 maxv Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.207 2019/12/18 14:44:16 kamil Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -411,7 +411,6 @@
 ./usr/share/examples/rtadvd
 ./usr/share/examples/slip
 ./usr/share/examples/smbfs
-./usr/share/examples/supfiles
 ./usr/share/examples/syslogd
 ./usr/share/examples/tmux
 ./usr/share/examples/wpa_supplicant



CVS commit: src/etc/mtree

2019-12-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 18 14:44:16 UTC 2019

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Remove obsolete mtree entry of usr/share/examples/supfiles


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/etc/mtree/NetBSD.dist.base

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



CVS commit: src/sys/dev/dm

2019-12-18 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Dec 18 14:31:35 UTC 2019

Modified Files:
src/sys/dev/dm: dm_target_error.c dm_target_linear.c dm_target_stripe.c
dm_target_zero.c

Log Message:
dm: Test # of args in target's ->init()

The # of args is part of target's spec.
Both Linux kernel and DragonFlyBSD test argc on ctr/init.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/dm/dm_target_error.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/dm/dm_target_stripe.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/dm/dm_target_zero.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/dm

2019-12-18 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Dec 18 14:31:35 UTC 2019

Modified Files:
src/sys/dev/dm: dm_target_error.c dm_target_linear.c dm_target_stripe.c
dm_target_zero.c

Log Message:
dm: Test # of args in target's ->init()

The # of args is part of target's spec.
Both Linux kernel and DragonFlyBSD test argc on ctr/init.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/dm/dm_target_error.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/dm/dm_target_stripe.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/dm/dm_target_zero.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/dm/dm_target_error.c
diff -u src/sys/dev/dm/dm_target_error.c:1.25 src/sys/dev/dm/dm_target_error.c:1.26
--- src/sys/dev/dm/dm_target_error.c:1.25	Mon Dec 16 14:26:23 2019
+++ src/sys/dev/dm/dm_target_error.c	Wed Dec 18 14:31:35 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_error.c,v 1.25 2019/12/16 14:26:23 tkusumi Exp $  */
+/*$NetBSD: dm_target_error.c,v 1.26 2019/12/18 14:31:35 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.25 2019/12/16 14:26:23 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.26 2019/12/18 14:31:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper error target.
@@ -101,6 +101,11 @@ int
 dm_target_error_init(dm_table_entry_t *table_en, int argc, char **argv)
 {
 
+	if (argc != 0) {
+		printf("Error target takes 0 args, %d given\n", argc);
+		return EINVAL;
+	}
+
 	printf("Error target init function called!!\n");
 
 	table_en->target_config = NULL;

Index: src/sys/dev/dm/dm_target_linear.c
diff -u src/sys/dev/dm/dm_target_linear.c:1.32 src/sys/dev/dm/dm_target_linear.c:1.33
--- src/sys/dev/dm/dm_target_linear.c:1.32	Sun Dec 15 16:14:27 2019
+++ src/sys/dev/dm/dm_target_linear.c	Wed Dec 18 14:31:35 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_linear.c,v 1.32 2019/12/15 16:14:27 tkusumi Exp $  */
+/*$NetBSD: dm_target_linear.c,v 1.33 2019/12/18 14:31:35 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.32 2019/12/15 16:14:27 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.33 2019/12/18 14:31:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper dklinear target.
@@ -59,12 +59,10 @@ dm_target_linear_init(dm_table_entry_t *
 	dm_target_linear_config_t *tlc;
 	dm_pdev_t *dmp;
 
-	/*
 	if (argc != 2) {
-		printf("Linear target takes 2 args\n");
+		printf("Linear target takes 2 args, %d given\n", argc);
 		return EINVAL;
 	}
-	*/
 
 	aprint_debug("Linear target init function called %s--%s!!\n",
 	argv[0], argv[1]);

Index: src/sys/dev/dm/dm_target_stripe.c
diff -u src/sys/dev/dm/dm_target_stripe.c:1.39 src/sys/dev/dm/dm_target_stripe.c:1.40
--- src/sys/dev/dm/dm_target_stripe.c:1.39	Sun Dec 15 16:14:27 2019
+++ src/sys/dev/dm/dm_target_stripe.c	Wed Dec 18 14:31:35 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_stripe.c,v 1.39 2019/12/15 16:14:27 tkusumi Exp $*/
+/*$NetBSD: dm_target_stripe.c,v 1.40 2019/12/18 14:31:35 tkusumi Exp $*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_stripe.c,v 1.39 2019/12/15 16:14:27 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_stripe.c,v 1.40 2019/12/18 14:31:35 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper stripe target.
@@ -139,12 +139,10 @@ dm_target_stripe_init(dm_table_entry_t *
 	dm_target_stripe_config_t *tsc;
 	int strpc, strpi;
 
-	/*
-	if (argc < 4) {
-		printf("Stripe target takes 4 or more args\n");
+	if (argc < 2) {
+		printf("Stripe target takes at least 2 args, %d given\n", argc);
 		return EINVAL;
 	}
-	*/
 
 	printf("Stripe target init function called!!\n");
 	printf("Stripe target chunk size %s number of stripes %s\n",

Index: src/sys/dev/dm/dm_target_zero.c
diff -u src/sys/dev/dm/dm_target_zero.c:1.27 src/sys/dev/dm/dm_target_zero.c:1.28
--- src/sys/dev/dm/dm_target_zero.c:1.27	Mon Dec 16 14:26:23 2019
+++ src/sys/dev/dm/dm_target_zero.c	Wed Dec 18 14:31:35 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_zero.c,v 1.27 2019/12/16 14:26:23 tkusumi Exp $  */
+/*$NetBSD: dm_target_zero.c,v 1.28 2019/12/18 14:31:35 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_zero.c,v 1.27 2019/12/16 14:26:23 tkusumi Exp $");
+__KERNEL_RCSID(0, 

CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2019-12-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 18 13:25:58 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: sumod.h

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/radeon/sumod.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/external/bsd/drm2/dist/drm/radeon/sumod.h
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/sumod.h:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/sumod.h:1.3
--- src/sys/external/bsd/drm2/dist/drm/radeon/sumod.h:1.2	Mon Aug 27 04:58:36 2018
+++ src/sys/external/bsd/drm2/dist/drm/radeon/sumod.h	Wed Dec 18 13:25:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sumod.h,v 1.2 2018/08/27 04:58:36 riastradh Exp $	*/
+/*	$NetBSD: sumod.h,v 1.3 2019/12/18 13:25:58 msaitoh Exp $	*/
 
 /*
  * Copyright 2012 Advanced Micro Devices, Inc.
@@ -197,7 +197,7 @@
 #   define SCLK_FSTATE_3_DIV(x) ((x) << 24)
 #   define SCLK_FSTATE_3_DIV_MASK   (0x7f << 24)
 #   define SCLK_FSTATE_3_DIV_SHIFT  24
-#   define SCLK_FSTATE_3_VLD(1 << 31)
+#   define SCLK_FSTATE_3_VLD(1U << 31)
 #define CG_SCLK_DPM_CTRL_2  0x688
 #define CG_GCOOR0x68c
 #   define PHC(x)   ((x) << 0)
@@ -243,7 +243,7 @@
 #   define DPM_SCLK_ENABLE  (1 << 18)
 #   define GNB_SLOW_FSTATE_0_MASK   (1 << 23)
 #   define GNB_SLOW_FSTATE_0_SHIFT  23
-#   define FORCE_NB_PSTATE_1(1 << 31)
+#   define FORCE_NB_PSTATE_1(1U << 31)
 
 #define CG_SSP  0x6e8
 #   define SST(x)   ((x) << 0)
@@ -263,7 +263,7 @@
 #   define DC_HDC_MASK  (0x3fff << 14)
 #   define DC_HDC_SHIFT 14
 #   define DC_HU(x) ((x) << 28)
-#   define DC_HU_MASK   (0xf << 28)
+#   define DC_HU_MASK   (0xfU << 28)
 #   define DC_HU_SHIFT  28
 #define CG_SCLK_DPM_CTRL_5  0x720
 #   define SCLK_FSTATE_BOOTUP(x)((x) << 0)
@@ -281,7 +281,7 @@
 #   define CG_R_MASK(0x << 0)
 #   define CG_R_SHIFT   0
 #   define CG_L(x)  ((x) << 16)
-#   define CG_L_MASK(0x << 16)
+#   define CG_L_MASK(0xU << 16)
 #   define CG_L_SHIFT   16
 #define CG_AT_1 0x72c
 #define CG_AT_2 0x730
@@ -351,7 +351,7 @@
 #   define HS(x)((x) << 4)
 #   define HS_MASK  (0xfff << 4)
 #   define HS_SHIFT 4
-#   define ENABLE_DS(1 << 31)
+#   define ENABLE_DS(1U << 31)
 #define DEEP_SLEEP_CNTL20x81c
 #   define LB_UFP_EN(1 << 0)
 #   define INOUT_C(x)   ((x) << 4)
@@ -363,7 +363,7 @@
 #define CG_SCLK_DPM_CTRL_11 0x830
 
 #define HW_REV   	0x5564
-#   define ATI_REV_ID_MASK  (0xf << 28)
+#   define ATI_REV_ID_MASK  (0xfU << 28)
 #   define ATI_REV_ID_SHIFT 28
 /* 0 = A0, 1 = A1, 2 = B0, 3 = C0, etc. */
 



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2019-12-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 18 13:25:58 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: sumod.h

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/radeon/sumod.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

2019-12-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 18 13:25:00 UTC 2019

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

Log Message:
 Cast to uint32_t to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_alc.c

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

Modified files:

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.45 src/sys/dev/pci/if_alc.c:1.46
--- src/sys/dev/pci/if_alc.c:1.45	Sun Dec  1 08:16:49 2019
+++ src/sys/dev/pci/if_alc.c	Wed Dec 18 13:25:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.45 2019/12/01 08:16:49 msaitoh Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.46 2019/12/18 13:25:00 msaitoh Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -2815,8 +2815,8 @@ alc_init_backend(struct ifnet *ifp, bool
 
 	/* Reprogram the station address. */
 	memcpy(eaddr, CLLADDR(ifp->if_sadl), sizeof(eaddr));
-	CSR_WRITE_4(sc, ALC_PAR0,
-	eaddr[2] << 24 | eaddr[3] << 16 | eaddr[4] << 8 | eaddr[5]);
+	CSR_WRITE_4(sc, ALC_PAR0, (uint32_t)eaddr[2] << 24
+	| eaddr[3] << 16 | eaddr[4] << 8 | eaddr[5]);
 	CSR_WRITE_4(sc, ALC_PAR1, eaddr[0] << 8 | eaddr[1]);
 	/*
 	 * Clear WOL status and disable all WOL feature as WOL



CVS commit: src/sys/dev/pci

2019-12-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 18 13:25:00 UTC 2019

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

Log Message:
 Cast to uint32_t to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_alc.c

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



Re: CVS commit: src

2019-12-18 Thread Christos Zoulas
While there was no discussion, it is more efficient to have the discussion
whether we should put it back or not (instead of putting it back first and
having the discussion). Of course we should fix the build first since it seems
to be broken.

The reality of the situation is that the syscall race has been there for months
and nobody has taken responsibility to fix it. The code is in version control,
so someone should fix it first and then we can discuss if we should bring it
back.


christos

> On Dec 18, 2019, at 4:58 AM, John Nemeth  wrote:
> 
> On Dec 18,  7:37am, "Maxime Villard" wrote:
> }
> } This is a multi-part message in MIME format.
> }
> } --_--=_1576654639170820
> } Content-Disposition: inline
> } Content-Transfer-Encoding: 8bit
> } Content-Type: text/plain; charset="US-ASCII"
> }
> } Module Name:src
> } Committed By:   maxv
> } Date:   Wed Dec 18 07:37:19 UTC 2019
> }
> } Modified Files:
> } src/distrib/sets/lists/base: mi
> } src/distrib/sets/lists/comp: mi
> } src/distrib/sets/lists/man: mi
> } src/etc: MAKEDEV.tmpl
> } src/etc/mtree: NetBSD.dist.base
> } src/share/man/man4: Makefile
> } src/sys/arch/amd64/conf: ALL
> } src/sys/arch/i386/conf: ALL
> } src/sys/conf: files majors
> } src/sys/dev: Makefile
> } src/sys/modules: Makefile
> } src/usr.bin/make: Makefile compat.c make.1 meta.c
> } src/usr.sbin/makemandb: nostem.txt
> } Removed Files:
> } src/share/man/man4: filemon.4
> } src/sys/dev/filemon: Makefile filemon.c filemon.h filemon_wrapper.c
> } mknod-sh
> } src/sys/modules/filemon: Makefile filemon.ioconf
> }
> } Log Message:
> } Retire filemon, discussed on tech-kern@.
> 
> What discussion?  In a message dated, Tue Dec 17 13:58:19
> 2019, you stated, "I will prepare the removal of filemon."  That
> doesn't exactly look like a proposal to me.  After that, I don't
> see any discussion about its removal.
> 
>Please revert this commit, make a proper proposal and allow
> for a proper discussion as per the policy for removing features.
> 
> }-- End of excerpt from "Maxime Villard"



signature.asc
Description: Message signed with OpenPGP


CVS commit: src/sys/uvm/pmap

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 11:27:56 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap_pvt.c pmap_segtab.c pmap_synci.c pmap_tlb.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/uvm/pmap/pmap_pvt.c
cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap_segtab.c
cvs rdiff -u -r1.3 -r1.4 src/sys/uvm/pmap/pmap_synci.c
cvs rdiff -u -r1.29 -r1.30 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_pvt.c
diff -u src/sys/uvm/pmap/pmap_pvt.c:1.5 src/sys/uvm/pmap/pmap_pvt.c:1.6
--- src/sys/uvm/pmap/pmap_pvt.c:1.5	Mon Dec  9 04:39:58 2019
+++ src/sys/uvm/pmap/pmap_pvt.c	Wed Dec 18 11:27:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_pvt.c,v 1.5 2019/12/09 04:39:58 riastradh Exp $	*/
+/*	$NetBSD: pmap_pvt.c,v 1.6 2019/12/18 11:27:56 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,11 +30,11 @@
  */
 
 #include 
-__RCSID("$NetBSD: pmap_pvt.c,v 1.5 2019/12/09 04:39:58 riastradh Exp $");
+__RCSID("$NetBSD: pmap_pvt.c,v 1.6 2019/12/18 11:27:56 skrll Exp $");
 
+#include 
 #include 
 #include 
-#include 
 
 #include 
 #include 

Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.12 src/sys/uvm/pmap/pmap_segtab.c:1.13
--- src/sys/uvm/pmap/pmap_segtab.c:1.12	Sat Dec 14 14:46:11 2019
+++ src/sys/uvm/pmap/pmap_segtab.c	Wed Dec 18 11:27:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.12 2019/12/14 14:46:11 ad Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.13 2019/12/18 11:27:56 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.12 2019/12/14 14:46:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.13 2019/12/18 11:27:56 skrll Exp $");
 
 /*
  *	Manages physical address maps.
@@ -100,10 +100,11 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_segtab.
 #include "opt_multiprocessor.h"
 
 #include 
-#include 
-#include 
-#include 
+
 #include 
+#include 
+#include 
+#include 
 
 #include 
 

Index: src/sys/uvm/pmap/pmap_synci.c
diff -u src/sys/uvm/pmap/pmap_synci.c:1.3 src/sys/uvm/pmap/pmap_synci.c:1.4
--- src/sys/uvm/pmap/pmap_synci.c:1.3	Mon Jul 11 16:06:09 2016
+++ src/sys/uvm/pmap/pmap_synci.c	Wed Dec 18 11:27:56 2019
@@ -29,17 +29,18 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_synci.c,v 1.3 2016/07/11 16:06:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_synci.c,v 1.4 2019/12/18 11:27:56 skrll Exp $");
 
 #define __PMAP_PRIVATE
 
 #include "opt_multiprocessor.h"
 
 #include 
-#include 
-#include 
+
 #include 
 #include 
+#include 
+#include 
  
 #include 
 

Index: src/sys/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.29 src/sys/uvm/pmap/pmap_tlb.c:1.30
--- src/sys/uvm/pmap/pmap_tlb.c:1.29	Tue Dec 17 13:25:50 2019
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Dec 18 11:27:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.29 2019/12/17 13:25:50 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.30 2019/12/18 11:27:56 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.29 2019/12/17 13:25:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.30 2019/12/18 11:27:56 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -127,12 +127,13 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v
 #include "opt_multiprocessor.h"
 
 #include 
-#include 
-#include 
-#include 
+
 #include 
-#include 			/* for cold */
 #include 
+#include 			/* for cold */
+#include 
+#include 
+#include 
 
 #include 
 



CVS commit: src/sys/uvm/pmap

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 11:27:56 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap_pvt.c pmap_segtab.c pmap_synci.c pmap_tlb.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/uvm/pmap/pmap_pvt.c
cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/pmap/pmap_segtab.c
cvs rdiff -u -r1.3 -r1.4 src/sys/uvm/pmap/pmap_synci.c
cvs rdiff -u -r1.29 -r1.30 src/sys/uvm/pmap/pmap_tlb.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/aarch64/aarch64

2019-12-18 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Dec 18 11:10:24 UTC 2019

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

Log Message:
atomic_add_16() is not used in pmap.c anymore. no need decl here.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.54 src/sys/arch/aarch64/aarch64/pmap.c:1.55
--- src/sys/arch/aarch64/aarch64/pmap.c:1.54	Wed Dec 18 11:06:42 2019
+++ src/sys/arch/aarch64/aarch64/pmap.c	Wed Dec 18 11:10:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.54 2019/12/18 11:06:42 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.55 2019/12/18 11:10:24 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2019/12/18 11:06:42 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.55 2019/12/18 11:10:24 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -195,9 +195,6 @@ struct pv_entry {
 #define L3INDEXMASK	(L3_SIZE * Ln_ENTRIES - 1)
 #define PDPSWEEP_TRIGGER	512
 
-void atomic_add_16(volatile uint16_t *, int16_t);
-uint16_t atomic_add_16_nv(volatile uint16_t *, int16_t);
-
 static pt_entry_t *_pmap_pte_lookup_l3(struct pmap *, vaddr_t);
 static pt_entry_t *_pmap_pte_lookup_bs(struct pmap *, vaddr_t, vsize_t *);
 static pt_entry_t _pmap_pte_adjust_prot(pt_entry_t, vm_prot_t, vm_prot_t, bool);



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

2019-12-18 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Dec 18 11:10:24 UTC 2019

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

Log Message:
atomic_add_16() is not used in pmap.c anymore. no need decl here.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/aarch64/aarch64/pmap.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/aarch64/aarch64

2019-12-18 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Dec 18 11:06:43 UTC 2019

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

Log Message:
space to tab


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/aarch64/aarch64/pmap.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/aarch64/aarch64

2019-12-18 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Dec 18 11:06:43 UTC 2019

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

Log Message:
space to tab


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.53 src/sys/arch/aarch64/aarch64/pmap.c:1.54
--- src/sys/arch/aarch64/aarch64/pmap.c:1.53	Sat Dec 14 13:48:09 2019
+++ src/sys/arch/aarch64/aarch64/pmap.c	Wed Dec 18 11:06:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.53 2019/12/14 13:48:09 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.54 2019/12/18 11:06:42 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2019/12/14 13:48:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2019/12/18 11:06:42 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -699,8 +699,8 @@ pmap_growkernel(vaddr_t maxkvaddr)
 	UVMHIST_LOG(pmaphist, "maxkvaddr=%llx, pmap_maxkvaddr=%llx",
 	maxkvaddr, pmap_maxkvaddr, 0, 0);
 
-kasan_shadow_map((void *)pmap_maxkvaddr,
-  (size_t)(maxkvaddr - pmap_maxkvaddr));
+	kasan_shadow_map((void *)pmap_maxkvaddr,
+	(size_t)(maxkvaddr - pmap_maxkvaddr));
 
 	pmap_maxkvaddr = maxkvaddr;
 



CVS commit: src/sys/uvm/pmap

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 10:55:50 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
Remove duplicate #includes


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/uvm/pmap/pmap.c

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



CVS commit: src/sys/uvm/pmap

2019-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 10:55:50 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
Remove duplicate #includes


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/uvm/pmap/pmap.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/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.44 src/sys/uvm/pmap/pmap.c:1.45
--- src/sys/uvm/pmap/pmap.c:1.44	Sun Oct 20 08:29:38 2019
+++ src/sys/uvm/pmap/pmap.c	Wed Dec 18 10:55:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.44 2019/10/20 08:29:38 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.45 2019/12/18 10:55:50 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.44 2019/10/20 08:29:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.45 2019/12/18 10:55:50 skrll Exp $");
 
 /*
  *	Manages physical address maps.
@@ -102,14 +102,12 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.4
 #define __PMAP_PRIVATE
 
 #include 
+
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
 #include 
 #include 



CVS commit: src/usr.bin/make

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 10:30:23 UTC 2019

Modified Files:
src/usr.bin/make: meta.c

Log Message:
Fix the build


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/meta.c

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

Modified files:

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.71 src/usr.bin/make/meta.c:1.72
--- src/usr.bin/make/meta.c:1.71	Wed Dec 18 07:37:19 2019
+++ src/usr.bin/make/meta.c	Wed Dec 18 10:30:23 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.71 2019/12/18 07:37:19 maxv Exp $ */
+/*  $NetBSD: meta.c,v 1.72 2019/12/18 10:30:23 martin Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -653,7 +653,7 @@ meta_cmd_finish(void *pbmp)
 if (!pbm)
 	pbm = 
 
-	fprintf(pbm->mfp, "\n");	/* ensure end with newline */
+fprintf(pbm->mfp, "\n");	/* ensure end with newline */
 return error;
 }
 



CVS commit: src/usr.bin/make

2019-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 10:30:23 UTC 2019

Modified Files:
src/usr.bin/make: meta.c

Log Message:
Fix the build


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/meta.c

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



CVS commit: src/external/historical/nawk/bin

2019-12-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 18 10:17:48 UTC 2019

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
Remove macros with no effect.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/bin/awk.1

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

Modified files:

Index: src/external/historical/nawk/bin/awk.1
diff -u src/external/historical/nawk/bin/awk.1:1.6 src/external/historical/nawk/bin/awk.1:1.7
--- src/external/historical/nawk/bin/awk.1:1.6	Tue Dec 17 18:35:57 2019
+++ src/external/historical/nawk/bin/awk.1	Wed Dec 18 10:17:48 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: awk.1,v 1.6 2019/12/17 18:35:57 christos Exp $
+.\"	$NetBSD: awk.1,v 1.7 2019/12/18 10:17:48 wiz Exp $
 .Dd December 19, 2019
 .Dt AWK 1
 .Os
@@ -194,7 +194,7 @@ Logical OR
 .It Ic ?:
 C conditional expression.
 This is used as
-.Ar expr1 Ic \&? Ar expr2 Ic \&: Ar expr3 No .
+.Ar expr1 Ic \&? Ar expr2 Ic \&: Ar expr3 .
 If
 .Ar expr1
 is true, the result value is
@@ -212,7 +212,6 @@ Assignment and Operator-Assignment
 .El
 .Ss Control Statements
 The control statements are as follows:
-.Pp
 .Bl -tag -width indent
 .It Ic if \&( Ar expression Ic \&) Ar statement Bq Ic else Ar statement
 .It Ic while \&( Ar expression Ic \&) Ar statement
@@ -223,7 +222,7 @@ Ar expression Ic \&) Ar statement
 .It Ic break
 .It Ic continue
 .It Ic \&{ Ar [ statement ... ] Ic \&}
-.It Ic Ar expression
+.It Ar expression
 Commonly var = expression
 .It Ic return Bq Ar expression
 .It Ic next
@@ -235,12 +234,11 @@ Delete an array element
 .It Ic delete Va array
 Delete all elements of an array
 .It Ic exit Bq Ar expression
-Exit immediately; status is 
+Exit immediately; status is
 .Ar expression
 .El
 .Ss I/O Statements
 The input/output statements are as follows:
-.Pp
 .Bl -tag -width indent
 .It Fn close expr
 Closes the file or pipe
@@ -286,7 +284,7 @@ statement prints its arguments on the st
 if
 .Ic \*[Gt] file
 or to a pipe if
-.Ic | Ar expr
+.Ic \&| Ar expr
 is present),
 separated by the current output field separator
 .Va OFS ,
@@ -308,7 +306,6 @@ for list of supported formats and their 
 .El
 .Ss Mathematical and Numeric Functions
 AWK has the following mathematical and numerical functions built-in:
-.Pp
 .Bl -tag -width indent
 .It Fn atan2 x y
 Returns the arctangent of
@@ -356,7 +353,6 @@ and returns the previous seed.
 .El
 .Ss String Functions
 AWK has the following string functions built-in:
-.Pp
 .Bl -tag -width indent
 .It Fn gensub r s h [t]
 Search the target string



CVS commit: src/external/historical/nawk/bin

2019-12-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 18 10:17:48 UTC 2019

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
Remove macros with no effect.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/bin/awk.1

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



Re: CVS commit: src

2019-12-18 Thread John Nemeth
On Dec 18,  7:37am, "Maxime Villard" wrote:
}
} This is a multi-part message in MIME format.
} 
} --_--=_1576654639170820
} Content-Disposition: inline
} Content-Transfer-Encoding: 8bit
} Content-Type: text/plain; charset="US-ASCII"
} 
} Module Name:  src
} Committed By: maxv
} Date: Wed Dec 18 07:37:19 UTC 2019
} 
} Modified Files:
}   src/distrib/sets/lists/base: mi
}   src/distrib/sets/lists/comp: mi
}   src/distrib/sets/lists/man: mi
}   src/etc: MAKEDEV.tmpl
}   src/etc/mtree: NetBSD.dist.base
}   src/share/man/man4: Makefile
}   src/sys/arch/amd64/conf: ALL
}   src/sys/arch/i386/conf: ALL
}   src/sys/conf: files majors
}   src/sys/dev: Makefile
}   src/sys/modules: Makefile
}   src/usr.bin/make: Makefile compat.c make.1 meta.c
}   src/usr.sbin/makemandb: nostem.txt
} Removed Files:
}   src/share/man/man4: filemon.4
}   src/sys/dev/filemon: Makefile filemon.c filemon.h filemon_wrapper.c
}   mknod-sh
}   src/sys/modules/filemon: Makefile filemon.ioconf
} 
} Log Message:
} Retire filemon, discussed on tech-kern@.

 What discussion?  In a message dated, Tue Dec 17 13:58:19
2019, you stated, "I will prepare the removal of filemon."  That
doesn't exactly look like a proposal to me.  After that, I don't
see any discussion about its removal.

Please revert this commit, make a proper proposal and allow
for a proper discussion as per the policy for removing features.

}-- End of excerpt from "Maxime Villard"