CVS commit: src/sys/arch/x86

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 19 06:32:46 UTC 2019

Modified Files:
src/sys/arch/x86/include: i82093reg.h
src/sys/arch/x86/x86: ioapic.c

Log Message:
 Fix ioapic_dump_raw() to dump whole ioapic area.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/ioapic.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/x86/include/i82093reg.h
diff -u src/sys/arch/x86/include/i82093reg.h:1.5 src/sys/arch/x86/include/i82093reg.h:1.6
--- src/sys/arch/x86/include/i82093reg.h:1.5	Sat Apr 22 04:25:09 2017
+++ src/sys/arch/x86/include/i82093reg.h	Wed Jun 19 06:32:46 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: i82093reg.h,v 1.5 2017/04/22 04:25:09 nonaka Exp $ */
+/* 	$NetBSD: i82093reg.h,v 1.6 2019/06/19 06:32:46 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -81,8 +81,9 @@
  * Redirection table registers.
  */
 
-#define IOAPIC_REDHI(pin)	(0x11 + ((pin)<<1))
-#define IOAPIC_REDLO(pin)	(0x10 + ((pin)<<1))
+#define IOAPIC_REDTBL		0x10
+#define IOAPIC_REDHI(pin)	(IOAPIC_REDTBL + ((pin) << 1) + 1)
+#define IOAPIC_REDLO(pin)	(IOAPIC_REDTBL + ((pin) << 1))
 
 #define IOAPIC_REDHI_DEST_SHIFT		24	   /* destination. */
 #define IOAPIC_REDHI_DEST_MASK		0xff00

Index: src/sys/arch/x86/x86/ioapic.c
diff -u src/sys/arch/x86/x86/ioapic.c:1.62 src/sys/arch/x86/x86/ioapic.c:1.63
--- src/sys/arch/x86/x86/ioapic.c:1.62	Mon Jun 17 06:38:30 2019
+++ src/sys/arch/x86/x86/ioapic.c	Wed Jun 19 06:32:46 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: ioapic.c,v 1.62 2019/06/17 06:38:30 msaitoh Exp $	*/
+/* 	$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.62 2019/06/17 06:38:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $");
 
 #include "opt_ddb.h"
 
@@ -611,7 +611,7 @@ ioapic_dump_raw(void)
 			printf(" %08x", (u_int)reg);
 			if (++i % 0x08 == 0)
 printf("\n");
-		} while (i < 0x40);
+		} while (i < IOAPIC_REDTBL + (sc->sc_apic_sz * 2));
 	}
 }
 #endif



CVS commit: src/sys/arch/x86

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 19 06:32:46 UTC 2019

Modified Files:
src/sys/arch/x86/include: i82093reg.h
src/sys/arch/x86/x86: ioapic.c

Log Message:
 Fix ioapic_dump_raw() to dump whole ioapic area.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/ioapic.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-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:33:14 UTC 2019

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

Log Message:
fix access to any busses that may appear beyond the bus the 4x slot see.
only the root bus and the slot's bus are limited to device = 0.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/rockchip/rk3399_pcie.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-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:33:14 UTC 2019

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

Log Message:
fix access to any busses that may appear beyond the bus the 4x slot see.
only the root bus and the slot's bus are limited to device = 0.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/rockchip/rk3399_pcie.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_pcie.c
diff -u src/sys/arch/arm/rockchip/rk3399_pcie.c:1.4 src/sys/arch/arm/rockchip/rk3399_pcie.c:1.5
--- src/sys/arch/arm/rockchip/rk3399_pcie.c:1.4	Sat Jun 15 00:08:25 2019
+++ src/sys/arch/arm/rockchip/rk3399_pcie.c	Wed Jun 19 05:33:14 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_pcie.c,v 1.4 2019/06/15 00:08:25 jmcneill Exp $ */
+/* $NetBSD: rk3399_pcie.c,v 1.5 2019/06/19 05:33:14 mrg Exp $ */
 /*
  * Copyright (c) 2018 Mark Kettenis 
  *
@@ -17,7 +17,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.4 2019/06/15 00:08:25 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.5 2019/06/19 05:33:14 mrg Exp $");
 
 #include 
 #include 
@@ -118,9 +118,13 @@ __KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.
 #define PCIE_ATR_OB_REGION_SIZE		(1 * 1024 * 1024)
 
 #define HREAD4(sc, reg)			\
-	(bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg)))
+	bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))
 #define HWRITE4(sc, reg, val)		\
 	bus_space_write_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val))
+#define AXIREAD4(sc, reg)		\
+	bus_space_read_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg))
+#define AXIWRITE4(sc, reg, val)		\
+	bus_space_write_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg), (val))
 
 struct rkpcie_softc {
 	struct pcihost_softc	sc_phsc;
@@ -508,6 +512,15 @@ rkpcie_decompose_tag(void *v, pcitag_t t
 		*fp = (tag >> 12) & 0x7;
 }
 
+/* Only one device on root port and the first subordinate port. */
+static bool
+rkpcie_conf_ok(int bus, int dev, int fn, int bus_min)
+{
+	if (dev != 0 && (bus == bus_min || bus == bus_min + 1))
+		return false;
+	return true;
+}
+
 pcireg_t
 rkpcie_conf_read(void *v, pcitag_t tag, int offset)
 {
@@ -520,18 +533,14 @@ rkpcie_conf_read(void *v, pcitag_t tag, 
 	KASSERT(offset < PCI_EXTCONF_SIZE);
 
 	rkpcie_decompose_tag(sc, tag, &bus, &dev, &fn);
+	if (!rkpcie_conf_ok(bus, dev, fn, phsc->sc_bus_min))
+		return 0x;
 	reg = (bus << 20) | (dev << 15) | (fn << 12) | offset;
 
-	if (bus == phsc->sc_bus_min) {
-		KASSERT(dev == 0);
+	if (bus == phsc->sc_bus_min)
 		return HREAD4(sc, PCIE_RC_NORMAL_BASE + reg);
-	}
-	if (bus == phsc->sc_bus_min + 1) {
-		KASSERT(dev == 0);
-		return bus_space_read_4(sc->sc_iot, sc->sc_axi_ioh, reg);
-	}
-
-	return 0x;
+	else
+		return AXIREAD4(sc, reg);
 }
 
 void
@@ -546,18 +555,14 @@ rkpcie_conf_write(void *v, pcitag_t tag,
 	KASSERT(offset < PCI_EXTCONF_SIZE);
 
 	rkpcie_decompose_tag(sc, tag, &bus, &dev, &fn);
+	if (!rkpcie_conf_ok(bus, dev, fn, phsc->sc_bus_min))
+		return;
 	reg = (bus << 20) | (dev << 15) | (fn << 12) | offset;
 
-	if (bus == phsc->sc_bus_min) {
-		KASSERT(dev == 0);
+	if (bus == phsc->sc_bus_min)
 		HWRITE4(sc, PCIE_RC_NORMAL_BASE + reg, data);
-		return;
-	}
-	if (bus == phsc->sc_bus_min + 1) {
-		KASSERT(dev == 0);
-		bus_space_write_4(sc->sc_iot, sc->sc_axi_ioh, reg, data);
-		return;
-	}
+	else
+		AXIWRITE4(sc, reg, data);
 }
 
 static int



CVS commit: src/sys/arch

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:31:05 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/arm/include: cputypes.h

Log Message:
add several cortex CPU implementations found in their TRMs:
- A32 R1 (aarch32 only, not supported)
- A35 R1
- A65 R0
- A76AE R1
- A77

add the aarch64 ones to cpu.c for identification.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/cputypes.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/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.17 src/sys/arch/aarch64/aarch64/cpu.c:1.18
--- src/sys/arch/aarch64/aarch64/cpu.c:1.17	Thu May  9 07:38:44 2019
+++ src/sys/arch/aarch64/aarch64/cpu.c	Wed Jun 19 05:31:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.17 2019/05/09 07:38:44 mrg Exp $ */
+/* $NetBSD: cpu.c,v 1.18 2019/06/19 05:31:05 mrg Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.17 2019/05/09 07:38:44 mrg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.18 2019/06/19 05:31:05 mrg Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -184,13 +184,17 @@ struct cpuidtab {
 #define CPU_PARTMASK	(CPU_ID_IMPLEMENTOR_MASK | CPU_ID_PARTNO_MASK)
 
 const struct cpuidtab cpuids[] = {
+	{ CPU_ID_CORTEXA35R0 & CPU_PARTMASK, "Cortex-A35", "Cortex", "V8-A" },
 	{ CPU_ID_CORTEXA53R0 & CPU_PARTMASK, "Cortex-A53", "Cortex", "V8-A" },
 	{ CPU_ID_CORTEXA57R0 & CPU_PARTMASK, "Cortex-A57", "Cortex", "V8-A" },
+	{ CPU_ID_CORTEXA55R1 & CPU_PARTMASK, "Cortex-A55", "Cortex", "V8.2-A+" },
+	{ CPU_ID_CORTEXA65R0 & CPU_PARTMASK, "Cortex-A65", "Cortex", "V8.2-A+" },
 	{ CPU_ID_CORTEXA72R0 & CPU_PARTMASK, "Cortex-A72", "Cortex", "V8-A" },
 	{ CPU_ID_CORTEXA73R0 & CPU_PARTMASK, "Cortex-A73", "Cortex", "V8-A" },
-	{ CPU_ID_CORTEXA55R1 & CPU_PARTMASK, "Cortex-A55", "Cortex", "V8.2-A" },
-	{ CPU_ID_CORTEXA75R2 & CPU_PARTMASK, "Cortex-A75", "Cortex", "V8.2-A" },
-	{ CPU_ID_CORTEXA76R3 & CPU_PARTMASK, "Cortex-A76", "Cortex", "V8.2-A" },
+	{ CPU_ID_CORTEXA75R2 & CPU_PARTMASK, "Cortex-A75", "Cortex", "V8.2-A+" },
+	{ CPU_ID_CORTEXA76R3 & CPU_PARTMASK, "Cortex-A76", "Cortex", "V8.2-A+" },
+	{ CPU_ID_CORTEXA76AER1 & CPU_PARTMASK, "Cortex-A76AE", "Cortex", "V8.2-A+" },
+	{ CPU_ID_CORTEXA77R0 & CPU_PARTMASK, "Cortex-A77", "Cortex", "V8.2-A+" },
 	{ CPU_ID_THUNDERXRX, "Cavium ThunderX", "Cavium", "V8-A" },
 	{ CPU_ID_THUNDERX81XXRX, "Cavium ThunderX CN81XX", "Cavium", "V8-A" },
 	{ CPU_ID_THUNDERX83XXRX, "Cavium ThunderX CN83XX", "Cavium", "V8-A" },

Index: src/sys/arch/arm/include/cputypes.h
diff -u src/sys/arch/arm/include/cputypes.h:1.6 src/sys/arch/arm/include/cputypes.h:1.7
--- src/sys/arch/arm/include/cputypes.h:1.6	Thu May  9 07:38:44 2019
+++ src/sys/arch/arm/include/cputypes.h	Wed Jun 19 05:31:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cputypes.h,v 1.6 2019/05/09 07:38:44 mrg Exp $	*/
+/*	$NetBSD: cputypes.h,v 1.7 2019/06/19 05:31:05 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -142,6 +142,8 @@
 #define CPU_ID_ARM1156T2S	0x4107b560 /* MPU only */
 #define CPU_ID_ARM1176JZS	0x410fb760
 #define CPU_ID_ARM11_P(n)	((n & 0xff07f000) == 0x4107b000)
+
+/* ARMv7 CPUs */
 #define CPU_ID_CORTEXA5R0	0x410fc050
 #define CPU_ID_CORTEXA7R0	0x410fc070
 #define CPU_ID_CORTEXA8R1	0x411fc080
@@ -155,15 +157,22 @@
 #define CPU_ID_CORTEXA15R3	0x413fc0f0
 #define CPU_ID_CORTEXA15R4	0x414fc0f0
 #define CPU_ID_CORTEXA17R1	0x411fc0e0
+
+/* ARMv8 CPUS */
+#define CPU_ID_CORTEXA32R1	0x411fd010
 #define CPU_ID_CORTEXA35R0	0x410fd040
+#define CPU_ID_CORTEXA35R1	0x411fd040
 #define CPU_ID_CORTEXA53R0	0x410fd030
 #define CPU_ID_CORTEXA55R1	0x411fd050
 #define CPU_ID_CORTEXA57R0	0x410fd070
 #define CPU_ID_CORTEXA57R1	0x411fd070
+#define CPU_ID_CORTEXA65R0	0x410fd060
 #define CPU_ID_CORTEXA72R0	0x410fd080
 #define CPU_ID_CORTEXA73R0	0x410fd090
 #define CPU_ID_CORTEXA75R2	0x412fd0a0
+#define CPU_ID_CORTEXA76AER1	0x411fd0e0
 #define CPU_ID_CORTEXA76R3	0x413fd0b0
+#define CPU_ID_CORTEXA77R0	0x410fd0d0
 
 #define CPU_ID_CORTEX_P(n)	((n & 0xff0fe000) == 0x410fc000)
 #define CPU_ID_CORTEX_A5_P(n)	((n & 0xff0ff0f0) == 0x410fc050)
@@ -171,14 +180,18 @@
 #define CPU_ID_CORTEX_A8_P(n)	((n & 0xff0ff0f0) == 0x410fc080)
 #define CPU_ID_CORTEX_A9_P(n)	((n & 0xff0ff0f0) == 0x410fc090)
 #define CPU_ID_CORTEX_A15_P(n)	((n & 0xff0ff0f0) == 0x410fc0f0)
+#define CPU_ID_CORTEX_A32_P(n)	((n & 0xff0ff0f0) == 0x410fd010)
 #define CPU_ID_CORTEX_A35_P(n)	((n & 0xff0ff0f0) == 0x410fd040)
 #define CPU_ID_CORTEX_A53_P(n)	((n & 0xff0ff0f0) == 0x410fd030)
 #define CPU_ID_CORTEX_A55_P(n)	((n & 0xff0ff0f0) == 0x410fd050)
 #define CPU_ID_CORTEX_A57_P(n)	((n & 0xff0ff0f0) == 0x410fd070)
+#define CPU_ID_CORTEX_A65_P(n)	((n & 0xff0ff0f0) == 0x410fd060)
 #define CPU_ID_CORTEX_A72_P(n)	((n & 

CVS commit: src/sys/arch

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:31:05 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/arm/include: cputypes.h

Log Message:
add several cortex CPU implementations found in their TRMs:
- A32 R1 (aarch32 only, not supported)
- A35 R1
- A65 R0
- A76AE R1
- A77

add the aarch64 ones to cpu.c for identification.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/cputypes.h

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



CVS commit: src/external/bsd/llvm/librt

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:24:13 UTC 2019

Modified Files:
src/external/bsd/llvm/librt: Makefile

Log Message:
skip the radeon bits for non x86 platforms.  they build fine, but
they're not linked into gallium, so avoid building them.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/librt/Makefile

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



CVS commit: src/external/bsd/llvm/librt

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:24:13 UTC 2019

Modified Files:
src/external/bsd/llvm/librt: Makefile

Log Message:
skip the radeon bits for non x86 platforms.  they build fine, but
they're not linked into gallium, so avoid building them.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/librt/Makefile

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

Modified files:

Index: src/external/bsd/llvm/librt/Makefile
diff -u src/external/bsd/llvm/librt/Makefile:1.4 src/external/bsd/llvm/librt/Makefile:1.5
--- src/external/bsd/llvm/librt/Makefile:1.4	Wed Apr  3 15:21:58 2019
+++ src/external/bsd/llvm/librt/Makefile	Wed Jun 19 05:24:13 2019
@@ -1,5 +1,12 @@
+#	$NetBSD: Makefile,v 1.5 2019/06/19 05:24:13 mrg Exp $
+
 .include 
 
+BUILD_RADEON=0
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+BUILD_RADEON=1
+.endif
+
 SUBDIR=	libLLVMAnalysis \
 	libLLVMAsmParser \
 	libLLVMAsmPrinter \
@@ -30,8 +37,12 @@ SUBDIR=	libLLVMAnalysis \
 	libLLVMTransformsAggressiveInstCombine \
 	libLLVMTransformsCoroutines \
 	libLLVMTransformsUtils \
-	libLLVMVectorize \
-	libLLVMAMDGPUCodeGen \
+	libLLVMVectorize
+
+.if ${BUILD_RADEON} == 1
+SUBDIR+= \
+	libLLVMAMDGPUCodeGen
+.endif
 
 .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "aarch64eb"
 SUBDIR+= \
@@ -59,6 +70,7 @@ SUBDIR+= \
 	libLLVMX86CodeGen
 .endif
 
+.if ${BUILD_RADEON} == 1
 SUBDIR+= \
 	.WAIT \
 	libLLVMAMDGPUMCTargetDesc \
@@ -66,6 +78,7 @@ SUBDIR+= \
 	libLLVMAMDGPUTargetInfo \
 	libLLVMAMDGPUAsmParser \
 	libLLVMAMDGPUUtils
+.endif
 
 .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "aarch64eb"
 SUBDIR+= \



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

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:17:05 UTC 2019

Modified Files:
src/external/mit/xorg/lib/gallium: Makefile

Log Message:
allow all arm platforms, not just evbarm, to build with MKLLVMRT.
allow mips and powerpc platforms as well.

amusingly, this allows my shark to finally have functional
if not usable GL :-)  glxgears gets 1fps.

