CVS commit: src/sys/arch/arm

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Nov 27 07:11:49 UTC 2020

Modified Files:
src/sys/arch/arm/altera: cycv_platform.c
src/sys/arch/arm/samsung: exynos_platform.c

Log Message:
cpu_hatched_p does necessary memory barrier so remove membar_consumer
calls from before cpu_hatched_p calls.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/altera/cycv_platform.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/samsung/exynos_platform.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/altera/cycv_platform.c
diff -u src/sys/arch/arm/altera/cycv_platform.c:1.14 src/sys/arch/arm/altera/cycv_platform.c:1.15
--- src/sys/arch/arm/altera/cycv_platform.c:1.14	Mon Sep 28 11:54:22 2020
+++ src/sys/arch/arm/altera/cycv_platform.c	Fri Nov 27 07:11:49 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.14 2020/09/28 11:54:22 jmcneill Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.15 2020/11/27 07:11:49 skrll Exp $ */
 
 /* This file is in the public domain. */
 
@@ -7,7 +7,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.14 2020/09/28 11:54:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.15 2020/11/27 07:11:49 skrll Exp $");
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include 
@@ -116,7 +116,6 @@ cycv_mpstart(void)
 	/* Wait for secondary processor to start */
 	int i;
 	for (i = 0x1000; i > 0; i--) {
-		membar_consumer();
 		if (cpu_hatched_p(1))
 			break;
 	}

Index: src/sys/arch/arm/samsung/exynos_platform.c
diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.31 src/sys/arch/arm/samsung/exynos_platform.c:1.32
--- src/sys/arch/arm/samsung/exynos_platform.c:1.31	Fri Oct 30 18:54:36 2020
+++ src/sys/arch/arm/samsung/exynos_platform.c	Fri Nov 27 07:11:49 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.31 2020/10/30 18:54:36 skrll Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.32 2020/11/27 07:11:49 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -35,7 +35,7 @@
 #include "ukbd.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.31 2020/10/30 18:54:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.32 2020/11/27 07:11:49 skrll Exp $");
 
 
 /*
@@ -179,7 +179,6 @@ exynos5800_mpstart(void)
 
 		/* Wait for AP to start */
 		for (n = 0x10; n > 0; n--) {
-			membar_consumer();
 			if (cpu_hatched_p(cpuindex))
 break;
 		}



CVS commit: src/sys/net

2020-11-26 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Fri Nov 27 03:37:11 UTC 2020

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

