CVS commit: src

2018-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 30 05:39:21 UTC 2018

Modified Files:
src/distrib/sets/lists/xetc: mi
src/external/mit/xorg/lib/fontconfig/etc/conf.d: Makefile

Log Message:
revert my own commit from a while back. Do allow matching bitmap fonts.
Not all bitmap fonts are bad, apparently.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/xetc/mi
cvs rdiff -u -r1.5 -r1.6 \
src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile

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

Modified files:

Index: src/distrib/sets/lists/xetc/mi
diff -u src/distrib/sets/lists/xetc/mi:1.30 src/distrib/sets/lists/xetc/mi:1.31
--- src/distrib/sets/lists/xetc/mi:1.30	Thu Mar 29 04:43:55 2018
+++ src/distrib/sets/lists/xetc/mi	Thu Aug 30 05:39:21 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.30 2018/03/29 04:43:55 snj Exp $
+# $NetBSD: mi,v 1.31 2018/08/30 05:39:21 maya Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -74,7 +74,7 @@
 ./etc/fonts/conf.d/65-fonts-persian.conf		-unknown-	xorg
 ./etc/fonts/conf.d/65-nonlatin.conf			-unknown-	xorg
 ./etc/fonts/conf.d/69-unifont.conf			-unknown-	xorg
-./etc/fonts/conf.d/70-no-bitmaps.conf			-unknown-	xorg
+./etc/fonts/conf.d/70-no-bitmaps.conf			-unknown-	obsolete
 ./etc/fonts/conf.d/80-delicious.conf			-unknown-	xorg
 ./etc/fonts/conf.d/90-synthetic.conf			-unknown-	xorg
 ./etc/fonts/fonts.conf	-unknown-	xorg

Index: src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile
diff -u src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile:1.5 src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile:1.6
--- src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile:1.5	Tue Aug 29 15:50:57 2017
+++ src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile	Thu Aug 30 05:39:21 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2017/08/29 15:50:57 maya Exp $
+#	$NetBSD: Makefile,v 1.6 2018/08/30 05:39:21 maya Exp $
 
 .include 
 
@@ -18,7 +18,6 @@ FONTCONFIG_LINKS= \
 	65-fonts-persian.conf \
 	65-nonlatin.conf \
 	69-unifont.conf \
-	70-no-bitmaps.conf \
 	80-delicious.conf \
 	90-synthetic.conf
 



CVS commit: src

2018-08-29 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Aug 30 05:39:21 UTC 2018

Modified Files:
src/distrib/sets/lists/xetc: mi
src/external/mit/xorg/lib/fontconfig/etc/conf.d: Makefile

Log Message:
revert my own commit from a while back. Do allow matching bitmap fonts.
Not all bitmap fonts are bad, apparently.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/xetc/mi
cvs rdiff -u -r1.5 -r1.6 \
src/external/mit/xorg/lib/fontconfig/etc/conf.d/Makefile

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



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

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Aug 30 01:19:49 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c

Log Message:
This is not merely `not for NetBSD'; upstream it's #if 0 altogether.

Always has been.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c
diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.13 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.14
--- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.13	Wed Aug 29 19:30:46 2018
+++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c	Thu Aug 30 01:19:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $	*/
+/*	$NetBSD: ttm_bo_util.c,v 1.14 2018/08/30 01:19:49 riastradh Exp $	*/
 
 /**
  *
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.14 2018/08/30 01:19:49 riastradh Exp $");
 
 #include 
 #include 
@@ -703,7 +703,7 @@ int ttm_bo_kmap(struct ttm_buffer_object
 		return -EINVAL;
 	if (start_page > bo->num_pages)
 		return -EINVAL;
-#ifndef __NetBSD__
+#if 0
 	if (num_pages > 1 && !capable(CAP_SYS_ADMIN))
 		return -EPERM;
 #endif



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

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Aug 30 01:19:49 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c

Log Message:
This is not merely `not for NetBSD'; upstream it's #if 0 altogether.

Always has been.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core

2018-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 29 19:31:35 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core: device.h

Log Message:
don't "return void_returning_function()" in a different void returning function.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h:1.6 src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h:1.7
--- src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h:1.6	Mon Aug 27 14:47:53 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h	Wed Aug 29 19:31:35 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: device.h,v 1.6 2018/08/27 14:47:53 riastradh Exp $	*/
+/*	$NetBSD: device.h,v 1.7 2018/08/29 19:31:35 mrg Exp $	*/
 
 #ifndef __NVKM_DEVICE_H__
 #define __NVKM_DEVICE_H__