status:
- arm32 and ppc have llvm dynamic linker patches.
- ppc is not yet working.
- mips untested.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/mit/xorg/lib/gallium/Makefile

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



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

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jun 19 05:17:05 UTC 2019

Modified Files:
src/external/mit/xorg/lib/gallium: Makefile

Log Message:
allow all arm platforms, not just evbarm, to build with MKLLVMRT.
allow mips and powerpc platforms as well.

amusingly, this allows my shark to finally have functional
if not usable GL :-)  glxgears gets 1fps.

status:
- arm32 and ppc have llvm dynamic linker patches.
- ppc is not yet working.
- mips untested.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/mit/xorg/lib/gallium/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.32 src/external/mit/xorg/lib/gallium/Makefile:1.33
--- src/external/mit/xorg/lib/gallium/Makefile:1.32	Sun Jun  9 01:56:49 2019
+++ src/external/mit/xorg/lib/gallium/Makefile	Wed Jun 19 05:17:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2019/06/09 01:56:49 mrg Exp $
+# $NetBSD: Makefile,v 1.33 2019/06/19 05:17:05 mrg Exp $
 
 # Link the gallium mega driver.
 
@@ -97,6 +97,15 @@ BUILD_RADEON=1
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE} == "evbarm"
 BUILD_NOUVEAU=1
 BUILD_VDPAU=1
+.endif
+
+.if ${MACHINE_ARCH} == "i386" || \
+${MACHINE_ARCH} == "x86_64" || \
+${MACHINE_ARCH} == "powerpc" || \
+${MACHINE_ARCH} == "powerpc64" || \
+!empty(MACHINE_ARCH:Mmips*) || \
+!empty(MACHINE_ARCH:Mearm*) || \
+!empty(MACHINE_ARCH:Marm*)
 . if ${MKLLVMRT} != "no"
 BUILD_LLVMPIPE=1
 . endif
@@ -998,7 +1007,6 @@ LLVMRT_LIBS+=	\
 .endif
 
 .if ${MACHINE_CPU} == "aarch64"
-# XXX duplicates
 LLVMRT_LIBS+=	\
 		AArch64AsmParser \
 		AArch64CodeGen \
@@ -1010,7 +1018,6 @@ LLVMRT_LIBS+=	\
 .endif
 
 .if ${MACHINE_CPU} == "arm"
-# XXX duplicates
 LLVMRT_LIBS+=	\
 		ARMCodeGen \
 		ARMDisassembler \
@@ -1021,6 +1028,26 @@ LLVMRT_LIBS+=	\
 		ARMUtils
 .endif
 
+.if ${MACHINE_CPU} == "mips"
+LLVMRT_LIBS+=	\
+		MipsCodeGen \
+		MipsDisassembler \
+		MipsAsmParser \
+		MipsMCTargetDesc \
+		MipsAsmPrinter \
+		MipsTargetInfo
+.endif
+
+.if ${MACHINE_CPU} == "powerpc"
+LLVMRT_LIBS+=	\
+		PowerPCCodeGen \
+		PowerPCDisassembler \
+		PowerPCTargetInfo \
+		PowerPCMCTargetDesc \
+		PowerPCAsmParser \
+		PowerPCAsmPrinter
+.endif
+
 LLVMRT_LIBS+=	\
 		GlobalISel \
 		MCDisassembler \



Re: CVS commit: src/sys/arch

2019-06-18 Thread maya
On Tue, Jun 18, 2019 at 09:18:13PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Tue Jun 18 21:18:13 UTC 2019
> 
> Modified Files:
>   src/sys/arch/aarch64/include: ptrace.h
>   src/sys/arch/alpha/include: ptrace.h
>   src/sys/arch/amd64/include: ptrace.h
>   src/sys/arch/arm/include: ptrace.h
>   src/sys/arch/hppa/include: ptrace.h
>   src/sys/arch/i386/include: ptrace.h
>   src/sys/arch/ia64/include: ptrace.h
>   src/sys/arch/m68k/include: ptrace.h
>   src/sys/arch/mips/include: ptrace.h
>   src/sys/arch/or1k/include: ptrace.h
>   src/sys/arch/powerpc/include: ptrace.h
>   src/sys/arch/riscv/include: ptrace.h
>   src/sys/arch/sh3/include: ptrace.h
>   src/sys/arch/sparc/include: ptrace.h
>   src/sys/arch/vax/include: ptrace.h
> 
> Log Message:
> Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer
> 
> The macro is dummy for ia64 (the FP register is unknown and can change
> freely) and sparc/sparc64 (not stored in struct reg).

Wouldn't it be better not to declare PTRACE_REG_FP for the cases where
obtaining it is more complicated?

e.g. someone who hasn't seen this commit and wants to use PTRACE_REG_FP
thinks that they can just use it, and until they specifically test ia64
and sparc64 they won't know it doesn't behave correctly.


CVS commit: src/tools/compat

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 03:40:15 UTC 2019

Modified Files:
src/tools/compat: compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
Add sys/uio.h & enum uio_seg, enum uio_rw to tools/compat

This is needed for bootstrapping the tools on Ubuntu 16.x.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.93 -r1.94 src/tools/compat/configure
cvs rdiff -u -r1.94 -r1.95 src/tools/compat/configure.ac
cvs rdiff -u -r1.49 -r1.50 src/tools/compat/nbtool_config.h.in

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



CVS commit: src/tools/compat

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 03:40:15 UTC 2019

Modified Files:
src/tools/compat: compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
Add sys/uio.h & enum uio_seg, enum uio_rw to tools/compat

This is needed for bootstrapping the tools on Ubuntu 16.x.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.93 -r1.94 src/tools/compat/configure
cvs rdiff -u -r1.94 -r1.95 src/tools/compat/configure.ac
cvs rdiff -u -r1.49 -r1.50 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.114 src/tools/compat/compat_defs.h:1.115
--- src/tools/compat/compat_defs.h:1.114	Thu Aug 30 12:05:34 2018
+++ src/tools/compat/compat_defs.h	Wed Jun 19 03:40:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.114 2018/08/30 12:05:34 christos Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.115 2019/06/19 03:40:15 kamil Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -52,6 +52,17 @@ typedef unsigned int id_t;
 typedef int socklen_t;
 #endif
 
+#if !HAVE_ENUM_UIO_RW
+enum uio_rw { UIO_READ, UIO_WRITE };
+#endif
+
+#if !HAVE_ENUM_UIO_SEG
+enum uio_seg {
+	UIO_USERSPACE,		/* from user data space */
+	UIO_SYSSPACE		/* from system space */
+};
+#endif
+
 #if !HAVE_U_LONG
 typedef unsigned long u_long;
 #endif
@@ -113,6 +124,10 @@ typedef unsigned short u_short;
 #include 
 #endif
 
+#if HAVE_SYS_UIO_H
+#include 
+#endif
+
 #ifdef _NETBSD_SOURCE
 #error _NETBSD_SOURCE is *not* to be defined.
 #endif

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.93 src/tools/compat/configure:1.94
--- src/tools/compat/configure:1.93	Thu Aug 30 12:05:34 2018
+++ src/tools/compat/configure	Wed Jun 19 03:40:15 2019
@@ -4098,7 +4098,8 @@ fi
 fi
 
 for ac_header in sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
-	getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h
+	getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h \
+	sys/uio.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -4240,6 +4241,54 @@ $as_echo "#define HAVE_SOCKLEN_T 1" >>co
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enum uio_rw" >&5
+$as_echo_n "checking for enum uio_rw... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include 
+#ifdef HAVE_SYS_UIO_H
+#include 
+#endif
+int
+main ()
+{
+enum uio_rw rw;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_ENUM_UIO_RW 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enum uio_seg" >&5
+$as_echo_n "checking for enum uio_seg... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include 
+#ifdef HAVE_SYS_UIO_H
+#include 
+#endif
+int
+main ()
+{
+enum uio_seg seg;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_ENUM_UIO_SEG 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 
 
 
@@ -7416,4 +7465,3 @@ if test -n "$ac_unrecognized_opts" && te
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
-

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.94 src/tools/compat/configure.ac:1.95
--- src/tools/compat/configure.ac:1.94	Thu Aug 30 12:05:34 2018
+++ src/tools/compat/configure.ac	Wed Jun 19 03:40:15 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.94 2018/08/30 12:05:34 christos Exp $
+#	$NetBSD: configure.ac,v 1.95 2019/06/19 03:40:15 kamil Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -79,7 +79,8 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h 
 # Find headers that may not be available.
 AC_HEADER_DIRENT
 AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
-	getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h)
+	getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h \
+	sys/uio.h)
 AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
 	sys/endian.h sys/featuretest.h err.h inttypes.h libgen.h paths.h \
 	libgen.h stdint.h util.h resolv.h arpa/nameser.h,,
