CVS commit: src/tests/dev/sysmon

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 21 04:50:22 UTC 2020

Modified Files:
src/tests/dev/sysmon: t_swsensor.sh

Log Message:
These test cases should now succeed, after fixing rump kernel to handle
modules that establish their sysctls via SYSCTL_SETUP()


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/dev/sysmon/t_swsensor.sh

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

Modified files:

Index: src/tests/dev/sysmon/t_swsensor.sh
diff -u src/tests/dev/sysmon/t_swsensor.sh:1.10 src/tests/dev/sysmon/t_swsensor.sh:1.11
--- src/tests/dev/sysmon/t_swsensor.sh:1.10	Thu Mar 19 20:10:49 2020
+++ src/tests/dev/sysmon/t_swsensor.sh	Sat Mar 21 04:50:21 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_swsensor.sh,v 1.10 2020/03/19 20:10:49 pgoyette Exp $
+# $NetBSD: t_swsensor.sh,v 1.11 2020/03/21 04:50:21 pgoyette Exp $
 
 get_sensor_info() {
 	rump.envstat -x | \
@@ -145,7 +145,6 @@ common_body() {
 	# Step 3 - verify that changes in sensor value are seen
 	rump.sysctl -w hw.swsensor.cur_value=$(( $2 + 1 ))
 	if [ $( get_sensor_key cur-value ) -ne $(( $2 + 1 )) ] ; then
-		atf_expect_fail "PR kern/55088"
 		atf_fail "3: Value not updated"
 	fi
 



CVS commit: src/tests/dev/sysmon

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 21 04:50:22 UTC 2020

Modified Files:
src/tests/dev/sysmon: t_swsensor.sh

Log Message:
These test cases should now succeed, after fixing rump kernel to handle
modules that establish their sysctls via SYSCTL_SETUP()


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/dev/sysmon/t_swsensor.sh

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



CVS commit: src

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 21 04:48:38 UTC 2020

Modified Files:
src/lib/librumpuser: rumpuser_dl.c
src/sys/rump: ldscript.rump

Log Message:
Teach rump how to process __link_set_sysctl_funcs so it can handle
modules the same as a real kernel.

Partly addresses PR kern/55088 - __link_set_evcnts not yet handled
(that will happen later)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/librumpuser/rumpuser_dl.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/ldscript.rump

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

Modified files:

Index: src/lib/librumpuser/rumpuser_dl.c
diff -u src/lib/librumpuser/rumpuser_dl.c:1.31 src/lib/librumpuser/rumpuser_dl.c:1.32
--- src/lib/librumpuser/rumpuser_dl.c:1.31	Thu Dec 26 04:53:11 2019
+++ src/lib/librumpuser/rumpuser_dl.c	Sat Mar 21 04:48:37 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_dl.c,v 1.31 2019/12/26 04:53:11 msaitoh Exp $	*/
+/*  $NetBSD: rumpuser_dl.c,v 1.32 2020/03/21 04:48:37 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -40,11 +40,16 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_dl.c,v 1.31 2019/12/26 04:53:11 msaitoh Exp $");
+__RCSID("$NetBSD: rumpuser_dl.c,v 1.32 2020/03/21 04:48:37 pgoyette Exp $");
 #endif /* !lint */
 
 #include 
 #include 
+
+#ifdef NOTYET
+#include 
+#endif
+
 #include 
 
 #include 
@@ -353,6 +358,14 @@ process_object(void *handle,
 	const struct modinfo *const *mi_start, *const *mi_end;
 	struct rump_component *const *rc, *const *rc_end;
 
+	struct sysctllog;
+	typedef void sysctl_setup_func(struct sysctllog **);
+	sysctl_setup_func *const *sfp, *const *sfp_end;
+
+#ifdef NOTYET	/* We don't yet handle link_set_evcnts */
+	struct evcnt *const *evp, *const *evp_end;
+#endif
+
 	mi_start = dlsym(handle, "__start_link_set_modules");
 	mi_end = dlsym(handle, "__stop_link_set_modules");
 	if (mi_start && mi_end)
@@ -365,6 +378,26 @@ process_object(void *handle,
 			docompload(*rc);
 		assert(rc == rc_end);
 	}
+
+	/* handle link_set_sysctl_funcs */
+	sfp = dlsym(handle, "__start_link_set_sysctl_funcs");
+	sfp_end = dlsym(handle, "__stop_link_set_sysctl_funcs");
+	if (sfp && sfp_end) {
+		for (; sfp < sfp_end; sfp++)
+			(**sfp)(NULL);
+		assert(sfp == sfp_end);
+	}
+
+#ifdef NOTYET
+	/* handle link_set_evcnts */
+	evp = dlsym(handle, "__start_link_set_evcnts");
+	evp_end = dlsym(handle, "__stop_link_set_evcnts");
+	if (evp && evp_end) {
+		for (; evp < evp_end; evp++)
+			evcnt_attach_static(*evp);
+		assert(evp == evp_end);
+	}
+#endif
 }
 
 /*

Index: src/sys/rump/ldscript.rump
diff -u src/sys/rump/ldscript.rump:1.3 src/sys/rump/ldscript.rump:1.4
--- src/sys/rump/ldscript.rump:1.3	Wed Apr 23 17:05:18 2014
+++ src/sys/rump/ldscript.rump	Sat Mar 21 04:48:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldscript.rump,v 1.3 2014/04/23 17:05:18 pooka Exp $	*/
+/*	$NetBSD: ldscript.rump,v 1.4 2020/03/21 04:48:38 pgoyette Exp $	*/
 
 /*
  * From binutils 2.19 onwards (in NetBSD) binutils ld PROVIDEs
@@ -24,5 +24,19 @@ SECTIONS
 		*(link_set_rump_components);
 		__stop_link_set_rump_components = .;
 	}
+
+	link_set_sysctl_funcs :
+	{
+		__start_link_set_sysctl_funcs = .;
+		*(link_set_sysctl_funcs);
+		__stop_link_set_sysctl_funcs = .;
+	}
+
+	link_set_rump_components :
+	{
+		__start_link_set_evcnts = .;
+		*(link_set_evcnts);
+		__stop_link_set_evcnts = .;
+	}
 }
 INSERT AFTER .data;



CVS commit: src

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 21 04:48:38 UTC 2020

Modified Files:
src/lib/librumpuser: rumpuser_dl.c
src/sys/rump: ldscript.rump

Log Message:
Teach rump how to process __link_set_sysctl_funcs so it can handle
modules the same as a real kernel.

Partly addresses PR kern/55088 - __link_set_evcnts not yet handled
(that will happen later)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/librumpuser/rumpuser_dl.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/ldscript.rump

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/sociox

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat Mar 21 04:35:20 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
more on toward dual descriptor design


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/if_ave.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/sociox/if_ave.c
diff -u src/sys/arch/arm/sociox/if_ave.c:1.4 src/sys/arch/arm/sociox/if_ave.c:1.5
--- src/sys/arch/arm/sociox/if_ave.c:1.4	Sat Mar 21 01:17:51 2020
+++ src/sys/arch/arm/sociox/if_ave.c	Sat Mar 21 04:35:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ave.c,v 1.4 2020/03/21 01:17:51 nisimura Exp $	*/
+/*	$NetBSD: if_ave.c,v 1.5 2020/03/21 04:35:20 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.4 2020/03/21 01:17:51 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.5 2020/03/21 04:35:20 nisimura Exp $");
 
 #include 
 #include 
@@ -125,16 +125,13 @@ __KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1
 #define AVEAFRING	0x0f00		/* entry ring number selector */
 #define AVEAFEN		0x0ffc		/* entry enable bit vector */
 
-#ifdef _LP64
 #define AVETDB		0x1000		/* 64bit Tx descriptor storage base */
 #define AVERDB		0x1c00		/* 64bit Rx descriptor storage base */
-#else
-#define AVETDB		0x1000		/* 32bit Tx descriptor storage base */
-#define AVERDB		0x1800		/* 32bit Rx descriptor storage base */
-#endif
+#define AVE32TDB	0x1000		/* 32bit Tx descriptor storage base */
+#define AVE32RDB	0x1800		/* 32bit Rx descriptor storage base */
 
 /*
- * descriptor size is 12 bytes when _LP64, 8 bytes otherwise.
+ * descriptor size is 12 bytes when 64bit paddr design, 8 bytes otherwise.
  * 3KB/24KB split or 64bit paddr Tx/Rx descriptor storage.
  * 2KB/16KB split or 32bit paddr Tx/Rx descriptor storage.
  */
@@ -146,6 +143,9 @@ struct rdes {
 	uint32_t r0, r1, r2;
 };
 
+struct tdes32 { uint32_t t0, t1; };
+struct rdes32 { uint32_t r0, r1; };
+
 #define T0_OWN		(1U<<31)	/* desc is ready to Tx */
 #define T0_IOC		(1U<<29)	/* post interrupt on Tx completes */
 #define T0_NOCSUM	(1U<<28)	/* inhibit checksum operation */
@@ -177,7 +177,6 @@ struct rdes {
 #define AVE_NRXDESC_MASK	(AVE_NRXDESC - 1)
 #define AVE_NEXTRX(x)		(((x) + 1) & AVE_NRXDESC_MASK)
 
-#ifdef _LP64
 #define AVE_INIT_RXDESC(sc, x)		\
 do {	\
 	struct ave_rxsoft *__rxs = &(sc)->sc_rxsoft[(x)];		\
@@ -189,18 +188,17 @@ do {	\
 	__rxd->r1 = htole32(BUS_ADDR_LO32(__paddr));			\
 	__rxd->r0 = R0_OWN | R0_FL_MASK;\
 } while (/*CONSTCOND*/0)
-#else
-#define AVE_INIT_RXDESC(sc, x)		\
+
+#define AVE32_INIT_RXDESC(sc, x)	\
 do {	\
 	struct ave_rxsoft *__rxs = &(sc)->sc_rxsoft[(x)];		\
-	struct rdes *__rxd = &(sc)->sc_rxdescs[(x)];			\
+	struct rdes32 *__rxd = &(sc)->sc_rxd32[(x)];			\
 	struct mbuf *__m = __rxs->rxs_mbuf;\
 	bus_addr_t __paddr =__rxs->rxs_dmamap->dm_segs[0].ds_addr;	\
 	__m->m_data = __m->m_ext.ext_buf;\
 	__rxd->r1 = htole32(__paddr);	\
 	__rxd->r0 = R0_OWN | R0_FL_MASK;\
 } while (/*CONSTCOND*/0)
-#endif
 
 struct ave_txsoft {
 	struct mbuf *txs_mbuf;		/* head of our mbuf chain */
@@ -236,6 +234,8 @@ struct ave_softc {
 
 	struct tdes *sc_txdescs;	/* PTR to tdes [NTXDESC] array */
 	struct rdes *sc_rxdescs;	/* PTR to rdes [NRXDESC] array */
+	struct tdes32 *sc_txd32;
+	struct rdes32 *sc_rxd32;
 
 	struct ave_txsoft sc_txsoft[AVE_TXQUEUELEN];
 	struct ave_rxsoft sc_rxsoft[AVE_NRXDESC];
@@ -515,6 +515,8 @@ ave_init(struct ifnet *ifp)
 	/* set ptr to Tx/Rx descriptor store */
 	sc->sc_txdescs = (void *)((uintptr_t)sc->sc_sh + AVETDB);
 	sc->sc_rxdescs = (void *)((uintptr_t)sc->sc_sh + AVERDB);
+	sc->sc_txd32 =   (void *)((uintptr_t)sc->sc_sh + AVE32TDB);
+	sc->sc_rxd32 =   (void *)((uintptr_t)sc->sc_sh + AVE32RDB);
 
 	/* build sane and loaded Tx/Rx descriptors */
 	memset(sc->sc_txdescs, 0, sizeof(struct tdes)*AVE_NTXDESC);
@@ -969,12 +971,8 @@ ave_start(struct ifnet *ifp)
 			 * yet.	 That could cause a race condition.
 			 * We'll do it below.
 			 */
-#ifdef _LP64
 			tdes->t2 = htole32(BUS_ADDR_HI32(paddr));
 			tdes->t1 = htole32(BUS_ADDR_LO32(paddr));
-#else
-			tdes->t1 = htole32(paddr);
-#endif
 			tdes->t0 = tdes0 | sc->sc_t0csum
 			 | (dmamap->dm_segs[seg].ds_len & T0_TBS_MASK);
 			tdes0 = T0_OWN; /* 2nd and other segments */



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

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat Mar 21 04:35:20 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
more on toward dual descriptor design


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sociox/if_ave.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

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Mar 21 02:32:37 UTC 2020

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

Log Message:
callout_destroy(): change output from a couple of assertions so it's clear
what they are checking for (callout being destroyed while pending/running).


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_timeout.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_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.58 src/sys/kern/kern_timeout.c:1.59
--- src/sys/kern/kern_timeout.c:1.58	Thu Jan 23 20:44:15 2020
+++ src/sys/kern/kern_timeout.c	Sat Mar 21 02:32:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.58 2020/01/23 20:44:15 ad Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.59 2020/03/21 02:32:37 ad Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.58 2020/01/23 20:44:15 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.59 2020/03/21 02:32:37 ad Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -315,9 +315,11 @@ callout_destroy(callout_t *cs)
 	 * running, the current thread should have stopped it.
 	 */
 	KASSERTMSG((c->c_flags & CALLOUT_PENDING) == 0,
-	"callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
+	"pending callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
+	c, c->c_func, c->c_flags, __builtin_return_address(0));
+	KASSERTMSG(c->c_cpu->cc_lwp == curlwp || c->c_cpu->cc_active != c,
+	"running callout %p: c_func (%p) c_flags (%#x) destroyed from %p",
 	c, c->c_func, c->c_flags, __builtin_return_address(0));
-	KASSERT(c->c_cpu->cc_lwp == curlwp || c->c_cpu->cc_active != c);
 	c->c_magic = 0;
 }
 



CVS commit: src/sys/kern

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Mar 21 02:32:37 UTC 2020

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

Log Message:
callout_destroy(): change output from a couple of assertions so it's clear
what they are checking for (callout being destroyed while pending/running).


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_timeout.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/sociox

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat Mar 21 01:17:51 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
- add missing RXC_EN bit to resume receiving.
- an inch forward to absorb incompatible descriptor designs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/if_ave.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/sociox/if_ave.c
diff -u src/sys/arch/arm/sociox/if_ave.c:1.3 src/sys/arch/arm/sociox/if_ave.c:1.4
--- src/sys/arch/arm/sociox/if_ave.c:1.3	Fri Mar 20 12:29:09 2020
+++ src/sys/arch/arm/sociox/if_ave.c	Sat Mar 21 01:17:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ave.c,v 1.3 2020/03/20 12:29:09 nisimura Exp $	*/
+/*	$NetBSD: if_ave.c,v 1.4 2020/03/21 01:17:51 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.3 2020/03/20 12:29:09 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.4 2020/03/21 01:17:51 nisimura Exp $");
 
 #include 
 #include 
@@ -139,17 +139,11 @@ __KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1
  * 2KB/16KB split or 32bit paddr Tx/Rx descriptor storage.
  */
 struct tdes {
-	uint32_t t0, t1;
-#ifdef _LP64
-	uint32_t t2;
-#endif
+	uint32_t t0, t1, t2;
 };
 
 struct rdes {
-	uint32_t r0, r1;
-#ifdef _LP64
-	uint32_t r2;
-#endif
+	uint32_t r0, r1, r2;
 };
 
 #define T0_OWN		(1U<<31)	/* desc is ready to Tx */
@@ -235,6 +229,7 @@ struct ave_softc {
 	int sc_phy_id;			/* PHY address */
 	uint32_t sc_phymode;		/* 1<<27: MII/RMII, 0: RGMII */
 	uint32_t sc_rxc;		/* software copy of AVERXC */
+	int sc_model;			/* 64 paddr model or otherwise 32 */
 
 	bus_dmamap_t sc_cddmamap;	/* control data DMA map */
 #define sc_cddma	sc_cddmamap->dm_segs[0].ds_addr
@@ -286,20 +281,21 @@ static int add_rxbuf(struct ave_softc *,
 #define CSR_WRITE(sc, off, val) \
 	bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (off), (val))
 
+static const struct of_compat_data compat_data[] = {
+	{ "socionext,unifier-ld20-ave4", 64 },
+	{ "socionext,unifier-pro4-ave4", 32 },
+	{ "socionext,unifier-pxs2-ave4", 32 },
+	{ "socionext,unifier-ld11-ave4", 32 },
+	{ "socionext,unifier-pxs3-ave4", 32 },
+	{ NULL }
+};
+
 static int
 ave_fdt_match(device_t parent, cfdata_t cf, void *aux)
 {
-	static const char * compatible[] = {
-		"socionext,unifier-ld20-ave4",
-		"socionext,unifier-pro4-ave4",
-		"socionext,unifier-pxs2-ave4",
-		"socionext,unifier-ld11-ave4",
-		"socionext,unifier-pxs3-ave4",
-		NULL
-	};
 	struct fdt_attach_args * const faa = aux;
 
-	return of_match_compatible(faa->faa_phandle, compatible);
+	return of_match_compat_data(faa->faa_phandle, compat_data);
 }
 
 static void
@@ -346,11 +342,13 @@ ave_fdt_attach(device_t parent, device_t
 
 	hwimp = CSR_READ(sc, AVEID);
 	hwver = CSR_READ(sc, AVEHWVER);
+	sc->sc_model = of_search_compatible(phandle, compat_data)->data;
 
 	aprint_naive("\n");
 	aprint_normal(": Gigabit Ethernet Controller\n");
-	aprint_normal_dev(self, "UniPhier %c%c%c%c AVE GbE (%d.%d)\n",
+	aprint_normal_dev(self, "UniPhier %c%c%c%c AVE %d GbE (%d.%d)\n",
 	hwimp >> 24, hwimp >> 16, hwimp >> 8, hwimp,
+	sc->sc_model,
 	hwver >> 8, hwver & 0xff);
 	aprint_normal_dev(self, "interrupt on %s\n", intrstr);
 
@@ -613,7 +611,7 @@ ave_ifmedia_upd(struct ifnet *ifp)
 	}
 	sc->sc_rxc = rxcr;
 	CSR_WRITE(sc, AVETXC, txcr);
-	CSR_WRITE(sc, AVERXC, rxcr);
+	CSR_WRITE(sc, AVERXC, rxcr | RXC_EN);
 	return 0;
 }
 



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

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat Mar 21 01:17:51 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
- add missing RXC_EN bit to resume receiving.
- an inch forward to absorb incompatible descriptor designs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sociox/if_ave.c

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



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2020-03-20 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Sat Mar 21 01:07:21 UTC 2020

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
cleanly fail initialization on empty keyring


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 \
src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.102 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.103
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.102	Tue Nov 13 14:52:30 2018
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Sat Mar 21 01:07:21 2020
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.102 2018/11/13 14:52:30 mlelstv Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.103 2020/03/21 01:07:21 jhigh Exp $");
 #endif
 
 #include 
@@ -429,7 +429,7 @@ get_first_ring(pgp_keyring_t *ring, char
 	int	 i;
 	int	 n;
 
-	if (ring == NULL) {
+	if (ring == NULL || ring->keyc == 0) {
 		return 0;
 	}
 	(void) memset(id, 0x0, len);



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2020-03-20 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Sat Mar 21 01:07:21 UTC 2020

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
cleanly fail initialization on empty keyring


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 \
src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.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

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 20 23:09:02 UTC 2020

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

Log Message:
Improve error message - at least indicate which value comes from the
module vs which was requested/wanted by the caller.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/kern_module.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_module.c
diff -u src/sys/kern/kern_module.c:1.147 src/sys/kern/kern_module.c:1.148
--- src/sys/kern/kern_module.c:1.147	Sat Feb 22 19:51:57 2020
+++ src/sys/kern/kern_module.c	Fri Mar 20 23:09:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.147 2020/02/22 19:51:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.148 2020/03/20 23:09:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.147 2020/02/22 19:51:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.148 2020/03/20 23:09:01 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -136,8 +136,8 @@ static void	module_callback_unload(struc
 static void
 module_incompat(const modinfo_t *mi, int modclass)
 {
-	module_error("incompatible module class for `%s' (%d != %d)",
-	mi->mi_name, modclass, mi->mi_class);
+	module_error("incompatible module class %d for `%s' (wanted %d)",
+	mi->mi_class, mi->mi_name, modclass);
 }
 
 struct module *



CVS commit: src/sys/kern

2020-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 20 23:09:02 UTC 2020

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

Log Message:
Improve error message - at least indicate which value comes from the
module vs which was requested/wanted by the caller.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/kern_module.c

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



CVS commit: src/doc

2020-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Mar 20 23:01:24 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
openssl-1.1.1e out.


To generate a diff of this commit:
cvs rdiff -u -r1.1700 -r1.1701 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.1700 src/doc/3RDPARTY:1.1701
--- src/doc/3RDPARTY:1.1700	Fri Mar 20 03:21:14 2020
+++ src/doc/3RDPARTY	Fri Mar 20 23:01:24 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1700 2020/03/20 03:21:14 sevan Exp $
+#	$NetBSD: 3RDPARTY,v 1.1701 2020/03/20 23:01:24 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1088,7 +1088,7 @@ markus is very cooperative about it):
 
 Package:	OpenSSL
 Version:	1.0.2o/1.1.1d
-Current Vers:	1.0.2t/1.1.1d
+Current Vers:	1.0.2t/1.1.1e
 Maintainer:	The OpenSSL Project
 Archive Site:	ftp://ftp.openssl.org/source/
 Home Page:	http://www.openssl.org/



CVS commit: src/doc

2020-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Mar 20 23:01:24 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
openssl-1.1.1e out.


To generate a diff of this commit:
cvs rdiff -u -r1.1700 -r1.1701 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/sys/arch/arm

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 19:48:04 UTC 2020

Modified Files:
src/sys/arch/arm/arm: armv6_start.S
src/sys/arch/arm/arm32: genassym.cf

Log Message:
Really use armv7 noncache memory attribute for early kernel mapping and
not SO


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm/armv6_start.S
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/arm/arm32/genassym.cf

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/arm/armv6_start.S
diff -u src/sys/arch/arm/arm/armv6_start.S:1.15 src/sys/arch/arm/arm/armv6_start.S:1.16
--- src/sys/arch/arm/arm/armv6_start.S:1.15	Sat Feb 15 08:16:10 2020
+++ src/sys/arch/arm/arm/armv6_start.S	Fri Mar 20 19:48:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: armv6_start.S,v 1.15 2020/02/15 08:16:10 skrll Exp $	*/
+/*	$NetBSD: armv6_start.S,v 1.16 2020/03/20 19:48:03 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012, 2017, 2018 The NetBSD Foundation, Inc.
@@ -257,8 +257,8 @@ arm_build_translation_table:
 	ldr	r0, =(L1_S_SIZE - 1)
 	bic	R_PA, R_PA, r0
 
-	// attribute to map kernel - run without L1_S_CACHEABLE
-	ldr R_ATTR, =(L1_S_PROTO | L1_S_AP_KRW)
+	// attribute to map kernel
+	ldr R_ATTR, =(L1_S_PROTO | L1_S_AP_KRW | L1_S_NOCACHE)
 	bl	arm_boot_l1pt_init
 
 	/*
@@ -287,8 +287,8 @@ arm_build_translation_table:
 	adr	R_PA, generic_start	// PA of kernel
 	bic	R_PA, r2		// ...rounded down to L1_S boundary
 
-	// attribute to map kernel - run without L1_S_CACHEABLE
-	ldr R_ATTR, =(L1_S_PROTO | L1_S_AP_KRW)
+	// attribute to map kernel
+	ldr R_ATTR, =(L1_S_PROTO | L1_S_AP_KRW | L1_S_NOCACHE)
 	bl	arm_boot_l1pt_entry
 
 #if defined(FDTBASE)

Index: src/sys/arch/arm/arm32/genassym.cf
diff -u src/sys/arch/arm/arm32/genassym.cf:1.88 src/sys/arch/arm/arm32/genassym.cf:1.89
--- src/sys/arch/arm/arm32/genassym.cf:1.88	Tue Feb 18 10:33:38 2020
+++ src/sys/arch/arm/arm32/genassym.cf	Fri Mar 20 19:48:03 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.88 2020/02/18 10:33:38 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.89 2020/03/20 19:48:03 skrll Exp $
 
 # Copyright (c) 1982, 1990 The Regents of the University of California.
 # All rights reserved.
@@ -109,6 +109,7 @@ define	L1_S_FRAME		L1_S_FRAME
 define	L1_S_SHIFT		L1_S_SHIFT
 define	L1_S_SIZE		L1_S_SIZE
 define	L1_S_CACHEABLE		L1_S_C|L1_S_B|L1_S_V6_S
+define	L1_S_NOCACHE		L1_S_XS_TEX(1)
 define	L1_S_B			L1_S_B
 define	L1_S_C			L1_S_C
 define	L1_S_V6_S		L1_S_V6_S



CVS commit: src/sys/arch/arm

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 19:48:04 UTC 2020

Modified Files:
src/sys/arch/arm/arm: armv6_start.S
src/sys/arch/arm/arm32: genassym.cf

Log Message:
Really use armv7 noncache memory attribute for early kernel mapping and
not SO


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm/armv6_start.S
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/arm/arm32/genassym.cf

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



CVS commit: src/sys/uvm

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 19:08:54 UTC 2020

Modified Files:
src/sys/uvm: uvm_amap.c uvm_amap.h uvm_anon.c uvm_anon.h uvm_fault.c
uvm_loan.c uvm_map.c

Log Message:
Go back to freeing struct vm_anon one by one.  There may have been an
advantage circa ~2008 but there isn't now.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/uvm/uvm_amap.c
cvs rdiff -u -r1.40 -r1.41 src/sys/uvm/uvm_amap.h
cvs rdiff -u -r1.75 -r1.76 src/sys/uvm/uvm_anon.c
cvs rdiff -u -r1.31 -r1.32 src/sys/uvm/uvm_anon.h
cvs rdiff -u -r1.220 -r1.221 src/sys/uvm/uvm_fault.c
cvs rdiff -u -r1.98 -r1.99 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.374 -r1.375 src/sys/uvm/uvm_map.c

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



CVS commit: src/sys/uvm

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 19:08:54 UTC 2020

Modified Files:
src/sys/uvm: uvm_amap.c uvm_amap.h uvm_anon.c uvm_anon.h uvm_fault.c
uvm_loan.c uvm_map.c

Log Message:
Go back to freeing struct vm_anon one by one.  There may have been an
advantage circa ~2008 but there isn't now.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/uvm/uvm_amap.c
cvs rdiff -u -r1.40 -r1.41 src/sys/uvm/uvm_amap.h
cvs rdiff -u -r1.75 -r1.76 src/sys/uvm/uvm_anon.c
cvs rdiff -u -r1.31 -r1.32 src/sys/uvm/uvm_anon.h
cvs rdiff -u -r1.220 -r1.221 src/sys/uvm/uvm_fault.c
cvs rdiff -u -r1.98 -r1.99 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.374 -r1.375 src/sys/uvm/uvm_map.c

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

Modified files:

Index: src/sys/uvm/uvm_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.118 src/sys/uvm/uvm_amap.c:1.119
--- src/sys/uvm/uvm_amap.c:1.118	Sat Mar 14 20:23:51 2020
+++ src/sys/uvm/uvm_amap.c	Fri Mar 20 19:08:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_amap.c,v 1.118 2020/03/14 20:23:51 ad Exp $	*/
+/*	$NetBSD: uvm_amap.c,v 1.119 2020/03/20 19:08:54 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.118 2020/03/14 20:23:51 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.119 2020/03/20 19:08:54 ad Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -358,7 +358,7 @@ amap_extend(struct vm_map_entry *entry, 
 	int *newppref, *oldppref;
 #endif
 	int i, *newsl, *newbck, *oldsl, *oldbck;
-	struct vm_anon **newover, **oldover, *tofree;
+	struct vm_anon **newover, **oldover;
 	const km_flag_t kmflags =
 	(flags & AMAP_EXTEND_NOWAIT) ? KM_NOSLEEP : KM_SLEEP;
 
@@ -386,7 +386,6 @@ amap_extend(struct vm_map_entry *entry, 
 		slotadj = slotadd - slotoff;
 		slotarea = amap->am_maxslot - slotmapped;
 	}
-	tofree = NULL;
 
 	/*
 	 * case 1: we already have enough slots in the map and thus
@@ -399,10 +398,10 @@ amap_extend(struct vm_map_entry *entry, 
 #ifdef UVM_AMAP_PPREF
 			if (amap->am_ppref && amap->am_ppref != PPREF_NONE) {
 amap_pp_adjref(amap, slotoff + slotmapped,
-slotadd, 1, );
+slotadd, 1);
 			}
 #endif
-			uvm_anon_freelst(amap, tofree);
+			amap_unlock(amap);
 			UVMHIST_LOG(maphist,
 			"<- done (case 1f), amap = %#jx, sltneed=%jd",
 			(uintptr_t)amap, slotneed, 0, 0);
@@ -414,11 +413,10 @@ amap_extend(struct vm_map_entry *entry, 
 			entry->aref.ar_pageoff = slotoff;
 #ifdef UVM_AMAP_PPREF
 			if (amap->am_ppref && amap->am_ppref != PPREF_NONE) {
-amap_pp_adjref(amap, slotoff, slotadd, 1,
-);
+amap_pp_adjref(amap, slotoff, slotadd, 1);
 			}
 #endif
-			uvm_anon_freelst(amap, tofree);
+			amap_unlock(amap);
 			UVMHIST_LOG(maphist,
 			"<- done (case 1b), amap = %#jx, sltneed=%jd",
 			(uintptr_t)amap, slotneed, 0, 0);
@@ -439,14 +437,13 @@ amap_extend(struct vm_map_entry *entry, 
 	amap_pp_adjref(amap,
 	slotoff + slotmapped,
 	(amap->am_nslot -
-	(slotoff + slotmapped)), 1,
-	);
+	(slotoff + slotmapped)), 1);
 pp_setreflen(amap->am_ppref, amap->am_nslot, 1,
 slotneed - amap->am_nslot);
 			}
 #endif
 			amap->am_nslot = slotneed;
-			uvm_anon_freelst(amap, tofree);
+			amap_unlock(amap);
 
 			/*
 			 * no need to zero am_anon since that was done at
@@ -620,8 +617,7 @@ amap_extend(struct vm_map_entry *entry, 
 		if ((flags & AMAP_EXTEND_FORWARDS) &&
 		(slotoff + slotmapped) < amap->am_nslot)
 			amap_pp_adjref(amap, slotoff + slotmapped,
-			(amap->am_nslot - (slotoff + slotmapped)), 1,
-			);
+			(amap->am_nslot - (slotoff + slotmapped)), 1);
 		if (flags & AMAP_EXTEND_FORWARDS)
 			pp_setreflen(newppref, amap->am_nslot, 1,
 			slotneed - amap->am_nslot);
@@ -646,8 +642,7 @@ amap_extend(struct vm_map_entry *entry, 
 	}
 	oldnslots = amap->am_maxslot;
 	amap->am_maxslot = slotalloc;
-
-	uvm_anon_freelst(amap, tofree);
+	amap_unlock(amap);
 
 	kmem_free(oldsl, oldnslots * sizeof(*oldsl));
 	kmem_free(oldbck, oldnslots * sizeof(*oldbck));
@@ -727,7 +722,6 @@ amap_share_protect(struct vm_map_entry *
 void
 amap_wipeout(struct vm_amap *amap)
 {
-	struct vm_anon *tofree = NULL;
 	u_int lcv;
 
 	UVMHIST_FUNC("amap_wipeout"); UVMHIST_CALLED(maphist);
@@ -757,14 +751,13 @@ amap_wipeout(struct vm_amap *amap)
 		(uintptr_t)anon, anon->an_ref, 0, 0);
 
 		/*
-		 * Drop the reference.  Defer freeing.
+		 * Drop the reference.
 		 */
 
-		if (--anon->an_ref == 0) {
-			anon->an_link = tofree;
-			tofree = anon;
+		if (__predict_true(--anon->an_ref == 0)) {
+			uvm_anfree(anon);
 		}
-		if ((lcv & 31) == 31) {
+		if (__predict_false((lcv & 31) == 31)) {
 			preempt_point();
 		}
 	}
@@ -774,7 +767,7 @@ amap_wipeout(struct vm_amap *amap)
 	 */
 
 	amap->am_nused = 0;
-	uvm_anon_freelst(amap, tofree);
+	amap_unlock(amap);
 	

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

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 19:06:14 UTC 2020

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

Log Message:
- pmap_extract(): This needs to take the pmap's lock, to allow for
  concurrent removal of pages (a new requirement).

- pmap_remove_pv(): Keep hold time of pp_lock as short as possible.

- pmap_get_ptp(): Don't re-init struct pmap_page for PD PTPs.  Would
  have no ill effects but is wrong regardless.


To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.378 src/sys/arch/x86/x86/pmap.c:1.379
--- src/sys/arch/x86/x86/pmap.c:1.378	Thu Mar 19 18:58:14 2020
+++ src/sys/arch/x86/x86/pmap.c	Fri Mar 20 19:06:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.378 2020/03/19 18:58:14 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.379 2020/03/20 19:06:14 ad Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.378 2020/03/19 18:58:14 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.379 2020/03/20 19:06:14 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -2163,20 +2163,22 @@ pmap_remove_pv(struct pmap *pmap, struct
 
 	pmap_check_pv(pmap, ptp, pp, va, true);
 
-	mutex_spin_enter(>pp_lock);
-	pp->pp_attrs |= oattrs;
 	if (pve == NULL) {
+		mutex_spin_enter(>pp_lock);
 		KASSERT(pp->pp_pte.pte_ptp == ptp);
 		KASSERT(pp->pp_pte.pte_va == va);
+		pp->pp_attrs |= oattrs;
 		pp->pp_pte.pte_ptp = NULL;
 		pp->pp_pte.pte_va = 0;
 		mutex_spin_exit(>pp_lock);
 	} else {
+		mutex_spin_enter(>pp_lock);
 		KASSERT(pp->pp_pte.pte_ptp != ptp ||
 		pp->pp_pte.pte_va != va);
 		KASSERT(pve->pve_pte.pte_ptp == ptp);
 		KASSERT(pve->pve_pte.pte_va == va);
 		KASSERT(pve->pve_pp == pp);
+		pp->pp_attrs |= oattrs;
 		LIST_REMOVE(pve, pve_list);
 		mutex_spin_exit(>pp_lock);
 
@@ -2347,7 +2349,7 @@ pmap_get_ptp(struct pmap *pmap, struct p
 		if (pt->pg[i] == NULL) {
 			pmap_unget_ptp(pmap, pt);
 			return ENOMEM;
-		} else {
+		} else if (pt->alloced[i]) {
 			pt->pg[i]->uanon = (struct vm_anon *)(vaddr_t)~0L;
 			rb_tree_init(_PAGE_TO_PP(pt->pg[i])->pp_rb,
 			_rbtree_ops);
@@ -3427,10 +3429,8 @@ pmap_extract(struct pmap *pmap, vaddr_t 
 	pd_entry_t pde;
 	pd_entry_t * const *pdes;
 	struct pmap *pmap2;
-	struct cpu_info *ci;
 	paddr_t pa;
-	lwp_t *l;
-	bool hard, rv;
+	bool rv;
 	int lvl;
 
 	if (__predict_false(pmap->pm_extract != NULL)) {
@@ -3448,29 +3448,11 @@ pmap_extract(struct pmap *pmap, vaddr_t 
 
 	rv = false;
 	pa = 0;
-	l = curlwp;
 
-	ci = l->l_cpu;
-	if (pmap == pmap_kernel() ||
-	__predict_true(!ci->ci_want_pmapload && ci->ci_pmap == pmap)) {
-		/*
-		 * no need to lock, because it's pmap_kernel() or our
-		 * own pmap and is active.  if a user pmap, the caller
-		 * will hold the vm_map write/read locked and so prevent
-		 * entries from disappearing while we are here.  ptps
-		 * can disappear via pmap_remove() and pmap_protect(),
-		 * but they are called with the vm_map write locked.
-		 */
-		hard = false;
-		ptes = PTE_BASE;
-		pdes = normal_pdes;
-		kpreempt_disable();
-	} else {
-		/* we lose, do it the hard way. */
-		hard = true;
+	if (pmap != pmap_kernel()) {
 		mutex_enter(>pm_lock);
-		pmap_map_ptes(pmap, , , );
 	}
+	pmap_map_ptes(pmap, , , );
 	if (pmap_pdes_valid(va, pdes, , )) {
 		if (lvl == 2) {
 			pa = (pde & PTE_LGFRAME) | (va & (NBPD_L2 - 1));
@@ -3484,15 +3466,14 @@ pmap_extract(struct pmap *pmap, vaddr_t 
 			}
 		}
 	}
-	if (__predict_false(hard)) {
-		pmap_unmap_ptes(pmap, pmap2);
+	pmap_unmap_ptes(pmap, pmap2);
+	if (pmap != pmap_kernel()) {
 		mutex_exit(>pm_lock);
-	} else {
-		kpreempt_enable();
 	}
 	if (pap != NULL) {
 		*pap = pa;
 	}
+
 	return rv;
 }
 



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

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 19:06:14 UTC 2020

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

Log Message:
- pmap_extract(): This needs to take the pmap's lock, to allow for
  concurrent removal of pages (a new requirement).

- pmap_remove_pv(): Keep hold time of pp_lock as short as possible.

- pmap_get_ptp(): Don't re-init struct pmap_page for PD PTPs.  Would
  have no ill effects but is wrong regardless.


To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/sys/arch/x86/x86/pmap.c

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



CVS commit: src/sys/dev

2020-03-20 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Mar 20 19:03:13 UTC 2020

Modified Files:
src/sys/dev: cgd.c

Log Message:
cgd: switch from malloc(9) to kmem(9)

XXX might be worthwhile to use pool_cache(9) in the write path


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.123 src/sys/dev/cgd.c:1.124
--- src/sys/dev/cgd.c:1.123	Wed Mar 11 13:48:45 2020
+++ src/sys/dev/cgd.c	Fri Mar 20 19:03:13 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.123 2020/03/11 13:48:45 mlelstv Exp $ */
+/* $NetBSD: cgd.c,v 1.124 2020/03/20 19:03:13 tnn Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.123 2020/03/11 13:48:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.124 2020/03/20 19:03:13 tnn Exp $");
 
 #include 
 #include 
@@ -40,7 +40,6 @@ __KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.12
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -636,11 +635,11 @@ cgd_getdata(struct cgd_softc *sc, unsign
 	if (data)
 		return data;
 
-	return malloc(size, M_DEVBUF, M_NOWAIT);
+	return kmem_intr_alloc(size, KM_NOSLEEP);
 }
 
 static void
-cgd_putdata(struct cgd_softc *sc, void *data)
+cgd_putdata(struct cgd_softc *sc, void *data, unsigned long size)
 {
 
 	if (data == sc->sc_data) {
@@ -648,7 +647,7 @@ cgd_putdata(struct cgd_softc *sc, void *
 		sc->sc_data_used = false;
 		mutex_exit(>sc_lock);
 	} else
-		free(data, M_DEVBUF);
+		kmem_intr_free(data, size);
 }
 
 static int
@@ -804,7 +803,7 @@ cgd_iodone2(struct cgd_softc *sc, struct
 
 	/* If we allocated memory, free it now... */
 	if (nbp->b_data != obp->b_data)
-		cgd_putdata(sc, nbp->b_data);
+		cgd_putdata(sc, nbp->b_data, nbp->b_bcount);
 
 	putiobuf(nbp);
 
@@ -857,7 +856,7 @@ cgd_dumpblocks(device_t dev, void *va, d
 	error = bdev_dump(sc->sc_tdev, blkno, buf, nbytes);
 
 	/* Release the buffer.  */
-	cgd_putdata(sc, buf);
+	cgd_putdata(sc, buf, nbytes);
 
 	/* Return any error from the underlying disk device.  */
 	return error;
@@ -1129,7 +1128,7 @@ cgd_ioctl_set(struct cgd_softc *sc, void
 
 	bufq_alloc(>sc_bufq, "fcfs", 0);
 
-	sc->sc_data = malloc(MAXPHYS, M_DEVBUF, M_WAITOK);
+	sc->sc_data = kmem_alloc(MAXPHYS, KM_SLEEP);
 	sc->sc_data_used = false;
 
 	/* Attach the disk. */
@@ -1168,7 +1167,7 @@ cgd_ioctl_clr(struct cgd_softc *sc, stru
 	(void)vn_close(sc->sc_tvn, FREAD|FWRITE, l->l_cred);
 	sc->sc_cfuncs->cf_destroy(sc->sc_cdata.cf_priv);
 	kmem_free(sc->sc_tpath, sc->sc_tpathlen);
-	free(sc->sc_data, M_DEVBUF);
+	kmem_free(sc->sc_data, MAXPHYS);
 	sc->sc_data_used = false;
 	dk_detach(dksc);
 	disk_detach(>sc_dkdev);
@@ -1486,7 +1485,7 @@ selftest(void)
 
 		sc.sc_cdata.cf_blocksize /= 8;
 
-		buf = malloc(txtlen, M_DEVBUF, M_WAITOK);
+		buf = kmem_alloc(txtlen, KM_SLEEP);
 		memcpy(buf, selftests[i].ptxt, txtlen);
 
 		cgd_cipher(, buf, buf, txtlen, selftests[i].blkno,
@@ -1499,7 +1498,7 @@ selftest(void)
 		if (memcmp(buf, selftests[i].ptxt, txtlen) != 0)
 			panic("decryption is broken");
 
-		free(buf, M_DEVBUF);
+		kmem_free(buf, txtlen);
 		sc.sc_cfuncs->cf_destroy(sc.sc_cdata.cf_priv);
 	}
 



CVS commit: src/sys/dev

2020-03-20 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Fri Mar 20 19:03:13 UTC 2020

Modified Files:
src/sys/dev: cgd.c

Log Message:
cgd: switch from malloc(9) to kmem(9)

XXX might be worthwhile to use pool_cache(9) in the write path


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/cgd.c

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



CVS commit: src/sys/uvm

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 18:50:09 UTC 2020

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

Log Message:
uvm_fault_upper_lookup(): don't call pmap_extract() and pmap_update() more
often than needed.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/uvm/uvm_fault.c

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

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.219 src/sys/uvm/uvm_fault.c:1.220
--- src/sys/uvm/uvm_fault.c:1.219	Tue Mar 17 18:31:39 2020
+++ src/sys/uvm/uvm_fault.c	Fri Mar 20 18:50:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.219 2020/03/17 18:31:39 ad Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.220 2020/03/20 18:50:09 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.219 2020/03/17 18:31:39 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.220 2020/03/20 18:50:09 ad Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -1166,6 +1166,7 @@ uvm_fault_upper_lookup(
 	int lcv;
 	vaddr_t currva;
 	bool shadowed __unused;
+	bool entered;
 	UVMHIST_FUNC("uvm_fault_upper_lookup"); UVMHIST_CALLED(maphist);
 
 	/* locked: maps(read), amap(if there) */
@@ -1179,18 +1180,9 @@ uvm_fault_upper_lookup(
 
 	currva = flt->startva;
 	shadowed = false;
+	entered = false;
 	for (lcv = 0; lcv < flt->npages; lcv++, currva += PAGE_SIZE) {
 		/*
-		 * don't play with VAs that are already mapped
-		 * (except for center)
-		 */
-		if (lcv != flt->centeridx &&
-		pmap_extract(ufi->orig_map->pmap, currva, NULL)) {
-			pages[lcv] = PGO_DONTCARE;
-			continue;
-		}
-
-		/*
 		 * unmapped or center page.   check if any anon at this level.
 		 */
 		if (amap == NULL || anons[lcv] == NULL) {
@@ -1213,12 +1205,21 @@ uvm_fault_upper_lookup(
 
 		KASSERT(anon->an_lock == amap->am_lock);
 
-		/* Ignore loaned and busy pages. */
-		if (pg && pg->loan_count == 0 && (pg->flags & PG_BUSY) == 0) {
+		/*
+		 * ignore loaned and busy pages.
+		 * don't play with VAs that are already mapped.
+		 */
+
+		if (pg && pg->loan_count == 0 && (pg->flags & PG_BUSY) == 0 &&
+		!pmap_extract(ufi->orig_map->pmap, currva, NULL)) {
 			uvm_fault_upper_neighbor(ufi, flt, currva,
 			pg, anon->an_ref > 1);
+			entered = true;
 		}
 	}
+	if (entered) {
+		pmap_update(ufi->orig_map->pmap);
+	}
 
 	/* locked: maps(read), amap(if there) */
 	KASSERT(amap == NULL || rw_write_held(amap->am_lock));
@@ -1276,8 +1277,6 @@ uvm_fault_upper_neighbor(
 	readonly ? (flt->enter_prot & ~VM_PROT_WRITE) :
 	flt->enter_prot,
 	PMAP_CANFAIL | (flt->wire_mapping ? PMAP_WIRED : 0));
-
-	pmap_update(ufi->orig_map->pmap);
 }
 
 /*



CVS commit: src/sys/uvm

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 18:50:09 UTC 2020

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

Log Message:
uvm_fault_upper_lookup(): don't call pmap_extract() and pmap_update() more
often than needed.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/uvm/uvm_fault.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/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:20:30 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c

Log Message:
Disable thrctrl or now and note why


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/dwc_mmc.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/ic/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.25 src/sys/dev/ic/dwc_mmc.c:1.26
--- src/sys/dev/ic/dwc_mmc.c:1.25	Fri Mar 20 17:07:17 2020
+++ src/sys/dev/ic/dwc_mmc.c	Fri Mar 20 17:20:30 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.26 2020/03/20 17:20:30 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.26 2020/03/20 17:20:30 skrll Exp $");
 
 #include 
 #include 
@@ -662,11 +662,21 @@ dwc_mmc_exec_command(sdmmc_chipset_handl
 		MMC_WRITE(sc, DWC_MMC_BLKSZ, cmd->c_blklen);
 		MMC_WRITE(sc, DWC_MMC_BYTECNT,
 		nblks > 1 ? nblks * cmd->c_blklen : cmd->c_datalen);
+
+#if 0
+		/*
+		 * The following doesn't work on the 250a verid IP in Odroid-XU4.
+		*
+		 * thrctl should only be used for UHS/HS200 and faster timings on
+		 * >=240a
+		 */
+
 		if (ISSET(cmd->c_flags, SCF_CMD_READ)) {
 			MMC_WRITE(sc, DWC_MMC_CARDTHRCTL,
 			__SHIFTIN(cmd->c_blklen, DWC_MMC_CARDTHRCTL_RDTHR) |
 			DWC_MMC_CARDTHRCTL_RDTHREN);
 		}
+#endif
 	}
 
 	MMC_WRITE(sc, DWC_MMC_IMASK, imask | sc->sc_intr_card);



CVS commit: src/sys/dev/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:20:30 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c

Log Message:
Disable thrctrl or now and note why


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/dwc_mmc.c

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



CVS commit: src/sys/dev/pci

2020-03-20 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Mar 20 17:19:25 UTC 2020

Modified Files:
src/sys/dev/pci: if_wpi.c if_wpivar.h

Log Message:
Apply the same change as for if_iwi.c r1.114 here.

This driver sleeps during wpi_media_change(), and thus requires an adaptive
mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/if_wpi.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_wpivar.h

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

Modified files:

Index: src/sys/dev/pci/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.88 src/sys/dev/pci/if_wpi.c:1.89
--- src/sys/dev/pci/if_wpi.c:1.88	Thu Jan 30 06:10:26 2020
+++ src/sys/dev/pci/if_wpi.c	Fri Mar 20 17:19:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wpi.c,v 1.88 2020/01/30 06:10:26 thorpej Exp $	*/
+/*	$NetBSD: if_wpi.c,v 1.89 2020/03/20 17:19:25 sevan Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.88 2020/01/30 06:10:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.89 2020/03/20 17:19:25 sevan Exp $");
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -387,7 +387,11 @@ wpi_attach(device_t parent __unused, dev
 	/* override state transition machine */
 	sc->sc_newstate = ic->ic_newstate;
 	ic->ic_newstate = wpi_newstate;
-	ieee80211_media_init(ic, wpi_media_change, ieee80211_media_status);
+
+	/* XXX media locking needs revisiting */
+	mutex_init(>sc_media_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
+	ieee80211_media_init_with_lock(ic,
+	wpi_media_change, ieee80211_media_status, >sc_media_mtx);
 
 	sc->amrr.amrr_min_success_threshold =  1;
 	sc->amrr.amrr_max_success_threshold = 15;

Index: src/sys/dev/pci/if_wpivar.h
diff -u src/sys/dev/pci/if_wpivar.h:1.22 src/sys/dev/pci/if_wpivar.h:1.23
--- src/sys/dev/pci/if_wpivar.h:1.22	Mon Aug 20 04:50:56 2018
+++ src/sys/dev/pci/if_wpivar.h	Fri Mar 20 17:19:25 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpivar.h,v 1.22 2018/08/20 04:50:56 riastradh Exp $*/
+/*  $NetBSD: if_wpivar.h,v 1.23 2020/03/20 17:19:25 sevan Exp $*/
 
 /*-
  * Copyright (c) 2006
@@ -172,6 +172,8 @@ struct wpi_softc {
 
 	struct bpf_if *		sc_drvbpf;
 
+	kmutex_t 		sc_media_mtx;	/* XXX */
+
 	union {
 		struct wpi_rx_radiotap_header th;
 		uint8_t pad[IEEE80211_RADIOTAP_HDRLEN];



CVS commit: src/sys/dev/pci

2020-03-20 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Mar 20 17:19:25 UTC 2020

Modified Files:
src/sys/dev/pci: if_wpi.c if_wpivar.h

Log Message:
Apply the same change as for if_iwi.c r1.114 here.

This driver sleeps during wpi_media_change(), and thus requires an adaptive
mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/if_wpi.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_wpivar.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/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:07:17 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c dwc_mmc_var.h

Log Message:
Remember / use sc_verid


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/dwc_mmc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/dwc_mmc_var.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/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:07:17 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c dwc_mmc_var.h

Log Message:
Remember / use sc_verid


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/dwc_mmc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/dwc_mmc_var.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/ic/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.24 src/sys/dev/ic/dwc_mmc.c:1.25
--- src/sys/dev/ic/dwc_mmc.c:1.24	Fri Mar 20 06:18:45 2020
+++ src/sys/dev/ic/dwc_mmc.c	Fri Mar 20 17:07:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $");
 
 #include 
 #include 
@@ -807,11 +807,11 @@ dwc_mmc_init(struct dwc_mmc_softc *sc)
 {
 	uint32_t val;
 
-	if (sc->sc_fifo_reg == 0) {
-		val = MMC_READ(sc, DWC_MMC_VERID);
-		const u_int id = __SHIFTOUT(val, DWC_MMC_VERID_ID);
+	val = MMC_READ(sc, DWC_MMC_VERID);
+	sc->sc_verid = __SHIFTOUT(val, DWC_MMC_VERID_ID);
 
-		if (id < DWC_MMC_VERID_240A)
+	if (sc->sc_fifo_reg == 0) {
+		if (sc->sc_verid < DWC_MMC_VERID_240A)
 			sc->sc_fifo_reg = 0x100;
 		else
 			sc->sc_fifo_reg = 0x200;

Index: src/sys/dev/ic/dwc_mmc_var.h
diff -u src/sys/dev/ic/dwc_mmc_var.h:1.13 src/sys/dev/ic/dwc_mmc_var.h:1.14
--- src/sys/dev/ic/dwc_mmc_var.h:1.13	Thu Jan 23 23:53:55 2020
+++ src/sys/dev/ic/dwc_mmc_var.h	Fri Mar 20 17:07:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc_var.h,v 1.13 2020/01/23 23:53:55 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc_var.h,v 1.14 2020/03/20 17:07:17 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -45,6 +45,7 @@ struct dwc_mmc_softc {
 	u_int sc_clock_freq;
 	u_int sc_bus_width;
 	bool sc_card_inited;
+	u_int sc_verid;
 
 	void *sc_ih;
 	kmutex_t sc_lock;



CVS commit: src/sys/dev/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:02:16 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc_reg.h

Log Message:
Add DWC_MMC_VERID_280A


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/dwc_mmc_reg.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/ic/dwc_mmc_reg.h
diff -u src/sys/dev/ic/dwc_mmc_reg.h:1.9 src/sys/dev/ic/dwc_mmc_reg.h:1.10
--- src/sys/dev/ic/dwc_mmc_reg.h:1.9	Wed Jan 22 23:19:12 2020
+++ src/sys/dev/ic/dwc_mmc_reg.h	Fri Mar 20 17:02:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc_reg.h,v 1.9 2020/01/22 23:19:12 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc_reg.h,v 1.10 2020/03/20 17:02:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -153,6 +153,7 @@
 
 #define DWC_MMC_VERID_ID		__BITS(15,0)
 #define DWC_MMC_VERID_240A		0x240a
+#define DWC_MMC_VERID_280A		0x280a
 
 #define DWC_MMC_IDST_HOST_ABT		__BIT(10)
 #define DWC_MMC_IDST_ABNORMAL_INT_SUM	__BIT(9)



CVS commit: src/sys/dev/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 17:02:16 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc_reg.h

Log Message:
Add DWC_MMC_VERID_280A


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/dwc_mmc_reg.h

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



CVS commit: src/sys/dev/pci

2020-03-20 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Mar 20 16:35:41 UTC 2020

Modified Files:
src/sys/dev/pci: if_iwn.c if_iwnvar.h

Log Message:
Apply the same change as for if_iwi.c r1.114 here, as part of kern/55090.

This driver sleeps during iwn_media_change(), and thus requires an adaptive
mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/if_iwn.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/if_iwnvar.h

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

Modified files:

Index: src/sys/dev/pci/if_iwn.c
diff -u src/sys/dev/pci/if_iwn.c:1.93 src/sys/dev/pci/if_iwn.c:1.94
--- src/sys/dev/pci/if_iwn.c:1.93	Thu Jan 30 06:03:34 2020
+++ src/sys/dev/pci/if_iwn.c	Fri Mar 20 16:35:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $	*/
+/*	$NetBSD: if_iwn.c,v 1.94 2020/03/20 16:35:41 sevan Exp $	*/
 /*	$OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.94 2020/03/20 16:35:41 sevan Exp $");
 
 #define IWN_USE_RBUF	/* Use local storage for RX */
 #undef IWN_HWCRYPTO	/* XXX does not even compile yet */
@@ -614,7 +614,11 @@ iwn_attach(device_t parent __unused, dev
 	/* Override 802.11 state transition machine. */
 	sc->sc_newstate = ic->ic_newstate;
 	ic->ic_newstate = iwn_newstate;
-	ieee80211_media_init(ic, iwn_media_change, ieee80211_media_status);
+
+	/* XXX media locking needs revisiting */
+	mutex_init(>sc_media_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
+	ieee80211_media_init_with_lock(ic,
+	iwn_media_change, ieee80211_media_status, >sc_media_mtx);
 
 	sc->amrr.amrr_min_success_threshold =  1;
 	sc->amrr.amrr_max_success_threshold = 15;

Index: src/sys/dev/pci/if_iwnvar.h
diff -u src/sys/dev/pci/if_iwnvar.h:1.21 src/sys/dev/pci/if_iwnvar.h:1.22
--- src/sys/dev/pci/if_iwnvar.h:1.21	Sat Oct  5 23:27:20 2019
+++ src/sys/dev/pci/if_iwnvar.h	Fri Mar 20 16:35:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwnvar.h,v 1.21 2019/10/05 23:27:20 mrg Exp $	*/
+/*	$NetBSD: if_iwnvar.h,v 1.22 2020/03/20 16:35:41 sevan Exp $	*/
 /*	$OpenBSD: if_iwnvar.h,v 1.28 2014/09/09 18:55:08 sthen Exp $	*/
 
 /*-
@@ -324,6 +324,8 @@ struct iwn_softc {
 
 	struct bpf_if *		sc_drvbpf;
 
+	kmutex_t 		sc_media_mtx;	/* XXX */
+
 	union {
 		struct iwn_rx_radiotap_header th;
 		uint8_t	pad[IEEE80211_RADIOTAP_HDRLEN];



CVS commit: src/sys/dev/pci

2020-03-20 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Mar 20 16:35:41 UTC 2020

Modified Files:
src/sys/dev/pci: if_iwn.c if_iwnvar.h

Log Message:
Apply the same change as for if_iwi.c r1.114 here, as part of kern/55090.

This driver sleeps during iwn_media_change(), and thus requires an adaptive
mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/if_iwn.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/if_iwnvar.h

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



CVS commit: src/sys/dev/pci

2020-03-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Mar 20 13:33:23 UTC 2020

Modified Files:
src/sys/dev/pci: if_iwi.c if_iwivar.h

Log Message:
This driver sleeps during iwi_media_change(), and thus requires an
adaptive mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/if_iwivar.h

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



CVS commit: src/sys/dev/pci

2020-03-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Mar 20 13:33:23 UTC 2020

Modified Files:
src/sys/dev/pci: if_iwi.c if_iwivar.h

Log Message:
This driver sleeps during iwi_media_change(), and thus requires an
adaptive mutex for the media lock.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/if_iwi.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/if_iwivar.h

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

Modified files:

Index: src/sys/dev/pci/if_iwi.c
diff -u src/sys/dev/pci/if_iwi.c:1.113 src/sys/dev/pci/if_iwi.c:1.114
--- src/sys/dev/pci/if_iwi.c:1.113	Thu Jan 30 06:03:34 2020
+++ src/sys/dev/pci/if_iwi.c	Fri Mar 20 13:33:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $  */
+/*	$NetBSD: if_iwi.c,v 1.114 2020/03/20 13:33:23 thorpej Exp $  */
 /*	$OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $	*/
 
 /*-
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.114 2020/03/20 13:33:23 thorpej Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -375,7 +375,11 @@ iwi_attach(device_t parent, device_t sel
 	/* override state transition machine */
 	sc->sc_newstate = ic->ic_newstate;
 	ic->ic_newstate = iwi_newstate;
-	ieee80211_media_init(ic, iwi_media_change, iwi_media_status);
+
+	/* XXX media locking needs revisiting */
+	mutex_init(>sc_media_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
+	ieee80211_media_init_with_lock(ic,
+	iwi_media_change, iwi_media_status, >sc_media_mtx);
 
 	/*
 	 * Allocate rings.

Index: src/sys/dev/pci/if_iwivar.h
diff -u src/sys/dev/pci/if_iwivar.h:1.19 src/sys/dev/pci/if_iwivar.h:1.20
--- src/sys/dev/pci/if_iwivar.h:1.19	Thu Feb  2 10:05:35 2017
+++ src/sys/dev/pci/if_iwivar.h	Fri Mar 20 13:33:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwivar.h,v 1.19 2017/02/02 10:05:35 nonaka Exp $ */
+/*	$NetBSD: if_iwivar.h,v 1.20 2020/03/20 13:33:23 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2004, 2005
@@ -148,6 +148,8 @@ struct iwi_softc {
 	bus_size_t		sc_sz;
 	void			*sc_soft_ih;
 
+	kmutex_t		sc_media_mtx;	/* XXX */
+
 	struct sysctllog	*sc_sysctllog;
 
 	int			antenna;



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

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Mar 20 12:29:09 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
use correct product name. still unfinished


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

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Mar 20 12:29:09 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
use correct product name. still unfinished


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sociox/if_ave.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/sociox/if_ave.c
diff -u src/sys/arch/arm/sociox/if_ave.c:1.2 src/sys/arch/arm/sociox/if_ave.c:1.3
--- src/sys/arch/arm/sociox/if_ave.c:1.2	Fri Mar 20 09:41:24 2020
+++ src/sys/arch/arm/sociox/if_ave.c	Fri Mar 20 12:29:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ave.c,v 1.2 2020/03/20 09:41:24 nisimura Exp $	*/
+/*	$NetBSD: if_ave.c,v 1.3 2020/03/20 12:29:09 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.2 2020/03/20 09:41:24 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.3 2020/03/20 12:29:09 nisimura Exp $");
 
 #include 
 #include 
@@ -321,19 +321,22 @@ ave_fdt_attach(device_t parent, device_t
 	uint8_t enaddr[ETHER_ADDR_LEN];
 	int i, error = 0;
 
-	if (fdtbus_get_reg(phandle, 0, , ) != 0) {
-		aprint_error(": couldn't get registers\n");
-		return;
-	}
-	error = bus_space_map(bst, addr, size, 0, );
-	if (error) {
-		aprint_error(": couldn't map registers: %d\n", error);
+	if (fdtbus_get_reg(phandle, 0, , ) != 0
+	|| bus_space_map(faa->faa_bst, addr, size, 0, ) != 0) {
+		aprint_error(": unable to map device\n");
 		return;
 	}
 	if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) {
 		aprint_error(": failed to decode interrupt\n");
 		return;
 	}
+	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0,
+	ave_intr, sc);
+	if (sc->sc_ih == NULL) {
+		aprint_error_dev(self, "couldn't establish interrupt on %s\n",
+		intrstr);
+		goto fail;
+	}
 
 	sc->sc_dev = self;
 	sc->sc_st = bst;
@@ -341,25 +344,20 @@ ave_fdt_attach(device_t parent, device_t
 	sc->sc_mapsize = size;
 	sc->sc_dmat = faa->faa_dmat;
 
-	aprint_naive("\n");
-	aprint_normal(": Gigabit Ethernet Controller\n");
-
 	hwimp = CSR_READ(sc, AVEID);
 	hwver = CSR_READ(sc, AVEHWVER);
-	aprint_normal_dev(self, "Unifier %c%c%c%c GbE (%d.%d)\n",
+
+	aprint_naive("\n");
+	aprint_normal(": Gigabit Ethernet Controller\n");
+	aprint_normal_dev(self, "UniPhier %c%c%c%c AVE GbE (%d.%d)\n",
 	hwimp >> 24, hwimp >> 16, hwimp >> 8, hwimp,
 	hwver >> 8, hwver & 0xff);
-
-	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET,
-		FDT_INTR_FLAGS, ave_intr, sc);
-	if (sc->sc_ih == NULL)
-		goto fail;
 	aprint_normal_dev(self, "interrupt on %s\n", intrstr);
 
 	phy_mode = fdtbus_get_string(phandle, "phy-mode");
 	if (phy_mode == NULL) {
 		aprint_error(": missing 'phy-mode' property\n");
-		return;
+		phy_mode = "rgmii";
 	}
 	if (strcmp(phy_mode, "rgmii") == 0)
 		sc->sc_phymode = 0;		/* RGMII */



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

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Mar 20 09:41:24 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
remove #ifdef _LP64 as jmcneil@ suggested


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sociox/if_ave.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/sociox

2020-03-20 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Fri Mar 20 09:41:24 UTC 2020

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
remove #ifdef _LP64 as jmcneil@ suggested


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sociox/if_ave.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/sociox/if_ave.c
diff -u src/sys/arch/arm/sociox/if_ave.c:1.1 src/sys/arch/arm/sociox/if_ave.c:1.2
--- src/sys/arch/arm/sociox/if_ave.c:1.1	Fri Mar 20 00:27:58 2020
+++ src/sys/arch/arm/sociox/if_ave.c	Fri Mar 20 09:41:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ave.c,v 1.1 2020/03/20 00:27:58 nisimura Exp $	*/
+/*	$NetBSD: if_ave.c,v 1.2 2020/03/20 09:41:24 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.1 2020/03/20 00:27:58 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.2 2020/03/20 09:41:24 nisimura Exp $");
 
 #include 
 #include 
@@ -290,14 +290,11 @@ static int
 ave_fdt_match(device_t parent, cfdata_t cf, void *aux)
 {
 	static const char * compatible[] = {
-#ifdef _LP64
 		"socionext,unifier-ld20-ave4",
-#else
 		"socionext,unifier-pro4-ave4",
 		"socionext,unifier-pxs2-ave4",
 		"socionext,unifier-ld11-ave4",
 		"socionext,unifier-pxs3-ave4",
-#endif
 		NULL
 	};
 	struct fdt_attach_args * const faa = aux;



Re: CVS commit: src/sys/arch/arm/sociox

2020-03-20 Thread Jared McNeill

Great work! One small remark:

+static int
+ave_fdt_match(device_t parent, cfdata_t cf, void *aux)
+{
+   static const char * compatible[] = {
+#ifdef _LP64
+   "socionext,unifier-ld20-ave4",
+#else
+   "socionext,unifier-pro4-ave4",
+   "socionext,unifier-pxs2-ave4",
+   "socionext,unifier-ld11-ave4",
+   "socionext,unifier-pxs3-ave4",
+#endif
+   NULL
+   };

Please do not use #ifdef here. Compatible strings are meant to describe 
which hardware device the driver is compatible with, and can be shared 
across multiple SoCs. In the case of IP licensing, possibly not even in 
the same SoC family! Consider a hypothetical where Socionext could release 
a new 32-bit SoC with an ave(4) that is functionally identical to the one 
found in their previous 64-bit chip.


CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-03-20 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Mar 20 08:26:01 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_znode.c

Log Message:
With zfs_netbsd_reclaim() no longer doing an unconditional
zil commit dmu_buf_get_user() may return a NULL handle when
the znode already disappeared.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.30 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.31
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.30	Sun Feb 23 15:46:38 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c	Fri Mar 20 08:26:01 2020
@@ -1315,7 +1315,11 @@ zfs_zget_cleaner(zfsvfs_t *zfsvfs, uint6
 		return (SET_ERROR(EINVAL));
 	}
 	hdl = dmu_buf_get_user(db);
-	ASSERT3P(hdl, !=, NULL);
+	if (hdl == NULL) {
+		sa_buf_rele(db, NULL);
+		ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+		return (SET_ERROR(EINVAL));
+	}
 	zp = sa_get_userdata(hdl);
 	ASSERT3U(zp->z_id, ==, obj_num);
 	sa_buf_rele(db, NULL);



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-03-20 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Mar 20 08:26:01 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_znode.c

Log Message:
With zfs_netbsd_reclaim() no longer doing an unconditional
zil commit dmu_buf_get_user() may return a NULL handle when
the znode already disappeared.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c

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



CVS commit: src/share/man/man9

2020-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Mar 20 08:02:55 UTC 2020

Modified Files:
src/share/man/man9: usbnet.9

Log Message:
Fix some typos, remove unnecessary Pp


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/usbnet.9

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



CVS commit: src/share/man/man9

2020-03-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Mar 20 08:02:55 UTC 2020

Modified Files:
src/share/man/man9: usbnet.9

Log Message:
Fix some typos, remove unnecessary Pp


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/usbnet.9

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/man9/usbnet.9
diff -u src/share/man/man9/usbnet.9:1.10 src/share/man/man9/usbnet.9:1.11
--- src/share/man/man9/usbnet.9:1.10	Fri Mar 20 01:15:05 2020
+++ src/share/man/man9/usbnet.9	Fri Mar 20 08:02:55 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: usbnet.9,v 1.10 2020/03/20 01:15:05 thorpej Exp $
+.\"	$NetBSD: usbnet.9,v 1.11 2020/03/20 08:02:55 wiz Exp $
 .\"
 .\" Copyright (c) 2019 Matthew R. Green
 .\" All rights reserved.
@@ -279,9 +279,8 @@ Returns true if device is dying (has bee
 pending detach.)
 .El
 .Pp
-Refrence counting functions for
+Reference counting functions for
 .Fa struct usbnet :
-.Pp
 .Bl -tag -width 4n
 .It Fn usbnet_busy un
 Increases the reference count on the driver instance, preventing
@@ -289,7 +288,7 @@ detach from occurring while the driver i
 device.
 Must be called with the core lock held.
 .It Fn usbnet_unbusy un
-Decreses the reference count on the driver instance.
+Decreases the reference count on the driver instance.
 Once the final reference has been dropped, if a detach event
 is pending, it is allowed to proceed.
 Must be called with the core lock held.



CVS commit: src/sys/dev/ic

2020-03-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 20 07:44:10 UTC 2020

Modified Files:
src/sys/dev/ic: spdmem.c

Log Message:
 Print DDR3's row and column correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/spdmem.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/ic/spdmem.c
diff -u src/sys/dev/ic/spdmem.c:1.31 src/sys/dev/ic/spdmem.c:1.32
--- src/sys/dev/ic/spdmem.c:1.31	Sun Apr  7 01:39:12 2019
+++ src/sys/dev/ic/spdmem.c	Fri Mar 20 07:44:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.31 2019/04/07 01:39:12 pgoyette Exp $ */
+/* $NetBSD: spdmem.c,v 1.32 2020/03/20 07:44:10 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.31 2019/04/07 01:39:12 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.32 2020/03/20 07:44:10 msaitoh Exp $");
 
 #include 
 #include 
@@ -797,7 +797,7 @@ decode_ddr3(const struct sysctlnode *nod
 	aprint_verbose_dev(self,
 	"%d rows, %d cols, %d log. banks, %d phys. banks, "
 	"%d.%03dns cycle time\n",
-	s->sm_ddr3.ddr3_rows + 9, s->sm_ddr3.ddr3_cols + 12,
+	s->sm_ddr3.ddr3_rows + 12, s->sm_ddr3.ddr3_cols + 9,
 	1 << (s->sm_ddr3.ddr3_logbanks + 3),
 	s->sm_ddr3.ddr3_physbanks + 1,
 	cycle_time/1000, cycle_time % 1000);



CVS commit: src/sys/dev/ic

2020-03-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 20 07:44:10 UTC 2020

Modified Files:
src/sys/dev/ic: spdmem.c

Log Message:
 Print DDR3's row and column correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/spdmem.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/samsung

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:38:16 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c exynos_pinctrl.c
exynos_pinctrl.h exynos_var.h

Log Message:
Support Exynos 5410 GPIO


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/samsung/exynos_gpio.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/samsung/exynos_pinctrl.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/samsung/exynos_pinctrl.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/samsung/exynos_var.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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.28 src/sys/arch/arm/samsung/exynos_gpio.c:1.29
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.28	Fri Mar 20 06:35:59 2020
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Fri Mar 20 06:38:16 2020
@@ -1,11 +1,11 @@
-/*	$NetBSD: exynos_gpio.c,v 1.28 2020/03/20 06:35:59 skrll Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.29 2020/03/20 06:38:16 skrll Exp $ */
 
 /*-
-* Copyright (c) 2014 The NetBSD Foundation, Inc.
+* Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
-* by Reinoud Zandijk
+* by Reinoud Zandijk, and by Nick Hudson
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.28 2020/03/20 06:35:59 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.29 2020/03/20 06:38:16 skrll Exp $");
 
 #include 
 #include 
@@ -84,7 +84,30 @@ struct exynos_gpio_pin {
 		.bank_bits = b, \
 	}
 
-static struct exynos_gpio_bank exynos5_banks[] = {
+#define GPIO_GRP_INTR(o, n, b, i)			\
+	{ 		\
+		.bank_name = #n,			\
+		.bank_core_offset = GPIO_REG(v,s,o),	\
+		.bank_bits = b,\
+	}
+
+#define GPIO_GRP_NONE(o, n, b)	\
+	{ \
+		.bank_name = #n, \
+		.bank_core_offset = GPIO_REG(v,s,o), \
+		.bank_bits = b, \
+	}
+
+#define GPIO_GRP_WAKEUP(o, n, b, i)			\
+	{ 		\
+		.bank_name = #n,			\
+		.bank_core_offset = GPIO_REG(v,s,o),	\
+		.bank_bits = b,\
+	}
+
+
+
+static struct exynos_gpio_bank exynos5420_banks[] = {
 	GPIO_GRP(5, MUXA, 0x, gpy7, 8),
 	GPIO_GRP(5, MUXA, 0x0C00, gpx0, 8),
 	GPIO_GRP(5, MUXA, 0x0C20, gpx1, 8),
@@ -125,10 +148,78 @@ static struct exynos_gpio_bank exynos5_b
 	GPIO_GRP(5, MUXD, 0x0100, gph0, 4),
 
 	GPIO_GRP(5, MUXE, 0x, gpz, 7),
+};
+
+struct exynos_pinctrl_banks exynos5420_pinctrl_banks = {
+	.epb_banks = exynos5420_banks,
+	.epb_nbanks = __arraycount(exynos5420_banks)
+};
+
+static struct exynos_gpio_bank exynos5410_banks[] = {
+	/* pin-controller 0 */
+	GPIO_GRP_INTR(0x000, gpa0, 8, 0x00),
+	GPIO_GRP_INTR(0x020, gpa1, 6, 0x04),
+	GPIO_GRP_INTR(0x040, gpa2, 8, 0x08),
+	GPIO_GRP_INTR(0x060, gpb0, 5, 0x0c),
+	GPIO_GRP_INTR(0x080, gpb1, 5, 0x10),
+	GPIO_GRP_INTR(0x0A0, gpb2, 4, 0x14),
+	GPIO_GRP_INTR(0x0C0, gpb3, 4, 0x18),
+	GPIO_GRP_INTR(0x0E0, gpc0, 7, 0x1c),
+	GPIO_GRP_INTR(0x100, gpc3, 4, 0x20),
+	GPIO_GRP_INTR(0x120, gpc1, 7, 0x24),
+	GPIO_GRP_INTR(0x140, gpc2, 7, 0x28),
+	GPIO_GRP_INTR(0x180, gpd1, 8, 0x2c),
+	GPIO_GRP_INTR(0x1A0, gpe0, 8, 0x30),
+	GPIO_GRP_INTR(0x1C0, gpe1, 2, 0x34),
+	GPIO_GRP_INTR(0x1E0, gpf0, 6, 0x38),
+	GPIO_GRP_INTR(0x200, gpf1, 8, 0x3c),
+	GPIO_GRP_INTR(0x220, gpg0, 8, 0x40),
+	GPIO_GRP_INTR(0x240, gpg1, 8, 0x44),
+	GPIO_GRP_INTR(0x260, gpg2, 2, 0x48),
+	GPIO_GRP_INTR(0x280, gph0, 4, 0x4c),
+	GPIO_GRP_INTR(0x2A0, gph1, 8, 0x50),
+	GPIO_GRP_NONE(0x160, gpm5, 2),
+	GPIO_GRP_NONE(0x2C0, gpm7, 8),
+	GPIO_GRP_NONE(0x2E0, gpy0, 6),
+	GPIO_GRP_NONE(0x300, gpy1, 4),
+	GPIO_GRP_NONE(0x320, gpy2, 6),
+	GPIO_GRP_NONE(0x340, gpy3, 8),
+	GPIO_GRP_NONE(0x360, gpy4, 8),
+	GPIO_GRP_NONE(0x380, gpy5, 8),
+	GPIO_GRP_NONE(0x3A0, gpy6, 8),
+	GPIO_GRP_NONE(0x3C0, gpy7, 8),
+	GPIO_GRP_WAKEUP(0xC00, gpx0, 8, 0x00),
+	GPIO_GRP_WAKEUP(0xC20, gpx1, 8, 0x04),
+	GPIO_GRP_WAKEUP(0xC40, gpx2, 8, 0x08),
+	GPIO_GRP_WAKEUP(0xC60, gpx3, 8, 0x0c),
+
+	/* pin-controller 1 */
+	GPIO_GRP_INTR(0x000, gpj0, 5, 0x00),
+	GPIO_GRP_INTR(0x020, gpj1, 8, 0x04),
+	GPIO_GRP_INTR(0x040, gpj2, 8, 0x08),
+	GPIO_GRP_INTR(0x060, gpj3, 8, 0x0c),
+	GPIO_GRP_INTR(0x080, gpj4, 2, 0x10),
+	GPIO_GRP_INTR(0x0A0, gpk0, 8, 0x14),
+	GPIO_GRP_INTR(0x0C0, gpk1, 8, 0x18),
+	GPIO_GRP_INTR(0x0E0, gpk2, 8, 0x1c),
+	GPIO_GRP_INTR(0x100, gpk3, 7, 0x20),
+
+	/* pin-controller 2 */
+	GPIO_GRP_INTR(0x000, gpv0, 8, 0x00),
+	GPIO_GRP_INTR(0x020, gpv1, 8, 0x04),
+	GPIO_GRP_INTR(0x060, gpv2, 8, 0x08),
+	GPIO_GRP_INTR(0x080, gpv3, 8, 0x0c),
+	GPIO_GRP_INTR(0x0C0, gpv4, 2, 0x10),
+
+	/* pin-controller 2 */
+	GPIO_GRP_INTR(0x000, gpz, 7, 0x00),
+};
 
+struct exynos_pinctrl_banks exynos5410_pinctrl_banks = {
+	.epb_banks = exynos5410_banks,
+	.epb_nbanks = 

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

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:38:16 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c exynos_pinctrl.c
exynos_pinctrl.h exynos_var.h

Log Message:
Support Exynos 5410 GPIO


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/samsung/exynos_gpio.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/samsung/exynos_pinctrl.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/samsung/exynos_pinctrl.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/samsung/exynos_var.h

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/samsung

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:35:59 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/samsung/exynos_gpio.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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.27 src/sys/arch/arm/samsung/exynos_gpio.c:1.28
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.27	Fri Mar 20 06:33:00 2020
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Fri Mar 20 06:35:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_gpio.c,v 1.27 2020/03/20 06:33:00 skrll Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.28 2020/03/20 06:35:59 skrll Exp $ */
 
 /*-
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.27 2020/03/20 06:33:00 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.28 2020/03/20 06:35:59 skrll Exp $");
 
 #include 
 #include 
@@ -63,11 +63,7 @@ struct exynos_gpio_bank {
 	const bus_addr_t	bank_core_offset;
 	const uint8_t		bank_bits;
 
-	uint8_t			bank_pin_mask;
-	uint8_t			bank_pin_inuse_mask;
-	bus_space_handle_t	bank_bsh;
 	struct exynos_gpio_pin_cfg bank_cfg;
-	struct exynos_gpio_bank * bank_next;
 };
 
 struct exynos_gpio_pin {
@@ -311,10 +307,6 @@ exynos_gpio_bank_config(struct exynos_pi
 	bank->bank_dev = config_found_ia(parent->sc_dev, "gpiobus", ,
 	 exynos_gpio_cfprint);
 
-	bank->bank_pin_mask = __BIT(bank->bank_bits) - 1;
-	bank->bank_pin_inuse_mask = 0;
-
-
 	/* read in our initial settings */
 	bank->bank_cfg.cfg = GPIO_READ(bank, EXYNOS_GPIO_CON);
 	bank->bank_cfg.pud = GPIO_READ(bank, EXYNOS_GPIO_PUD);



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

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:35:59 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/samsung/exynos_gpio.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/samsung

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:33:00 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
Use __BIT/__SHIFTOUT some more.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/samsung/exynos_gpio.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/samsung

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:33:00 UTC 2020

Modified Files:
src/sys/arch/arm/samsung: exynos_gpio.c

Log Message:
Use __BIT/__SHIFTOUT some more.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/samsung/exynos_gpio.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/samsung/exynos_gpio.c
diff -u src/sys/arch/arm/samsung/exynos_gpio.c:1.26 src/sys/arch/arm/samsung/exynos_gpio.c:1.27
--- src/sys/arch/arm/samsung/exynos_gpio.c:1.26	Tue Mar 17 21:24:30 2020
+++ src/sys/arch/arm/samsung/exynos_gpio.c	Fri Mar 20 06:33:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_gpio.c,v 1.26 2020/03/17 21:24:30 skrll Exp $ */
+/*	$NetBSD: exynos_gpio.c,v 1.27 2020/03/20 06:33:00 skrll Exp $ */
 
 /*-
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.26 2020/03/17 21:24:30 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_gpio.c,v 1.27 2020/03/20 06:33:00 skrll Exp $");
 
 #include 
 #include 
@@ -179,11 +179,13 @@ static int
 exynos_gpio_pin_read(void *cookie, int pin)
 {
 	struct exynos_gpio_bank * const bank = cookie;
+	uint8_t val;
 
 	KASSERT(pin < bank->bank_bits);
-	return (bus_space_read_1(bank->bank_sc->sc_bst,
- bank->bank_sc->sc_bsh,
-		EXYNOS_GPIO_DAT) >> pin) & 1;
+	val = bus_space_read_1(bank->bank_sc->sc_bst, bank->bank_sc->sc_bsh,
+	EXYNOS_GPIO_DAT);
+
+	return __SHIFTOUT(val, __BIT(pin));
 }
 
 static void
@@ -193,15 +195,13 @@ exynos_gpio_pin_write(void *cookie, int 
 	int val;
 
 	KASSERT(pin < bank->bank_bits);
-	val = bus_space_read_1(bank->bank_sc->sc_bst,
-			   bank->bank_sc->sc_bsh,
-			   EXYNOS_GPIO_DAT);
+	val = bus_space_read_1(bank->bank_sc->sc_bst, bank->bank_sc->sc_bsh,
+	EXYNOS_GPIO_DAT);
 	val &= ~__BIT(pin);
 	if (value)
 		val |= __BIT(pin);
-	bus_space_write_1(bank->bank_sc->sc_bst,
-			  bank->bank_sc->sc_bsh,
-		EXYNOS_GPIO_DAT, val);
+	bus_space_write_1(bank->bank_sc->sc_bst, bank->bank_sc->sc_bsh,
+	EXYNOS_GPIO_DAT, val);
 }
 
 static void



CVS commit: src/sys/arch/arm

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:23:52 UTC 2020

Modified Files:
src/sys/arch/arm/altera: cycv_dwcmmc.c
src/sys/arch/arm/samsung: exynos_dwcmmc.c

Log Message:
Provide a sc_intr_cardmask to restore the value used to that before

http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/altera/cycv_dwcmmc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/samsung/exynos_dwcmmc.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_dwcmmc.c
diff -u src/sys/arch/arm/altera/cycv_dwcmmc.c:1.4 src/sys/arch/arm/altera/cycv_dwcmmc.c:1.5
--- src/sys/arch/arm/altera/cycv_dwcmmc.c:1.4	Fri Oct 18 06:50:08 2019
+++ src/sys/arch/arm/altera/cycv_dwcmmc.c	Fri Mar 20 06:23:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_dwcmmc.c,v 1.4 2019/10/18 06:50:08 skrll Exp $ */
+/* $NetBSD: cycv_dwcmmc.c,v 1.5 2020/03/20 06:23:51 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_dwcmmc.c,v 1.4 2019/10/18 06:50:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_dwcmmc.c,v 1.5 2020/03/20 06:23:51 skrll Exp $");
 
 #include 
 #include 
@@ -134,6 +134,7 @@ cycv_dwcmmc_attach(device_t parent, devi
 	sc->sc_fifo_depth = fifo_depth;
 	sc->sc_fifo_reg = FIFO_REG;
 	sc->sc_flags = DWC_MMC_F_USE_HOLD_REG | DWC_MMC_F_DMA;
+	sc->sc_intr_cardmask = DWC_MMC_INT_SDIO_INT(8);
 
 	sc->sc_card_detect = cycv_dwcmmc_card_detect;
 	sc->sc_write_protect = NULL;

Index: src/sys/arch/arm/samsung/exynos_dwcmmc.c
diff -u src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.9 src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.10
--- src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.9	Fri Oct 18 06:13:38 2019
+++ src/sys/arch/arm/samsung/exynos_dwcmmc.c	Fri Mar 20 06:23:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_dwcmmc.c,v 1.9 2019/10/18 06:13:38 skrll Exp $ */
+/* $NetBSD: exynos_dwcmmc.c,v 1.10 2020/03/20 06:23:51 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.9 2019/10/18 06:13:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.10 2020/03/20 06:23:51 skrll Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: exynos_dwcmm
 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -130,6 +131,7 @@ exynos_dwcmmc_attach(device_t parent, de
 	sc->sc_dev = self;
 	sc->sc_bst = faa->faa_bst;
 	sc->sc_dmat = faa->faa_dmat;
+	sc->sc_intr_cardmask = DWC_MMC_INT_SDIO_INT(8);
 	error = bus_space_map(sc->sc_bst, addr, size, 0, >sc_bsh);
 	if (error) {
 		aprint_error(": couldn't map %#" PRIxBUSADDR ": %d\n",



CVS commit: src/sys/arch/arm

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:23:52 UTC 2020

Modified Files:
src/sys/arch/arm/altera: cycv_dwcmmc.c
src/sys/arch/arm/samsung: exynos_dwcmmc.c

Log Message:
Provide a sc_intr_cardmask to restore the value used to that before

http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/altera/cycv_dwcmmc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/samsung/exynos_dwcmmc.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/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:18:45 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/dwc_mmc.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/ic

2020-03-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Mar 20 06:18:45 UTC 2020

Modified Files:
src/sys/dev/ic: dwc_mmc.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/dwc_mmc.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/ic/dwc_mmc.c
diff -u src/sys/dev/ic/dwc_mmc.c:1.23 src/sys/dev/ic/dwc_mmc.c:1.24
--- src/sys/dev/ic/dwc_mmc.c:1.23	Thu Mar 19 15:19:13 2020
+++ src/sys/dev/ic/dwc_mmc.c	Fri Mar 20 06:18:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.23 2020/03/19 15:19:13 skrll Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.23 2020/03/19 15:19:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $");
 
 #include 
 #include 
@@ -439,7 +439,7 @@ dwc_mmc_bus_width(sdmmc_chipset_handle_t
 	}
 
 	sc->sc_mmc_width = width;
-	
+
 	return 0;
 }