@@ -248,17 +248,17 @@ nvkm_rd32(struct nvkm_device *d, bus_siz
 static inline void
 nvkm_wr08(struct nvkm_device *d, bus_size_t a, uint8_t v)
 {
-	return bus_space_write_1(d->mmiot, d->mmioh, a, v);
+	bus_space_write_1(d->mmiot, d->mmioh, a, v);
 }
 static inline void
 nvkm_wr16(struct nvkm_device *d, bus_size_t a, uint16_t v)
 {
-	return bus_space_write_stream_2(d->mmiot, d->mmioh, a, v);
+	bus_space_write_stream_2(d->mmiot, d->mmioh, a, v);
 }
 static inline void
 nvkm_wr32(struct nvkm_device *d, bus_size_t a, uint32_t v)
 {
-	return bus_space_write_stream_4(d->mmiot, d->mmioh, a, v);
+	bus_space_write_stream_4(d->mmiot, d->mmioh, a, v);
 }
 #else
 #define nvkm_rd08(d,a) ioread8((d)->pri + (a))



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core

2018-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 29 19:31:35 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core: device.h

Log Message:
don't "return void_returning_function()" in a different void returning function.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h

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



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

2018-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 29 19:30:46 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c

Log Message:
restore #ifndef __NetBSD__ code so drm on nouveau has a chance.
from @riastradh.

display is still black, but tools some times try to work now.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c

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



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

2018-08-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 29 19:30:46 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c

Log Message:
restore #ifndef __NetBSD__ code so drm on nouveau has a chance.
from @riastradh.

display is still black, but tools some times try to work now.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c
diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.12 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.13
--- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.12	Mon Aug 27 14:51:33 2018
+++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c	Wed Aug 29 19:30:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_util.c,v 1.12 2018/08/27 14:51:33 riastradh Exp $	*/
+/*	$NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $	*/
 
 /**
  *
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.12 2018/08/27 14:51:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $");
 
 #include 
 #include 
@@ -703,12 +703,10 @@ int ttm_bo_kmap(struct ttm_buffer_object
 		return -EINVAL;
 	if (start_page > bo->num_pages)
 		return -EINVAL;
-#ifdef __NetBSD__
-	if (num_pages > 1 && !DRM_SUSER())
-#else
+#ifndef __NetBSD__
 	if (num_pages > 1 && !capable(CAP_SYS_ADMIN))
-#endif
 		return -EPERM;
+#endif
 	(void) ttm_mem_io_lock(man, false);
 	ret = ttm_mem_io_reserve(bo->bdev, >mem);
 	ttm_mem_io_unlock(man);



CVS commit: [netbsd-7] src/doc

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 17:04:45 UTC 2018

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

Log Message:
Adjust path for mdoc.local


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 src/doc/CHANGES-7.2

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

Modified files:

Index: src/doc/CHANGES-7.2
diff -u src/doc/CHANGES-7.2:1.1.2.109 src/doc/CHANGES-7.2:1.1.2.110
--- src/doc/CHANGES-7.2:1.1.2.109	Wed Aug 29 13:27:27 2018
+++ src/doc/CHANGES-7.2	Wed Aug 29 17:04:45 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.2,v 1.1.2.109 2018/08/29 13:27:27 martin Exp $
+# $NetBSD: CHANGES-7.2,v 1.1.2.110 2018/08/29 17:04:45 martin Exp $
 
 A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2
 release:
@@ -6068,7 +6068,7 @@ xsrc/external/mit/libX11/dist/src/ListEx
 	Fixed crash on invalid reply (CVE-2018-14598)
 	[mrg, ticket #1635]
 
-gnu/dist/groff/tmac/doc-common			(manually changed)
+gnu/usr.bin/groff/tmac/mdoc.local		(manually changed)
 sys/sys/param.h	(manually changed)
 
 	Welcome to NetBSD 7.2!



CVS commit: [netbsd-7] src/doc

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 17:04:45 UTC 2018

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

Log Message:
Adjust path for mdoc.local


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 src/doc/CHANGES-7.2

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

2018-08-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Aug 29 16:51:51 UTC 2018

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

Log Message:
Note added for a strange value of residual counts in successful read/write.
Seems like a H/W bug. The best thing we can do would be to leave the code as is.

No binary changes.


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

2018-08-29 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Aug 29 16:51:51 UTC 2018

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

Log Message:
Note added for a strange value of residual counts in successful read/write.
Seems like a H/W bug. The best thing we can do would be to leave the code as is.

No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/adv.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/adv.c
diff -u src/sys/dev/ic/adv.c:1.47 src/sys/dev/ic/adv.c:1.48
--- src/sys/dev/ic/adv.c:1.47	Thu Jul 14 04:19:26 2016
+++ src/sys/dev/ic/adv.c	Wed Aug 29 16:51:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: adv.c,v 1.47 2016/07/14 04:19:26 msaitoh Exp $	*/
+/*	$NetBSD: adv.c,v 1.48 2018/08/29 16:51:51 rin Exp $	*/
 
 /*
  * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.47 2016/07/14 04:19:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.48 2018/08/29 16:51:51 rin Exp $");
 
 #include 
 #include 
@@ -899,6 +899,14 @@ adv_narrow_isr_callback(ASC_SOFTC *sc, A
 		switch (qdonep->d3.host_stat) {
 		case ASC_QHSTA_NO_ERROR:
 			xs->error = XS_NOERROR;
+			/*
+			 * XXX
+			 * According to the original Linux driver, xs->resid
+			 * should be qdonep->remain_bytes. However, its value
+			 * is bogus, which seems like a H/W bug. The best thing
+			 * we can do would be to ignore it, assuming that all
+			 * data has been successfully transferred...
+			 */
 			xs->resid = 0;
 			break;
 



CVS commit: src/sys/arch

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 16:26:25 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
clean up a little


To generate a diff of this commit:
cvs rdiff -u -r1.317 -r1.318 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.306 -r1.307 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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.317 src/sys/arch/amd64/amd64/machdep.c:1.318
--- src/sys/arch/amd64/amd64/machdep.c:1.317	Wed Aug 29 06:17:26 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Wed Aug 29 16:26:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.317 2018/08/29 06:17:26 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.318 2018/08/29 16:26:25 maxv Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.317 2018/08/29 06:17:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.318 2018/08/29 16:26:25 maxv Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1610,7 +1610,6 @@ init_pte(void)
 void __noasan
 init_slotspace(void)
 {
-	vaddr_t slotspace_rand(int, size_t, size_t);
 	vaddr_t va;
 
 	memset(, 0, sizeof(slotspace));

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.87 src/sys/arch/x86/include/pmap.h:1.88
--- src/sys/arch/x86/include/pmap.h:1.87	Wed Aug 29 06:28:50 2018
+++ src/sys/arch/x86/include/pmap.h	Wed Aug 29 16:26:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.87 2018/08/29 06:28:50 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.88 2018/08/29 16:26:25 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -357,6 +357,7 @@ bool		pmap_is_curpmap(struct pmap *);
 #ifndef __HAVE_DIRECT_MAP
 void		pmap_vpage_cpu_init(struct cpu_info *);
 #endif
+vaddr_t		slotspace_rand(int, size_t, size_t);
 
 vaddr_t reserve_dumppages(vaddr_t); /* XXX: not a pmap fn */
 

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.306 src/sys/arch/x86/x86/pmap.c:1.307
--- src/sys/arch/x86/x86/pmap.c:1.306	Wed Aug 29 06:17:26 2018
+++ src/sys/arch/x86/x86/pmap.c	Wed Aug 29 16:26:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.306 2018/08/29 06:17:26 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.307 2018/08/29 16:26:25 maxv Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -70,31 +70,6 @@
  */
 
 /*
- * Copyright (c) 1997 Charles D. Cranor and Washington University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
  * Copyright 2001 (c) Wasabi Systems, Inc.
  * All rights reserved.
  *
@@ -130,34 +105,32 @@
  */
 
 /*
- * pmap.c: i386 pmap module rewrite
- * Chuck Cranor 
- * 11-Aug-97
- *
- * history of this pmap module: in addition to my own input, i used
- *the following references for this rewrite of the i386 pmap:
- *
- * [1] the NetBSD i386 pmap.   this pmap appears to be based on the
- * BSD hp300 pmap done by Mike Hibler at University of Utah.
- * it was then ported to the i386 by William Jolitz of UUNET
- * Technologies, Inc.   Then Charles M. Hannum of the NetBSD
- * project fixed some bugs and provided some speed ups.
- *
- * [2] the FreeBSD i386 pmap.   this pmap seems to be the
- * Hibler/Jolitz pmap, as modified for FreeBSD by John S. Dyson
- * and David Greenman.
- *
- * [3] the Mach pmap.   this pmap, from CMU, seems to have migrated
- * between several processors.   

CVS commit: src/sys/arch

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 16:26:25 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
clean up a little


To generate a diff of this commit:
cvs rdiff -u -r1.317 -r1.318 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.306 -r1.307 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/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 15:52:27 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem:
nouveau_nvkm_subdev_instmem_nv40.c

Log Message:
No, this cannot be bar 0 -- it is bar 2 or bar 3, as shown above.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.6 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.6	Wed Aug 29 15:46:31 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c	Wed Aug 29 15:52:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.6 2018/08/29 15:46:31 riastradh Exp $	*/
+/*	$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.7 2018/08/29 15:52:27 riastradh Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.6 2018/08/29 15:46:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.7 2018/08/29 15:52:27 riastradh Exp $");
 
 #define nv40_instmem(p) container_of((p), struct nv40_instmem, base)
 #include "priv.h"
@@ -294,7 +294,6 @@ nv40_instmem_new(struct nvkm_device *dev
 	bus_size_t iomemsz;
 	int ret;
 
-	/* XXX Can this be BAR 0, for which we need a subregion?  */
 	imem->iomemt = device->func->resource_tag(device, bar);
 	iomembase = device->func->resource_addr(device, bar);
 	iomemsz = device->func->resource_size(device, bar);



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 15:52:27 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem:
nouveau_nvkm_subdev_instmem_nv40.c

Log Message:
No, this cannot be bar 0 -- it is bar 2 or bar 3, as shown above.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 15:46:31 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem:
nouveau_nvkm_subdev_instmem_nv40.c

Log Message:
Let's try not to use uninitialized memory as a bus size, shall we?

>From rjs@.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.5 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.6
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c:1.5	Mon Aug 27 14:51:55 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c	Wed Aug 29 15:46:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.5 2018/08/27 14:51:55 riastradh Exp $	*/
+/*	$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.6 2018/08/29 15:46:31 riastradh Exp $	*/
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.5 2018/08/27 14:51:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv40.c,v 1.6 2018/08/29 15:46:31 riastradh Exp $");
 
 #define nv40_instmem(p) container_of((p), struct nv40_instmem, base)
 #include "priv.h"
@@ -299,7 +299,7 @@ nv40_instmem_new(struct nvkm_device *dev
 	iomembase = device->func->resource_addr(device, bar);
 	iomemsz = device->func->resource_size(device, bar);
 	/* XXX errno NetBSD->Linux */
-	ret = -bus_space_map(imem->iomemt, iomembase, imem->iomemsz,
+	ret = -bus_space_map(imem->iomemt, iomembase, iomemsz,
 	BUS_SPACE_MAP_LINEAR, >iomemh);
 	if (ret) {
 		nvkm_error(>base.subdev, "unable to map PRAMIN BAR %d"



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 15:46:31 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem:
nouveau_nvkm_subdev_instmem_nv40.c

Log Message:
Let's try not to use uninitialized memory as a bus size, shall we?

>From rjs@.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \

src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c

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



CVS commit: [netbsd-7] src/gnu/usr.bin/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 15:40:37 UTC 2018

Modified Files:
src/gnu/usr.bin/groff/tmac [netbsd-7]: mdoc.local

Log Message:
Add NetBSD 8.0


To generate a diff of this commit:
cvs rdiff -u -r1.75.4.6 -r1.75.4.7 src/gnu/usr.bin/groff/tmac/mdoc.local

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

Modified files:

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.6 src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.7
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.6	Wed Mar 15 06:26:31 2017
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Wed Aug 29 15:40:37 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.75.4.6 2017/03/15 06:26:31 snj Exp $
+.\" $NetBSD: mdoc.local,v 1.75.4.7 2018/08/29 15:40:37 martin Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -63,6 +63,7 @@
 .ds doc-operating-system-NetBSD-7.07.0
 .ds doc-operating-system-NetBSD-7.17.1
 .ds doc-operating-system-NetBSD-7.27.2
+.ds doc-operating-system-NetBSD-8.08.0
 .ds doc-operating-system-FreeBSD-4.11  4.11
 .ds doc-operating-system-FreeBSD-5.4   5.4
 .ds doc-operating-system-FreeBSD-5.5   5.5



CVS commit: [netbsd-7] src/gnu/usr.bin/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 15:40:37 UTC 2018

Modified Files:
src/gnu/usr.bin/groff/tmac [netbsd-7]: mdoc.local

Log Message:
Add NetBSD 8.0


To generate a diff of this commit:
cvs rdiff -u -r1.75.4.6 -r1.75.4.7 src/gnu/usr.bin/groff/tmac/mdoc.local

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



CVS commit: [netbsd-7] src/gnu/dist/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 15:37:27 UTC 2018

Modified Files:
src/gnu/dist/groff/tmac [netbsd-7]: doc-common

Log Message:
Revert previous, this is the wrong place


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/gnu/dist/groff/tmac/doc-common

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

Modified files:

Index: src/gnu/dist/groff/tmac/doc-common
diff -u src/gnu/dist/groff/tmac/doc-common:1.10.4.1 src/gnu/dist/groff/tmac/doc-common:1.10.4.2
--- src/gnu/dist/groff/tmac/doc-common:1.10.4.1	Wed Aug 29 13:23:58 2018
+++ src/gnu/dist/groff/tmac/doc-common	Wed Aug 29 15:37:27 2018
@@ -436,18 +436,6 @@
 .ds doc-operating-system-NetBSD-2.0.1 2.0.1
 .ds doc-operating-system-NetBSD-2.0.2 2.0.2
 .ds doc-operating-system-NetBSD-2.1   2.1
-.ds doc-operating-system-NetBSD-3.03.0
-.ds doc-operating-system-NetBSD-3.0.1  3.0.1
-.ds doc-operating-system-NetBSD-3.13.1
-.ds doc-operating-system-NetBSD-4.04.0
-.ds doc-operating-system-NetBSD-5.05.0
-.ds doc-operating-system-NetBSD-5.15.1
-.ds doc-operating-system-NetBSD-6.06.0
-.ds doc-operating-system-NetBSD-6.16.1
-.ds doc-operating-system-NetBSD-7.07.0
-.ds doc-operating-system-NetBSD-7.17.1
-.ds doc-operating-system-NetBSD-7.27.2
-.ds doc-operating-system-NetBSD-8.08.0
 .
 .ds doc-operating-system-FreeBSD-1.0 1.0
 .ds doc-operating-system-FreeBSD-1.1 1.1



CVS commit: [netbsd-7] src/gnu/dist/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 15:37:27 UTC 2018

Modified Files:
src/gnu/dist/groff/tmac [netbsd-7]: doc-common

Log Message:
Revert previous, this is the wrong place


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/gnu/dist/groff/tmac/doc-common

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



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

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 14:53:46 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fence.c

Log Message:
Return timeout left, not error, if fence is already signaled.

fence_add_callback returns -ENOENT if fence is already signaled;
radeon_fence_default_wait is supposed to wait until fence is
signaled; this means its job is done.

Should fix spurious ENOENT in DRM_IOCTL_RADEON_GEM_WAIT_IDLE (or
_IOW('d',0x64,0x8) for you ktracers out there).


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.14 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.15
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c:1.14	Mon Aug 27 14:20:26 2018
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c	Wed Aug 29 14:53:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_fence.c,v 1.14 2018/08/27 14:20:26 riastradh Exp $	*/
+/*	$NetBSD: radeon_fence.c,v 1.15 2018/08/29 14:53:46 riastradh Exp $	*/
 
 /*
  * Copyright 2009 Jerome Glisse.
@@ -31,7 +31,7 @@
  *Dave Airlie
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.14 2018/08/27 14:20:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_fence.c,v 1.15 2018/08/29 14:53:46 riastradh Exp $");
 
 #include 
 #include 
@@ -1177,8 +1177,8 @@ radeon_fence_default_wait(struct fence *
 	int r;
 
 	r = fence_add_callback(f, , radeon_fence_wakeup_cb);
-	if (r)
-		return r;
+	if (r)			/* fence is done already */
+		return timo;
 
 	spin_lock(>fence_lock);
 	if (intr) {



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

2018-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 29 14:53:46 UTC 2018

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fence.c

Log Message:
Return timeout left, not error, if fence is already signaled.

fence_add_callback returns -ENOENT if fence is already signaled;
radeon_fence_default_wait is supposed to wait until fence is
signaled; this means its job is done.

Should fix spurious ENOENT in DRM_IOCTL_RADEON_GEM_WAIT_IDLE (or
_IOW('d',0x64,0x8) for you ktracers out there).


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c

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



CVS commit: [netbsd-7] src

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 13:27:28 UTC 2018

Modified Files:
src/doc [netbsd-7]: CHANGES-7.2
src/sys/sys [netbsd-7]: param.h

Log Message:
Welcome to NetBSD 7.2!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.108 -r1.1.2.109 src/doc/CHANGES-7.2
cvs rdiff -u -r1.459.2.11 -r1.459.2.12 src/sys/sys/param.h

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



CVS commit: [netbsd-7] src

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 13:27:28 UTC 2018

Modified Files:
src/doc [netbsd-7]: CHANGES-7.2
src/sys/sys [netbsd-7]: param.h

Log Message:
Welcome to NetBSD 7.2!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.108 -r1.1.2.109 src/doc/CHANGES-7.2
cvs rdiff -u -r1.459.2.11 -r1.459.2.12 src/sys/sys/param.h

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

Modified files:

Index: src/doc/CHANGES-7.2
diff -u src/doc/CHANGES-7.2:1.1.2.108 src/doc/CHANGES-7.2:1.1.2.109
--- src/doc/CHANGES-7.2:1.1.2.108	Tue Aug 28 13:17:03 2018
+++ src/doc/CHANGES-7.2	Wed Aug 29 13:27:27 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.2,v 1.1.2.108 2018/08/28 13:17:03 martin Exp $
+# $NetBSD: CHANGES-7.2,v 1.1.2.109 2018/08/29 13:27:27 martin Exp $
 
 A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2
 release:
@@ -6068,4 +6068,7 @@ xsrc/external/mit/libX11/dist/src/ListEx
 	Fixed crash on invalid reply (CVE-2018-14598)
 	[mrg, ticket #1635]
 
+gnu/dist/groff/tmac/doc-common			(manually changed)
+sys/sys/param.h	(manually changed)
 
+	Welcome to NetBSD 7.2!

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.459.2.11 src/sys/sys/param.h:1.459.2.12
--- src/sys/sys/param.h:1.459.2.11	Wed Mar 15 06:26:31 2017
+++ src/sys/sys/param.h	Wed Aug 29 13:27:28 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.459.2.11 2017/03/15 06:26:31 snj Exp $	*/
+/*	$NetBSD: param.h,v 1.459.2.12 2018/08/29 13:27:28 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	70100	/* NetBSD 7.1_STABLE */
+#define	__NetBSD_Version__	70200	/* NetBSD 7.2 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: [netbsd-7] src/gnu/dist/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 13:23:58 UTC 2018

Modified Files:
src/gnu/dist/groff/tmac [netbsd-7]: doc-common

Log Message:
Add a bunch of NetBSD versions


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/gnu/dist/groff/tmac/doc-common

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

Modified files:

Index: src/gnu/dist/groff/tmac/doc-common
diff -u src/gnu/dist/groff/tmac/doc-common:1.10 src/gnu/dist/groff/tmac/doc-common:1.10.4.1
--- src/gnu/dist/groff/tmac/doc-common:1.10	Mon Feb 24 07:23:40 2014
+++ src/gnu/dist/groff/tmac/doc-common	Wed Aug 29 13:23:58 2018
@@ -436,6 +436,18 @@
 .ds doc-operating-system-NetBSD-2.0.1 2.0.1
 .ds doc-operating-system-NetBSD-2.0.2 2.0.2
 .ds doc-operating-system-NetBSD-2.1   2.1
+.ds doc-operating-system-NetBSD-3.03.0
+.ds doc-operating-system-NetBSD-3.0.1  3.0.1
+.ds doc-operating-system-NetBSD-3.13.1
+.ds doc-operating-system-NetBSD-4.04.0
+.ds doc-operating-system-NetBSD-5.05.0
+.ds doc-operating-system-NetBSD-5.15.1
+.ds doc-operating-system-NetBSD-6.06.0
+.ds doc-operating-system-NetBSD-6.16.1
+.ds doc-operating-system-NetBSD-7.07.0
+.ds doc-operating-system-NetBSD-7.17.1
+.ds doc-operating-system-NetBSD-7.27.2
+.ds doc-operating-system-NetBSD-8.08.0
 .
 .ds doc-operating-system-FreeBSD-1.0 1.0
 .ds doc-operating-system-FreeBSD-1.1 1.1



CVS commit: [netbsd-7] src/gnu/dist/groff/tmac

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 13:23:58 UTC 2018

Modified Files:
src/gnu/dist/groff/tmac [netbsd-7]: doc-common

Log Message:
Add a bunch of NetBSD versions


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/gnu/dist/groff/tmac/doc-common

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



CVS commit: [netbsd-7] src/distrib/notes/common

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 12:59:12 UTC 2018

Modified Files:
src/distrib/notes/common [netbsd-7]: main

Log Message:
Fix swapped version numbers, remove huge and useless "We are" section.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.510.4.10 -r1.510.4.11 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.510.4.10 src/distrib/notes/common/main:1.510.4.11
--- src/distrib/notes/common/main:1.510.4.10	Tue Aug  7 15:53:17 2018
+++ src/distrib/notes/common/main	Wed Aug 29 12:59:12 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.510.4.10 2018/08/07 15:53:17 martin Exp $
+.\"	$NetBSD: main,v 1.510.4.11 2018/08/29 12:59:12 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST " sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd August 7, 2018
+.Dd August 29, 2018
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -479,7 +479,7 @@ possible,
 would not exist.
 .
 .if \n[FOR_RELEASE] \{\
-.Ss Changes Between The NetBSD 7.2 and 7.1.2 Releases
+.Ss Changes Between The NetBSD 7.1.2 and 7.2 Releases
 .Pp
 The
 .Nx
@@ -1015,425 +1015,6 @@ since its inception in January, 1993.
 If you're one of them, and would like to be mentioned, tell us!)
 .bullet)
 .
-.Ss "We are..."
-.
-.Pp
-(in alphabetical order)
-.Pp
-.
-.
-.Bl -column xxx "Jun-ichiro itojun Hagino" ".Mt sommerf...@netbsd.org" ".Sy playstation2"
-.
-.br_ne 1i
-.It Em "The NetBSD core group:"
-.It Ta Ta
-.It Ta Alan Barrett Ta Mt a...@netbsd.org
-.It Ta Alistair Crooks Ta Mt a...@netbsd.org
-.It Ta Matthew Green Ta Mt m...@netbsd.org
-.It Ta Chuck Silvers Ta Mt c...@netbsd.org
-.It Ta Matt Thomas Ta Mt m...@netbsd.org
-.It Ta YAMAMOTO Takashi Ta Mt y...@netbsd.org
-.It Ta Christos Zoulas Ta Mt chris...@netbsd.org
-.It Ta Ta
-.
-.br_ne 2i
-.It Em "The portmasters (and their ports):"
-.\"
-.\" Please keep src/doc/RESPONSIBLE in sync with this list.
-.\"
-.\" XXX created by list-portmasters.pl
-.\"
-.It Ta Reinoud ZandijkTa Mt  reinoud Ta Sy acorn32
-.It Ta Matt ThomasTa Mt matt Ta Sy alpha
-.It Ta Ignatios Souvatzis Ta Mt   is Ta Sy amiga
-.It Ta Ignatios Souvatzis Ta Mt   is Ta Sy amigappc
-.It Ta Noriyuki Soda  Ta Mt soda Ta Sy arc
-.It Ta Julian Coleman Ta Mt  jdc Ta Sy atari
-.It Ta Matthias Drochner  Ta Mt drochner Ta Sy cesfic
-.It Ta Erik Berls Ta Mtcyber Ta Sy cobalt
-.It Ta Antti Kantee   Ta Mtpooka Ta Sy emips
-.It Ta Simon BurgeTa Mt   simonb Ta Sy evbmips
-.It Ta Steve Woodford Ta Mt  scw Ta Sy evbppc
-.It Ta Izumi Tsutsui  Ta Mt  tsutsui Ta Sy ews4800mips
-.It Ta Izumi Tsutsui  Ta Mt  tsutsui Ta Sy hp300
-.It Ta Nick HudsonTa Mtskrll Ta Sy hppa
-.It Ta Valeriy E. Ushakov Ta Mt  uwe Ta Sy hpcsh
-.It Ta Matt ThomasTa Mt matt Ta Sy ibmnws
-.It Ta Gavan Fantom   Ta Mtgavan Ta Sy iyonix
-.It Ta Valeriy E. Ushakov Ta Mt  uwe Ta Sy landisk
-.It Ta Izumi Tsutsui  Ta Mt  tsutsui Ta Sy luna68k
-.It Ta Scott Reynolds Ta Mt   scottr Ta Sy mac68k
-.It Ta Michael Lorenz Ta Mt macallan Ta Sy macppc
-.It Ta Steve Woodford Ta Mt  scw Ta Sy mvme68k
-.It Ta Steve Woodford Ta Mt  scw Ta Sy mvmeppc
-.It Ta Matt ThomasTa Mt matt Ta Sy netwinder
-.It Ta Izumi Tsutsui  Ta Mt  tsutsui Ta Sy news68k
-.It Ta Tim Rightnour  Ta Mt  garbled Ta Sy ofppc
-.It Ta Simon BurgeTa Mt   simonb Ta Sy pmax
-.It Ta Tim Rightnour  Ta Mt  garbled Ta Sy prep
-.It Ta Tim Rightnour  Ta Mt  garbled Ta Sy rs6000
-.It Ta Tohru NishimuraTa Mt nisimura Ta Sy sandpoint
-.It Ta Simon BurgeTa Mt   simonb Ta Sy sbmips
-.It Ta S\(/oren J\(/orvangTa Mtsoren Ta Sy sgimips
-.It Ta SAITOH MasanobuTa Mt  msaitoh Ta Sy sh3
-.It Ta Martin HusemannTa Mt   martin Ta Sy sparc64
-.It Ta Anders Magnusson   Ta Mtragge 

CVS commit: [netbsd-7] src/distrib/notes/common

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 12:59:12 UTC 2018

Modified Files:
src/distrib/notes/common [netbsd-7]: main

Log Message:
Fix swapped version numbers, remove huge and useless "We are" section.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.510.4.10 -r1.510.4.11 src/distrib/notes/common/main

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

2018-08-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 29 11:29:27 UTC 2018

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

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/arm/include/cpufunc.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/include

2018-08-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 29 11:29:27 UTC 2018

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

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/arm/include/cpufunc.h

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

Modified files:

Index: src/sys/arch/arm/include/cpufunc.h
diff -u src/sys/arch/arm/include/cpufunc.h:1.79 src/sys/arch/arm/include/cpufunc.h:1.80
--- src/sys/arch/arm/include/cpufunc.h:1.79	Sun Apr  1 04:35:04 2018
+++ src/sys/arch/arm/include/cpufunc.h	Wed Aug 29 11:29:27 2018
@@ -358,7 +358,7 @@ cpsid(register_t psw)
 	case I32_bit|F32_bit:	__asm("cpsid\tif"); break;
 	}
 	return oldpsw;
-#else 
+#else
 	return disable_interrupts(psw);
 #endif
 }



CVS commit: src/sys/dev/i2c

2018-08-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Aug 29 11:08:30 UTC 2018

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

Log Message:
Initialize transition slew rate if specified in the DT


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/fan53555.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/fan53555.c
diff -u src/sys/dev/i2c/fan53555.c:1.1 src/sys/dev/i2c/fan53555.c:1.2
--- src/sys/dev/i2c/fan53555.c:1.1	Wed Aug 29 01:57:38 2018
+++ src/sys/dev/i2c/fan53555.c	Wed Aug 29 11:08:30 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fan53555.c,v 1.1 2018/08/29 01:57:38 jmcneill Exp $ */
+/* $NetBSD: fan53555.c,v 1.2 2018/08/29 11:08:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fan53555.c,v 1.1 2018/08/29 01:57:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fan53555.c,v 1.2 2018/08/29 11:08:30 jmcneill Exp $");
 
 #include 
 #include 
@@ -80,6 +80,14 @@ enum fan53555_vendor {
 	FAN_VENDOR_SILERGY,
 };
 
+/*
+ * Transition slew rates.
+ * Array index is reg value, value is slew rate in uV / us
+ */
+static const int fan53555_slew_rates[] = {
+	64000, 32000, 16000, 8000, 4000, 2000, 1000, 500
+};
+
 static const struct device_compatible_entry compat_data[] = {
 	{ "silergy,syr827",		FAN_VENDOR_SILERGY },
 	{ "silergy,syr828",		FAN_VENDOR_SILERGY },
@@ -205,7 +213,8 @@ static struct fdtbus_regulator_controlle
 static int
 fan53555_init(struct fan53555_softc *sc, enum fan53555_vendor vendor)
 {
-	uint8_t id1;
+	uint8_t id1, control;
+	int n;
 
 	I2C_LOCK(sc);
 	id1 = I2C_READ(sc, ID1_REG);
@@ -232,6 +241,8 @@ fan53555_init(struct fan53555_softc *sc,
 		return ENXIO;
 	}
 
+	of_getprop_uint32(sc->sc_phandle, "suspend_voltage_selector",
+	>sc_suspend_voltage_selector);
 	switch (sc->sc_suspend_voltage_selector) {
 	case 0:
 		sc->sc_suspend_reg = VSEL0_REG;
@@ -242,10 +253,28 @@ fan53555_init(struct fan53555_softc *sc,
 		sc->sc_runtime_reg = VSEL0_REG;
 		break;
 	default:
-		aprint_error(": Unsupported 'fcs,suspend-voltage-selector' value %u\n", sc->sc_suspend_voltage_selector);
+		aprint_error_dev(sc->sc_dev, "unsupported 'fcs,suspend-voltage-selector' value %u\n", sc->sc_suspend_voltage_selector);
 		return EINVAL;
 	}
 
+	of_getprop_uint32(sc->sc_phandle, "regulator-ramp-delay",
+	>sc_ramp_delay);
+	if (sc->sc_ramp_delay) {
+		for (n = 0; n < __arraycount(fan53555_slew_rates); n++)
+			if (sc->sc_ramp_delay > fan53555_slew_rates[n])
+break;
+		if (n == __arraycount(fan53555_slew_rates)) {
+			aprint_error_dev(sc->sc_dev, "unsupported 'regulator-ramp-delay' value %u\n", sc->sc_ramp_delay);
+			return EINVAL;
+		}
+		I2C_LOCK(sc);
+		control = I2C_READ(sc, CONTROL_REG);
+		control &= ~CONTROL_SLEW;
+		control |= __SHIFTIN(fan53555_slew_rates[n], CONTROL_SLEW);
+		I2C_WRITE(sc, CONTROL_REG, control);
+		I2C_UNLOCK(sc);
+	}
+
 	return 0;
 }
 
@@ -267,7 +296,6 @@ fan53555_attach(device_t parent, device_
 	struct fan53555_softc * const sc = device_private(self);
 	const struct device_compatible_entry *compat;
 	struct i2c_attach_args *ia = aux;
-	enum fan53555_vendor vendor;
 
 	sc->sc_dev = self;
 	sc->sc_i2c = ia->ia_tag;
@@ -275,14 +303,8 @@ fan53555_attach(device_t parent, device_
 	sc->sc_phandle = ia->ia_cookie;
 
 	iic_compatible_match(ia, compat_data, );
-	vendor = compat->data;
-
-	of_getprop_uint32(sc->sc_phandle, "regulator-ramp-delay",
-	>sc_ramp_delay);
-	of_getprop_uint32(sc->sc_phandle, "suspend_voltage_selector",
-	>sc_suspend_voltage_selector);
 
-	if (fan53555_init(sc, vendor) != 0)
+	if (fan53555_init(sc, compat->data) != 0)
 		return;
 
 	fdtbus_register_regulator_controller(self, sc->sc_phandle,



CVS commit: src/sys/dev/i2c

2018-08-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Aug 29 11:08:30 UTC 2018

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

Log Message:
Initialize transition slew rate if specified in the DT


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

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:05:17 UTC 2018

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

Log Message:
Make sure getnewbuf() runs bawrite() inside fstrans.
Use fstrans_start_nowait() to skip buffers that would block.


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

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:04:40 UTC 2018

Modified Files:
src/sys/dev: fss.c fssvar.h

Log Message:
Add two new states FSS_CREATING and FSS_DESTROYING and use them
while creating or destroying a snapshot.

Remove now unneeded sc_lock that made fss_ioctl mutually exclusive.

Fss_ioctl no longer blocks forever because a snapshot gets
created or destroyed.

Serialize snapshot creation and make it interruptible.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/fss.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/fssvar.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/fss.c
diff -u src/sys/dev/fss.c:1.105 src/sys/dev/fss.c:1.106
--- src/sys/dev/fss.c:1.105	Wed Aug 29 09:04:03 2018
+++ src/sys/dev/fss.c	Wed Aug 29 09:04:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.105 2018/08/29 09:04:03 hannken Exp $	*/
+/*	$NetBSD: fss.c,v 1.106 2018/08/29 09:04:40 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.105 2018/08/29 09:04:03 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.106 2018/08/29 09:04:40 hannken Exp $");
 
 #include 
 #include 
@@ -93,6 +93,8 @@ static int fss_bs_io(struct fss_softc *,
 static u_int32_t *fss_bs_indir(struct fss_softc *, u_int32_t);
 
 static kmutex_t fss_device_lock;	/* Protect all units. */
+static kcondvar_t fss_device_cv;	/* Serialize snapshot creation. */
+static bool fss_creating = false;	/* Currently creating a snapshot. */
 static int fss_num_attached = 0;	/* Number of attached devices. */
 static struct vfs_hooks fss_vfs_hooks = {
 	.vh_unmount = fss_unmount_hook
@@ -136,6 +138,7 @@ fssattach(int num)
 {
 
 	mutex_init(_device_lock, MUTEX_DEFAULT, IPL_NONE);
+	cv_init(_device_cv, "snapwait");
 	if (config_cfattach_attach(fss_cd.cd_name, _ca))
 		aprint_error("%s: unable to register\n", fss_cd.cd_name);
 }
@@ -154,7 +157,6 @@ fss_attach(device_t parent, device_t sel
 	sc->sc_dev = self;
 	sc->sc_bdev = NODEV;
 	mutex_init(>sc_slock, MUTEX_DEFAULT, IPL_NONE);
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(>sc_work_cv, "fssbs");
 	cv_init(>sc_cache_cv, "cowwait");
 	bufq_alloc(>sc_bufq, "fcfs", 0);
@@ -185,7 +187,6 @@ fss_detach(device_t self, int flags)
 
 	pmf_device_deregister(self);
 	mutex_destroy(>sc_slock);
-	mutex_destroy(>sc_lock);
 	cv_destroy(>sc_work_cv);
 	cv_destroy(>sc_cache_cv);
 	bufq_drain(sc->sc_bufq);
@@ -341,36 +342,83 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
 		fss->fss_flags = 0;
 		/* Fall through */
 	case FSSIOCSET:
-		mutex_enter(>sc_lock);
+		mutex_enter(>sc_slock);
 		if ((flag & FWRITE) == 0)
 			error = EPERM;
-		mutex_enter(>sc_slock);
-		if (error == 0 && sc->sc_state != FSS_IDLE)
+		if (error == 0 && sc->sc_state != FSS_IDLE) {
 			error = EBUSY;
+		} else {
+			sc->sc_state = FSS_CREATING;
+			copyinstr(fss->fss_mount, sc->sc_mntname,
+			sizeof(sc->sc_mntname), NULL);
+			memset(>sc_time, 0, sizeof(sc->sc_time));
+			sc->sc_clshift = 0;
+		}
 		mutex_exit(>sc_slock);
-		if (error == 0)
-			error = fss_create_snapshot(sc, fss, l);
-		if (error == 0)
+		if (error)
+			break;
+
+		/*
+		 * Serialize snapshot creation.
+		 */
+		mutex_enter(_device_lock);
+		while (fss_creating) {
+			error = cv_wait_sig(_device_cv, _device_lock);
+			if (error) {
+mutex_enter(>sc_slock);
+KASSERT(sc->sc_state == FSS_CREATING);
+sc->sc_state = FSS_IDLE;
+mutex_exit(>sc_slock);
+mutex_exit(_device_lock);
+break;
+			}
+		}
+		fss_creating = true;
+		mutex_exit(_device_lock);
+
+		error = fss_create_snapshot(sc, fss, l);
+		mutex_enter(>sc_slock);
+		if (error == 0) {
+			KASSERT(sc->sc_state == FSS_ACTIVE);
 			sc->sc_uflags = fss->fss_flags;
-		mutex_exit(>sc_lock);
+		} else {
+			KASSERT(sc->sc_state == FSS_CREATING);
+			sc->sc_state = FSS_IDLE;
+		}
+		mutex_exit(>sc_slock);
+
+		mutex_enter(_device_lock);
+		fss_creating = false;
+		cv_broadcast(_device_cv);
+		mutex_exit(_device_lock);
+
 		break;
 
 	case FSSIOCCLR:
-		mutex_enter(>sc_lock);
-		if ((flag & FWRITE) == 0)
+		mutex_enter(>sc_slock);
+		if ((flag & FWRITE) == 0) {
 			error = EPERM;
+		} else if (sc->sc_state != FSS_ACTIVE &&
+		sc->sc_state != FSS_ERROR) {
+			error = EBUSY;
+		} else {
+			sc->sc_state = FSS_DESTROYING;
+		}
+		mutex_exit(>sc_slock);
+		if (error)
+			break;
+
+		error = fss_delete_snapshot(sc, l);
 		mutex_enter(>sc_slock);
-		if (error == 0 && sc->sc_state == FSS_IDLE)
-			error = ENXIO;
+		if (error)
+			fss_error(sc, "Failed to delete snapshot");
+		else
+			KASSERT(sc->sc_state == FSS_IDLE);
 		mutex_exit(>sc_slock);
-		if (error == 0)
-			error = fss_delete_snapshot(sc, l);
-		mutex_exit(>sc_lock);
 		break;
 
 #ifndef _LP64
 	case FSSIOCGET50:
-		mutex_enter(>sc_lock);
 		mutex_enter(>sc_slock);
 		if (sc->sc_state == FSS_IDLE) {
 			error = 

CVS commit: src/sys/kern

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:05:17 UTC 2018

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

Log Message:
Make sure getnewbuf() runs bawrite() inside fstrans.
Use fstrans_start_nowait() to skip buffers that would block.


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/kern/vfs_bio.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/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.276 src/sys/kern/vfs_bio.c:1.277
--- src/sys/kern/vfs_bio.c:1.276	Sat Oct 28 00:37:11 2017
+++ src/sys/kern/vfs_bio.c	Wed Aug 29 09:05:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_bio.c,v 1.276 2017/10/28 00:37:11 pgoyette Exp $	*/
+/*	$NetBSD: vfs_bio.c,v 1.277 2018/08/29 09:05:17 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.276 2017/10/28 00:37:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.277 2018/08/29 09:05:17 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bufcache.h"
@@ -1360,11 +1360,12 @@ allocbuf(buf_t *bp, int size, int preser
  * Called with the buffer queues locked.
  * Return buffer locked.
  */
-buf_t *
+static buf_t *
 getnewbuf(int slpflag, int slptimeo, int from_bufq)
 {
 	buf_t *bp;
 	struct vnode *vp;
+	struct mount *transmp = NULL;
 
  start:
 	KASSERT(mutex_owned(_lock));
@@ -1389,8 +1390,21 @@ getnewbuf(int slpflag, int slptimeo, int
 	}
 
 	KASSERT(mutex_owned(_lock));
-	if ((bp = TAILQ_FIRST([BQ_AGE].bq_queue)) != NULL ||
-	(bp = TAILQ_FIRST([BQ_LRU].bq_queue)) != NULL) {
+	if ((bp = TAILQ_FIRST([BQ_AGE].bq_queue)) != NULL) {
+		KASSERT(!ISSET(bp->b_oflags, BO_DELWRI));
+	} else {
+		TAILQ_FOREACH(bp, [BQ_LRU].bq_queue, b_freelist) {
+			if (ISSET(bp->b_cflags, BC_VFLUSH) ||
+			!ISSET(bp->b_oflags, BO_DELWRI))
+break;
+			if (fstrans_start_nowait(bp->b_vp->v_mount) == 0) {
+KASSERT(transmp == NULL);
+transmp = bp->b_vp->v_mount;
+break;
+			}
+		}
+	}
+	if (bp != NULL) {
 		KASSERT(!ISSET(bp->b_cflags, BC_BUSY) || ISSET(bp->b_cflags, BC_VFLUSH));
 		bremfree(bp);
 
@@ -1444,10 +1458,14 @@ getnewbuf(int slpflag, int slptimeo, int
 		SET(bp->b_cflags, BC_AGE);
 		mutex_exit(_lock);
 		bawrite(bp);
+		KASSERT(transmp != NULL);
+		fstrans_done(transmp);
 		mutex_enter(_lock);
 		return (NULL);
 	}
 
+	KASSERT(transmp == NULL);
+
 	vp = bp->b_vp;
 
 	/* clear out various other fields */



CVS commit: src/sys/dev

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:04:40 UTC 2018

Modified Files:
src/sys/dev: fss.c fssvar.h

Log Message:
Add two new states FSS_CREATING and FSS_DESTROYING and use them
while creating or destroying a snapshot.

Remove now unneeded sc_lock that made fss_ioctl mutually exclusive.

Fss_ioctl no longer blocks forever because a snapshot gets
created or destroyed.

Serialize snapshot creation and make it interruptible.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/fss.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/fssvar.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

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:04:03 UTC 2018

Modified Files:
src/sys/dev: fss.c fssvar.h

Log Message:
Convert flags FSS_ACTIVE and FSS_ERROR into new member sc_state
with states FSS_IDLE, FSS_ACTIVE and FSS_ERROR.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/fss.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/fssvar.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/fss.c
diff -u src/sys/dev/fss.c:1.104 src/sys/dev/fss.c:1.105
--- src/sys/dev/fss.c:1.104	Tue Jan 23 22:42:29 2018
+++ src/sys/dev/fss.c	Wed Aug 29 09:04:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.104 2018/01/23 22:42:29 pgoyette Exp $	*/
+/*	$NetBSD: fss.c,v 1.105 2018/08/29 09:04:03 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.104 2018/01/23 22:42:29 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.105 2018/08/29 09:04:03 hannken Exp $");
 
 #include 
 #include 
@@ -173,8 +173,12 @@ fss_detach(device_t self, int flags)
 {
 	struct fss_softc *sc = device_private(self);
 
-	if (sc->sc_flags & FSS_ACTIVE)
+	mutex_enter(>sc_slock);
+	if (sc->sc_state != FSS_IDLE) {
+		mutex_exit(>sc_slock);
 		return EBUSY;
+	}
+	mutex_exit(>sc_slock);
 
 	if (--fss_num_attached == 0)
 		vfs_hooks_detach(_vfs_hooks);
@@ -215,6 +219,7 @@ fss_open(dev_t dev, int flags, int mode,
 			mutex_exit(_device_lock);
 			return ENOMEM;
 		}
+		sc->sc_state = FSS_IDLE;
 	}
 
 	mutex_enter(>sc_slock);
@@ -246,20 +251,20 @@ restart:
 		mutex_exit(_device_lock);
 		return 0;
 	}
-	if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
+	if (sc->sc_state != FSS_IDLE &&
 	(sc->sc_uflags & FSS_UNCONFIG_ON_CLOSE) != 0) {
 		sc->sc_uflags &= ~FSS_UNCONFIG_ON_CLOSE;
 		mutex_exit(>sc_slock);
 		error = fss_ioctl(dev, FSSIOCCLR, NULL, FWRITE, l);
 		goto restart;
 	}
-	if ((sc->sc_flags & FSS_ACTIVE) != 0) {
+	if (sc->sc_state != FSS_IDLE) {
 		mutex_exit(>sc_slock);
 		mutex_exit(_device_lock);
 		return error;
 	}
 
-	KASSERT((sc->sc_flags & FSS_ACTIVE) == 0);
+	KASSERT(sc->sc_state == FSS_IDLE);
 	KASSERT((sc->sc_flags & (FSS_CDEV_OPEN|FSS_BDEV_OPEN)) == mflag);
 	mutex_exit(>sc_slock);
 	cf = device_cfdata(sc->sc_dev);
@@ -279,7 +284,7 @@ fss_strategy(struct buf *bp)
 
 	mutex_enter(>sc_slock);
 
-	if (write || !FSS_ISVALID(sc)) {
+	if (write || sc->sc_state != FSS_ACTIVE) {
 		bp->b_error = (write ? EROFS : ENXIO);
 		goto done;
 	}
@@ -317,7 +322,7 @@ fss_write(dev_t dev, struct uio *uio, in
 int
 fss_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
-	int error;
+	int error = 0;
 	struct fss_softc *sc = device_lookup_private(_cd, minor(dev));
 	struct fss_set _fss;
 	struct fss_set *fss = (struct fss_set *)data;
@@ -339,9 +344,11 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
 		mutex_enter(>sc_lock);
 		if ((flag & FWRITE) == 0)
 			error = EPERM;
-		else if ((sc->sc_flags & FSS_ACTIVE) != 0)
+		mutex_enter(>sc_slock);
+		if (error == 0 && sc->sc_state != FSS_IDLE)
 			error = EBUSY;
-		else
+		mutex_exit(>sc_slock);
+		if (error == 0)
 			error = fss_create_snapshot(sc, fss, l);
 		if (error == 0)
 			sc->sc_uflags = fss->fss_flags;
@@ -352,9 +359,11 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
 		mutex_enter(>sc_lock);
 		if ((flag & FWRITE) == 0)
 			error = EPERM;
-		else if ((sc->sc_flags & FSS_ACTIVE) == 0)
+		mutex_enter(>sc_slock);
+		if (error == 0 && sc->sc_state == FSS_IDLE)
 			error = ENXIO;
-		else
+		mutex_exit(>sc_slock);
+		if (error == 0)
 			error = fss_delete_snapshot(sc, l);
 		mutex_exit(>sc_lock);
 		break;
@@ -362,54 +371,50 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
 #ifndef _LP64
 	case FSSIOCGET50:
 		mutex_enter(>sc_lock);
-		switch (sc->sc_flags & (FSS_PERSISTENT | FSS_ACTIVE)) {
-		case FSS_ACTIVE:
+		mutex_enter(>sc_slock);
+		if (sc->sc_state == FSS_IDLE) {
+			error = ENXIO;
+		} else if ((sc->sc_flags & FSS_PERSISTENT) == 0) {
 			memcpy(fsg50->fsg_mount, sc->sc_mntname, MNAMELEN);
 			fsg50->fsg_csize = FSS_CLSIZE(sc);
 			timeval_to_timeval50(>sc_time, >fsg_time);
 			fsg50->fsg_mount_size = sc->sc_clcount;
 			fsg50->fsg_bs_size = sc->sc_clnext;
 			error = 0;
-			break;
-		case FSS_PERSISTENT | FSS_ACTIVE:
+		} else {
 			memcpy(fsg50->fsg_mount, sc->sc_mntname, MNAMELEN);
 			fsg50->fsg_csize = 0;
 			timeval_to_timeval50(>sc_time, >fsg_time);
 			fsg50->fsg_mount_size = 0;
 			fsg50->fsg_bs_size = 0;
 			error = 0;
-			break;
-		default:
-			error = ENXIO;
-			break;
 		}
+		mutex_exit(>sc_slock);
 		mutex_exit(>sc_lock);
 		break;
 #endif /* _LP64 */
 
 	case FSSIOCGET:
 		mutex_enter(>sc_lock);
-		switch (sc->sc_flags & (FSS_PERSISTENT | FSS_ACTIVE)) {
-		case FSS_ACTIVE:
+		mutex_enter(>sc_slock);
+		if (sc->sc_state == FSS_IDLE) {
+			error = ENXIO;
+		} else if ((sc->sc_flags & FSS_PERSISTENT) == 0) {
 		

CVS commit: src/sys/dev

2018-08-29 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 29 09:04:03 UTC 2018

Modified Files:
src/sys/dev: fss.c fssvar.h

Log Message:
Convert flags FSS_ACTIVE and FSS_ERROR into new member sc_state
with states FSS_IDLE, FSS_ACTIVE and FSS_ERROR.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/fss.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/fssvar.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/ixgbe

2018-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 29 09:03:15 UTC 2018

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

Log Message:
 Fix a bug that media change may fail. I noticed that ifconfig ixgN media XXX
took a 10 or more seconds on a Denverton machie. I occurred by trying take a
lock and timed out. The reason was that ixgbe_media_change() didn't take
CORE_LOCK. Do it.

 This problem was from FreeBSD's pre-iflib ixgbe (I don't know whether this
problem really occurs on FreeBSD or not). Post-iflib ixgbe has no problem
because iflib_media_change() takes a lock.

XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.163 src/sys/dev/pci/ixgbe/ixgbe.c:1.164
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.163	Fri Jul  6 02:36:35 2018
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Aug 29 09:03:14 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.163 2018/07/06 02:36:35 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.164 2018/08/29 09:03:14 msaitoh Exp $ */
 
 /**
 
@@ -2843,6 +2843,7 @@ ixgbe_media_change(struct ifnet *ifp)
 	if (hw->phy.media_type == ixgbe_media_type_backplane)
 		return (EPERM);
 
+	IXGBE_CORE_LOCK(adapter);
 	/*
 	 * We don't actually need to check against the supported
 	 * media types of the adapter; ifmedia will take care of
@@ -2855,6 +2856,7 @@ ixgbe_media_change(struct ifnet *ifp)
 		if (err != IXGBE_SUCCESS) {
 			device_printf(adapter->dev, "Unable to determine "
 			"supported advertise speeds\n");
+			IXGBE_CORE_UNLOCK(adapter);
 			return (ENODEV);
 		}
 		speed |= link_caps;
@@ -2915,10 +2917,12 @@ ixgbe_media_change(struct ifnet *ifp)
 			adapter->advertise |= 1 << 5;
 	}
 
+	IXGBE_CORE_UNLOCK(adapter);
 	return (0);
 
 invalid:
 	device_printf(adapter->dev, "Invalid media type!\n");
+	IXGBE_CORE_UNLOCK(adapter);
 
 	return (EINVAL);
 } /* ixgbe_media_change */



CVS commit: src/sys/dev/pci/ixgbe

2018-08-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 29 09:03:15 UTC 2018

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

Log Message:
 Fix a bug that media change may fail. I noticed that ifconfig ixgN media XXX
took a 10 or more seconds on a Denverton machie. I occurred by trying take a
lock and timed out. The reason was that ixgbe_media_change() didn't take
CORE_LOCK. Do it.

 This problem was from FreeBSD's pre-iflib ixgbe (I don't know whether this
problem really occurs on FreeBSD or not). Post-iflib ixgbe has no problem
because iflib_media_change() takes a lock.

XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/dev/pci/ixgbe/ixgbe.c

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



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

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 07:58:14 UTC 2018

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

Log Message:
Ticket #1635


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

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

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.110 src/doc/CHANGES-7.0.3:1.1.2.111
--- src/doc/CHANGES-7.0.3:1.1.2.110	Tue Aug 14 14:37:05 2018
+++ src/doc/CHANGES-7.0.3	Wed Aug 29 07:58:14 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.110 2018/08/14 14:37:05 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.111 2018/08/29 07:58:14 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5484,3 +5484,16 @@ sys/netinet6/frag6.c1.64
 	Ignore zero-sized fragments.
 	[maxv, ticket #1630]
 
+xsrc/external/mit/libX11/dist/src/FontNames.	(patch)
+xsrc/external/mit/libX11/dist/src/GetFPath.c	(patch)
+xsrc/external/mit/libX11/dist/src/LiHosts.c	(patch)
+xsrc/external/mit/libX11/dist/src/ListExt.c	(patch)
+
+	Apply fixes from libX11 1.6.5 for the following vulnerabilities:
+	Fixed off-by-one writes (CVE-2018-14599)
+	Validation of server response in XListHosts
+	Fixed out of boundary write (CVE-2018-14600)
+	Fixed crash on invalid reply (CVE-2018-14598)
+	[mrg, ticket #1635]
+
+



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

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 07:58:14 UTC 2018

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

Log Message:
Ticket #1635


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

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



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

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 07:57:14 UTC 2018

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

Log Message:
Ticket #1635


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-7.1.3

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



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

2018-08-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug 29 07:57:14 UTC 2018

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

Log Message:
Ticket #1635


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-7.1.3

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

Modified files:

Index: src/doc/CHANGES-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.17 src/doc/CHANGES-7.1.3:1.1.2.18
--- src/doc/CHANGES-7.1.3:1.1.2.17	Tue Aug 14 14:36:09 2018
+++ src/doc/CHANGES-7.1.3	Wed Aug 29 07:57:13 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.17 2018/08/14 14:36:09 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.18 2018/08/29 07:57:13 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -176,3 +176,15 @@ sys/netinet6/frag6.c1.64
 	Ignore zero-sized fragments.
 	[maxv, ticket #1630]
 
+xsrc/external/mit/libX11/dist/src/FontNames.	(patch)
+xsrc/external/mit/libX11/dist/src/GetFPath.c	(patch)
+xsrc/external/mit/libX11/dist/src/LiHosts.c	(patch)
+xsrc/external/mit/libX11/dist/src/ListExt.c	(patch)
+
+	Apply fixes from libX11 1.6.5 for the following vulnerabilities:
+	Fixed off-by-one writes (CVE-2018-14599)
+	Validation of server response in XListHosts
+	Fixed out of boundary write (CVE-2018-14600)
+	Fixed crash on invalid reply (CVE-2018-14598)
+	[mrg, ticket #1635]
+



CVS commit: [netbsd-7-0] xsrc/external/mit/libX11/dist/src

2018-08-29 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Aug 29 07:55:51 UTC 2018

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-7-0]: FontNames.c GetFPath.c
LiHosts.c ListExt.c

Log Message:
Apply patch, requested by mrg in ticket #1635:

xsrc/external/mit/libX11/dist/src/FontNames.c
xsrc/external/mit/libX11/dist/src/GetFPath.c
xsrc/external/mit/libX11/dist/src/LiHosts.c
xsrc/external/mit/libX11/dist/src/ListExt.c

Apply fixes from libX11 1.6.5 for the following vulnerabilities:
Fixed off-by-one writes (CVE-2018-14599)
Validation of server response in XListHosts
Fixed out of boundary write (CVE-2018-14600)
Fixed crash on invalid reply (CVE-2018-14598)
(Backport of upstream git commits b469da1430cdcee06e31c6251b83aede072a1ff0,
 d81da209fd4d0c2c9ad0596a8078e58864479d0d,
 dbf72805fd9d7b1846fe9a11b46f3994bfc27fea,
 e83722768fd5c467ef61fa159e8c6278770b45c2 resp)


To generate a diff of this commit:
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 \
xsrc/external/mit/libX11/dist/src/FontNames.c \
xsrc/external/mit/libX11/dist/src/ListExt.c
cvs rdiff -u -r1.3 -r1.3.4.1 xsrc/external/mit/libX11/dist/src/GetFPath.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.6.1 \
xsrc/external/mit/libX11/dist/src/LiHosts.c

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

Modified files:

Index: xsrc/external/mit/libX11/dist/src/FontNames.c
diff -u xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.4.1 xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.4.2
--- xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.4.1	Wed Oct  5 09:42:35 2016
+++ xsrc/external/mit/libX11/dist/src/FontNames.c	Wed Aug 29 07:55:51 2018
@@ -86,23 +86,16 @@ int *actualCount)	/* RETURN */
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (rlen + 1);
+	chend = ch + rlen;
 	length = *(unsigned char *)ch;
 	*ch = 1; /* make sure it is non-zero for XFreeFontNames */
 	for (i = 0; i < rep.nFonts; i++) {
 	if (ch + length < chend) {
 		flist[i] = ch + 1;  /* skip over length */
 		ch += length + 1;  /* find next length ... */
-		if (ch <= chend) {
-		length = *(unsigned char *)ch;
-		*ch = '\0';  /* and replace with null-termination */
-		count++;
-		} else {
-Xfree(flist);
-flist = NULL;
-count = 0;
-break;
-		}
+		length = *(unsigned char *)ch;
+		*ch = '\0';  /* and replace with null-termination */
+		count++;
 	} else {
 Xfree(flist);
 flist = NULL;
Index: xsrc/external/mit/libX11/dist/src/ListExt.c
diff -u xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.4.1 xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.4.2
--- xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.4.1	Wed Oct  5 09:42:35 2016
+++ xsrc/external/mit/libX11/dist/src/ListExt.c	Wed Aug 29 07:55:51 2018
@@ -74,19 +74,20 @@ char **XListExtensions(
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (rlen + 1);
-	length = *ch;
+	chend = ch + rlen;
+	length = *(unsigned char *)ch;
 	for (i = 0; i < rep.nExtensions; i++) {
 		if (ch + length < chend) {
 		list[i] = ch+1;  /* skip over length */
 		ch += length + 1; /* find next length ... */
-		if (ch <= chend) {
-			length = *ch;
-			*ch = '\0'; /* and replace with null-termination */
-			count++;
-		} else {
-			list[i] = NULL;
-		}
+		length = *(unsigned char *)ch;
+		*ch = '\0'; /* and replace with null-termination */
+		count++;
+		} else if (i == 0) {
+		Xfree(list);
+		Xfree(ch);
+		list = NULL;
+		break;
 		} else
 		list[i] = NULL;
 	}

Index: xsrc/external/mit/libX11/dist/src/GetFPath.c
diff -u xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3 xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3.4.1
--- xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3	Sun Mar 16 22:48:34 2014
+++ xsrc/external/mit/libX11/dist/src/GetFPath.c	Wed Aug 29 07:55:51 2018
@@ -69,15 +69,20 @@ char **XGetFontPath(
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (nbytes + 1);
-	length = *ch;
+	chend = ch + nbytes;
+	length = *(unsigned char *)ch;
 	for (i = 0; i < rep.nPaths; i++) {
 		if (ch + length < chend) {
 		flist[i] = ch+1;  /* skip over length */
 		ch += length + 1; /* find next length ... */
-		length = *ch;
+		length = *(unsigned char *)ch;
 		*ch = '\0'; /* and replace with null-termination */
 		count++;
+		} else if (i == 0) {
+		Xfree(flist);
+		Xfree(ch);
+		flist = NULL;
+		break;
 		} else
 		flist[i] = NULL;
 	}

Index: xsrc/external/mit/libX11/dist/src/LiHosts.c
diff -u xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5 xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5.6.1
--- xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5	Thu May 30 23:04:40 2013
+++ 

CVS commit: [netbsd-7-0] xsrc/external/mit/libX11/dist/src

2018-08-29 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Aug 29 07:55:51 UTC 2018

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-7-0]: FontNames.c GetFPath.c
LiHosts.c ListExt.c

Log Message:
Apply patch, requested by mrg in ticket #1635:

xsrc/external/mit/libX11/dist/src/FontNames.c
xsrc/external/mit/libX11/dist/src/GetFPath.c
xsrc/external/mit/libX11/dist/src/LiHosts.c
xsrc/external/mit/libX11/dist/src/ListExt.c

Apply fixes from libX11 1.6.5 for the following vulnerabilities:
Fixed off-by-one writes (CVE-2018-14599)
Validation of server response in XListHosts
Fixed out of boundary write (CVE-2018-14600)
Fixed crash on invalid reply (CVE-2018-14598)
(Backport of upstream git commits b469da1430cdcee06e31c6251b83aede072a1ff0,
 d81da209fd4d0c2c9ad0596a8078e58864479d0d,
 dbf72805fd9d7b1846fe9a11b46f3994bfc27fea,
 e83722768fd5c467ef61fa159e8c6278770b45c2 resp)


To generate a diff of this commit:
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 \
xsrc/external/mit/libX11/dist/src/FontNames.c \
xsrc/external/mit/libX11/dist/src/ListExt.c
cvs rdiff -u -r1.3 -r1.3.4.1 xsrc/external/mit/libX11/dist/src/GetFPath.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.6.1 \
xsrc/external/mit/libX11/dist/src/LiHosts.c

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



CVS commit: [netbsd-7-1] xsrc/external/mit/libX11/dist/src

2018-08-29 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Aug 29 07:55:08 UTC 2018

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-7-1]: FontNames.c GetFPath.c
LiHosts.c ListExt.c

Log Message:
Apply patch, requested by mrg in ticket #1635:

xsrc/external/mit/libX11/dist/src/FontNames.c
xsrc/external/mit/libX11/dist/src/GetFPath.c
xsrc/external/mit/libX11/dist/src/LiHosts.c
xsrc/external/mit/libX11/dist/src/ListExt.c

Apply fixes from libX11 1.6.5 for the following vulnerabilities:
Fixed off-by-one writes (CVE-2018-14599)
Validation of server response in XListHosts
Fixed out of boundary write (CVE-2018-14600)
Fixed crash on invalid reply (CVE-2018-14598)
(Backport of upstream git commits b469da1430cdcee06e31c6251b83aede072a1ff0,
 d81da209fd4d0c2c9ad0596a8078e58864479d0d,
 dbf72805fd9d7b1846fe9a11b46f3994bfc27fea,
 e83722768fd5c467ef61fa159e8c6278770b45c2 resp)


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.1 -r1.3.2.1.2.1 \
xsrc/external/mit/libX11/dist/src/FontNames.c \
xsrc/external/mit/libX11/dist/src/ListExt.c
cvs rdiff -u -r1.3 -r1.3.6.1 xsrc/external/mit/libX11/dist/src/GetFPath.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.8.1 \
xsrc/external/mit/libX11/dist/src/LiHosts.c

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

Modified files:

Index: xsrc/external/mit/libX11/dist/src/FontNames.c
diff -u xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.2.1 xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.2.1.2.1
--- xsrc/external/mit/libX11/dist/src/FontNames.c:1.3.2.1	Wed Oct  5 09:41:45 2016
+++ xsrc/external/mit/libX11/dist/src/FontNames.c	Wed Aug 29 07:55:08 2018
@@ -86,23 +86,16 @@ int *actualCount)	/* RETURN */
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (rlen + 1);
+	chend = ch + rlen;
 	length = *(unsigned char *)ch;
 	*ch = 1; /* make sure it is non-zero for XFreeFontNames */
 	for (i = 0; i < rep.nFonts; i++) {
 	if (ch + length < chend) {
 		flist[i] = ch + 1;  /* skip over length */
 		ch += length + 1;  /* find next length ... */
-		if (ch <= chend) {
-		length = *(unsigned char *)ch;
-		*ch = '\0';  /* and replace with null-termination */
-		count++;
-		} else {
-Xfree(flist);
-flist = NULL;
-count = 0;
-break;
-		}
+		length = *(unsigned char *)ch;
+		*ch = '\0';  /* and replace with null-termination */
+		count++;
 	} else {
 Xfree(flist);
 flist = NULL;
Index: xsrc/external/mit/libX11/dist/src/ListExt.c
diff -u xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.2.1 xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.2.1.2.1
--- xsrc/external/mit/libX11/dist/src/ListExt.c:1.3.2.1	Wed Oct  5 09:41:45 2016
+++ xsrc/external/mit/libX11/dist/src/ListExt.c	Wed Aug 29 07:55:08 2018
@@ -74,19 +74,20 @@ char **XListExtensions(
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (rlen + 1);
-	length = *ch;
+	chend = ch + rlen;
+	length = *(unsigned char *)ch;
 	for (i = 0; i < rep.nExtensions; i++) {
 		if (ch + length < chend) {
 		list[i] = ch+1;  /* skip over length */
 		ch += length + 1; /* find next length ... */
-		if (ch <= chend) {
-			length = *ch;
-			*ch = '\0'; /* and replace with null-termination */
-			count++;
-		} else {
-			list[i] = NULL;
-		}
+		length = *(unsigned char *)ch;
+		*ch = '\0'; /* and replace with null-termination */
+		count++;
+		} else if (i == 0) {
+		Xfree(list);
+		Xfree(ch);
+		list = NULL;
+		break;
 		} else
 		list[i] = NULL;
 	}

Index: xsrc/external/mit/libX11/dist/src/GetFPath.c
diff -u xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3 xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3.6.1
--- xsrc/external/mit/libX11/dist/src/GetFPath.c:1.3	Sun Mar 16 22:48:34 2014
+++ xsrc/external/mit/libX11/dist/src/GetFPath.c	Wed Aug 29 07:55:08 2018
@@ -69,15 +69,20 @@ char **XGetFontPath(
 	/*
 	 * unpack into null terminated strings.
 	 */
-	chend = ch + (nbytes + 1);
-	length = *ch;
+	chend = ch + nbytes;
+	length = *(unsigned char *)ch;
 	for (i = 0; i < rep.nPaths; i++) {
 		if (ch + length < chend) {
 		flist[i] = ch+1;  /* skip over length */
 		ch += length + 1; /* find next length ... */
-		length = *ch;
+		length = *(unsigned char *)ch;
 		*ch = '\0'; /* and replace with null-termination */
 		count++;
+		} else if (i == 0) {
+		Xfree(flist);
+		Xfree(ch);
+		flist = NULL;
+		break;
 		} else
 		flist[i] = NULL;
 	}

Index: xsrc/external/mit/libX11/dist/src/LiHosts.c
diff -u xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5 xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5.8.1
--- xsrc/external/mit/libX11/dist/src/LiHosts.c:1.1.1.5	Thu May 30 23:04:40 2013
+++ 

CVS commit: [netbsd-7-1] xsrc/external/mit/libX11/dist/src

2018-08-29 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Aug 29 07:55:08 UTC 2018

Modified Files:
xsrc/external/mit/libX11/dist/src [netbsd-7-1]: FontNames.c GetFPath.c
LiHosts.c ListExt.c

Log Message:
Apply patch, requested by mrg in ticket #1635:

xsrc/external/mit/libX11/dist/src/FontNames.c
xsrc/external/mit/libX11/dist/src/GetFPath.c
xsrc/external/mit/libX11/dist/src/LiHosts.c
xsrc/external/mit/libX11/dist/src/ListExt.c

Apply fixes from libX11 1.6.5 for the following vulnerabilities:
Fixed off-by-one writes (CVE-2018-14599)
Validation of server response in XListHosts
Fixed out of boundary write (CVE-2018-14600)
Fixed crash on invalid reply (CVE-2018-14598)
(Backport of upstream git commits b469da1430cdcee06e31c6251b83aede072a1ff0,
 d81da209fd4d0c2c9ad0596a8078e58864479d0d,
 dbf72805fd9d7b1846fe9a11b46f3994bfc27fea,
 e83722768fd5c467ef61fa159e8c6278770b45c2 resp)


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.1 -r1.3.2.1.2.1 \
xsrc/external/mit/libX11/dist/src/FontNames.c \
xsrc/external/mit/libX11/dist/src/ListExt.c
cvs rdiff -u -r1.3 -r1.3.6.1 xsrc/external/mit/libX11/dist/src/GetFPath.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.8.1 \
xsrc/external/mit/libX11/dist/src/LiHosts.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

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 06:28:51 UTC 2018

Modified Files:
src/sys/arch/amd64/include: pmap.h
src/sys/arch/x86/include: pmap.h

Log Message:
Remove the constants of the DMAP, they are unused, and move NL4_SLOT_DIRECT
into amd64/.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/include/pmap.h
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/x86/include/pmap.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/pmap.h
diff -u src/sys/arch/amd64/include/pmap.h:1.55 src/sys/arch/amd64/include/pmap.h:1.56
--- src/sys/arch/amd64/include/pmap.h:1.55	Mon Aug 20 15:04:51 2018
+++ src/sys/arch/amd64/include/pmap.h	Wed Aug 29 06:28:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.55 2018/08/20 15:04:51 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.56 2018/08/29 06:28:50 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -97,6 +97,8 @@
 #define NL4_SLOT_KASAN		32
 #endif
 
+#define NL4_SLOT_DIRECT		32
+
 #ifndef XEN
 #define L4_SLOT_PTE		slotspace.area[SLAREA_PTE].sslot
 #else
@@ -167,7 +169,7 @@ extern pt_entry_t *pte_base;
 #define PG_PVLIST	PG_AVAIL2	/* mapping has entry on pvlist */
 /* PG_AVAIL3 not used */
 
-#define	PG_X		0		/* XXX dummy */
+#define	PG_X		0		/* dummy */
 
 void svs_pmap_sync(struct pmap *, int);
 void svs_lwp_switch(struct lwp *, struct lwp *);

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.86 src/sys/arch/x86/include/pmap.h:1.87
--- src/sys/arch/x86/include/pmap.h:1.86	Wed Aug 29 06:17:26 2018
+++ src/sys/arch/x86/include/pmap.h	Wed Aug 29 06:28:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.86 2018/08/29 06:17:26 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.87 2018/08/29 06:28:50 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -569,13 +569,6 @@ extern struct pcpu_area *pcpuarea;
 extern vaddr_t pmap_direct_base;
 extern vaddr_t pmap_direct_end;
 
-#define L4_SLOT_DIRECT		456
-#define PDIR_SLOT_DIRECT	L4_SLOT_DIRECT
-
-#define NL4_SLOT_DIRECT		32
-
-#define PMAP_DIRECT_DEFAULT_BASE (VA_SIGN_NEG((L4_SLOT_DIRECT * NBPD_L4)))
-
 #define PMAP_DIRECT_BASE	pmap_direct_base
 #define PMAP_DIRECT_END		pmap_direct_end
 



CVS commit: src/sys/arch

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 06:28:51 UTC 2018

Modified Files:
src/sys/arch/amd64/include: pmap.h
src/sys/arch/x86/include: pmap.h

Log Message:
Remove the constants of the DMAP, they are unused, and move NL4_SLOT_DIRECT
into amd64/.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/include/pmap.h
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/x86/include/pmap.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

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 06:17:26 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
Simplify the ASLR stuff, we don't care about resizable areas now, and it
makes the code more complicated for no good reason.


To generate a diff of this commit:
cvs rdiff -u -r1.316 -r1.317 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.305 -r1.306 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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.316 src/sys/arch/amd64/amd64/machdep.c:1.317
--- src/sys/arch/amd64/amd64/machdep.c:1.316	Wed Aug 22 12:07:42 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Wed Aug 29 06:17:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.316 2018/08/22 12:07:42 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.317 2018/08/29 06:17:26 maxv Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.316 2018/08/22 12:07:42 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.317 2018/08/29 06:17:26 maxv Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1617,75 +1617,55 @@ init_slotspace(void)
 
 	/* User. [256, because we want to land in >= 256] */
 	slotspace.area[SLAREA_USER].sslot = 0;
-	slotspace.area[SLAREA_USER].mslot = PDIR_SLOT_USERLIM+1;
 	slotspace.area[SLAREA_USER].nslot = PDIR_SLOT_USERLIM+1;
 	slotspace.area[SLAREA_USER].active = true;
-	slotspace.area[SLAREA_USER].dropmax = false;
 
 #ifdef XEN
 	/* PTE. */
 	slotspace.area[SLAREA_PTE].sslot = PDIR_SLOT_PTE;
-	slotspace.area[SLAREA_PTE].mslot = 1;
 	slotspace.area[SLAREA_PTE].nslot = 1;
 	slotspace.area[SLAREA_PTE].active = true;
-	slotspace.area[SLAREA_PTE].dropmax = false;
 #endif
 
 #ifdef __HAVE_PCPU_AREA
 	/* Per-CPU. */
 	slotspace.area[SLAREA_PCPU].sslot = PDIR_SLOT_PCPU;
-	slotspace.area[SLAREA_PCPU].mslot = 1;
 	slotspace.area[SLAREA_PCPU].nslot = 1;
 	slotspace.area[SLAREA_PCPU].active = true;
-	slotspace.area[SLAREA_PCPU].dropmax = false;
 #endif
 
 #ifdef __HAVE_DIRECT_MAP
-	/* Direct Map. */
-	slotspace.area[SLAREA_DMAP].sslot = PDIR_SLOT_DIRECT;
-	slotspace.area[SLAREA_DMAP].mslot = NL4_SLOT_DIRECT+1;
-	slotspace.area[SLAREA_DMAP].nslot = 0 /* variable */;
+	/* Direct Map. [Randomized later] */
 	slotspace.area[SLAREA_DMAP].active = false;
-	slotspace.area[SLAREA_DMAP].dropmax = true;
 #endif
 
 #ifdef XEN
 	/* Hypervisor. */
 	slotspace.area[SLAREA_HYPV].sslot = 256;
-	slotspace.area[SLAREA_HYPV].mslot = 17;
 	slotspace.area[SLAREA_HYPV].nslot = 17;
 	slotspace.area[SLAREA_HYPV].active = true;
-	slotspace.area[SLAREA_HYPV].dropmax = false;
 #endif
 
 #ifdef KASAN
 	/* ASAN. */
 	slotspace.area[SLAREA_ASAN].sslot = L4_SLOT_KASAN;
-	slotspace.area[SLAREA_ASAN].mslot = NL4_SLOT_KASAN;
 	slotspace.area[SLAREA_ASAN].nslot = NL4_SLOT_KASAN;
 	slotspace.area[SLAREA_ASAN].active = true;
-	slotspace.area[SLAREA_ASAN].dropmax = false;
 #endif
 
 	/* Kernel. */
 	slotspace.area[SLAREA_KERN].sslot = L4_SLOT_KERNBASE;
-	slotspace.area[SLAREA_KERN].mslot = 1;
 	slotspace.area[SLAREA_KERN].nslot = 1;
 	slotspace.area[SLAREA_KERN].active = true;
-	slotspace.area[SLAREA_KERN].dropmax = false;
 
 	/* Main. */
-	slotspace.area[SLAREA_MAIN].mslot = NKL4_MAX_ENTRIES+1;
-	slotspace.area[SLAREA_MAIN].dropmax = false;
 	va = slotspace_rand(SLAREA_MAIN, NKL4_MAX_ENTRIES * NBPD_L4,
-	NBPD_L4);
+	NBPD_L4); /* TODO: NBPD_L1 */
 	vm_min_kernel_address = va;
 	vm_max_kernel_address = va + NKL4_MAX_ENTRIES * NBPD_L4;
 
 #ifndef XEN
 	/* PTE. */
-	slotspace.area[SLAREA_PTE].mslot = 1;
-	slotspace.area[SLAREA_PTE].dropmax = false;
 	va = slotspace_rand(SLAREA_PTE, NBPD_L4, NBPD_L4);
 	pte_base = (pd_entry_t *)va;
 #endif

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.85 src/sys/arch/x86/include/pmap.h:1.86
--- src/sys/arch/x86/include/pmap.h:1.85	Mon Aug 20 15:04:52 2018
+++ src/sys/arch/x86/include/pmap.h	Wed Aug 29 06:17:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.85 2018/08/20 15:04:52 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.86 2018/08/29 06:17:26 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -169,9 +169,7 @@ struct slotspace {
 	struct {
 		size_t sslot; /* start slot */
 		size_t nslot; /* # of slots */
-		size_t mslot; /* max # of slots */
 		bool active;  /* area is active */
-		bool dropmax; /* !resizable */
 	} area[SLSPACE_NAREAS];
 };
 

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.305 src/sys/arch/x86/x86/pmap.c:1.306
--- src/sys/arch/x86/x86/pmap.c:1.305	Wed Aug 22 12:07:43 2018
+++ src/sys/arch/x86/x86/pmap.c	Wed Aug 29 06:17:26 2018
@@ -1,4 +1,4 @@
-/*	

CVS commit: src/sys/arch

2018-08-29 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Aug 29 06:17:26 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
Simplify the ASLR stuff, we don't care about resizable areas now, and it
makes the code more complicated for no good reason.


To generate a diff of this commit:
cvs rdiff -u -r1.316 -r1.317 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.305 -r1.306 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/arch/aarch64/aarch64

2018-08-29 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Aug 29 06:16:40 UTC 2018

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

Log Message:
Update coherency_unit if needed.

Pointed out by skrll@


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

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



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

2018-08-29 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Aug 29 06:16:40 UTC 2018

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

Log Message:
Update coherency_unit if needed.

Pointed out by skrll@


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

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/cpufunc.c
diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.3 src/sys/arch/aarch64/aarch64/cpufunc.c:1.4
--- src/sys/arch/aarch64/aarch64/cpufunc.c:1.3	Sun Aug 26 18:15:49 2018
+++ src/sys/arch/aarch64/aarch64/cpufunc.c	Wed Aug 29 06:16:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.3 2018/08/26 18:15:49 ryo Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.4 2018/08/29 06:16:40 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.3 2018/08/26 18:15:49 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.4 2018/08/29 06:16:40 ryo Exp $");
 
 #include 
 #include 
@@ -135,6 +135,9 @@ aarch64_getcacheinfo(void)
 		arm_dcache_align = sizeof(int) << arm_dcache_maxline;
 		arm_dcache_align_mask = arm_dcache_align - 1;
 	}
+	/* update coherency_unit (in param.h) */
+	if (coherency_unit < arm_dcache_align)
+		coherency_unit = arm_dcache_align;
 
 	/*
 	 * CLIDR -  Cache Level ID Register