@@ -105,6 +106,24 @@ AC_CHECK_TYPE(socklen_t, [AC_DEFINE([HAV
 #endif
 #include ])
 
+AC_MSG_CHECKING([for enum uio_rw])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include 
+#ifdef HAVE_SYS_UIO_H
+#include 
+#endif]],
+[[enum uio_rw rw;]])],[AC_DEFINE([HAVE_ENUM_UIO_RW], 1,
+			[Define if you have the enum uio_rw type.])

CVS commit: src/external/bsd/wpa/bin/wpa_supplicant

2019-06-18 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 19 03:27:39 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_supplicant: wpa_supplicant.8

Log Message:
wpa_supplicant.8: add xref to wpa_passphrase.8


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8

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



CVS commit: src/external/bsd/wpa/bin/wpa_supplicant

2019-06-18 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 19 03:27:39 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_supplicant: wpa_supplicant.8

Log Message:
wpa_supplicant.8: add xref to wpa_passphrase.8


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8

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

Modified files:

Index: src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8
diff -u src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.8 src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.9
--- src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8:1.8	Fri Mar 25 07:48:16 2016
+++ src/external/bsd/wpa/bin/wpa_supplicant/wpa_supplicant.8	Wed Jun 19 03:27:38 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpa_supplicant.8,v 1.8 2016/03/25 07:48:16 wiz Exp $
+.\" $NetBSD: wpa_supplicant.8,v 1.9 2019/06/19 03:27:38 gutteridge Exp $
 .\"
 .\" Copyright (c) 2005 Sam Leffler 
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" Based on:
 .\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8,v 1.2 2005/06/27 06:40:43 ru Exp $
 .\"
-.Dd March 23, 2016
+.Dd June 19, 2019
 .Dt WPA_SUPPLICANT 8
 .Os
 .Sh NAME
@@ -190,7 +190,8 @@ Wait for a control interface monitor bef
 .Xr zyd 4 ,
 .Xr wpa_supplicant.conf 5 ,
 .Xr ifconfig 8 ,
-.Xr wpa_cli 8
+.Xr wpa_cli 8 ,
+.Xr wpa_passphrase 8
 .Sh HISTORY
 The
 .Nm



CVS commit: src/external/bsd/wpa/bin/wpa_cli

2019-06-18 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 19 03:23:56 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_cli: wpa_cli.8

Log Message:
wpa_cli.8: add xref to wpa_passphrase.8


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8

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



CVS commit: src/external/bsd/wpa/bin/wpa_cli

2019-06-18 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Jun 19 03:23:56 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_cli: wpa_cli.8

Log Message:
wpa_cli.8: add xref to wpa_passphrase.8


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8

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

Modified files:

Index: src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8
diff -u src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.4 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.5
--- src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.4	Tue Jun 18 14:28:40 2019
+++ src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8	Wed Jun 19 03:23:56 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpa_cli.8,v 1.4 2019/06/18 14:28:40 maya Exp $
+.\" $NetBSD: wpa_cli.8,v 1.5 2019/06/19 03:23:56 gutteridge Exp $
 .\"
 .\" Copyright (c) 2005 Sam Leffler 
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" Based on:
 .\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/wpa/wpa_cli/wpa_cli.8,v 1.2 2005/06/27 06:40:43 ru Exp $
 .\"
-.Dd June 18, 2019
+.Dd June 19, 2019
 .Dt WPA_CLI 8
 .Os
 .Sh NAME
@@ -224,6 +224,7 @@ Exit
 .El
 .Sh SEE ALSO
 .Xr wpa_supplicant.conf 5 ,
+.Xr wpa_passphrase 8 ,
 .Xr wpa_supplicant 8
 .Sh EXAMPLES
 A sample run of discovering and connecting to a network



Re: CVS commit: src/bin/ps

2019-06-18 Thread Kamil Rytarowski
On 19.06.2019 00:31, matthew green wrote:
> "Kamil Rytarowski" writes:
>> Module Name: src
>> Committed By:kamil
>> Date:Tue Jun 18 02:23:29 UTC 2019
>>
>> Modified Files:
>>  src/bin/ps: print.c
>>
>> Log Message:
>> Make LSDEAD usage conditional
>>
>> LSDEAD is not used since NetBSD-5.0 and will be gone.
>>
>> The same conditional usage is already in ps.c in the same program.
> 
> please revert this so that it works on netbsd-4 and earlier
> kernels.
> 
> ps(1) is expected to be binary compatible for a very long
> time now.
> 
> 
> .mrg.
> 

It still works on NetBSD-4 kernels (if it doesn't, it's not caused by
this change).

The only difference is that it will print '?' for (LS)DEAD process
(short-lived state).

sysstat ps.c has this change for a long time now.

How about this change:

Index: bin/ps/print.c
===
RCS file: /cvsroot/src/bin/ps/print.c,v
retrieving revision 1.131
diff -u -r1.131 print.c
--- bin/ps/print.c  18 Jun 2019 02:23:29 -  1.131
+++ bin/ps/print.c  19 Jun 2019 00:01:20 -
@@ -588,6 +588,8 @@
case LSZOMB:
 #ifdef LSDEAD
case LSDEAD:
+#else
+   case 6:
 #endif
*cp = 'Z';
break;



signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/kern

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 23:53:55 UTC 2019

Modified Files:
src/sys/kern: kern_exec.c kern_sig.c

Log Message:
Add support for KTR logs of SIGTRAP for TRAP_CHILD events

Previously it was disabled due to vfork(2) synchronization issues.
These problems are now gone.

While there, set l_vforkwaiting to false in posix_spawn. This is not very
needed but it does not make harm to keep it initialized explicitly.


To generate a diff of this commit:
cvs rdiff -u -r1.467 -r1.468 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.360 -r1.361 src/sys/kern/kern_sig.c

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



CVS commit: src/sys/kern

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 23:53:55 UTC 2019

Modified Files:
src/sys/kern: kern_exec.c kern_sig.c

Log Message:
Add support for KTR logs of SIGTRAP for TRAP_CHILD events

Previously it was disabled due to vfork(2) synchronization issues.
These problems are now gone.

While there, set l_vforkwaiting to false in posix_spawn. This is not very
needed but it does not make harm to keep it initialized explicitly.


To generate a diff of this commit:
cvs rdiff -u -r1.467 -r1.468 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.360 -r1.361 src/sys/kern/kern_sig.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_exec.c
diff -u src/sys/kern/kern_exec.c:1.467 src/sys/kern/kern_exec.c:1.468
--- src/sys/kern/kern_exec.c:1.467	Thu Jun 13 20:20:18 2019
+++ src/sys/kern/kern_exec.c	Tue Jun 18 23:53:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.467 2019/06/13 20:20:18 kamil Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.468 2019/06/18 23:53:55 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.467 2019/06/13 20:20:18 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.468 2019/06/18 23:53:55 kamil Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -2470,6 +2470,7 @@ do_posix_spawn(struct lwp *l1, pid_t *pi
 	}
 
 	p2->p_lflag = 0;
+	l1->l_vforkwaiting = false;
 	p2->p_sflag = 0;
 	p2->p_slflag = 0;
 	p2->p_pptr = p1;

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.360 src/sys/kern/kern_sig.c:1.361
--- src/sys/kern/kern_sig.c:1.360	Thu Jun 13 00:07:19 2019
+++ src/sys/kern/kern_sig.c	Tue Jun 18 23:53:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.360 2019/06/13 00:07:19 kamil Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.361 2019/06/18 23:53:55 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.360 2019/06/13 00:07:19 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.361 2019/06/18 23:53:55 kamil Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -1621,9 +1621,12 @@ eventswitch(int code)
 
 	sigswitch(0, signo, false);
 
-	/* XXX: hangs for VFORK */
-	if (code == TRAP_CHLD)
-		return;
+	if (code == TRAP_CHLD) {
+		mutex_enter(proc_lock);
+		while (l->l_vforkwaiting)
+			cv_wait(&l->l_waitcv, proc_lock);
+		mutex_exit(proc_lock);
+	}
 
 	if (ktrpoint(KTR_PSIG)) {
 		if (p->p_emul->e_ktrpsig)



CVS commit: src/share/man/man8

2019-06-18 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Jun 18 23:11:05 UTC 2019

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
servpce -> service


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.61 src/share/man/man8/afterboot.8:1.62
--- src/share/man/man8/afterboot.8:1.61	Tue Jun 18 13:27:25 2019
+++ src/share/man/man8/afterboot.8	Tue Jun 18 23:11:05 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.61 2019/06/18 13:27:25 maya Exp $
+.\"	$NetBSD: afterboot.8,v 1.62 2019/06/18 23:11:05 nia Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -412,7 +412,7 @@ You can scan for nearby wireless network
 To connect to a wireless network using WPA and DHCP:
 .Bd -literal -offset indent
 .Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf
-.Ic servpce wpa_supplicant onestart
+.Ic service wpa_supplicant onestart
 .Ic service dhcpcd onestart
 .Ed
 .Pp



CVS commit: src/share/man/man8

2019-06-18 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Jun 18 23:11:05 UTC 2019

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
servpce -> service


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/share/man/man8/afterboot.8

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



CVS commit: src/sys/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:41:32 UTC 2019

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

Log Message:
Welcome 8.99.46!

do_sys_mknod{,at}() changes
quota modules refactoring


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

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.593 src/sys/sys/param.h:1.594
--- src/sys/sys/param.h:1.593	Thu Jun 13 20:23:56 2019
+++ src/sys/sys/param.h	Tue Jun 18 22:41:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.593 2019/06/13 20:23:56 kamil Exp $	*/
+/*	$NetBSD: param.h,v 1.594 2019/06/18 22:41:32 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	899004500	/* NetBSD 8.99.45 */
+#define	__NetBSD_Version__	899004600	/* NetBSD 8.99.46 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:41:32 UTC 2019

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

Log Message:
Welcome 8.99.46!

do_sys_mknod{,at}() changes
quota modules refactoring


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

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



CVS commit: src/sys/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:40:09 UTC 2019

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

Log Message:
Stop defining in lwp.h: LSDEAD

Not used since NetBSD-5.0.

It had a confusing comment that suggested that all entries after LSDEAD
are removed, which wasn't true.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/sys/lwp.h

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



CVS commit: src/sys/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:40:09 UTC 2019

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

Log Message:
Stop defining in lwp.h: LSDEAD

Not used since NetBSD-5.0.

It had a confusing comment that suggested that all entries after LSDEAD
are removed, which wasn't true.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/sys/lwp.h

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

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.184 src/sys/sys/lwp.h:1.185
--- src/sys/sys/lwp.h:1.184	Thu Jun 13 20:20:18 2019
+++ src/sys/sys/lwp.h	Tue Jun 18 22:40:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.184 2019/06/13 20:20:18 kamil Exp $	*/
+/*	$NetBSD: lwp.h,v 1.185 2019/06/18 22:40:09 kamil Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -287,8 +287,7 @@ extern int		maxlwp __read_mostly;	/* max
 #define	LSSLEEP		3	/* Sleeping on an address. */
 #define	LSSTOP		4	/* Process debugging or suspension. */
 #define	LSZOMB		5	/* Awaiting collection by parent. */
-/* unused, for source compatibility with NetBSD 4.0 and earlier. */
-#define	LSDEAD		6	/* Process is almost a zombie. */
+/* define	LSDEAD	6	Process is almost a zombie. (removed in 5.0) */
 #define	LSONPROC	7	/* Process is currently on a CPU. */
 #define	LSSUSPENDED	8	/* Not running, not signalable. */
 



CVS commit: src

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:34:26 UTC 2019

Modified Files:
src/external/cddl/osnet/sys/kern: ddi.c
src/sys/compat/common: vfs_syscalls_50.c
src/sys/compat/linux/common: linux_file.c
src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_netbsd.c
src/sys/kern: vfs_syscalls.c
src/sys/rump/librump/rumpvfs: devnodes.c
src/sys/sys: vfs_syscalls.h

Log Message:
Drop unused retval pointer from do_sys_mknod{,at}()

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/sys/kern/ddi.c
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/common/vfs_syscalls_50.c
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.226 -r1.227 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.528 -r1.529 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpvfs/devnodes.c
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/vfs_syscalls.h

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

Modified files:

Index: src/external/cddl/osnet/sys/kern/ddi.c
diff -u src/external/cddl/osnet/sys/kern/ddi.c:1.7 src/external/cddl/osnet/sys/kern/ddi.c:1.8
--- src/external/cddl/osnet/sys/kern/ddi.c:1.7	Wed May 22 08:44:48 2019
+++ src/external/cddl/osnet/sys/kern/ddi.c	Tue Jun 18 22:34:26 2019
@@ -613,7 +613,6 @@ ddi_create_minor_node(dev_info_t *dip, c
 	char *pn;
 	dev_t dev;
 	int error;
-	register_t ret;
 
 	pn = PNBUF_GET();
 	if (spec_type == S_IFCHR) {
@@ -649,7 +648,7 @@ ddi_create_minor_node(dev_info_t *dip, c
 		(void)do_sys_unlink(pn, UIO_SYSSPACE);
 	}
 
-	error = do_sys_mknod(l, pn, spec_type, dev, &ret, UIO_SYSSPACE);
+	error = do_sys_mknod(l, pn, spec_type, dev, UIO_SYSSPACE);
 
 exit:
 	PNBUF_PUT(pn);

Index: src/sys/compat/common/vfs_syscalls_50.c
diff -u src/sys/compat/common/vfs_syscalls_50.c:1.22 src/sys/compat/common/vfs_syscalls_50.c:1.23
--- src/sys/compat/common/vfs_syscalls_50.c:1.22	Mon Jun 17 14:59:15 2019
+++ src/sys/compat/common/vfs_syscalls_50.c	Tue Jun 18 22:34:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_50.c,v 1.22 2019/06/17 14:59:15 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_50.c,v 1.23 2019/06/18 22:34:25 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.22 2019/06/17 14:59:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.23 2019/06/18 22:34:25 kamil Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -343,7 +343,7 @@ compat_50_sys_mknod(struct lwp *l,
 		syscallarg(uint32_t) dev;
 	} */
 	return do_sys_mknod(l, SCARG(uap, path), SCARG(uap, mode),
-	SCARG(uap, dev), retval, UIO_USERSPACE);
+	SCARG(uap, dev), UIO_USERSPACE);
 }
 
 #ifdef QUOTA

Index: src/sys/compat/linux/common/linux_file.c
diff -u src/sys/compat/linux/common/linux_file.c:1.115 src/sys/compat/linux/common/linux_file.c:1.116
--- src/sys/compat/linux/common/linux_file.c:1.115	Sun Mar  1 13:19:39 2015
+++ src/sys/compat/linux/common/linux_file.c	Tue Jun 18 22:34:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $	*/
+/*	$NetBSD: linux_file.c,v 1.116 2019/06/18 22:34:25 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.115 2015/03/01 13:19:39 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.116 2019/06/18 22:34:25 kamil Exp $");
 
 #include 
 #include 
@@ -675,8 +675,7 @@ linux_sys_mknodat(struct lwp *l, const s
 		 */
 
 		return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
-		SCARG(uap, mode), SCARG(uap, dev) & 0x, retval,
-		UIO_USERSPACE);
+		SCARG(uap, mode), SCARG(uap, dev) & 0x, UIO_USERSPACE);
 	}
 }
 

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.37 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.38
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.37	Tue Jun 18 01:37:03 2019
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Tue Jun 18 22:34:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.37 2019/06/18 01:37:03 christos Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.38 2019/06/18 22:34:25 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.37 2019/06/18 01:37:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.38 2019/06/18 22:34:25 kamil Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -117,7 +117,7 @@ compat_50_netbsd32_mknod(struct lwp *l,
 		syscallarg(uint32_t

CVS commit: src

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 22:34:26 UTC 2019

Modified Files:
src/external/cddl/osnet/sys/kern: ddi.c
src/sys/compat/common: vfs_syscalls_50.c
src/sys/compat/linux/common: linux_file.c
src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_netbsd.c
src/sys/kern: vfs_syscalls.c
src/sys/rump/librump/rumpvfs: devnodes.c
src/sys/sys: vfs_syscalls.h

Log Message:
Drop unused retval pointer from do_sys_mknod{,at}()

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/sys/kern/ddi.c
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/common/vfs_syscalls_50.c
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.226 -r1.227 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.528 -r1.529 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpvfs/devnodes.c
cvs rdiff -u -r1.23 -r1.24 src/sys/sys/vfs_syscalls.h

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



re: CVS commit: src/bin/ps

2019-06-18 Thread matthew green
"Kamil Rytarowski" writes:
> Module Name:  src
> Committed By: kamil
> Date: Tue Jun 18 02:23:29 UTC 2019
> 
> Modified Files:
>   src/bin/ps: print.c
> 
> Log Message:
> Make LSDEAD usage conditional
> 
> LSDEAD is not used since NetBSD-5.0 and will be gone.
> 
> The same conditional usage is already in ps.c in the same program.

please revert this so that it works on netbsd-4 and earlier
kernels.

ps(1) is expected to be binary compatible for a very long
time now.


.mrg.


Re: CVS commit: src/sys/conf

2019-06-18 Thread Ryo ONODERA
Hi,

chris...@zoulas.com (Christos Zoulas) writes:

> On Jun 18,  9:37pm, r...@tetera.org (Ryo ONODERA) wrote:
> -- Subject: Re: CVS commit: src/sys/conf
>
> | chris...@astron.com (Christos Zoulas) writes:
> | 
> | > Yes, the question becomes should be part of the default GENERIC build?
> | > I think not (like before).
> | 
> | I feel that chfs should be disabled by default.
> | And hopefully it should be documented that flash(4) is required
> | in filesystems.config or similar place.
>
> Yes, I agree. Can you supply a patch (documentation)?
> - there is no nand9 man page?

I will try to write the man page.

Thank you.

> christos

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/sys/arch

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 21:18:13 UTC 2019

Modified Files:
src/sys/arch/aarch64/include: ptrace.h
src/sys/arch/alpha/include: ptrace.h
src/sys/arch/amd64/include: ptrace.h
src/sys/arch/arm/include: ptrace.h
src/sys/arch/hppa/include: ptrace.h
src/sys/arch/i386/include: ptrace.h
src/sys/arch/ia64/include: ptrace.h
src/sys/arch/m68k/include: ptrace.h
src/sys/arch/mips/include: ptrace.h
src/sys/arch/or1k/include: ptrace.h
src/sys/arch/powerpc/include: ptrace.h
src/sys/arch/riscv/include: ptrace.h
src/sys/arch/sh3/include: ptrace.h
src/sys/arch/sparc/include: ptrace.h
src/sys/arch/vax/include: ptrace.h

Log Message:
Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer

The macro is dummy for ia64 (the FP register is unknown and can change
freely) and sparc/sparc64 (not stored in struct reg).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/ptrace.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amd64/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/ptrace.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/include/ptrace.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/ptrace.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/ptrace.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/m68k/include/ptrace.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/include/ptrace.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/or1k/include/ptrace.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/ptrace.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sh3/include/ptrace.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/include/ptrace.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/vax/include/ptrace.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/include/ptrace.h
diff -u src/sys/arch/aarch64/include/ptrace.h:1.8 src/sys/arch/aarch64/include/ptrace.h:1.9
--- src/sys/arch/aarch64/include/ptrace.h:1.8	Thu Dec 13 10:44:25 2018
+++ src/sys/arch/aarch64/include/ptrace.h	Tue Jun 18 21:18:11 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.h,v 1.8 2018/12/13 10:44:25 ryo Exp $ */
+/* $NetBSD: ptrace.h,v 1.9 2019/06/18 21:18:11 kamil Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -57,6 +57,7 @@
 
 #include 
 #define PTRACE_REG_PC(r)	(r)->r_pc
+#define PTRACE_REG_FP(r)	(r)->r_reg[29]
 #define PTRACE_REG_SET_PC(r, v)	(r)->r_pc = (v)
 #define PTRACE_REG_SP(r)	(r)->r_sp
 #define PTRACE_REG_INTRV(r)	(r)->r_reg[0]

Index: src/sys/arch/alpha/include/ptrace.h
diff -u src/sys/arch/alpha/include/ptrace.h:1.9 src/sys/arch/alpha/include/ptrace.h:1.10
--- src/sys/arch/alpha/include/ptrace.h:1.9	Wed Apr 12 18:17:59 2017
+++ src/sys/arch/alpha/include/ptrace.h	Tue Jun 18 21:18:11 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.h,v 1.9 2017/04/12 18:17:59 kamil Exp $ */
+/* $NetBSD: ptrace.h,v 1.10 2019/06/18 21:18:11 kamil Exp $ */
 
 /*
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -48,6 +48,7 @@
 #include 
 
 #define PTRACE_REG_PC(r)	(r)->r_regs[R_ZERO]
+#define PTRACE_REG_FP(r)	(r)->r_regs[R_S6]
 #define PTRACE_REG_SET_PC(r, v)	(r)->r_regs[R_ZERO] = (v)
 #define PTRACE_REG_SP(r)	(r)->r_regs[R_SP]
 #define PTRACE_REG_INTRV(r)	(r)->r_regs[R_V0]

Index: src/sys/arch/amd64/include/ptrace.h
diff -u src/sys/arch/amd64/include/ptrace.h:1.14 src/sys/arch/amd64/include/ptrace.h:1.15
--- src/sys/arch/amd64/include/ptrace.h:1.14	Tue Jun  4 16:29:53 2019
+++ src/sys/arch/amd64/include/ptrace.h	Tue Jun 18 21:18:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.14 2019/06/04 16:29:53 mgorny Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.15 2019/06/18 21:18:11 kamil Exp $	*/
 
 /*
  * Copyright (c) 1993 Christopher G. Demetriou
@@ -59,6 +59,7 @@
 
 #include 
 #define PTRACE_REG_PC(r)	(r)->regs[_REG_RIP]
+#define PTRACE_REG_FP(r)	(r)->regs[_REG_RBP]
 #define PTRACE_REG_SET_PC(r, v)	(r)->regs[_REG_RIP] = (v)
 #define PTRACE_REG_SP(r)	(r)->regs[_REG_RSP]
 #define PTRACE_REG_INTRV(r)	(r)->regs[_REG_RAX]

Index: src/sys/arch/arm/include/ptrace.h
diff -u src/sys/arch/arm/include/ptrace.h:1.14 src/sys/arch/arm/include/ptrace.h:1.15
--- src/sys/arch/arm/include/ptrace.h:1.14	Tue Jun 18 15:21:19 2019
+++ src/sys/arch/arm/include/ptrace.h	Tue Jun 18 21:18:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.14 2019/06/18 15:21:19 skrll Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.15 2019/06/18 21:18:12 kamil Exp $	*/
 
 /*
  * Copyright (c) 1995 Frank Lancaster
@@ -60,6 +60,7 @@
 
 #include 
 #define PTRACE_REG_PC(_r)		(_r)->r_pc
+#define PTRACE_REG_FP(_r)		(_r)->r[11]
 #define PTRACE_REG_SET_PC(_r, _v)	(_r)->r_pc = (_v)
 #define PTRACE_REG_SP(_r)		(_r)->r_sp
 #define PTRACE_REG_INTRV(_r)		(_r)->r[0]

Index: src/sys/arch/hppa/include/ptrace.h

CVS commit: src/sys/arch

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 21:18:13 UTC 2019

Modified Files:
src/sys/arch/aarch64/include: ptrace.h
src/sys/arch/alpha/include: ptrace.h
src/sys/arch/amd64/include: ptrace.h
src/sys/arch/arm/include: ptrace.h
src/sys/arch/hppa/include: ptrace.h
src/sys/arch/i386/include: ptrace.h
src/sys/arch/ia64/include: ptrace.h
src/sys/arch/m68k/include: ptrace.h
src/sys/arch/mips/include: ptrace.h
src/sys/arch/or1k/include: ptrace.h
src/sys/arch/powerpc/include: ptrace.h
src/sys/arch/riscv/include: ptrace.h
src/sys/arch/sh3/include: ptrace.h
src/sys/arch/sparc/include: ptrace.h
src/sys/arch/vax/include: ptrace.h

Log Message:
Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer

The macro is dummy for ia64 (the FP register is unknown and can change
freely) and sparc/sparc64 (not stored in struct reg).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/ptrace.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amd64/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/ptrace.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/include/ptrace.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/ptrace.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/ptrace.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/m68k/include/ptrace.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/include/ptrace.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/or1k/include/ptrace.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/ptrace.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sh3/include/ptrace.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/include/ptrace.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/vax/include/ptrace.h

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



CVS commit: src/tests/lib/libc/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 21:14:26 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Allow to conditionally enable LWP ATF tests in t_ptrace_wait*

By default the tests are disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/tests/lib/libc/sys/t_ptrace_wait.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.127 src/tests/lib/libc/sys/t_ptrace_wait.c:1.128
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.127	Thu Jun 13 20:26:06 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Tue Jun 18 21:14:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.127 2019/06/13 20:26:06 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.128 2019/06/18 21:14:26 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.127 2019/06/13 20:26:06 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.128 2019/06/18 21:14:26 kamil Exp $");
 
 #include 
 #include 
@@ -103,6 +103,10 @@ static int debug = 0;
 #define TEST_VFORK_ENABLED 1
 #endif
 
+#ifndef TEST_LWP_ENABLED
+#define TEST_LWP_ENABLED 0
+#endif
+
 /// 
 
 static void
@@ -5454,8 +5458,10 @@ trace_threads(bool trace_create, bool tr
 	/* Track created and exited threads */
 	bool traced_lwps[__arraycount(t)];
 
+#if !TEST_LWP_ENABLED
 	if (trace_create || trace_exit)
 		atf_tc_skip("PR kern/51995");
+#endif
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
 	SYSCALL_REQUIRE((child = fork()) != -1);



CVS commit: src/tests/lib/libc/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 21:14:26 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Allow to conditionally enable LWP ATF tests in t_ptrace_wait*

By default the tests are disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/tests/lib/libc/sys/t_ptrace_wait.c

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



CVS commit: src/doc

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 21:08:34 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
more bsd-family-tree


To generate a diff of this commit:
cvs rdiff -u -r1.1628 -r1.1629 src/doc/3RDPARTY

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



CVS commit: src/doc

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 21:08:34 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
more bsd-family-tree


To generate a diff of this commit:
cvs rdiff -u -r1.1628 -r1.1629 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1628 src/doc/3RDPARTY:1.1629
--- src/doc/3RDPARTY:1.1628	Mon Jun 17 22:03:50 2019
+++ src/doc/3RDPARTY	Tue Jun 18 21:08:34 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1628 2019/06/17 22:03:50 sevan Exp $
+#	$NetBSD: 3RDPARTY,v 1.1629 2019/06/18 21:08:34 sevan Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -209,12 +209,12 @@ Notes:
 Delete "queue.h" from the distribution.
 
 Package:	bsd-family-tree
-Version:	349157
-Current Vers:	349157
+Version:	349177
+Current Vers:	349177
 Maintainer:	The FreeBSD Project
 Archive Site:	https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 Home Page:	https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
-Date:		2019-06-17
+Date:		2019-06-18
 Mailing List:
 Responsible:
 License:	BSD (2-clause) (see http://www.freebsd.org/cgi/cvsweb.cgi/src/COPYRIGHT)



CVS commit: src/share/misc

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 21:07:21 UTC 2019

Modified Files:
src/share/misc: bsd-family-tree

Log Message:
Sync with FreeBSD r349177


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/share/misc/bsd-family-tree

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



CVS commit: src/share/misc

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 21:07:21 UTC 2019

Modified Files:
src/share/misc: bsd-family-tree

Log Message:
Sync with FreeBSD r349177


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.73 src/share/misc/bsd-family-tree:1.74
--- src/share/misc/bsd-family-tree:1.73	Mon Jun 17 21:51:56 2019
+++ src/share/misc/bsd-family-tree	Tue Jun 18 21:07:21 2019
@@ -64,14 +64,14 @@ Tenth Edition | 
||   4.4BSD-Encumbered  | |
|-NetBSD 0.8|   BSD/386 1.0
|   /|  | |
-FreeBSD 1.0 <-'  NetBSD 0.9|   BSD/386 1.1
+FreeBSD 1.0 <-' *--NetBSD 0.9  |   BSD/386 1.1
||   .- 4.4BSD Lite   |
-FreeBSD 1.1 |  /   /   | \   |
-   || /   /|  \  |
-FreeBSD 1.1.5   .---|'   / |   \ |
-   |   /|   /  |\|
-FreeBSD 1.1.5.1   / |  /   | \   |
-   | /   NetBSD 1.0 <-'|  \  |
+FreeBSD 1.1 |  / / | \   |
+   || / |  |  \  |
+FreeBSD 1.1.5   .---|'  |  |   \ |
+   |   /|   |  |\|
+FreeBSD 1.1.5.1   / |   |  | \   |
+   | /  *--NetBSD 1.0 <-'  |  \  |
|/   |  |   \ |
 FreeBSD 2.0 <--'|  |   BSD/OS 2.0
| \ | |
@@ -83,9 +83,9 @@ FreeBSD 2.0.5 \ 
| | | |   OpenBSD 2.3 |   |
| | | |BSD/OS 3.0 |
 FreeBSD 2.1  | | |   |
- |   |   | |  NetBSD 1.1 --.   BSD/OS 2.1
- | FreeBSD 2.1.5 | | |  \|
- | | | |  NetBSD 1.2 \ BSD/OS 3.0
+ |   |   | | *--NetBSD 1.1 -.  BSD/OS 2.1
+ | FreeBSD 2.1.5 | | |   \   |
+ | | | | *--NetBSD 1.2\BSD/OS 3.0
  | FreeBSD 2.1.6 | | |  \  OpenBSD 2.0   |
  | | | | |   \ | |
  | FreeBSD 2.1.6.1   | | |\| |
@@ -103,7 +103,7 @@ FreeBSD 2.1  | | |  
  | | | | | | |
  | FreeBSD 2.2.5 | | | | |
  | | | | | OpenBSD 2.2   |
- | | | |  NetBSD 1.3   | |
+ | | | | *--NetBSD 1.3 | |
  | FreeBSD 2.2.6 | | ||| |
  | | | | | NetBSD 1.3.1|   BSD/OS 3.1
  | | | | ||OpenBSD 2.3   |
@@ -119,7 +119,7 @@ FreeBSD 3.0 <* | |v 
  | | | NetBSD 1.3.3| |
  *---FreeBSD 3.1   | | | |
  |   | | | |   BSD/OS 4.0.1
- |   FreeBSD 3.2*  |  NetBSD 1.4   OpenBSD 2.5   |
+ |   FreeBSD 3.2*  |  .--*--NetBSD 1.4 OpenBSD 2.5   |
  |   |  |  |  |  ||| |
  |   |  |  |  |  ||| |
  |   |  |  |  |  ||| |
@@ -142,7 +142,7 @@ FreeBSD 4.0  |  |  |  |  | NetBSD 1.
  |  | Mac OS X   | OpenBSD 2.8 BSD/OS 4.2
  |  | |  | | |
  |  | |  | | |
- |  |   10.0  NetBSD 1.5   | |
+ |  |   10.0 *--NetBSD 1.5 | |
  |   FreeBSD 4.3  |  ||| |
  |  | |  ||OpenBSD 2.9   |
  |  | |  | NetBSD 1.5.1| |
@@ -157,7 +157,7 @@ FreeBSD 4.0  |  |  |  |  | NetBSD 1.
  |   FreeBSD 4.6.2 Mac OS X  | | |
  |  |10.2| | |
  |   FreeBSD 4.7  |  | | |
- |  | |   NetBSD 1.6   OpenBSD 3.2  

CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:46:03 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
sort -u opt_ to remove dup.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/compat/netbsd32/netbsd32_netbsd.c

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:46:03 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
sort -u opt_ to remove dup.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/compat/netbsd32/netbsd32_netbsd.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.225 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.226
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.225	Tue Jun 18 12:22:54 2019
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Tue Jun 18 12:46:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.225 2019/06/18 16:22:54 christos Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.226 2019/06/18 16:46:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.225 2019/06/18 16:22:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.226 2019/06/18 16:46:03 christos Exp $");
 
 /*
  * below are all the standard NetBSD system calls, in the 32bit
@@ -46,15 +46,14 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_net
  */
 
 #if defined(_KERNEL_OPT)
+#include "opt_compat_43.h"
+#include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
-#include "opt_ntp.h"
 #include "opt_ktrace.h"
-#include "opt_compat_netbsd.h"
-#include "opt_compat_43.h"
-#include "opt_sysv.h"
+#include "opt_ntp.h"
 #include "opt_quota.h"
 #include "opt_syscall_debug.h"
-#include "opt_quota.h"
+#include "opt_sysv.h"
 #endif
 
 #include 



Re: CVS commit: src/sys/conf

2019-06-18 Thread Christos Zoulas
On Jun 18,  9:37pm, r...@tetera.org (Ryo ONODERA) wrote:
-- Subject: Re: CVS commit: src/sys/conf

| chris...@astron.com (Christos Zoulas) writes:
| 
| > Yes, the question becomes should be part of the default GENERIC build?
| > I think not (like before).
| 
| I feel that chfs should be disabled by default.
| And hopefully it should be documented that flash(4) is required
| in filesystems.config or similar place.

Yes, I agree. Can you supply a patch (documentation)?
- there is no nand9 man page?

christos


CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:24:32 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.140 -r1.141 src/sys/compat/netbsd32/netbsd32_syscallargs.h \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.139 -r1.140 src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/netbsd32/netbsd32_systrace_args.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/compat/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.141 src/sys/compat/netbsd32/netbsd32_syscall.h:1.142
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.141	Mon Jun 17 21:37:04 2019
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Tue Jun 18 12:24:32 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.141 2019/06/18 01:37:04 christos Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.142 2019/06/18 16:24:32 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.126 2019/06/18 01:36:50 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.127 2019/06/18 16:23:24 christos Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -1240,9 +1240,13 @@
 /* syscall: "netbsd32_futimens" ret: "int" args: "int" "const netbsd32_timespecp_t" */
 #define	NETBSD32_SYS_netbsd32_futimens	472
 
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 /* syscall: "netbsd32___quotactl" ret: "int" args: "const netbsd32_charp" "netbsd32_voidp" */
 #define	NETBSD32_SYS_netbsd32___quotactl	473
 
+#else
+/* 473 is excluded netbsd32___quotactl */
+#endif
 /* syscall: "netbsd32_posix_spawn" ret: "int" args: "netbsd32_pid_tp" "const netbsd32_charp" "const netbsd32_posix_spawn_file_actionsp" "const netbsd32_posix_spawnattrp" "netbsd32_charpp" "netbsd32_charpp" */
 #define	NETBSD32_SYS_netbsd32_posix_spawn	474
 

Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.140 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.141
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.140	Mon Jun 17 21:37:04 2019
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Tue Jun 18 12:24:32 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.140 2019/06/18 01:37:04 christos Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.141 2019/06/18 16:24:32 christos Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.126 2019/06/18 01:36:50 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.127 2019/06/18 16:23:24 christos Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -2534,12 +2534,15 @@ struct netbsd32_futimens_args {
 	syscallarg(const netbsd32_timespecp_t) tptr;
 };
 check_syscall_args(netbsd32_futimens)
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 
 struct netbsd32___quotactl_args {
 	syscallarg(const netbsd32_charp) path;
 	syscallarg(netbsd32_voidp) args;
 };
 check_syscall_args(netbsd32___quotactl)
+#else
+#endif
 
 struct netbsd32_posix_spawn_args {
 	syscallarg(netbsd32_pid_tp) pid;
@@ -3424,8 +3427,11 @@ int	netbsd32_unlinkat(struct lwp *, cons
 
 int	netbsd32_futimens(struct lwp *, const struct netbsd32_futimens_args *, register_t *);
 
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 int	netbsd32___quotactl(struct lwp *, const struct netbsd32___quotactl_args *, register_t *);
 
+#else
+#endif
 int	netbsd32_posix_spawn(struct lwp *, const struct netbsd32_posix_spawn_args *, register_t *);
 
 int	netbsd32_recvmmsg(struct lwp *, const struct netbsd32_recvmmsg_args *, register_t *);
Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.140 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.141
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.140	Mon Jun 17 21:37:04 2019
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Tue Jun 18 12:24:32 2019
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.140 2019/06/18 01:37:04 christos Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.141 2019/06/18 16:24:32 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.126 2019/06/18 01:36:50 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.127 2019/06/18 16:23:24 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.140 2019/06/18 01:37:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: 

CVS commit: src/sys/kern

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:24:17 UTC 2019

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
include #ifdefs in the syscalls autoload file and make it standalone.
XXX: This needs to be re-thought


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/kern/makesyscalls.sh

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:24:32 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c
netbsd32_systrace_args.c

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/compat/netbsd32/netbsd32_syscall.h
cvs rdiff -u -r1.140 -r1.141 src/sys/compat/netbsd32/netbsd32_syscallargs.h \
src/sys/compat/netbsd32/netbsd32_syscalls.c
cvs rdiff -u -r1.20 -r1.21 \
src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c
cvs rdiff -u -r1.139 -r1.140 src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.31 -r1.32 src/sys/compat/netbsd32/netbsd32_systrace_args.c

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



CVS commit: src/sys/kern

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:24:17 UTC 2019

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
include #ifdefs in the syscalls autoload file and make it standalone.
XXX: This needs to be re-thought


To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/kern/makesyscalls.sh

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/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.172 src/sys/kern/makesyscalls.sh:1.173
--- src/sys/kern/makesyscalls.sh:1.172	Sun Aug 26 07:53:28 2018
+++ src/sys/kern/makesyscalls.sh	Tue Jun 18 12:24:17 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.172 2018/08/26 11:53:28 kre Exp $
+#	$NetBSD: makesyscalls.sh,v 1.173 2019/06/18 16:24:17 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -94,6 +94,7 @@ esac
 $fail && exit 1
 
 # tmp files:
+sysautoloadbottom="$sysautoload.bottom"
 sysdcl="sysent.dcl"
 sysprotos="sys.protos"
 syscompat_pref="sysent."
@@ -106,7 +107,7 @@ systracetmp="systrace.$$"
 systraceret="systraceret.$$"
 
 cleanup() {
-rm $sysdcl $sysprotos $sysent $sysnamesbottom $sysnamesfriendly $rumpsysent $rumptypes $rumpprotos $systracetmp $systraceret
+rm $sysdcl $sysprotos $sysent $sysnamesbottom $sysnamesfriendly $rumpsysent $rumptypes $rumpprotos $systracetmp $systraceret $sysautoloadbottom
 }
 trap "cleanup" 0
 
@@ -162,7 +163,6 @@ BEGIN {
 
 	# to allow nested #if/#else/#endif sets
 	savedepth = 0
-	auto_skip = 0
 	# to track already processed syscalls
 
 	sysnames = \"$sysnames\"
@@ -174,6 +174,7 @@ BEGIN {
 	systracetmp = \"$systracetmp\"
 	systraceret = \"$systraceret\"
 	sysautoload = \"$sysautoload\"
+	sysautoloadbottom = \"${sysautoload}.bottom\"
 	rumpcalls = \"$rumpcalls\"
 	rumpcallshdr = \"$rumpcallshdr\"
 	rumpsysent = \"$rumpsysent\"
@@ -272,9 +273,8 @@ NR == 1 {
 
 	printf " * created from%s\n */\n\n", $0 > sysautoload
 	printf "#include \n__KERNEL_RCSID(0, \"%s\");\n\n", tag > sysautoload
-	printf("#include \n")		> sysautoload
 	printf("static struct sc_autoload " emulname \
-		"_syscalls_autoload[] = {\n")		> sysautoload
+		"_syscalls_autoload[] = {\n")		> sysautoloadbottom
 
 	printf " * created from%s\n */\n\n", $0 > rumpcalls
 	printf "#ifdef RUMP_CLIENT\n" > rumpcalls
@@ -418,30 +418,19 @@ $0 ~ /^%%$/ {
 $1 ~ /^#[ 	]*include/ {
 	print > sysdcl
 	print > sysnames
+	print > sysautoload
 	next
 }
 $1 ~ /^#/ && !intable {
 	print > sysdcl
 	print > sysnames
+	print > sysautoload
 	next
 }
 $1 ~ /^#/ && intable {
 	if ($1 ~ /^#[ 	]*if/) {
 		savedepth++
 		savesyscall[savedepth] = syscall
-		skip_auto[savedepth] = auto_skip
-		auto_skip = 0
-
-		# Special handling for sysautoload conditionals
-		#
-		# We ignore all conditions other than those for
-		# !defined(_LP64) which are used for SYSV* syscalls
-		# only
-
-		if ($0 ~ /!defined\(_LP64\)/) {
-			printf("#if !defined(_LP64)\n") > sysautoload
-			auto_skip = savedepth
-		}
 	}
 	if ($1 ~ /^#[ 	]*else/) {
 		if (savedepth <= 0) {
@@ -449,9 +438,6 @@ $1 ~ /^#/ && intable {
 			infile, NR)
 			exit 1
 		}
-		if (auto_skip == savedepth) {
-			print > sysautoload
-		}
 		syscall = savesyscall[savedepth]
 	}
 	if ($1 ~ /^#[   ]*endif/) {
@@ -460,16 +446,13 @@ $1 ~ /^#/ && intable {
 			infile, NR)
 			exit 1
 		}
-		if (auto_skip == savedepth) {
-			print > sysautoload
-		}
-		auto_skip = skip_auto[savedepth];
 		savedepth--
 	}
 	print > sysent
 	print > sysarghdr
 	print > sysnumhdr
 	print > sysprotos
+	print > sysautoloadbottom
 	print > sysnamesbottom
 	print > sysnamesfriendly
 	print > systrace
@@ -709,9 +692,9 @@ function printproto(wrap) {
 	syscall) > sysnumhdr
 
 	# output entry for syscall autoload table, if modular
-	if (modular ) {
+	if (modular) {
 		printf("\t{ %s%s%s, \"%s\" },\n", constprefix, wrap,
-		funcalias, modname) > sysautoload
+		   funcalias, modname) > sysautoloadbottom
 	}
 
 
@@ -1190,13 +1173,14 @@ END {
 cat $sysprotos >> $sysarghdr
 echo "#endif /* _${constprefix}SYSCALL_H_ */" >> $sysnumhdr
 echo "#endif /* _${constprefix}SYSCALLARGS_H_ */" >> $sysarghdr
-printf "\t{ 0, NULL }\n" >> $sysautoload
-echo "};" >> $sysautoload
+printf "\t{ 0, NULL }\n" >> $sysautoloadbottom
+echo "};" >> $sysautoloadbottom
 printf "\n#endif /* _RUMP_RUMP_SYSCALLS_H_ */\n" >> $rumpprotos
 cat $sysdcl $sysent > $syssw
 cat $sysnamesbottom >> $sysnames
 cat $sysnamesfriendly >> $sysnames
 cat $rumpsysent >> $rumpcalls
+cat $sysautoloadbottom >> $sysautoload
 
 touch $rumptypes
 cat $rumptypes >> $rumpcallshdr



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:23:24 UTC 2019

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add ifdef for quota and include the syscall numbers header


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/compat/netbsd32/syscalls.master

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

Modified files:

Index: src/sys/compat/netbsd32/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.126 src/sys/compat/netbsd32/syscalls.master:1.127
--- src/sys/compat/netbsd32/syscalls.master:1.126	Mon Jun 17 21:36:50 2019
+++ src/sys/compat/netbsd32/syscalls.master	Tue Jun 18 12:23:24 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.126 2019/06/18 01:36:50 christos Exp $
+	$NetBSD: syscalls.master,v 1.127 2019/06/18 16:23:24 christos Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -50,6 +50,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 %%
@@ -1124,8 +1125,12 @@
 			int flag); }
 472	STD  		{ int|netbsd32||futimens(int fd, \
 			const netbsd32_timespecp_t tptr); }
+#if defined(QUOTA) || !defined(_KERNEL_OPT)
 473	STD		{ int|netbsd32||__quotactl(const netbsd32_charp path, \
 			netbsd32_voidp args); }
+#else
+473	EXCL		netbsd32___quotactl
+#endif
 474	NOERR		{ int|netbsd32||posix_spawn(netbsd32_pid_tp pid, \
 			const netbsd32_charp path, \
 			const netbsd32_posix_spawn_file_actionsp \



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:23:24 UTC 2019

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add ifdef for quota and include the syscall numbers header


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/compat/netbsd32/syscalls.master

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:22:54 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c netbsd32_quota.c

Log Message:
Add options for quota.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/netbsd32/netbsd32_quota.c

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:22:54 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c netbsd32_quota.c

Log Message:
Add options for quota.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/netbsd32/netbsd32_quota.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/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.224 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.225
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.224	Tue Jun 18 12:05:30 2019
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Tue Jun 18 12:22:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.224 2019/06/18 16:05:30 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.225 2019/06/18 16:22:54 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.224 2019/06/18 16:05:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.225 2019/06/18 16:22:54 christos Exp $");
 
 /*
  * below are all the standard NetBSD system calls, in the 32bit
@@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_net
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
 #include "opt_sysv.h"
+#include "opt_quota.h"
 #include "opt_syscall_debug.h"
 #include "opt_quota.h"
 #endif

Index: src/sys/compat/netbsd32/netbsd32_quota.c
diff -u src/sys/compat/netbsd32/netbsd32_quota.c:1.1 src/sys/compat/netbsd32/netbsd32_quota.c:1.2
--- src/sys/compat/netbsd32/netbsd32_quota.c:1.1	Mon Dec 24 15:44:39 2018
+++ src/sys/compat/netbsd32/netbsd32_quota.c	Tue Jun 18 12:22:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_quota.c,v 1.1 2018/12/24 20:44:39 mrg Exp $	*/
+/*	$NetBSD: netbsd32_quota.c,v 1.2 2019/06/18 16:22:54 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -29,7 +29,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_quota.c,v 1.1 2018/12/24 20:44:39 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_quota.c,v 1.2 2019/06/18 16:22:54 christos Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_quota.h"
+#endif
 
 #include 
 #include 
@@ -42,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_quo
 #include 
 #include 
 
+#ifdef QUOTA
 int
 netbsd32___quotactl(struct lwp *l, const struct netbsd32___quotactl_args *uap, register_t *retval)
 {
@@ -135,3 +140,4 @@ netbsd32___quotactl(struct lwp *l, const
 
 	return do_sys_quotactl(SCARG_P32(uap, path), &args);
 }
+#endif



CVS commit: src/sys/kern

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:06:45 UTC 2019

Modified Files:
src/sys/kern: syscalls.master

Log Message:
remove XXX from the quota call.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/kern/syscalls.master

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/syscalls.master
diff -u src/sys/kern/syscalls.master:1.294 src/sys/kern/syscalls.master:1.295
--- src/sys/kern/syscalls.master:1.294	Sat Jan 26 21:08:43 2019
+++ src/sys/kern/syscalls.master	Tue Jun 18 12:06:45 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.294 2019/01/27 02:08:43 pgoyette Exp $
+	$NetBSD: syscalls.master,v 1.295 2019/06/18 16:06:45 christos Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -314,8 +314,8 @@
 146	COMPAT_43 MODULAR compat_43	\
 		{ int|sys||killpg(int pgid, int signum); } okillpg
 147	STD 	RUMP 	{ int|sys||setsid(void); }
-148	COMPAT_50 MODULAR XXX { int|sys||quotactl(const char *path, int cmd, \
-			int uid, void *arg); }
+148	COMPAT_50 MODULAR compat_50 { int|sys||quotactl(const char *path, \
+			  int cmd, int uid, void *arg); }
 149	COMPAT_43 MODULAR compat_43 { int|sys||quota(void); } oquota
 150	COMPAT_43 MODULAR compat_43 { int|sys||getsockname(int fdec,	\
 			void *asa, socklen_t *alen); } ogetsockname



CVS commit: src/sys/kern

2019-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 18 16:06:45 UTC 2019

Modified Files:
src/sys/kern: syscalls.master

Log Message:
remove XXX from the quota call.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/sys/kern/syscalls.master

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 18 16:05:30 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
Include opt_quota.h

Fixes (at least) the amd64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/sys/compat/netbsd32/netbsd32_netbsd.c

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



CVS commit: src/sys/compat/netbsd32

2019-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 18 16:05:30 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_netbsd.c

Log Message:
Include opt_quota.h

Fixes (at least) the amd64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/sys/compat/netbsd32/netbsd32_netbsd.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.223 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.224
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.223	Sun Jan 27 02:08:40 2019
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Tue Jun 18 16:05:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.223 2019/01/27 02:08:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.224 2019/06/18 16:05:30 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.223 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.224 2019/06/18 16:05:30 pgoyette Exp $");
 
 /*
  * below are all the standard NetBSD system calls, in the 32bit
@@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_net
 #include "opt_compat_43.h"
 #include "opt_sysv.h"
 #include "opt_syscall_debug.h"
+#include "opt_quota.h"
 #endif
 
 #include 



CVS commit: src/sys/modules/compat_netbsd32_50

2019-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 18 15:26:28 UTC 2019

Modified Files:
src/sys/modules/compat_netbsd32_50: Makefile

Log Message:
Include quota compat code by default


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_50/Makefile

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



CVS commit: src/sys/modules/compat_netbsd32_50

2019-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 18 15:26:28 UTC 2019

Modified Files:
src/sys/modules/compat_netbsd32_50: Makefile

Log Message:
Include quota compat code by default


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/compat_netbsd32_50/Makefile

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

Modified files:

Index: src/sys/modules/compat_netbsd32_50/Makefile
diff -u src/sys/modules/compat_netbsd32_50/Makefile:1.3 src/sys/modules/compat_netbsd32_50/Makefile:1.4
--- src/sys/modules/compat_netbsd32_50/Makefile:1.3	Sun Feb 17 04:05:45 2019
+++ src/sys/modules/compat_netbsd32_50/Makefile	Tue Jun 18 15:26:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:45 rin Exp $
+#	$NetBSD: Makefile,v 1.4 2019/06/18 15:26:27 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -6,7 +6,7 @@
 
 KMOD=	compat_netbsd32_50
 
-CPPFLAGS+=	-DNTP
+CPPFLAGS+=	-DNTP -DQUOTA
 CPPFLAGS+=	-DCOMPAT_NETBSD32
 CPPFLAGS+=	-DCOMPAT_50 -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
 CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist



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

2019-06-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 18 15:21:19 UTC 2019

Modified Files:
src/sys/arch/arm/include: ptrace.h

Log Message:
Use UAL syntax for udf.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/ptrace.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/arm/include/ptrace.h
diff -u src/sys/arch/arm/include/ptrace.h:1.13 src/sys/arch/arm/include/ptrace.h:1.14
--- src/sys/arch/arm/include/ptrace.h:1.13	Mon Jun 17 17:53:22 2019
+++ src/sys/arch/arm/include/ptrace.h	Tue Jun 18 15:21:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.13 2019/06/17 17:53:22 kamil Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.14 2019/06/18 15:21:19 skrll Exp $	*/
 
 /*
  * Copyright (c) 1995 Frank Lancaster
@@ -64,7 +64,7 @@
 #define PTRACE_REG_SP(_r)		(_r)->r_sp
 #define PTRACE_REG_INTRV(_r)		(_r)->r[0]
 
-#define PTRACE_ILLEGAL_ASM	__asm __volatile ("udf $0" : : : "memory")
+#define PTRACE_ILLEGAL_ASM	__asm __volatile ("udf #0" : : : "memory")
 
 #ifdef __ARMEB__
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0xfe, 0xde, 0xff, 0xe7 })



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

2019-06-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 18 15:21:19 UTC 2019

Modified Files:
src/sys/arch/arm/include: ptrace.h

Log Message:
Use UAL syntax for udf.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/ptrace.h

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



CVS commit: src/external/bsd/wpa/bin/wpa_cli

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 14:28:41 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_cli: wpa_cli.8

Log Message:
Add more information about commands. Add a working, annotated example.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8

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

Modified files:

Index: src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8
diff -u src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.3 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.4
--- src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8:1.3	Tue Mar 18 18:20:36 2014
+++ src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8	Tue Jun 18 14:28:40 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpa_cli.8,v 1.3 2014/03/18 18:20:36 riastradh Exp $
+.\" $NetBSD: wpa_cli.8,v 1.4 2019/06/18 14:28:40 maya Exp $
 .\"
 .\" Copyright (c) 2005 Sam Leffler 
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" Based on:
 .\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/wpa/wpa_cli/wpa_cli.8,v 1.2 2005/06/27 06:40:43 ru Exp $
 .\"
-.Dd October 1, 2005
+.Dd June 18, 2019
 .Dt WPA_CLI 8
 .Os
 .Sh NAME
@@ -159,6 +159,21 @@ Report the current WPA/EAPOL/EAP status 
 Report MIB variables (dot1x, dot11) for the current interface.
 .It Ic help
 Show usage help.
+.It Ic status
+Get current WPA/EAPOL/EAP status.
+.It Ic add_network
+Add a network. Returns a number to be used in set_network commands.
+.It Ic set_network Ar network_id ssid Ar my_ssid_name
+Make network_id use the SSID my_ssid_name.
+.It Ic set_network Ar network_id psk Ar my_ssid_password
+Make network_id use the password my_ssid_password
+.It Ic enable_network Ar network_id
+Begin using the network at network_id.
+.It Ic list_network
+List the networks configured.
+.It Ic scan
+Begin a scan of nearby APs. Results can be obtained with
+.Ic scan_results .
 .It Ic interface Op Ar ifname
 Show available interfaces and/or set the current interface
 when multiple are available.
@@ -210,6 +225,38 @@ Exit
 .Sh SEE ALSO
 .Xr wpa_supplicant.conf 5 ,
 .Xr wpa_supplicant 8
+.Sh EXAMPLES
+A sample run of discovering and connecting to a network
+with SSID "MyWifiNetwork" and with a password "MyWifiPassword".
+.Pp
+If wpa_supplicant isn't already running, start it with the command
+.Ic service wpa_supplicant onestart .
+.Pp
+Find the network
+.Bd -literal -offset indent
+.Ic scan
+.Ic scan_results
+17:07:08.868: bssid / frequency / signal level / flags / ssid
+14:aa:ff:ee:aa:cc	2437	187	[WPA-PSK-CCMP+TKIP][ESS]	MyWifiNetwork
+44:ee:ff:bb:33:33	2452	168	[WPA2-PSK-CCMP][ESS]	SomeOtherNetwork
+.Ed
+.Pp
+Now, let's create a network and configure it.
+.Bd -literal -offset indent
+.Ic add_network
+17:08:13.047: 1
+.Ed
+.Pp
+That means the new network_id we should use is 1.
+.Bd -literal -offset indent
+.Ic set_network 1 ssid \[dq]MyWifiNetwork\[dq]
+.Ic set_network 1 psk \[dq]MyWifiPassword\[dq]
+.Ic enable_network 1
+.Ed
+.Pp
+After this point, you should be connected, but no IP address
+is configured. You will likely want to configure the address using
+.Xr dhcpcd 8 .
 .Sh HISTORY
 The
 .Nm



CVS commit: src/external/bsd/wpa/bin/wpa_cli

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 14:28:41 UTC 2019

Modified Files:
src/external/bsd/wpa/bin/wpa_cli: wpa_cli.8

Log Message:
Add more information about commands. Add a working, annotated example.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/wpa/bin/wpa_cli/wpa_cli.8

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



CVS commit: src/lib/libc/compat/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 14:25:04 UTC 2019

Modified Files:
src/lib/libc/compat/sys: compat_mknod.c

Log Message:
Fix warning message for mknod symbol linkage

The correct reference for mknod(2) is in 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/compat/sys/compat_mknod.c

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



CVS commit: src/lib/libc/compat/sys

2019-06-18 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 18 14:25:04 UTC 2019

Modified Files:
src/lib/libc/compat/sys: compat_mknod.c

Log Message:
Fix warning message for mknod symbol linkage

The correct reference for mknod(2) is in 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/compat/sys/compat_mknod.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/compat/sys/compat_mknod.c
diff -u src/lib/libc/compat/sys/compat_mknod.c:1.4 src/lib/libc/compat/sys/compat_mknod.c:1.5
--- src/lib/libc/compat/sys/compat_mknod.c:1.4	Fri Oct  4 21:07:37 2013
+++ src/lib/libc/compat/sys/compat_mknod.c	Tue Jun 18 14:25:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mknod.c,v 1.4 2013/10/04 21:07:37 christos Exp $ */
+/*	$NetBSD: compat_mknod.c,v 1.5 2019/06/18 14:25:04 kamil Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat_mknod.c,v 1.4 2013/10/04 21:07:37 christos Exp $");
+__RCSID("$NetBSD: compat_mknod.c,v 1.5 2019/06/18 14:25:04 kamil Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -48,7 +48,7 @@ __RCSID("$NetBSD: compat_mknod.c,v 1.4 2
 #include 
 
 __warn_references(mknod,
-"warning: reference to compatibility mknod(); include  to generate correct reference")
+"warning: reference to compatibility mknod(); include  to generate correct reference")
 
 __strong_alias(mknod, __compat_mknod)
 



CVS commit: src/share/man/man8

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 13:27:25 UTC 2019

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
Don't describe wpa supplicant flags now that they aren't needed.

I'm intentionally not describing wpa_cli since it seems to be a worse
user experience than appending with wpa_passphrase.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/share/man/man8/afterboot.8

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

Modified files:

Index: src/share/man/man8/afterboot.8
diff -u src/share/man/man8/afterboot.8:1.60 src/share/man/man8/afterboot.8:1.61
--- src/share/man/man8/afterboot.8:1.60	Sun Sep 10 19:08:17 2017
+++ src/share/man/man8/afterboot.8	Tue Jun 18 13:27:25 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: afterboot.8,v 1.60 2017/09/10 19:08:17 maya Exp $
+.\"	$NetBSD: afterboot.8,v 1.61 2019/06/18 13:27:25 maya Exp $
 .\"	$OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
 .\"
 .\" Originally created by Marshall M. Midden -- 1997-10-20, m...@umn.edu
@@ -59,7 +59,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 10, 2017
+.Dd June 18, 2019
 .Dt AFTERBOOT 8
 .Os
 .Sh NAME
@@ -411,18 +411,16 @@ You can scan for nearby wireless network
 .Pp
 To connect to a wireless network using WPA and DHCP:
 .Bd -literal -offset indent
-.Ic wpa_passphrase networkname password > /etc/wpa_supplicant.conf
-.Ic wpa_supplicant -i iwm0 -c /etc/wpa_supplicant.conf &
-.Ic dhcpcd iwm0
+.Ic wpa_passphrase networkname password >> /etc/wpa_supplicant.conf
+.Ic servpce wpa_supplicant onestart
+.Ic service dhcpcd onestart
 .Ed
 .Pp
-To automatically connect at boot, add the following flags to
+To automatically connect at boot, add the following to
 .Pa /etc/rc.conf :
 .Pp
 .Dl dhcpcd=YES
-.Dl dhcpcd_flags="-b"
 .Dl wpa_supplicant=YES
-.Dl wpa_supplicant_flags="-i iwm0 -c /etc/wpa_supplicant.conf"
 .Ss RPC-based network services
 Several services depend on the RPC portmapper
 .Xr rpcbind 8



CVS commit: src/share/man/man8

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 13:27:25 UTC 2019

Modified Files:
src/share/man/man8: afterboot.8

Log Message:
Don't describe wpa supplicant flags now that they aren't needed.

I'm intentionally not describing wpa_cli since it seems to be a worse
user experience than appending with wpa_passphrase.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/share/man/man8/afterboot.8

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



Re: CVS commit: src/sys/conf

2019-06-18 Thread Ryo ONODERA
chris...@astron.com (Christos Zoulas) writes:

> Yes, the question becomes should be part of the default GENERIC build?
> I think not (like before).

I feel that chfs should be disabled by default.
And hopefully it should be documented that flash(4) is required
in filesystems.config or similar place.

Thank you.

> christos
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


CVS commit: src/usr.bin/calendar/calendars

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 12:05:51 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars: calendar.computer

Log Message:
Happy 32nd birthday SDF.org!
https://twitter.com/sdf_pubnix/status/1140280083598327810
https://sdf.org/?faq?BASICS?02


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/calendar/calendars/calendar.computer

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/calendar/calendars/calendar.computer
diff -u src/usr.bin/calendar/calendars/calendar.computer:1.6 src/usr.bin/calendar/calendars/calendar.computer:1.7
--- src/usr.bin/calendar/calendars/calendar.computer:1.6	Sun Jan 24 22:56:12 2010
+++ src/usr.bin/calendar/calendars/calendar.computer	Tue Jun 18 12:05:51 2019
@@ -44,6 +44,8 @@
 06/10	First Apple II shipped, 1977
 06/15	UNIVAC I delivered to the Census Bureau, 1951
 06/16	First programming error at Census Bureau, 1951 (apocryphal)
+06/16	Super Dimension Fortress (SDF) BBS received it's first caller on an
+	Apple ][e known as the SDF-1, 1987
 06/19	FreeBSD project born, 1993
 06/23	IBM unbundles software, 1969
 06/30	First advanced degree on computer related topic: to H. Karamanian,



CVS commit: src/usr.bin/calendar/calendars

2019-06-18 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 18 12:05:51 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars: calendar.computer

Log Message:
Happy 32nd birthday SDF.org!
https://twitter.com/sdf_pubnix/status/1140280083598327810
https://sdf.org/?faq?BASICS?02


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/calendar/calendars/calendar.computer

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



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

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 11:28:30 UTC 2019

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

Log Message:
Include mesa-ver.mk so MESA_VER doesn't get expanded into an empty string.

This changes the output of glGetString(GL_VERSION)
from: 3.1 Mesa
to: 3.1 Mesa 18.3.4

This means programs like firefox/libreoffice no longer blacklist our mesa
version as being too old.

Fixes WebGL on firefox with AMD CEDAR, reported by nia.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/libmesa.mk

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

Modified files:

Index: src/external/mit/xorg/lib/libmesa.mk
diff -u src/external/mit/xorg/lib/libmesa.mk:1.6 src/external/mit/xorg/lib/libmesa.mk:1.7
--- src/external/mit/xorg/lib/libmesa.mk:1.6	Wed Apr  3 15:26:34 2019
+++ src/external/mit/xorg/lib/libmesa.mk	Tue Jun 18 11:28:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: libmesa.mk,v 1.6 2019/04/03 15:26:34 joerg Exp $
+#	$NetBSD: libmesa.mk,v 1.7 2019/06/18 11:28:30 maya Exp $
 #
 # Consumer of this Makefile should set MESA_SRC_MODULES.
 
@@ -543,3 +543,5 @@ CPPFLAGS+=	\
 	-DYYTEXT_POINTER=1
 
 CFLAGS+=	-fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp
+
+.include "libGL/mesa-ver.mk"



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

2019-06-18 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jun 18 11:28:30 UTC 2019

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

Log Message:
Include mesa-ver.mk so MESA_VER doesn't get expanded into an empty string.

This changes the output of glGetString(GL_VERSION)
from: 3.1 Mesa
to: 3.1 Mesa 18.3.4

This means programs like firefox/libreoffice no longer blacklist our mesa
version as being too old.

Fixes WebGL on firefox with AMD CEDAR, reported by nia.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/libmesa.mk

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



CVS commit: src/usr.sbin/sysinst

2019-06-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 18 10:46:51 UTC 2019

Modified Files:
src/usr.sbin/sysinst: util.c

Log Message:
When creating an install description from existing partitions, use
the inner partitioning scheme (e.g.: disklabel) instead of the
outer (e.g. MBR).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/util.c

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



CVS commit: src/usr.sbin/sysinst

2019-06-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 18 10:46:51 UTC 2019

Modified Files:
src/usr.sbin/sysinst: util.c

Log Message:
When creating an install description from existing partitions, use
the inner partitioning scheme (e.g.: disklabel) instead of the
outer (e.g. MBR).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/util.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.sbin/sysinst/util.c
diff -u src/usr.sbin/sysinst/util.c:1.22 src/usr.sbin/sysinst/util.c:1.23
--- src/usr.sbin/sysinst/util.c:1.22	Wed Jun 12 06:20:18 2019
+++ src/usr.sbin/sysinst/util.c	Tue Jun 18 10:46:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.22 2019/06/12 06:20:18 martin Exp $	*/
+/*	$NetBSD: util.c,v 1.23 2019/06/18 10:46:51 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -2032,8 +2032,38 @@ bool
 install_desc_from_parts(struct install_partition_desc *install,
 struct disk_partitions *parts)
 {
+	struct disk_partitions *inner_parts;
+	daddr_t start, size;
+	part_id pno;
+	struct disk_part_info info;
+
 	memset(install, 0, sizeof(*install));
 
+	if (parts->pscheme->secondary_scheme != NULL) {
+		start = -1;
+		size = -1;
+		if (parts->pscheme->guess_install_target != NULL &&
+		parts->pscheme->guess_install_target(parts,
+			&start, &size)) {
+		} else {
+			for (pno = 0; pno < parts->num_part; pno++) {
+if (!parts->pscheme->get_part_info(parts, pno,
+&info))
+	continue;
+if (!(info.flags & PTI_SEC_CONTAINER))
+	continue;
+start = info.start;
+size = info.size;
+			}
+		}
+		if (size > 0) {
+			inner_parts = parts->pscheme->secondary_partitions(
+			parts, start, false);
+			if (inner_parts != NULL)
+parts = inner_parts;
+		}
+	}
+
 	return usage_info_list_from_parts(&install->infos, &install->num,
 	parts);
 }



CVS commit: src/usr.sbin/sysinst

2019-06-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 18 10:45:27 UTC 2019

Modified Files:
src/usr.sbin/sysinst: net.c

Log Message:
Fix buffer size


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sysinst/net.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.sbin/sysinst/net.c
diff -u src/usr.sbin/sysinst/net.c:1.27 src/usr.sbin/sysinst/net.c:1.28
--- src/usr.sbin/sysinst/net.c:1.27	Wed Jun 12 06:20:18 2019
+++ src/usr.sbin/sysinst/net.c	Tue Jun 18 10:45:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: net.c,v 1.27 2019/06/12 06:20:18 martin Exp $	*/
+/*	$NetBSD: net.c,v 1.28 2019/06/18 10:45:27 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -793,7 +793,7 @@ done:
 			net_dev, net_ip, net_srv_ip);
 			strcpy(sl_flags, "-s 115200 -l /dev/tty00");
 			msg_prompt_win(MSG_slattach, -1, 12, 70, 0,
-sl_flags, sl_flags, 255);
+sl_flags, sl_flags, sizeof sl_flags);
 
 			/* XXX: wtf isn't run_program() used here? */
 			pid = fork();



CVS commit: src/usr.sbin/sysinst

2019-06-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 18 10:45:27 UTC 2019

Modified Files:
src/usr.sbin/sysinst: net.c

Log Message:
Fix buffer size


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/sysinst/net.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/x86/pci

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 10:06:49 UTC 2019

Modified Files:
src/sys/arch/x86/pci: msipic.c

Log Message:
 Add note about the case of PCI_MSI_MDATA[64] is 16bit.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/msipic.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/x86/pci/msipic.c
diff -u src/sys/arch/x86/pci/msipic.c:1.15 src/sys/arch/x86/pci/msipic.c:1.16
--- src/sys/arch/x86/pci/msipic.c:1.15	Mon Jun 17 06:38:29 2019
+++ src/sys/arch/x86/pci/msipic.c	Tue Jun 18 10:06:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msipic.c,v 1.15 2019/06/17 06:38:29 msaitoh Exp $	*/
+/*	$NetBSD: msipic.c,v 1.16 2019/06/18 10:06:49 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.15 2019/06/17 06:38:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.16 2019/06/18 10:06:49 msaitoh Exp $");
 
 #include "opt_intrdebug.h"
 
@@ -388,6 +388,15 @@ msi_addroute(struct pic *pic, struct cpu
 	data = __SHIFTIN(idt_vec, LAPIC_VECTOR_MASK)
 		| LAPIC_TRIGMODE_EDGE | LAPIC_DLMODE_FIXED;
 
+	/*
+	 * The size of the message data register is 16bit if the extended
+	 * message data is not implemented. If it's 16bit and the per-vector
+	 * masking is not capable, the location of the upper 16bit is out of
+	 * the MSI capability structure's range. The PCI spec says the upper
+	 * 16bit is driven to 0 if the message data register is 16bit. It's the
+	 * spec, so it's OK just to write it regardless of the value of the
+	 * upper 16bit.
+	 */
 	ctl = pci_conf_read(pc, tag, off + PCI_MSI_CTL);
 	if (ctl & PCI_MSI_CTL_64BIT_ADDR) {
 		pci_conf_write(pc, tag, off + PCI_MSI_MADDR64_LO, addr);



CVS commit: src/sys/arch/x86/pci

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 10:06:49 UTC 2019

Modified Files:
src/sys/arch/x86/pci: msipic.c

Log Message:
 Add note about the case of PCI_MSI_MDATA[64] is 16bit.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/msipic.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/usb

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 18 09:34:57 UTC 2019

Modified Files:
src/sys/dev/usb: if_axen.c if_axenreg.h

Log Message:
move struct axen_chain, struct axen_cdata, struct axen_softc,
struct axen_type, sc_if, GET_MII(), and GET_IFP() -- all the
software defined components from if_axenreg.h into if_axen.c.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/if_axenreg.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/usb

2019-06-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 18 09:34:57 UTC 2019

Modified Files:
src/sys/dev/usb: if_axen.c if_axenreg.h

Log Message:
move struct axen_chain, struct axen_cdata, struct axen_softc,
struct axen_type, sc_if, GET_MII(), and GET_IFP() -- all the
software defined components from if_axenreg.h into if_axen.c.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/if_axen.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/if_axenreg.h

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

Modified files:

Index: src/sys/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.41 src/sys/dev/usb/if_axen.c:1.42
--- src/sys/dev/usb/if_axen.c:1.41	Tue May 28 07:41:50 2019
+++ src/sys/dev/usb/if_axen.c	Tue Jun 18 09:34:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.41 2019/05/28 07:41:50 msaitoh Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.42 2019/06/18 09:34:57 mrg Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.41 2019/05/28 07:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.42 2019/06/18 09:34:57 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -73,6 +73,69 @@ int	axendebug = 0;
 #define DPRINTFN(n, x)
 #endif
 
+struct axen_softc;
+
+struct axen_chain {
+	struct axen_softc	*axen_sc;
+	struct usbd_xfer	*axen_xfer;
+	uint8_t			*axen_buf;
+};
+
+struct axen_cdata {
+	struct axen_chain	axen_tx_chain[AXEN_TX_LIST_CNT];
+	struct axen_chain	axen_rx_chain[AXEN_RX_LIST_CNT];
+	int			axen_tx_prod;
+	int			axen_tx_cnt;
+};
+
+struct axen_softc {
+	device_t		axen_dev;
+	struct ethercom		axen_ec;
+	struct mii_data		axen_mii;
+	krndsource_t		rnd_source;
+	struct usbd_device *	axen_udev;
+	struct usbd_interface *	axen_iface;
+
+	uint16_t		axen_vendor;
+	uint16_t		axen_product;
+	uint16_t		axen_flags;
+
+	int			axen_ed[AXEN_ENDPT_MAX];
+	struct usbd_pipe	*axen_ep[AXEN_ENDPT_MAX];
+	int			axen_if_flags;
+	struct axen_cdata	axen_cdata;
+	struct callout		axen_stat_ch;
+
+	int			axen_refcnt;
+	bool			axen_dying;
+	bool			axen_attached;
+
+	struct usb_task		axen_tick_task;
+
+	krwlock_t		axen_mii_lock;
+
+	int			axen_link;
+
+	int			axen_phyno;
+	struct timeval		axen_rx_notice;
+	struct timeval		axen_tx_notice;
+	u_int			axen_rx_bufsz;
+	u_int			axen_tx_bufsz;
+	int			axen_rev;
+
+#define sc_if	axen_ec.ec_if
+};
+
+#define GET_MII(sc) (&(sc)->axen_mii)
+#define GET_IFP(sc) (&(sc)->sc_if)
+
+struct axen_type {
+	struct usb_devno	axen_dev;
+	uint16_t		axen_flags;
+#define AX178A	0x0001		/* AX88178a */
+#define AX179	0x0002		/* AX88179 */
+};
+
 /*
  * Various supported device vendors/products.
  */

Index: src/sys/dev/usb/if_axenreg.h
diff -u src/sys/dev/usb/if_axenreg.h:1.13 src/sys/dev/usb/if_axenreg.h:1.14
--- src/sys/dev/usb/if_axenreg.h:1.13	Tue May 28 08:59:35 2019
+++ src/sys/dev/usb/if_axenreg.h	Tue Jun 18 09:34:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axenreg.h,v 1.13 2019/05/28 08:59:35 msaitoh Exp $	*/
+/*	$NetBSD: if_axenreg.h,v 1.14 2019/06/18 09:34:57 mrg Exp $	*/
 /*	$OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $	*/
 
 /*
@@ -230,28 +230,6 @@
 #define AXEN_ENDPT_INTR		0x2
 #define AXEN_ENDPT_MAX		0x3
 
-struct axen_type {
-	struct usb_devno	axen_dev;
-	uint16_t		axen_flags;
-#define AX178A	0x0001		/* AX88178a */
-#define AX179	0x0002		/* AX88179 */
-};
-
-struct axen_softc;
-
-struct axen_chain {
-	struct axen_softc	*axen_sc;
-	struct usbd_xfer	*axen_xfer;
-	uint8_t			*axen_buf;
-};
-
-struct axen_cdata {
-	struct axen_chain	axen_tx_chain[AXEN_TX_LIST_CNT];
-	struct axen_chain	axen_rx_chain[AXEN_RX_LIST_CNT];
-	int			axen_tx_prod;
-	int			axen_tx_cnt;
-};
-
 struct axen_qctrl {
 	uint8_t			ctrl;
 	uint8_t			timer_low;
@@ -264,44 +242,3 @@ struct axen_sframe_hdr {
 	uint32_t		plen; /* packet length */
 	uint32_t		gso;
 } __packed;
-
-struct axen_softc {
-	device_t		axen_dev;
-	struct ethercom		axen_ec;
-	struct mii_data		axen_mii;
-	krndsource_t		rnd_source;
-	struct usbd_device *	axen_udev;
-	struct usbd_interface *	axen_iface;
-
-	uint16_t		axen_vendor;
-	uint16_t		axen_product;
-	uint16_t		axen_flags;
-
-	int			axen_ed[AXEN_ENDPT_MAX];
-	struct usbd_pipe	*axen_ep[AXEN_ENDPT_MAX];
-	int			axen_if_flags;
-	struct axen_cdata	axen_cdata;
-	struct callout		axen_stat_ch;
-
-	int			axen_refcnt;
-	bool			axen_dying;
-	bool			axen_attached;
-
-	struct usb_task		axen_tick_task;
-
-	krwlock_t		axen_mii_lock;
-
-	int			axen_link;
-
-	int			axen_phyno;
-	struct timeval		axen_rx_notice;
-	struct timeval		axen_tx_notice;
-	u_int			axen_rx_bufsz;
-	u_int			axen_tx_bufsz;
-	int			axen_rev;
-
-#define sc_if	axen_ec.ec_if
-};
-
-#define GET_MII(sc) (&(sc)->axen_mii)
-#define GET_IFP(sc) (&(sc)->sc_if)



CVS commit: src/sys/net

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 08:36:52 UTC 2019

Modified Files:
src/sys/net: if_vlan.c

Log Message:
 KNF. No functional change.


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

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



CVS commit: src/sys/net

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 08:36:52 UTC 2019

Modified Files:
src/sys/net: if_vlan.c

Log Message:
 KNF. No functional change.


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

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

Modified files:

Index: src/sys/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.136 src/sys/net/if_vlan.c:1.137
--- src/sys/net/if_vlan.c:1.136	Wed May 15 02:59:18 2019
+++ src/sys/net/if_vlan.c	Tue Jun 18 08:36:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.136 2019/05/15 02:59:18 ozaki-r Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.136 2019/05/15 02:59:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -147,7 +147,7 @@ struct ifvlan_linkmib {
 	int	ifvm_mintu;	/* min transmission unit */
 	uint16_t ifvm_proto;	/* encapsulation ethertype */
 	uint16_t ifvm_tag;	/* tag to apply on packets */
-	struct ifnet *ifvm_p;		/* parent interface of this vlan */
+	struct ifnet *ifvm_p;	/* parent interface of this vlan */
 
 	struct psref_target ifvm_psref;
 };
@@ -199,23 +199,19 @@ const struct vlan_multisw vlan_ether_mul
 
 static int	vlan_clone_create(struct if_clone *, int);
 static int	vlan_clone_destroy(struct ifnet *);
-static int	vlan_config(struct ifvlan *, struct ifnet *,
-uint16_t);
+static int	vlan_config(struct ifvlan *, struct ifnet *, uint16_t);
 static int	vlan_ioctl(struct ifnet *, u_long, void *);
 static void	vlan_start(struct ifnet *);
 static int	vlan_transmit(struct ifnet *, struct mbuf *);
 static void	vlan_unconfig(struct ifnet *);
-static int	vlan_unconfig_locked(struct ifvlan *,
-struct ifvlan_linkmib *);
+static int	vlan_unconfig_locked(struct ifvlan *, struct ifvlan_linkmib *);
 static void	vlan_hash_init(void);
 static int	vlan_hash_fini(void);
 static int	vlan_tag_hash(uint16_t, u_long);
 static struct ifvlan_linkmib*	vlan_getref_linkmib(struct ifvlan *,
 struct psref *);
-static void	vlan_putref_linkmib(struct ifvlan_linkmib *,
-struct psref *);
-static void	vlan_linkmib_update(struct ifvlan *,
-struct ifvlan_linkmib *);
+static void	vlan_putref_linkmib(struct ifvlan_linkmib *, struct psref *);
+static void	vlan_linkmib_update(struct ifvlan *, struct ifvlan_linkmib *);
 static struct ifvlan_linkmib*	vlan_lookup_tag_psref(struct ifnet *,
 uint16_t, struct psref *);
 
@@ -348,7 +344,7 @@ vlan_clone_create(struct if_clone *ifc, 
 	struct ifvlan_linkmib *mib;
 	int rv;
 
-	ifv = malloc(sizeof(struct ifvlan), M_DEVBUF, M_WAITOK|M_ZERO);
+	ifv = malloc(sizeof(struct ifvlan), M_DEVBUF, M_WAITOK | M_ZERO);
 	mib = kmem_zalloc(sizeof(struct ifvlan_linkmib), KM_SLEEP);
 	ifp = &ifv->ifv_if;
 	LIST_INIT(&ifv->ifv_mc_listhead);
@@ -508,11 +504,11 @@ vlan_config(struct ifvlan *ifv, struct i
 			ec->ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 			ifp->if_capabilities = p->if_capabilities &
 			(IFCAP_TSOv4 | IFCAP_TSOv6 |
-			 IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx|
-			 IFCAP_CSUM_TCPv4_Tx|IFCAP_CSUM_TCPv4_Rx|
-			 IFCAP_CSUM_UDPv4_Tx|IFCAP_CSUM_UDPv4_Rx|
-			 IFCAP_CSUM_TCPv6_Tx|IFCAP_CSUM_TCPv6_Rx|
-			 IFCAP_CSUM_UDPv6_Tx|IFCAP_CSUM_UDPv6_Rx);
+IFCAP_CSUM_IPv4_Tx  | IFCAP_CSUM_IPv4_Rx |
+IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_TCPv4_Rx |
+IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_UDPv4_Rx |
+IFCAP_CSUM_TCPv6_Tx | IFCAP_CSUM_TCPv6_Rx |
+IFCAP_CSUM_UDPv6_Tx | IFCAP_CSUM_UDPv6_Rx);
 		}
 
 		/*
@@ -598,7 +594,7 @@ vlan_unconfig_locked(struct ifvlan *ifv,
 	KASSERT(IFNET_LOCKED(ifp));
 	KASSERT(mutex_owned(&ifv->ifv_lock));
 
-	ifp->if_flags &= ~(IFF_UP|IFF_RUNNING);
+	ifp->if_flags &= ~(IFF_UP | IFF_RUNNING);
 
 	omib = ifv->ifv_mib;
 	p = omib->ifvm_p;
@@ -613,7 +609,7 @@ vlan_unconfig_locked(struct ifvlan *ifv,
 	psref_target_init(nmib_psref, ifvm_psref_class);
 
 	/*
- 	 * Since the interface is being unconfigured, we need to empty the
+	 * Since the interface is being unconfigured, we need to empty the
 	 * list of multicast groups that we may have joined while we were
 	 * alive and remove them from the parent's list also.
 	 */
@@ -860,8 +856,8 @@ vlan_ifdetach(struct ifnet *p)
 
 		/* XXX ifv_mib = NULL? */
 		if (ifv->ifv_mib->ifvm_p == p) {
-			KASSERTMSG(i < cnt, "no memory for unconfig, parent=%s",
-			p->if_xname);
+			KASSERTMSG(i < cnt,
+			"no memory for unconfig, parent=%s", p->if_xname);
 			error = vlan_unconfig_locked(ifv, nmibs[i]);
 			if (!error) {
 nmibs[i] = NULL;
@@ -1607,8 +1603,8 @@ vlan_input(struct ifnet *ifp, struct mbu
 	KASSERT(mib->ifvm_encaplen == ETHER_VLAN_ENCAP_LEN);
 
 	ifv = mib->ifvm_ifvlan;
-	if ((ifv->ifv_if.if_flags & (IFF_UP|IFF_RUNNING)) !=
-	(IFF_U

CVS commit: src/sys/net

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 07:50:43 UTC 2019

Modified Files:
src/sys/net: if_gif.c

Log Message:
No functional change:
- Fix typo (s/configureation/configuration/)
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/net/if_gif.c

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



CVS commit: src/sys/net

2019-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 18 07:50:43 UTC 2019

Modified Files:
src/sys/net: if_gif.c

Log Message:
No functional change:
- Fix typo (s/configureation/configuration/)
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/net/if_gif.c

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

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.146 src/sys/net/if_gif.c:1.147
--- src/sys/net/if_gif.c:1.146	Mon Apr 22 08:09:59 2019
+++ src/sys/net/if_gif.c	Tue Jun 18 07:50:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.146 2019/04/22 08:09:59 knakahara Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.147 2019/06/18 07:50:43 msaitoh Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.146 2019/04/22 08:09:59 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.147 2019/06/18 07:50:43 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -169,7 +169,7 @@ gif_sysctl_setup(void)
 		   CTL_NET, PF_INET, IPPROTO_IP, CTL_EOL);
 
 	sysctl_createv(&gif_sysctl, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
 		   CTLTYPE_INT, "gifttl",
 		   SYSCTL_DESCR("Default TTL for a gif tunnel datagram"),
 		   NULL, 0, &ip_gif_ttl, 0,
@@ -194,7 +194,7 @@ gif_sysctl_setup(void)
 		   CTL_NET, PF_INET6, IPPROTO_IPV6, CTL_EOL);
 
 	sysctl_createv(&gif_sysctl, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
 		   CTLTYPE_INT, "gifhlim",
 		   SYSCTL_DESCR("Default hop limit for a gif tunnel datagram"),
 		   NULL, 0, &ip6_gif_hlim, 0,
@@ -473,7 +473,7 @@ gif_output(struct ifnet *ifp, struct mbu
 	}
 	/* XXX should we check if our outer source is legal? */
 
-	m->m_flags &= ~(M_BCAST|M_MCAST);
+	m->m_flags &= ~(M_BCAST | M_MCAST);
 
 	/* use DLT_NULL encapsulation here to pass inner af type */
 	M_PREPEND(m, sizeof(int), M_DONTWAIT);
@@ -1037,7 +1037,7 @@ gif_set_tunnel(struct ifnet *ifp, struct
 		/* can't configure same pair of address onto two gifs */
 		if (sockaddr_cmp(var2->gv_pdst, dst) == 0 &&
 		sockaddr_cmp(var2->gv_psrc, src) == 0) {
-			/* continue to use the old configureation. */
+			/* continue to use the old configuration. */
 			gif_putref_variant(var2, &psref);
 			mutex_exit(&gif_softcs.lock);
 			error =  EADDRNOTAVAIL;