Log Message:
Fix missing disable of kpreempt while getting interface address


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/sys/net/if_spppsubr.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_spppsubr.c
diff -u src/sys/net/if_spppsubr.c:1.214 src/sys/net/if_spppsubr.c:1.215
--- src/sys/net/if_spppsubr.c:1.214	Wed Nov 25 10:44:53 2020
+++ src/sys/net/if_spppsubr.c	Fri Nov 27 03:37:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_spppsubr.c,v 1.214 2020/11/25 10:44:53 yamaguchi Exp $	 */
+/*	$NetBSD: if_spppsubr.c,v 1.215 2020/11/27 03:37:11 yamaguchi Exp $	 */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.214 2020/11/25 10:44:53 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.215 2020/11/27 03:37:11 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3327,7 +3327,9 @@ sppp_ipcp_open(struct sppp *sp, void *xc
 	memset(>dns_addrs, 0, sizeof sp->dns_addrs);
 
 #ifdef INET
+	kpreempt_disable();
 	sppp_get_ip_addrs(sp, , , 0);
+	kpreempt_enable();
 #else
 	myaddr = hisaddr = 0;
 #endif
@@ -3809,10 +3811,13 @@ sppp_ipcp_scr(struct sppp *sp)
 
 #ifdef INET
 	if (ISSET(sp->ipcp.opts, SPPP_IPCP_OPT_ADDRESS)) {
-		if (sp->ipcp.flags & IPCP_MYADDR_SEEN)
+		if (sp->ipcp.flags & IPCP_MYADDR_SEEN) {
 			ouraddr = sp->ipcp.req_myaddr;	/* not sure if this can ever happen */
-		else
+		} else {
+			kpreempt_disable();
 			sppp_get_ip_addrs(sp, , 0, 0);
+			kpreempt_enable();
+		}
 		opt[i++] = IPCP_OPT_ADDRESS;
 		opt[i++] = 6;
 		opt[i++] = ouraddr >> 24;
@@ -3879,7 +3884,9 @@ sppp_ipv6cp_open(struct sppp *sp, void *
 	sp->ipv6cp.flags &= ~IPV6CP_MYIFID_SEEN;
 #endif
 
+	kpreempt_disable();
 	sppp_get_ip6_addrs(sp, , , 0);
+	kpreempt_enable();
 	/*
 	 * If we don't have our address, this probably means our
 	 * interface doesn't want to talk IPv6 at all.  (This could
@@ -4308,7 +4315,10 @@ sppp_ipv6cp_scr(struct sppp *sp)
 	KASSERT(SPPP_WLOCKED(sp));
 
 	if (ISSET(sp->ipv6cp.opts, SPPP_IPV6CP_OPT_IFID)) {
+		kpreempt_disable();
 		sppp_get_ip6_addrs(sp, , 0, 0);
+		kpreempt_enable();
+
 		opt[i++] = IPV6CP_OPT_IFID;
 		opt[i++] = 10;
 		memcpy([i], _addr[8], 8);
@@ -6056,7 +6066,9 @@ sppp_params(struct sppp *sp, u_long cmd,
 		status->state = sp->scp[IDX_IPCP].state;
 		status->opts = sp->ipcp.opts;
 #ifdef INET
+		kpreempt_disable();
 		sppp_get_ip_addrs(sp, , 0, 0);
+		kpreempt_enable();
 #else
 		myaddr = 0;
 #endif



CVS commit: src/lib/libc/string

2020-11-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Nov 26 23:13:55 UTC 2020

Modified Files:
src/lib/libc/string: strchr.3

Log Message:
fix typo in manual page for strchrnul(3)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/strchr.3

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/string/strchr.3
diff -u src/lib/libc/string/strchr.3:1.13 src/lib/libc/string/strchr.3:1.14
--- src/lib/libc/string/strchr.3:1.13	Sun Oct 16 05:28:33 2016
+++ src/lib/libc/string/strchr.3	Thu Nov 26 23:13:55 2020
@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)strchr.3	8.2 (Berkeley) 4/19/94
-.\"	$NetBSD: strchr.3,v 1.13 2016/10/16 05:28:33 wiz Exp $
+.\"	$NetBSD: strchr.3,v 1.14 2020/11/26 23:13:55 rillig Exp $
 .\"
-.Dd October 12, 2016
+.Dd November 27, 2020
 .Dt STRCHR 3
 .Os
 .Sh NAME
@@ -76,7 +76,7 @@ if the character does not appear in the 
 The function
 .Fn strchrnul
 returns a pointer to the located character, or
-the a pointer to the
+a pointer to the
 .Dv NUL
 terminating character of the string if the character does not appear
 in the string.



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:52:00 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: Makefile native-elf-format
os.Linux.mk

Log Message:
Sync with elftoolchain upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/elftoolchain/dist/common/Makefile \
src/external/bsd/elftoolchain/dist/common/native-elf-format
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/elftoolchain/dist/common/os.Linux.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/bsd/elftoolchain/dist/common/Makefile
diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.2
--- src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/Makefile	Thu Nov 26 21:52:00 2020
@@ -1,4 +1,4 @@
-# Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy 
+# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy
 
 TOP=	..
 
@@ -7,12 +7,12 @@ INCSDIR=	/usr/include
 
 .PHONY:	all clean clobber depend obj
 
-all depend obj:
+all depend:
 
 clean clobber:
 	rm -f ${CLEANFILES}
 
 cleandepend:
-	rm -f .depend
+	rm -f ${.OBJDIR}/.depend
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
Index: src/external/bsd/elftoolchain/dist/common/native-elf-format
diff -u src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2 src/external/bsd/elftoolchain/dist/common/native-elf-format:1.2
--- src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/native-elf-format	Thu Nov 26 21:52:00 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste 
+# Id: native-elf-format 3893 2020-11-20 17:11:04Z jkoshy
 #
 # Find the native ELF format for a host platform by compiling a
 # test object and examining the resulting object.
@@ -9,7 +9,7 @@
 # information statically at compile time.
 
 program=`basename $0`
-tmp_c=`mktemp -u nefXX`.c
+tmp_c=`mktemp ${MAKEOBJDIRPREFIX+"-p ${MAKEOBJDIRPREFIX}"} -u nefXX`.c
 tmp_o=`echo ${tmp_c} | sed -e 's/.c$/.o/'`
 
 trap "rm -f ${tmp_c} ${tmp_o}"	0 1 2 3 15
@@ -35,8 +35,12 @@ $1 ~ "Machine:" {
 elfarch = "EM_386";
 } else if (match($0, "MIPS")) {
 elfarch = "EM_MIPS";
-} else if (match($0, ".*[xX]86-64")) {
+} else if (match($0, ".*[xX]86[-_]64")) {
 elfarch = "EM_X86_64";
+} else if (match($0, "PowerPC64")) {
+elfarch = "EM_PPC64";
+	} else if (match($0, "ARM")) {
+	elfarch = "EM_ARM";
 } else {
 elfarch = "unknown";
 }

Index: src/external/bsd/elftoolchain/dist/common/os.Linux.mk
diff -u src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1 src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.2
--- src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1	Sun Mar  9 16:25:59 2014
+++ src/external/bsd/elftoolchain/dist/common/os.Linux.mk	Thu Nov 26 21:52:00 2020
@@ -1,13 +1,15 @@
 #
 # Build recipes for Linux based operating systems.
 #
-# Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy 
+# Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy
 
 _NATIVE_ELF_FORMAT = native-elf-format
 
-.BEGIN:	${_NATIVE_ELF_FORMAT}.h
+.if !make(obj)
+.BEGIN:	${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h
 
-${_NATIVE_ELF_FORMAT}.h:
+${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h:
 	${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET}
+.endif
 
-CLEANFILES += ${_NATIVE_ELF_FORMAT}.h
+CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:01:47 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Restore an overlooked 'Id' line.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/elftoolchain/dist/common/_elftc.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/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6	Sat Nov 21 21:04:25 2020
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Thu Nov 26 21:01:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $
+ * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy
  */
 
 /**



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

2020-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 26 20:50:45 UTC 2020

Modified Files:
src/sys/arch/amd64/include: vmparam.h

Log Message:
make the max text size the same as the max data size


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amd64/include/vmparam.h

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

Modified files:

Index: src/sys/arch/amd64/include/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.53 src/sys/arch/amd64/include/vmparam.h:1.54
--- src/sys/arch/amd64/include/vmparam.h:1.53	Tue Oct  6 09:42:03 2020
+++ src/sys/arch/amd64/include/vmparam.h	Thu Nov 26 15:50:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.53 2020/10/06 13:42:03 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.54 2020/11/26 20:50:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -88,7 +88,7 @@
 /*
  * Virtual memory related constants, all in bytes
  */
-#define	MAXTSIZ		(256*1024*1024)		/* max text size */
+#define	MAXTSIZ		(8L*1024*1024*1024)	/* max text size */
 #ifndef DFLDSIZ
 #define	DFLDSIZ		(256*1024*1024)		/* initial data size limit */
 #endif



CVS commit: src/sys/arch

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 26 12:56:35 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx23 imx23_pinctrl.c
src/sys/arch/evbarm/gemini: gemini_machdep.c
src/sys/arch/evbarm/imx23_olinuxino: imx23_olinuxino_machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/imx/files.imx23
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx23_pinctrl.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/gemini/gemini_machdep.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c

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

Modified files:

Index: src/sys/arch/arm/imx/files.imx23
diff -u src/sys/arch/arm/imx/files.imx23:1.4 src/sys/arch/arm/imx/files.imx23:1.5
--- src/sys/arch/arm/imx/files.imx23:1.4	Sat Jan 10 12:18:09 2015
+++ src/sys/arch/arm/imx/files.imx23	Thu Nov 26 12:56:34 2020
@@ -1,4 +1,4 @@
-# $Id: files.imx23,v 1.4 2015/01/10 12:18:09 jmcneill Exp $
+# $Id: files.imx23,v 1.5 2020/11/26 12:56:34 skrll Exp $
 #
 # Freescale i.MX23 applications processor configuration info.
 #
@@ -85,7 +85,7 @@ file	arch/arm/imx/imx23_usb.c	imxusbc
 attach	ehci at imxusbc with imxehci
 file	arch/arm/imx/imxusb.c		imxehci
 
-# RTC 
+# RTC
 device rtc
 attach rtc at apbx
 file arch/arm/imx/imx23_rtc.c		rtc

Index: src/sys/arch/arm/imx/imx23_pinctrl.c
diff -u src/sys/arch/arm/imx/imx23_pinctrl.c:1.2 src/sys/arch/arm/imx/imx23_pinctrl.c:1.3
--- src/sys/arch/arm/imx/imx23_pinctrl.c:1.2	Fri Oct 18 04:09:01 2019
+++ src/sys/arch/arm/imx/imx23_pinctrl.c	Thu Nov 26 12:56:34 2020
@@ -1,4 +1,4 @@
-/* $Id: imx23_pinctrl.c,v 1.2 2019/10/18 04:09:01 msaitoh Exp $ */
+/* $Id: imx23_pinctrl.c,v 1.3 2020/11/26 12:56:34 skrll Exp $ */
 
 /*
 * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -386,7 +386,7 @@ pinctrl_attach(device_t parent, device_t
 
 	sc->sc_dev = self;
 	sc->sc_iot = aa->aa_iot;
-	
+
 	if (pinctrl_attached) {
 		aprint_error_dev(sc->sc_dev, "already attached\n");
 		return;
@@ -428,7 +428,7 @@ pinctrl_attach(device_t parent, device_t
 	gpiobus_aa.gba_pins = sc->pins;
 
 	config_found_ia(self, "gpiobus", _aa, gpiobus_print);
-	
+
 	return;
 }
 
@@ -439,7 +439,7 @@ pinctrl_activate(device_t self, enum dev
 	return EOPNOTSUPP;
 }
 
-static void
+static void
 pinctrl_init(struct pinctrl_softc *sc)
 {
 	_sc = sc;
@@ -499,7 +499,7 @@ pinctrl_reset(struct pinctrl_softc *sc)
  * MAXI boards. We configure this pin to logic 1.
  */
 void
-pinctrl_en_usb(void)
+pinctrl_en_usb(void)
 {
 	struct pinctrl_softc *sc = _sc;
 
@@ -537,7 +537,7 @@ pinctrl_gp_pin_read(void *cookie, int pi
 		value = 1;
 	else
 		value = 0;
-	
+
 	return value;
 }
 

Index: src/sys/arch/evbarm/gemini/gemini_machdep.c
diff -u src/sys/arch/evbarm/gemini/gemini_machdep.c:1.31 src/sys/arch/evbarm/gemini/gemini_machdep.c:1.32
--- src/sys/arch/evbarm/gemini/gemini_machdep.c:1.31	Tue Jul 16 14:41:45 2019
+++ src/sys/arch/evbarm/gemini/gemini_machdep.c	Thu Nov 26 12:56:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gemini_machdep.c,v 1.31 2019/07/16 14:41:45 skrll Exp $	*/
+/*	$NetBSD: gemini_machdep.c,v 1.32 2020/11/26 12:56:34 skrll Exp $	*/
 
 /* adapted from:
  *	NetBSD: sdp24xx_machdep.c,v 1.4 2008/08/27 11:03:10 matt Exp
@@ -129,7 +129,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.31 2019/07/16 14:41:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.32 2020/11/26 12:56:34 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_console.h"
@@ -485,7 +485,7 @@ static const struct pmap_devmap devmap[]
 		.pd_cache = PTE_NOCACHE
 	},
 
-#if defined(MEMORY_DISK_DYNAMIC) 
+#if defined(MEMORY_DISK_DYNAMIC)
 	/* Ramdisk */
 	{
 		.pd_va = _A(GEMINI_RAMDISK_VBASE),
@@ -493,7 +493,7 @@ static const struct pmap_devmap devmap[]
 		.pd_size = _S(GEMINI_RAMDISK_SIZE),
 		.pd_prot = VM_PROT_READ|VM_PROT_WRITE,
 		.pd_cache = PTE_NOCACHE
-	}, 
+	},
 #endif
 
 	{0}	/* list terminator */
@@ -799,7 +799,7 @@ consinit(void)
 			panic("Serial console can not be initialized.");
 }
 
-#elif CONSADDR==0x478003f8 
+#elif CONSADDR==0x478003f8
 # include 
 /*
  * console initialization for lpc com console

Index: src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
diff -u src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.9 src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.10
--- src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.9	Tue Jul 16 14:41:45 2019
+++ src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c	Thu Nov 26 12:56:34 2020
@@ -1,4 +1,4 @@
-/* $Id: imx23_olinuxino_machdep.c,v 1.9 2019/07/16 14:41:45 skrll Exp $ */
+/* $Id: imx23_olinuxino_machdep.c,v 1.10 2020/11/26 12:56:34 skrll Exp $ */
 
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -217,7 +217,7 @@ cpu_reboot(int howto, char *bootstr)
 	static int cpu_reboot_called = 0;
 
 	

CVS commit: src/sys/dev/i2c

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 26 12:53:03 UTC 2020

Modified Files:
src/sys/dev/i2c: g760a.c

Log Message:
Fix build and improve error handling


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/g760a.c

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

Modified files:

Index: src/sys/dev/i2c/g760a.c
diff -u src/sys/dev/i2c/g760a.c:1.5 src/sys/dev/i2c/g760a.c:1.6
--- src/sys/dev/i2c/g760a.c:1.5	Sat Jun 16 21:22:13 2018
+++ src/sys/dev/i2c/g760a.c	Thu Nov 26 12:53:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: g760a.c,v 1.5 2018/06/16 21:22:13 thorpej Exp $	*/
+/*	$NetBSD: g760a.c,v 1.6 2020/11/26 12:53:03 skrll Exp $	*/
 
 /*-
  * Copyright (C) 2008 A.Leo.
@@ -32,7 +32,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: g760a.c,v 1.5 2018/06/16 21:22:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: g760a.c,v 1.6 2020/11/26 12:53:03 skrll Exp $");
 
 #include 
 #include 
@@ -227,6 +227,8 @@ g760a_setup(struct g760a_softc* sc)
 			CTLTYPE_NODE, device_xname(sc->sc_dev), NULL,
 			NULL, 0, NULL, 0,
 			CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+	if (ret)
+		goto sysctl_failed;
 
 	(void)strlcpy(sc->sc_sensor.desc, "sysfan rpm",
 			sizeof(sc->sc_sensor.desc));
@@ -242,6 +244,9 @@ g760a_setup(struct g760a_softc* sc)
 			sysctl_g760a_rpm, 0x42, (void*)sc, 0,
 			CTL_MACHDEP, me->sysctl_num, CTL_CREATE, CTL_EOL);
 
+	if (ret)
+		goto sysctl_failed;
+
 	sc->sc_sme->sme_name = device_xname(sc->sc_dev);
 	sc->sc_sme->sme_cookie = sc;
 	sc->sc_sme->sme_refresh = g760a_refresh;
@@ -255,6 +260,11 @@ g760a_setup(struct g760a_softc* sc)
 	}
 
 	return;
+
+sysctl_failed:
+	aprint_error_dev(sc->sc_dev,
+	"couldn't create sysctl nodes (%d)\n", ret);
+
 out:
 	sysmon_envsys_destroy(sc->sc_sme);
 }



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

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 26 08:37:54 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Style around setting the physical memory limit.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/evbarm/fdt/fdt_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.80 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.81
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.80	Thu Nov 26 08:29:17 2020
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Nov 26 08:37:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.80 2020/11/26 08:29:17 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.81 2020/11/26 08:37:54 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.80 2020/11/26 08:29:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.81 2020/11/26 08:37:54 skrll Exp $");
 
 #include "opt_machdep.h"
 #include "opt_bootconfig.h"
@@ -623,10 +623,10 @@ initarm(void *arg)
 	fdt_get_memory(_start, _end);
 
 #if !defined(_LP64)
-	/* Cannot map memory above 4GB */
-	if (memory_end >= 0x1ULL)
-		memory_end = 0x1ULL - PAGE_SIZE;
-
+	/* Cannot map memory above 4GB (remove last page as well) */
+	const uint64_t memory_limit = 0x1ULL - PAGE_SIZE;
+	if (memory_end > memory_limit)
+		memory_end = memory_limit;
 #endif
 	uint64_t memory_size = memory_end - memory_start;
 



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

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 26 08:29:17 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Tweak a comment


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/evbarm/fdt/fdt_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.79 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.80
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.79	Tue Nov 24 06:36:36 2020
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Nov 26 08:29:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.79 2020/11/24 06:36:36 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.80 2020/11/26 08:29:17 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.79 2020/11/24 06:36:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.80 2020/11/26 08:29:17 skrll Exp $");
 
 #include "opt_machdep.h"
 #include "opt_bootconfig.h"
@@ -641,8 +641,7 @@ initarm(void *arg)
 	fdt_probe_efirng(_start, _end);
 
 	/*
-	 * Populate bootconfig structure for the benefit of
-	 * dodumpsys
+	 * Populate bootconfig structure for the benefit of dodumpsys
 	 */
 	VPRINTF("%s: fdt_build_bootconfig\n", __func__);
 	fdt_build_bootconfig(memory_start, memory_end);



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

2020-11-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 26 08:25:01 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: asan.h

Log Message:
Mark KASAN shadow pages as LX_BLKPAG_ATTR_NORMAL_WB.  NFC as this is zero,
but someone might change it one day.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/aarch64/include/asan.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/asan.h
diff -u src/sys/arch/aarch64/include/asan.h:1.14 src/sys/arch/aarch64/include/asan.h:1.15
--- src/sys/arch/aarch64/include/asan.h:1.14	Tue Nov 10 07:51:19 2020
+++ src/sys/arch/aarch64/include/asan.h	Thu Nov 26 08:25:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: asan.h,v 1.14 2020/11/10 07:51:19 skrll Exp $	*/
+/*	$NetBSD: asan.h,v 1.15 2020/11/26 08:25:01 skrll Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -187,7 +187,7 @@ kasan_md_shadow_map_page(vaddr_t va)
 		pa = __md_palloc();
 		atomic_swap_64([idx], pa | L3_PAGE | LX_BLKPAG_UXN |
 		LX_BLKPAG_PXN | LX_BLKPAG_AF | LX_BLKPAG_SH_IS |
-		LX_BLKPAG_AP_RW);
+		LX_BLKPAG_AP_RW | LX_BLKPAG_ATTR_NORMAL_WB);
 		aarch64_tlbi_by_va(va);
 	}
 }