CVS commit: src/sys/net

2020-02-23 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Feb 24 00:47:38 UTC 2020

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

Log Message:
Remove debug printf I put into bridge_calc_csum_flags().
Sorry for noise.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/net/if_bridge.c

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

Modified files:

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.167 src/sys/net/if_bridge.c:1.168
--- src/sys/net/if_bridge.c:1.167	Sun Feb 23 21:50:21 2020
+++ src/sys/net/if_bridge.c	Mon Feb 24 00:47:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.167 2020/02/23 21:50:21 jdolecek Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.168 2020/02/24 00:47:38 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.167 2020/02/23 21:50:21 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.168 2020/02/24 00:47:38 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -789,9 +789,6 @@ bridge_calc_csum_flags(struct bridge_sof
 	}
 	sc->sc_csum_flags_tx = flags;
 	BRIDGE_UNLOCK(sc);
-#if 0
-	printf("%s: 0x%x\n", __func__, flags);
-#endif
 }
 
 static int



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

2020-02-23 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon Feb 24 00:02:55 UTC 2020

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

Log Message:
Add K publish date
https://twitter.com/MIT_CSAIL/status/1231263883303645184


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

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.computer
diff -u src/usr.bin/calendar/calendars/calendar.computer:1.10 src/usr.bin/calendar/calendars/calendar.computer:1.11
--- src/usr.bin/calendar/calendars/calendar.computer:1.10	Sat Feb  8 00:41:42 2020
+++ src/usr.bin/calendar/calendars/calendar.computer	Mon Feb 24 00:02:55 2020
@@ -18,6 +18,7 @@
 02/11	Last day of JOSS service at RAND Corp., 1966
 02/14	First micro-on-a-chip patented (TI), 1978
 02/15	ENIAC demonstrated, 1946
+02/22	The C Programming Language book is published, 1978
 03/01	First NPL (later PL/I) report published, 1964
 03/04	First Cray-1 shipped to Los Alamos, 1976
 03/09	"GOTO considered harmful" (E.J. Dijkstra) published in CACM, 1968



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

2020-02-23 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Feb 23 23:56:15 UTC 2020

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

Log Message:
Add The KLF's Chill Out


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/calendar/calendars/calendar.music

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.music
diff -u src/usr.bin/calendar/calendars/calendar.music:1.21 src/usr.bin/calendar/calendars/calendar.music:1.22
--- src/usr.bin/calendar/calendars/calendar.music:1.21	Mon Feb 17 21:47:33 2020
+++ src/usr.bin/calendar/calendars/calendar.music	Sun Feb 23 23:56:15 2020
@@ -23,6 +23,7 @@
 02/02	Graham Nash is born in Lancashire, England, 1942
 02/03	The Day The Music Died; Buddy Holly, Richie Valens, and the Big
 	Bopper are killed in a plane crash outside Mason City, Iowa, 1959
+02/05	The KLF's "Chill Out" is released, 1990
 02/07	Beatles land at JFK airport to begin first U.S. tour, 1964
 02/07	Steven Stills makes the first digitally recorded rock album, 1979
 02/08	John Towner Williams born in New York City, 1932; composer



CVS commit: src/sys/uvm

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 23:54:52 UTC 2020

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

Log Message:
Fix a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/uvm/uvm_page.c

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

Modified files:

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.226 src/sys/uvm/uvm_page.c:1.227
--- src/sys/uvm/uvm_page.c:1.226	Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_page.c	Sun Feb 23 23:54:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.226 2020/02/23 15:46:43 ad Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.227 2020/02/23 23:54:52 ad Exp $	*/
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.226 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.227 2020/02/23 23:54:52 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvm.h"
@@ -1772,7 +1772,7 @@ uvm_pagelookup(struct uvm_object *obj, v
 {
 	struct vm_page *pg;
 
-	/* No - used from DDB. KASSERT(rw_write_held(obj->vmobjlock)); */
+	/* No - used from DDB. KASSERT(rw_lock_held(obj->vmobjlock)); */
 
 	pg = radix_tree_lookup_node(>uo_pages, off >> PAGE_SHIFT);
 



CVS commit: src/doc

2020-02-23 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Feb 23 23:32:57 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
bsd-family-tree


To generate a diff of this commit:
cvs rdiff -u -r1.1692 -r1.1693 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.1692 src/doc/3RDPARTY:1.1693
--- src/doc/3RDPARTY:1.1692	Sat Feb 22 23:40:05 2020
+++ src/doc/3RDPARTY	Sun Feb 23 23:32:57 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1692 2020/02/22 23:40:05 sevan Exp $
+#	$NetBSD: 3RDPARTY,v 1.1693 2020/02/23 23:32:57 sevan Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -195,12 +195,12 @@ Todo[4]: Re-entrant functions of net/*
 Todo[5]: Reconcile the doc directory.
 
 Package:	bsd-family-tree
-Version:	358254
-Current Vers:	358254
+Version:	358264
+Current Vers:	358264
 Maintainer:	The FreeBSD Project
 Archive Site:	https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 Home Page:	https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
-Date:		2020-02-22
+Date:		2020-02-23
 Mailing List:
 Responsible:
 License:	BSD (2-clause) (see http://www.freebsd.org/cgi/cvsweb.cgi/src/COPYRIGHT)



CVS commit: src/share/misc

2020-02-23 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Feb 23 23:31:55 UTC 2020

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

Log Message:
Sync with r358264 which fixes NetBSD 9.0 release


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

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.78 src/share/misc/bsd-family-tree:1.79
--- src/share/misc/bsd-family-tree:1.78	Sat Feb 22 23:38:04 2020
+++ src/share/misc/bsd-family-tree	Sun Feb 23 23:31:55 2020
@@ -799,7 +799,7 @@ OpenBSD 6.6		2019-10-17 [OBD]
 macOS 10.15		2019-10-07 [APL]
 macOS 10.15.1		2019-10-29 [APL] (security/critical release)
 FreeBSD 12.1		2019-11-04 [FBD]
-NetBSD 9.0 		2020-02-15 [NBD]
+NetBSD 9.0 		2020-02-14 [NBD]
 
 Bibliography
 
@@ -864,5 +864,5 @@ Steven M. Schultz for providing 2.8BSD, 
 Copyright (c) 1997-2012 Wolfram Schneider 
 URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 
-$FreeBSD: head/share/misc/bsd-family-tree 358254 2020-02-22 23:36:10Z sevan $
-$NetBSD: bsd-family-tree,v 1.78 2020/02/22 23:38:04 sevan Exp $
+$FreeBSD: head/share/misc/bsd-family-tree 358264 2020-02-23 23:29:53Z sevan $
+$NetBSD: bsd-family-tree,v 1.79 2020/02/23 23:31:55 sevan Exp $



CVS commit: xsrc/external/mit/libxshmfence/dist/src

2020-02-23 Thread Tobias Nygren
Module Name:xsrc
Committed By:   tnn
Date:   Sun Feb 23 23:18:01 UTC 2020

Modified Files:
xsrc/external/mit/libxshmfence/dist/src: xshmfence_semaphore.c
xshmfence_semaphore.h

Log Message:
sync from pkgsrc:

> libxshmfence: improve performance of semaphore backend. Bump rev.
>
> It used more locking than necessary. We only need two semaphores.
> One to tell waiters to wake up and one to let the last waiter that
> wakes up notify xshmfence_trigger() it may now return.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.c \
xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.h

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/libxshmfence/dist/src/xshmfence_semaphore.c
diff -u xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.c:1.1 xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.c:1.2
--- xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.c:1.1	Sun Aug 14 03:43:37 2016
+++ xsrc/external/mit/libxshmfence/dist/src/xshmfence_semaphore.c	Sun Feb 23 23:18:01 2020
@@ -33,12 +33,12 @@
 
 #include "xshmfenceint.h"
 
-static sem_t *mksemtemp(char *, const char *);
+static sem_t *mksemtemp(char *, size_t, const char *);
 
-#define LOCK() do {} while (sem_wait(f->lock) != 0)
-#define UNLOCK() do { sem_post(f->lock); } while (0)
-#define COND_WAIT() do {} while (sem_wait(f->cond) != 0)
-#define COND_SIGNAL() do { sem_post(f->cond); } while (0)
+#define COND_WAIT_W() do {} while (sem_wait(f->cond_w) != 0)
+#define COND_SIGNAL_W() do { sem_post(f->cond_w); } while (0)
+#define COND_WAIT_T() do {} while (sem_wait(f->cond_t) != 0)
+#define COND_SIGNAL_T() do { sem_post(f->cond_t); } while (0)
 
 /**
  * xshmfence_trigger:
@@ -52,30 +52,23 @@ static sem_t *mksemtemp(char *, const ch
 int
 xshmfence_trigger(struct xshmfence *f) {
 	int v, waiting;
-	LOCK();
 	v = __sync_bool_compare_and_swap(>triggered, 0, 1);
 	if (v == 0) {
 		/* already triggered */
-		UNLOCK();
 		return 0;
 	}
-	
-	waiting = __sync_fetch_and_add(>waiting, 0);
 
-	while (waiting > 0) {
-		COND_SIGNAL();
-		waiting--;
-	}
-
-	while (__sync_fetch_and_add(>waiting, 0) > 0) {
-		/*
-		 * Busy wait until they all woke up.
-		 * No new sleepers should arrive since
-		 * the lock is still held.
-		 */
-		/* yield(); */
+	while ((waiting = __sync_fetch_and_add(>waiting, 0)) > 0) {
+		if (__sync_bool_compare_and_swap(>waiting, waiting, 0)) {
+			__sync_fetch_and_add(>wakeups, waiting);
+			while (waiting--) {
+COND_SIGNAL_W();
+			}
+			COND_WAIT_T();
+			return 0;
+		}
 	}
-	UNLOCK();
+
 	return 0;
 }
 
@@ -92,24 +85,18 @@ xshmfence_trigger(struct xshmfence *f) {
 int
 xshmfence_await(struct xshmfence *f) {
 
-	LOCK();
 	if (__sync_fetch_and_add(>triggered, 0) == 1) {
-		UNLOCK();
 		return 0;
 	}
 	do {
 		__sync_fetch_and_add(>waiting, 1);
-		/*
-		 * These next operations are not atomic.
-		 * But we busy-wait in xshmfence_trigger, so that's ok.
-		 */
-		UNLOCK();
-		COND_WAIT();
-		__sync_fetch_and_sub(>waiting, 1);
-		LOCK();
+		COND_WAIT_W();
+	} while (__sync_fetch_and_add(>triggered, 0) == 0);
+
+	if (__sync_sub_and_fetch(>wakeups, 1) == 0) {
+		COND_SIGNAL_T();
 	}
-	while (__sync_fetch_and_add(>triggered, 0) == 0);
-	UNLOCK();
+
 	return 0;
 }
 
@@ -121,11 +108,7 @@ xshmfence_await(struct xshmfence *f) {
  **/
 int
 xshmfence_query(struct xshmfence *f) {
-	int ret;
-	LOCK();
-	ret = __sync_fetch_and_add(>triggered, 0);
-	UNLOCK();
-	return ret;
+	return __sync_fetch_and_add(>triggered, 0);
 }
 
 /**
@@ -137,9 +120,7 @@ xshmfence_query(struct xshmfence *f) {
  **/
 void
 xshmfence_reset(struct xshmfence *f) {
-	LOCK();
 	__sync_bool_compare_and_swap(>triggered, 1, 0);
-	UNLOCK();
 }
 
 /**
@@ -151,27 +132,26 @@ xshmfence_reset(struct xshmfence *f) {
 void
 xshmfence_init(int fd)
 {
-	sem_t *lock;
-	sem_t *cond;
+	sem_t *cond_w, *cond_t;
 	struct xshmfence f;
 
 	__sync_fetch_and_and(, 0);
 	__sync_fetch_and_and(, 0);
 	__sync_fetch_and_and(, 0);
-	
-	lock = mksemtemp(f.lockname, "/xshmfl-%i");
-	if (lock == SEM_FAILED) {
+	__sync_fetch_and_and(, 0);
+
+	cond_w = mksemtemp(f.condname_w, sizeof(f.condname_w), "w");
+	if (cond_w == SEM_FAILED) {
 		err(EXIT_FAILURE, "xshmfence_init: sem_open");
 	}
-
-	cond = mksemtemp(f.condname, "/xshmfc-%i");
-	if (cond == SEM_FAILED) {
+	cond_t = mksemtemp(f.condname_t, sizeof(f.condname_t), "t");
+	if (cond_t == SEM_FAILED) {
 		err(EXIT_FAILURE, "xshmfence_init: sem_open");
 	}
-	
-	sem_close(lock);
-	sem_close(cond);
-	
+
+	sem_close(cond_w);
+	sem_close(cond_t);
+
 	pwrite(fd, , sizeof(f), 0);
 }
 
@@ -187,7 +167,7 @@ xshmfence_open_semaphore(struct xshmfenc
 	/*
 	 * map process local memory to page 2
 	 */
-	if (mmap ((void*)>lock,
+	if (mmap ((void*)>cond_w,
 		  LIBXSHM_PAGESIZE,
 		  PROT_READ|PROT_WRITE,
 		  MAP_FIXED|MAP_ANON,
@@ -195,11 +175,11 @@ 

CVS commit: src/sys/kern

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 22:56:41 UTC 2020

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

Log Message:
Mistake in previous - lwp_t *l was not meant to be static.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/kern_reboot.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_reboot.c
diff -u src/sys/kern/kern_reboot.c:1.3 src/sys/kern/kern_reboot.c:1.4
--- src/sys/kern/kern_reboot.c:1.3	Sun Feb 23 20:06:30 2020
+++ src/sys/kern/kern_reboot.c	Sun Feb 23 22:56:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_reboot.c,v 1.3 2020/02/23 20:06:30 ad Exp $	*/
+/*	$NetBSD: kern_reboot.c,v 1.4 2020/02/23 22:56:41 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.3 2020/02/23 20:06:30 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.4 2020/02/23 22:56:41 ad Exp $");
 
 #include 
 #include 
@@ -51,7 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: kern_reboot.
 void
 kern_reboot(int howto, char *bootstr)
 {
-	static lwp_t *rebooter, *l;
+	static lwp_t *rebooter;
+	lwp_t *l;
 
 	/*
 	 * If already rebooting then just hang out.  Allow reentry for the



CVS commit: src/sys/arch/x86

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 22:28:53 UTC 2020

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

Log Message:
The PV locking changes are expensive and not needed yet, so back them
out for the moment.  I want to find a cheaper approach.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/pmap_pv.h
cvs rdiff -u -r1.358 -r1.359 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/include/pmap_pv.h
diff -u src/sys/arch/x86/include/pmap_pv.h:1.11 src/sys/arch/x86/include/pmap_pv.h:1.12
--- src/sys/arch/x86/include/pmap_pv.h:1.11	Sun Feb 23 15:46:39 2020
+++ src/sys/arch/x86/include/pmap_pv.h	Sun Feb 23 22:28:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_pv.h,v 1.11 2020/02/23 15:46:39 ad Exp $	*/
+/*	$NetBSD: pmap_pv.h,v 1.12 2020/02/23 22:28:53 ad Exp $	*/
 
 /*-
  * Copyright (c)2008 YAMAMOTO Takashi,
@@ -72,7 +72,6 @@ struct pmap_page {
 		LIST_ENTRY(vm_page) u_link;
 	} pp_u;
 	LIST_HEAD(, pv_entry) pp_pvlist;
-	__cpu_simple_lock_t pp_lock;
 #define	pp_pte	pp_u.u_pte
 #define	pp_link	pp_u.u_link
 	uint8_t pp_flags;
@@ -86,10 +85,6 @@ struct pmap_page {
 #define	PP_EMBEDDED	1
 #define	PP_FREEING	2
 
-#define	PMAP_PAGE_INIT(pp) \
-do { \
-	LIST_INIT(&(pp)->pp_pvlist); \
-	__cpu_simple_lock_init(&(pp)->pp_lock); \
-} while (0);
+#define	PMAP_PAGE_INIT(pp)	LIST_INIT(&(pp)->pp_pvlist)
 
 #endif /* !_X86_PMAP_PV_H_ */

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.358 src/sys/arch/x86/x86/pmap.c:1.359
--- src/sys/arch/x86/x86/pmap.c:1.358	Sun Feb 23 15:46:39 2020
+++ src/sys/arch/x86/x86/pmap.c	Sun Feb 23 22:28:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.358 2020/02/23 15:46:39 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.359 2020/02/23 22:28:53 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.358 2020/02/23 15:46:39 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.359 2020/02/23 22:28:53 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -229,10 +229,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.3
  *
  * - pg->uobject->vmobjlock, pg->uanon->an_lock
  *   These per-object locks are taken by the VM system before calling into
- *   the pmap module.  They are always held at least read locked, and held
- *   write locked when operating in the P->V direction (for example calls to
- *   pmap_page_remove(), pmap_test_attrs(), pmap_clear_attrs()), preventing
- *   the PV lists from changing.  Asserted with uvm_page_owner_locked_p().
+ *   the pmap module.  Holding them prevents concurrent operations on the
+ *   given page or set of pages.  Asserted with uvm_page_owner_locked_p().
  *
  * - pmap->pm_lock (per pmap)
  *   This lock protects the fields in the pmap structure including the
@@ -243,14 +241,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.3
  * - pmaps_lock
  *   This lock protects the list of active pmaps (headed by "pmaps"). We
  *   lock it when adding or removing pmaps from this list.
- *
- * - pp->pp_lock
- *   This per-page lock protects PV entry lists and the embedded PV entry
- *   in each vm_page, allowing concurrent calls to pmap_enter() and
- *   pmap_remove() on a given page.  It's a __cpu_simple_lock_t, which
- *   is one byte in size (in preference to kmutex_t which takes a whole
- *   uintptr_t).  As this is a spinlock, we go to IPL_VM before taking it,
- *   to prevent an interrupt deadlocking on kernel_lock.
  */
 
 /* uvm_object is abused here to index pmap_pages; make assertions happy. */
@@ -1804,6 +1794,29 @@ pmap_vpage_cpu_init(struct cpu_info *ci)
  * p v _ e n t r y   f u n c t i o n s
  */
 
+
+/*
+ * pmap_pp_needs_pve: return true if we need to allocate a pv entry and
+ * corresponding radix tree entry for the page.
+ */
+static bool
+pmap_pp_needs_pve(struct pmap_page *pp, struct vm_page *ptp, vaddr_t va)
+{
+
+	/*
+	 * Adding a pv entry for this page only needs to allocate a pv_entry
+	 * structure if the page already has at least one pv entry, since
+	 * the first pv entry is stored in the pmap_page.  However, because
+	 * of subsequent removal(s), PP_EMBEDDED can be false and there can
+	 * still be pv entries on the list.
+	 */
+
+	if (pp == NULL || (pp->pp_flags & PP_EMBEDDED) == 0) {
+		return false;
+	}
+	return pp->pp_pte.pte_ptp != ptp || pp->pp_pte.pte_va != va;
+}
+
 /*
  * pmap_free_pvs: free a linked list of pv entries.  the pv entries have
  * been removed from their respective pages, but are still entered into the
@@ -1892,21 +1905,21 @@ pmap_enter_pv(struct pmap *pmap, struct 
 	KASSERT(ptp == NULL || ptp->wire_count >= 2);
 	KASSERT(ptp == NULL || ptp->uobject != NULL);
 	KASSERT(ptp == NULL || ptp_va2o(va, 1) == ptp->offset);
-	

CVS commit: src/sys

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 22:15:19 UTC 2020

Modified Files:
src/sys/kern: vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: vnode_if.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.32 -r1.33 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.32 -r1.33 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.103 -r1.104 src/sys/sys/vnode_if.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/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.109 src/sys/kern/vnode_if.c:1.110
--- src/sys/kern/vnode_if.c:1.109	Sun Dec  1 13:58:52 2019
+++ src/sys/kern/vnode_if.c	Sun Feb 23 22:15:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.109 2019/12/01 13:58:52 ad Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.110 2020/02/23 22:15:19 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.69 2020/02/23 22:14:04 ad Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.109 2019/12/01 13:58:52 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.110 2020/02/23 22:15:19 ad Exp $");
 
 #include 
 #include 
@@ -1280,7 +1280,7 @@ VOP_LOCK(struct vnode *vp,
 	a.a_desc = VDESC(vop_lock);
 	a.a_vp = vp;
 	a.a_flags = flags;
-	error = vop_pre(vp, , , (flags & (LK_UPGRADE|LK_DOWNGRADE) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES)));
+	error = vop_pre(vp, , , (!(flags & (LK_SHARED|LK_EXCLUSIVE)) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES)));
 	if (error)
 		return error;
 	error = (VCALL(vp, VOFFSET(vop_lock), ));

Index: src/sys/rump/include/rump/rumpvnode_if.h
diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.32 src/sys/rump/include/rump/rumpvnode_if.h:1.33
--- src/sys/rump/include/rump/rumpvnode_if.h:1.32	Sun Dec  1 13:58:52 2019
+++ src/sys/rump/include/rump/rumpvnode_if.h	Sun Feb 23 22:15:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.h,v 1.32 2019/12/01 13:58:52 ad Exp $	*/
+/*	$NetBSD: rumpvnode_if.h,v 1.33 2020/02/23 22:15:19 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.69 2020/02/23 22:14:04 ad Exp
  */
 
 /*

Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c
diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.32 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.33
--- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.32	Sun Dec  1 13:58:53 2019
+++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c	Sun Feb 23 22:15:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpvnode_if.c,v 1.32 2019/12/01 13:58:53 ad Exp $	*/
+/*	$NetBSD: rumpvnode_if.c,v 1.33 2020/02/23 22:15:19 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.69 2020/02/23 22:14:04 ad Exp
  */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.32 2019/12/01 13:58:53 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.33 2020/02/23 22:15:19 ad Exp $");
 
 #include 
 #include 

Index: src/sys/sys/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.103 src/sys/sys/vnode_if.h:1.104
--- src/sys/sys/vnode_if.h:1.103	Sun Dec  1 13:58:53 2019
+++ src/sys/sys/vnode_if.h	Sun Feb 23 22:15:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.h,v 1.103 2019/12/01 13:58:53 ad Exp $	*/
+/*	$NetBSD: vnode_if.h,v 1.104 2020/02/23 22:15:18 ad Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
  * Created from the file:
  *	NetBSD: vnode_if.src,v 1.78 2019/10/11 08:04:52 hannken Exp
  * by the script:
- *	NetBSD: vnode_if.sh,v 1.68 2019/12/01 13:56:29 ad Exp
+ *	NetBSD: vnode_if.sh,v 1.69 2020/02/23 22:14:04 ad Exp
  */
 
 /*



CVS commit: src/sys

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 22:14:04 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32_fs.c
src/sys/kern: kern_exec.c kern_proc.c uipc_usrreq.c vfs_cwd.c
vfs_getcwd.c vfs_lookup.c vfs_mount.c vfs_subr.c vfs_syscalls.c
vfs_vnode.c vnode_if.sh
src/sys/miscfs/genfs: genfs_vnops.c
src/sys/miscfs/procfs: procfs_vnops.c
src/sys/sys: filedesc.h vfs_syscalls.h vnode.h vnode_impl.h

Log Message:
Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.492 -r1.493 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.241 -r1.242 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.196 -r1.197 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/vfs_cwd.c
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/vfs_getcwd.c
cvs rdiff -u -r1.213 -r1.214 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.480 -r1.481 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.541 -r1.542 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.68 -r1.69 src/sys/kern/vnode_if.sh
cvs rdiff -u -r1.201 -r1.202 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.208 -r1.209 src/sys/miscfs/procfs/procfs_vnops.c
cvs rdiff -u -r1.65 -r1.66 src/sys/sys/filedesc.h
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/vfs_syscalls.h
cvs rdiff -u -r1.288 -r1.289 src/sys/sys/vnode.h
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/vnode_impl.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/compat/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.86 src/sys/compat/netbsd32/netbsd32_fs.c:1.87
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.86	Fri Jan 31 09:01:23 2020
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Sun Feb 23 22:14:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.86 2020/01/31 09:01:23 maxv Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.87 2020/02/23 22:14:03 ad Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.86 2020/01/31 09:01:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.87 2020/02/23 22:14:03 ad Exp $");
 
 #include 
 #include 
@@ -740,13 +740,12 @@ netbsd32___getcwd(struct lwp *l, const s
 		syscallarg(char *) bufp;
 		syscallarg(size_t) length;
 	} */
-	struct proc *p = l->l_proc;
 	int error;
 	char   *path;
 	char   *bp, *bend;
 	int len = (int)SCARG(uap, length);
 	int	lenused;
-	struct	cwdinfo *cwdi;
+	struct	vnode *dvp;
 
 	if (len > MAXPATHLEN*4)
 		len = MAXPATHLEN*4;
@@ -764,11 +763,10 @@ netbsd32___getcwd(struct lwp *l, const s
 	 * limit it to N/2 vnodes for an N byte buffer.
 	 */
 #define GETCWD_CHECK_ACCESS 0x0001
-	cwdi = p->p_cwdi;
-	rw_enter(>cwdi_lock, RW_READER);
-	error = getcwd_common (cwdi->cwdi_cdir, NULL, , path, len/2,
+	dvp = cwdcdir();
+	error = getcwd_common (dvp, NULL, , path, len/2,
 			   GETCWD_CHECK_ACCESS, l);
-	rw_exit(>cwdi_lock);
+	vrele(dvp);
 
 	if (error)
 		goto out;

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.492 src/sys/kern/kern_exec.c:1.493
--- src/sys/kern/kern_exec.c:1.492	Sat Feb 15 17:13:55 2020
+++ src/sys/kern/kern_exec.c	Sun Feb 23 22:14:03 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: kern_exec.c,v 1.492 2020/02/15 17:13:55 ad Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.493 2020/02/23 22:14:03 ad Exp $	*/
 
 /*-
- * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.492 2020/02/15 17:13:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.493 2020/02/23 22:14:03 ad Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -672,7 +672,7 @@ exec_makepathbuf(struct lwp *l, const ch
 	char *path, *bp;
 	size_t len, tlen;
 	int error;
-	struct cwdinfo *cwdi;
+	struct vnode *dvp;
 
 	path = PNBUF_GET();
 	if (seg == UIO_SYSSPACE) {
@@ -698,11 +698,10 @@ exec_makepathbuf(struct lwp *l, const ch
 	memmove(bp, path, len);
 	*(--bp) = '/';
 
-	cwdi = l->l_proc->p_cwdi;
-	rw_enter(>cwdi_lock, RW_READER);
-	error = getcwd_common(cwdi->cwdi_cdir, NULL, , path, MAXPATHLEN / 2,
+	dvp = cwdcdir();
+	error = getcwd_common(dvp, NULL, , path, MAXPATHLEN / 2,
 	GETCWD_CHECK_ACCESS, l);
-	

CVS commit: src/sys/net

2020-02-23 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Feb 23 21:50:21 UTC 2020

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

Log Message:
disable the DEBUG bridge_calc_csum_flags() printf


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/net/if_bridge.c

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

Modified files:

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.166 src/sys/net/if_bridge.c:1.167
--- src/sys/net/if_bridge.c:1.166	Wed Jan 29 04:18:34 2020
+++ src/sys/net/if_bridge.c	Sun Feb 23 21:50:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.166 2020/01/29 04:18:34 thorpej Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.167 2020/02/23 21:50:21 jdolecek Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.166 2020/01/29 04:18:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.167 2020/02/23 21:50:21 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -789,7 +789,7 @@ bridge_calc_csum_flags(struct bridge_sof
 	}
 	sc->sc_csum_flags_tx = flags;
 	BRIDGE_UNLOCK(sc);
-#ifdef DEBUG
+#if 0
 	printf("%s: 0x%x\n", __func__, flags);
 #endif
 }



CVS commit: src/sys/uvm

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 21:36:29 UTC 2020

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

Log Message:
Use rw_lock_op().


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/uvm/uvm_anon.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_anon.c
diff -u src/sys/uvm/uvm_anon.c:1.72 src/sys/uvm/uvm_anon.c:1.73
--- src/sys/uvm/uvm_anon.c:1.72	Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_anon.c	Sun Feb 23 21:36:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_anon.c,v 1.72 2020/02/23 15:46:43 ad Exp $	*/
+/*	$NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.72 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -279,8 +279,7 @@ uvm_anon_lockloanpg(struct vm_anon *anon
  * XXX Better than yielding but inadequate.
  */
 mutex_exit(>interlock);
-op = rw_write_held(anon->an_lock)
-? RW_WRITER : RW_READER;
+op = rw_lock_op(anon->an_lock);
 rw_exit(anon->an_lock);
 kpause("lkloanpg", false, 1, NULL);
 rw_enter(anon->an_lock, op);



CVS commit: src/lib/libc/sys

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 20:41:41 UTC 2020

Modified Files:
src/lib/libc/sys: _lwp_wait.2

Log Message:
+EINVAL


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

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

Modified files:

Index: src/lib/libc/sys/_lwp_wait.2
diff -u src/lib/libc/sys/_lwp_wait.2:1.4 src/lib/libc/sys/_lwp_wait.2:1.5
--- src/lib/libc/sys/_lwp_wait.2:1.4	Wed Apr 30 13:10:51 2008
+++ src/lib/libc/sys/_lwp_wait.2	Sun Feb 23 20:41:41 2020
@@ -1,6 +1,6 @@
-.\"	$NetBSD: _lwp_wait.2,v 1.4 2008/04/30 13:10:51 martin Exp $
+.\"	$NetBSD: _lwp_wait.2,v 1.5 2020/02/23 20:41:41 ad Exp $
 .\"
-.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2003, 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 13, 2003
+.Dd February 23, 2020
 .Dt _LWP_WAIT 2
 .Os
 .Sh NAME
@@ -67,7 +67,7 @@ Otherwise, an error code is returned to 
 will fail if:
 .Bl -tag -width [EDEADLK]
 .It Bq Er ESRCH
-No undetached LWP can be found in the current process corresponding to that
+No LWP can be found in the current process corresponding to that
 specified by
 .Fa wlwp .
 .It Bq Er EDEADLK
@@ -76,6 +76,10 @@ The calling LWP is the only LWP in the p
 The LWP ID specified by
 .Fa wlwp
 is the LWP ID of the calling LWP.
+.It Bq Er EINVAL
+The LWP specified by
+.Fa wlwp
+is detached.
 .It Bq Er EINTR
 .Fn _lwp_wait
 was interrupted by a caught signal, or the signal did not



CVS commit: src/sys/netbt

2020-02-23 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Feb 23 20:16:10 UTC 2020

Modified Files:
src/sys/netbt: rfcomm_session.c

Log Message:
fix reversed logic for Remote Port Negotiation, pointed out by maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/rfcomm_session.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/netbt/rfcomm_session.c
diff -u src/sys/netbt/rfcomm_session.c:1.25 src/sys/netbt/rfcomm_session.c:1.26
--- src/sys/netbt/rfcomm_session.c:1.25	Sat Dec 22 14:28:57 2018
+++ src/sys/netbt/rfcomm_session.c	Sun Feb 23 20:16:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rfcomm_session.c,v 1.25 2018/12/22 14:28:57 maxv Exp $	*/
+/*	$NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.25 2018/12/22 14:28:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $");
 
 #include 
 #include 
@@ -1232,11 +1232,13 @@ rfcomm_session_recv_mcc_rpn(struct rfcom
 	rpn.xoff_char = RFCOMM_RPN_XOFF_CHAR;
 
 	if (m->m_pkthdr.len == sizeof(rpn)) {
+		/* negotiation request */
 		m_copydata(m, 0, sizeof(rpn), );
-		rpn.param_mask = RFCOMM_RPN_PM_ALL;
+		rpn.param_mask = le16toh(rpn.param_mask);
 	} else if (m->m_pkthdr.len == 1) {
+		/* current settings request */
 		m_copydata(m, 0, 1, );
-		rpn.param_mask = le16toh(rpn.param_mask);
+		rpn.param_mask = RFCOMM_RPN_PM_ALL;
 	} else {
 		DPRINTF("Bad RPN length (%d)\n", m->m_pkthdr.len);
 		return;



CVS commit: src/sys/kern

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 20:08:35 UTC 2020

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

Log Message:
shutdown_all: take kernel_lock now that kern_reboot() doesn't.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/kern_pmf.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_pmf.c
diff -u src/sys/kern/kern_pmf.c:1.40 src/sys/kern/kern_pmf.c:1.41
--- src/sys/kern/kern_pmf.c:1.40	Sun Apr  8 11:46:13 2018
+++ src/sys/kern/kern_pmf.c	Sun Feb 23 20:08:35 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.40 2018/04/08 11:46:13 mlelstv Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.41 2020/02/23 20:08:35 ad Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.40 2018/04/08 11:46:13 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.41 2020/02/23 20:08:35 ad Exp $");
 
 #include 
 #include 
@@ -351,6 +351,7 @@ shutdown_all(int how)
 	device_t curdev;
 	bool progress = false;
 
+	KERNEL_LOCK(1, NULL);
 	for (curdev = shutdown_first(); curdev != NULL;
 	 curdev = shutdown_next()) {
 		aprint_debug(" shutting down %s, ", device_xname(curdev));
@@ -369,6 +370,7 @@ shutdown_all(int how)
 			aprint_debug("success.");
 		}
 	}
+	KERNEL_UNLOCK_ONE(NULL);
 	return progress;
 }
 



CVS commit: src/sys/kern

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 20:06:30 UTC 2020

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

Log Message:
- If concurrent calls to kern_reboot(), only let the first do the deed.
- Don't need kernel_lock for this (either OK, or suspendsched() called).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/kern/kern_reboot.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_reboot.c
diff -u src/sys/kern/kern_reboot.c:1.2 src/sys/kern/kern_reboot.c:1.3
--- src/sys/kern/kern_reboot.c:1.2	Wed Jan  1 22:57:17 2020
+++ src/sys/kern/kern_reboot.c	Sun Feb 23 20:06:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_reboot.c,v 1.2 2020/01/01 22:57:17 thorpej Exp $	*/
+/*	$NetBSD: kern_reboot.c,v 1.3 2020/02/23 20:06:30 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -33,8 +33,9 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.2 2020/01/01 22:57:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.3 2020/02/23 20:06:30 ad Exp $");
 
+#include 
 #include 
 #include 
 #include 
@@ -50,7 +51,17 @@ __KERNEL_RCSID(0, "$NetBSD: kern_reboot.
 void
 kern_reboot(int howto, char *bootstr)
 {
+	static lwp_t *rebooter, *l;
 
+	/*
+	 * If already rebooting then just hang out.  Allow reentry for the
+	 * benfit of ddb, even if questionable.  It would be better to call
+	 * exit1(), but this is called from all sorts of places.
+	 */
+	l = atomic_cas_ptr(, NULL, curlwp);
+	while (l != NULL && l != curlwp) {
+		(void)kpause("reboot", true, 0, NULL);
+	}
 	shutting_down = 1;
 
 	/*
@@ -87,8 +98,6 @@ sys_reboot(struct lwp *l, const struct s
 	/*
 	 * Not all ports use the bootstr currently.
 	 */
-	KERNEL_LOCK(1, NULL);
 	kern_reboot(SCARG(uap, opt), bootstr);
-	KERNEL_UNLOCK_ONE(NULL);
 	return (0);
 }



CVS commit: [ad-namecache] src/sys/kern

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 19:14:03 UTC 2020

Modified Files:
src/sys/kern [ad-namecache]: vfs_vnode.c

Log Message:
Turns out there's no point adjusting v_holdcnt with atomics.


To generate a diff of this commit:
cvs rdiff -u -r1.105.2.7 -r1.105.2.8 src/sys/kern/vfs_vnode.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_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.105.2.7 src/sys/kern/vfs_vnode.c:1.105.2.8
--- src/sys/kern/vfs_vnode.c:1.105.2.7	Sat Jan 25 22:38:51 2020
+++ src/sys/kern/vfs_vnode.c	Sun Feb 23 19:14:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.105.2.7 2020/01/25 22:38:51 ad Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.105.2.8 2020/02/23 19:14:03 ad Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011, 2019 The NetBSD Foundation, Inc.
@@ -142,10 +142,10 @@
  *	as vput(9), routines.  Common points holding references are e.g.
  *	file openings, current working directory, mount points, etc.  
  *
- * Note on v_usecount & v_holdcnt and their locking
+ * Note on v_usecount and its locking
  *
- *	At nearly all points it is known that the counts could be zero,
- *	the vnode_t::v_interlock will be held.  To change the counts away
+ *	At nearly all points it is known that v_usecount could be zero,
+ *	the vnode_t::v_interlock will be held.  To change the count away
  *	from zero, the interlock must be held.  To change from a non-zero
  *	value to zero, again the interlock must be held.
  *
@@ -154,7 +154,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.105.2.7 2020/01/25 22:38:51 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.105.2.8 2020/02/23 19:14:03 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -939,7 +939,7 @@ vholdl(vnode_t *vp)
 
 	KASSERT(mutex_owned(vp->v_interlock));
 
-	if (atomic_inc_uint_nv(>v_holdcnt) == 1 && vp->v_usecount == 0)
+	if (vp->v_holdcnt++ == 0 && vp->v_usecount == 0)
 		lru_requeue(vp, lru_which(vp));
 }
 
@@ -949,17 +949,6 @@ vholdl(vnode_t *vp)
 void
 vhold(vnode_t *vp)
 {
-	int hold, next;
-
-	for (hold = vp->v_holdcnt;; hold = next) {
-		if (__predict_false(hold == 0)) {
-			break;
-		}
-		next = atomic_cas_uint(>v_holdcnt, hold, hold + 1);
-		if (__predict_true(next == hold)) {
-			return;
-		}
-	}
 
 	mutex_enter(vp->v_interlock);
 	vholdl(vp);
@@ -980,7 +969,8 @@ holdrelel(vnode_t *vp)
 		vnpanic(vp, "%s: holdcnt vp %p", __func__, vp);
 	}
 
-	if (atomic_dec_uint_nv(>v_holdcnt) == 0 && vp->v_usecount == 0)
+	vp->v_holdcnt--;
+	if (vp->v_holdcnt == 0 && vp->v_usecount == 0)
 		lru_requeue(vp, lru_which(vp));
 }
 
@@ -990,18 +980,6 @@ holdrelel(vnode_t *vp)
 void
 holdrele(vnode_t *vp)
 {
-	int hold, next;
-
-	for (hold = vp->v_holdcnt;; hold = next) {
-		if (__predict_false(hold == 1)) {
-			break;
-		}
-		KASSERT(hold > 1);
-		next = atomic_cas_uint(>v_holdcnt, hold, hold - 1);
-		if (__predict_true(next == hold)) {
-			return;
-		}
-	}
 
 	mutex_enter(vp->v_interlock);
 	holdrelel(vp);



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

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 18:57:28 UTC 2020

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

Log Message:
Adjustment to previous: TP_SET_DONE() was wiping out the VA to shoot,
instead of ORing the flag into the array element.  This caused the CPU
initiating the shootdown to occasionally miss an INVLPG.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/x86/x86_tlb.c

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

Modified files:

Index: src/sys/arch/x86/x86/x86_tlb.c
diff -u src/sys/arch/x86/x86/x86_tlb.c:1.16 src/sys/arch/x86/x86/x86_tlb.c:1.17
--- src/sys/arch/x86/x86/x86_tlb.c:1.16	Sat Feb 22 20:12:40 2020
+++ src/sys/arch/x86/x86/x86_tlb.c	Sun Feb 23 18:57:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_tlb.c,v 1.16 2020/02/22 20:12:40 maxv Exp $	*/
+/*	$NetBSD: x86_tlb.c,v 1.17 2020/02/23 18:57:28 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008-2020 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_tlb.c,v 1.16 2020/02/22 20:12:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_tlb.c,v 1.17 2020/02/23 18:57:28 ad Exp $");
 
 #include 
 #include 
@@ -99,7 +99,11 @@ typedef struct {
 
 #define	TP_SET_USERPMAP(tp)	((tp)->tp_store[TP_USERPMAP] |= 1)
 #define	TP_SET_GLOBAL(tp)	((tp)->tp_store[TP_GLOBAL] |= 1)
-#define	TP_SET_DONE(tp)		atomic_store_relaxed(&(tp)->tp_store[TP_DONE], 1)
+#define	TP_SET_DONE(tp) \
+do { \
+	uintptr_t v = atomic_load_relaxed(&(tp)->tp_store[TP_DONE]); \
+	atomic_store_relaxed(&(tp)->tp_store[TP_DONE], v | 1); \
+} while (/* CONSTCOND */ 0);
 
 #define	TP_CLEAR(tp)		memset(__UNVOLATILE(tp), 0, sizeof(*(tp)));
 



CVS commit: src/sys

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 16:27:09 UTC 2020

Modified Files:
src/sys/kern: kern_synch.c
src/sys/sys: syncobj.h

Log Message:
kpause(): is only awoken via timeout or signal, so use SOBJ_SLEEPQ_NULL like
_lwp_park() does, and dispense with the hashed sleepq & lock.


To generate a diff of this commit:
cvs rdiff -u -r1.341 -r1.342 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/syncobj.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/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.341 src/sys/kern/kern_synch.c:1.342
--- src/sys/kern/kern_synch.c:1.341	Sun Feb 23 15:46:41 2020
+++ src/sys/kern/kern_synch.c	Sun Feb 23 16:27:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.341 2020/02/23 15:46:41 ad Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.342 2020/02/23 16:27:09 ad Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009, 2019, 2020
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.341 2020/02/23 15:46:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.342 2020/02/23 16:27:09 ad Exp $");
 
 #include "opt_kstack.h"
 #include "opt_dtrace.h"
@@ -122,6 +122,14 @@ syncobj_t sched_syncobj = {
 	.sobj_owner	= syncobj_noowner,
 };
 
+syncobj_t kpause_syncobj = {
+	.sobj_flag	= SOBJ_SLEEPQ_NULL,
+	.sobj_unsleep	= sleepq_unsleep,
+	.sobj_changepri	= sleepq_changepri,
+	.sobj_lendpri	= sleepq_lendpri,
+	.sobj_owner	= syncobj_noowner,
+};
+
 /* "Lightning bolt": once a second sleep address. */
 kcondvar_t		lbolt			__cacheline_aligned;
 
@@ -258,8 +266,6 @@ int
 kpause(const char *wmesg, bool intr, int timo, kmutex_t *mtx)
 {
 	struct lwp *l = curlwp;
-	kmutex_t *mp;
-	sleepq_t *sq;
 	int error;
 
 	KASSERT(!(timo == 0 && intr == false));
@@ -270,9 +276,9 @@ kpause(const char *wmesg, bool intr, int
 	if (mtx != NULL)
 		mutex_exit(mtx);
 	l->l_kpriority = true;
-	sq = sleeptab_lookup(, l, );
-	sleepq_enter(sq, l, mp);
-	sleepq_enqueue(sq, l, wmesg, _syncobj);
+	lwp_lock(l);
+	KERNEL_UNLOCK_ALL(NULL, >l_biglocks);
+	sleepq_enqueue(NULL, l, wmesg, _syncobj);
 	error = sleepq_block(timo, intr);
 	if (mtx != NULL)
 		mutex_enter(mtx);

Index: src/sys/sys/syncobj.h
diff -u src/sys/sys/syncobj.h:1.10 src/sys/sys/syncobj.h:1.11
--- src/sys/sys/syncobj.h:1.10	Sat Feb 15 17:09:24 2020
+++ src/sys/sys/syncobj.h	Sun Feb 23 16:27:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: syncobj.h,v 1.10 2020/02/15 17:09:24 ad Exp $	*/
+/*	$NetBSD: syncobj.h,v 1.11 2020/02/23 16:27:09 ad Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -59,6 +59,7 @@ struct lwp *syncobj_noowner(wchan_t);
 extern syncobj_t	cv_syncobj;
 extern syncobj_t	lwp_park_syncobj;
 extern syncobj_t	mutex_syncobj;
+extern syncobj_t	kpause_syncobj;
 extern syncobj_t	rw_syncobj;
 extern syncobj_t	sched_syncobj;
 extern syncobj_t	select_syncobj;



CVS commit: src/sys/sys

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 16:04:58 UTC 2020

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

Log Message:
NetBSD 9.99.48 - UVM locking changes


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

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.650 src/sys/sys/param.h:1.651
--- src/sys/sys/param.h:1.650	Sat Feb 15 17:14:30 2020
+++ src/sys/sys/param.h	Sun Feb 23 16:04:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.650 2020/02/15 17:14:30 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.651 2020/02/23 16:04:58 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999004700	/* NetBSD 9.99.47 */
+#define	__NetBSD_Version__	999004800	/* NetBSD 9.99.48 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/compat/common

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 15:57:09 UTC 2020

Modified Files:
src/sys/compat/common: kern_xxx_12.c

Log Message:
Don't bother with kernel_lock for kern_reboot().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/compat/common/kern_xxx_12.c

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

Modified files:

Index: src/sys/compat/common/kern_xxx_12.c
diff -u src/sys/compat/common/kern_xxx_12.c:1.17 src/sys/compat/common/kern_xxx_12.c:1.18
--- src/sys/compat/common/kern_xxx_12.c:1.17	Wed Jan  1 22:57:17 2020
+++ src/sys/compat/common/kern_xxx_12.c	Sun Feb 23 15:57:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_xxx_12.c,v 1.17 2020/01/01 22:57:17 thorpej Exp $	*/
+/*	$NetBSD: kern_xxx_12.c,v 1.18 2020/02/23 15:57:09 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_xxx_12.c,v 1.17 2020/01/01 22:57:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_xxx_12.c,v 1.18 2020/02/23 15:57:09 ad Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -68,9 +68,7 @@ compat_12_sys_reboot(struct lwp *l,
 	if ((error = kauth_authorize_system(l->l_cred,
 	KAUTH_SYSTEM_REBOOT, 0, NULL, NULL, NULL)) != 0)
 		return (error);
-	KERNEL_LOCK(1, NULL);
 	kern_reboot(SCARG(uap, opt), NULL);
-	KERNEL_UNLOCK_ONE(NULL);
 	return (0);
 }
 



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 15:23:08 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_subr.c lfs_vnops.c

Log Message:
Fix missing  by removing the evcnts instead.

Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -u -r1.329 -r1.330 src/sys/ufs/lfs/lfs_vnops.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/ufs/lfs/lfs_subr.c
diff -u src/sys/ufs/lfs/lfs_subr.c:1.101 src/sys/ufs/lfs/lfs_subr.c:1.102
--- src/sys/ufs/lfs/lfs_subr.c:1.101	Sun Feb 23 15:09:55 2020
+++ src/sys/ufs/lfs/lfs_subr.c	Sun Feb 23 15:23:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $	*/
+/*	$NetBSD: lfs_subr.c,v 1.102 2020/02/23 15:23:08 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.102 2020/02/23 15:23:08 riastradh Exp $");
 
 #include 
 #include 
@@ -337,10 +337,6 @@ lfs_seglock(struct lfs *fs, unsigned lon
 
 static void lfs_unmark_dirop(struct lfs *);
 
-static struct evcnt lfs_dchain_marker_pass_dirop =
-EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "lfs", "dchain marker pass dirop");
-EVCNT_ATTACH_STATIC(lfs_dchain_marker_pass_dirop);
-
 static void
 lfs_unmark_dirop(struct lfs *fs)
 {
@@ -371,10 +367,8 @@ lfs_unmark_dirop(struct lfs *fs)
 		TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
 		TAILQ_INSERT_AFTER(>lfs_dchainhd, ip, marker,
 		i_lfs_dchain);
-		if (ip->i_state & IN_MARKER) {
-			lfs_dchain_marker_pass_dirop.ev_count++;
+		if (ip->i_state & IN_MARKER)
 			continue;
-		}
 		vp = ITOV(ip);
 		if ((ip->i_state & (IN_ADIROP | IN_CDIROP)) == IN_CDIROP) {
 			--lfs_dirvcount;

Index: src/sys/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.329 src/sys/ufs/lfs/lfs_vnops.c:1.330
--- src/sys/ufs/lfs/lfs_vnops.c:1.329	Sun Feb 23 08:40:19 2020
+++ src/sys/ufs/lfs/lfs_vnops.c	Sun Feb 23 15:23:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.330 2020/02/23 15:23:08 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.330 2020/02/23 15:23:08 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1595,10 +1595,6 @@ lfs_strategy(void *v)
 	return VOP_STRATEGY(vp, bp);
 }
 
-static struct evcnt lfs_dchain_marker_pass_flush =
-EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "lfs", "dchain marker pass flush");
-EVCNT_ATTACH_STATIC(lfs_dchain_marker_pass_flush);
-
 /*
  * Inline lfs_segwrite/lfs_writevnodes, but just for dirops.
  * Technically this is a checkpoint (the on-disk state is valid)
@@ -1662,10 +1658,8 @@ lfs_flush_dirops(struct lfs *fs)
 		TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
 		TAILQ_INSERT_AFTER(>lfs_dchainhd, ip, marker,
 		i_lfs_dchain);
-		if (ip->i_state & IN_MARKER) {
-			lfs_dchain_marker_pass_flush.ev_count++;
+		if (ip->i_state & IN_MARKER)
 			continue;
-		}
 		vp = ITOV(ip);
 
 		/*



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

2020-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 23 15:12:19 UTC 2020

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
G/C l1pte_pgindex


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/arch/arm/include/arm32/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/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.161 src/sys/arch/arm/include/arm32/pmap.h:1.162
--- src/sys/arch/arm/include/arm32/pmap.h:1.161	Wed Feb  5 07:37:36 2020
+++ src/sys/arch/arm/include/arm32/pmap.h	Sun Feb 23 15:12:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.161 2020/02/05 07:37:36 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.162 2020/02/23 15:12:18 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -557,8 +557,6 @@ pmap_ptesync(pt_entry_t *ptep, size_t cn
 #define l1pte_fpage_p(pde)	(((pde) & L1_TYPE_MASK) == L1_TYPE_F)
 #define l1pte_pa(pde)		((pde) & L1_C_ADDR_MASK)
 #define l1pte_index(v)		((vaddr_t)(v) >> L1_S_SHIFT)
-#define l1pte_pgindex(v)	l1pte_index((v) & L1_ADDR_BITS \
-		& ~(PAGE_SIZE * PAGE_SIZE / sizeof(pt_entry_t) - 1))
 
 static inline void
 l1pte_setone(pt_entry_t *pdep, pt_entry_t pde)



CVS commit: src

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 15:11:33 UTC 2020

Modified Files:
src/sbin/fsck_lfs: pass1.c
src/usr.sbin/dumplfs: dumplfs.c

Log Message:
Fix userland references to LFS_ORPHAN_NEXTFREE.

Forgot to grep for these or do a full distribution build, oops!


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sbin/fsck_lfs/pass1.c
cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/dumplfs/dumplfs.c

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

Modified files:

Index: src/sbin/fsck_lfs/pass1.c
diff -u src/sbin/fsck_lfs/pass1.c:1.45 src/sbin/fsck_lfs/pass1.c:1.46
--- src/sbin/fsck_lfs/pass1.c:1.45	Sat Oct  3 08:30:13 2015
+++ src/sbin/fsck_lfs/pass1.c	Sun Feb 23 15:11:33 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.45 2015/10/03 08:30:13 dholland Exp $	 */
+/* $NetBSD: pass1.c,v 1.46 2020/02/23 15:11:33 riastradh Exp $	 */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -307,7 +307,7 @@ checkinode(ino_t inumber, struct inodesc
 	 */
 	if (lfs_dino_getnlink(fs, dp) <= 0) {
 		LFS_IENTRY(ifp, fs, inumber, bp);
-		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE) {
+		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE(fs)) {
 			statemap[inumber] = (mode == LFS_IFDIR ? DCLEAR : FCLEAR);
 			/* Add this to our list of orphans */
 			zlnp = emalloc(sizeof *zlnp);

Index: src/usr.sbin/dumplfs/dumplfs.c
diff -u src/usr.sbin/dumplfs/dumplfs.c:1.64 src/usr.sbin/dumplfs/dumplfs.c:1.65
--- src/usr.sbin/dumplfs/dumplfs.c:1.64	Fri Jun 15 15:16:05 2018
+++ src/usr.sbin/dumplfs/dumplfs.c	Sun Feb 23 15:11:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dumplfs.c,v 1.64 2018/06/15 15:16:05 christos Exp $	*/
+/*	$NetBSD: dumplfs.c,v 1.65 2020/02/23 15:11:33 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
 #if 0
 static char sccsid[] = "@(#)dumplfs.c	8.5 (Berkeley) 5/24/95";
 #else
-__RCSID("$NetBSD: dumplfs.c,v 1.64 2018/06/15 15:16:05 christos Exp $");
+__RCSID("$NetBSD: dumplfs.c,v 1.65 2020/02/23 15:11:33 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -133,7 +133,7 @@ print_ientry(int i, struct lfs *lfsp, IF
 	else
 		printf("%d\tINUSE\t%u\t%8jX\t%s\n",
 		i, version, (intmax_t)daddr,
-		nextfree == LFS_ORPHAN_NEXTFREE ? "" : "-");
+		nextfree == LFS_ORPHAN_NEXTFREE(lfsp) ? "orphan" : "-");
 }
 
 /*



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Feb 23 15:09:55 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_subr.c

Log Message:
Fix !DIAGNOSTIC compile


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/ufs/lfs/lfs_subr.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/ufs/lfs/lfs_subr.c
diff -u src/sys/ufs/lfs/lfs_subr.c:1.100 src/sys/ufs/lfs/lfs_subr.c:1.101
--- src/sys/ufs/lfs/lfs_subr.c:1.100	Sun Feb 23 08:42:53 2020
+++ src/sys/ufs/lfs/lfs_subr.c	Sun Feb 23 15:09:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_subr.c,v 1.100 2020/02/23 08:42:53 riastradh Exp $	*/
+/*	$NetBSD: lfs_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.100 2020/02/23 08:42:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.101 2020/02/23 15:09:55 ad Exp $");
 
 #include 
 #include 
@@ -574,7 +574,7 @@ lfs_segunlock(struct lfs *fs)
 void
 lfs_writer_enter(struct lfs *fs, const char *wmesg)
 {
-	int error;
+	int error __diagused;
 
 	ASSERT_NO_SEGLOCK(fs);
 	mutex_enter(_lock);



CVS commit: src/sys/dev/wsfb

2020-02-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb 23 14:44:24 UTC 2020

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
Do not replay the msgbuf if we are booting silent or quiet.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.70 src/sys/dev/wsfb/genfb.c:1.71
--- src/sys/dev/wsfb/genfb.c:1.70	Fri Aug  9 17:22:02 2019
+++ src/sys/dev/wsfb/genfb.c	Sun Feb 23 14:44:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.70 2019/08/09 17:22:02 rin Exp $ */
+/*	$NetBSD: genfb.c,v 1.71 2020/02/23 14:44:23 martin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.70 2019/08/09 17:22:02 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.71 2020/02/23 14:44:23 martin Exp $");
 
 #include 
 #include 
@@ -39,6 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -53,7 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.
 #include 
 
 #ifdef GENFB_DISABLE_TEXT
-#include 
 #define DISABLESPLASH (boothowto & (RB_SINGLE | RB_USERCONF | RB_ASKNAME | \
 		AB_VERBOSE | AB_DEBUG) )
 #endif
@@ -342,7 +342,7 @@ genfb_attach(struct genfb_softc *sc, str
 	}
 #else
 	genfb_init_palette(sc);
-	if (console)
+	if (console && (boothowto & (AB_SILENT|AB_QUIET)) == 0)
 		vcons_replay_msgbuf(>sc_console_screen);
 #endif
 



CVS commit: xsrc/external/mit/xf86-video-sis

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 11:31:07 UTC 2020

Modified Files:
xsrc/external/mit/xf86-video-sis/dist/src: sis_driver.c sis_utility.c
xsrc/external/mit/xf86-video-sis/include: config.h

Log Message:
merge xf86-video-sis 0.12.0


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-sis/dist/src/sis_utility.c
cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/xf86-video-sis/include/config.h

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

Modified files:

Index: xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c
diff -u xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.9 xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.10
--- xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.9	Mon Dec 31 22:17:21 2018
+++ xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c	Sun Feb 23 11:31:06 2020
@@ -1305,7 +1305,7 @@ SiSCopyModeNLink(ScrnInfoPtr pScrn, Disp
  * (Code base taken from mga driver)
  */
 static DisplayModePtr
-SiSGetModeFromName(char* str, DisplayModePtr i)
+SiSGetModeFromName(const char* str, DisplayModePtr i)
 {
 DisplayModePtr c = i;
 if(!i) return NULL;
@@ -2148,7 +2148,9 @@ int
 SiSProcXineramaQueryVersion(ClientPtr client)
 {
 xPanoramiXQueryVersionReply	  rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int		  n;
+#endif
 
 REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
 rep.type = X_Reply;
@@ -2172,7 +2174,9 @@ SiSProcXineramaGetState(ClientPtr client
 REQUEST(xPanoramiXGetStateReq);
 WindowPtr			pWin;
 xPanoramiXGetStateReply	rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int		n;
+#endif
 intrc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
@@ -2198,7 +2202,9 @@ SiSProcXineramaGetScreenCount(ClientPtr 
 REQUEST(xPanoramiXGetScreenCountReq);
 WindowPtrpWin;
 xPanoramiXGetScreenCountReply	rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int			n;
+#endif
 int	rc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
@@ -2224,7 +2230,9 @@ SiSProcXineramaGetScreenSize(ClientPtr c
 REQUEST(xPanoramiXGetScreenSizeReq);
 WindowPtrpWin;
 xPanoramiXGetScreenSizeReply	rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int			n;
+#endif
 int	rc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
@@ -2259,7 +2267,9 @@ SiSProcXineramaIsActive(ClientPtr client
 rep.sequenceNumber = client->sequence;
 rep.state = !SiSnoPanoramiXExtension;
 if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	register int n;
+#endif
 	_swaps(, n);
 	_swapl(, n);
 	_swapl(, n);
@@ -2280,7 +2290,9 @@ SiSProcXineramaQueryScreens(ClientPtr cl
 rep.number = (SiSnoPanoramiXExtension) ? 0 : SiSXineramaNumScreens;
 rep.length = rep.number * sz_XineramaScreenInfo >> 2;
 if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
register int n;
+#endif
_swaps(, n);
_swapl(, n);
_swapl(, n);
@@ -2297,7 +2309,9 @@ SiSProcXineramaQueryScreens(ClientPtr cl
 	  scratch.width  = SiSXineramadataPtr[i].width;
 	  scratch.height = SiSXineramadataPtr[i].height;
 	  if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	 register int n;
+#endif
 	 _swaps(_org, n);
 	 _swaps(_org, n);
 	 _swaps(, n);
@@ -2337,7 +2351,9 @@ static int
 SiSSProcXineramaQueryVersion (ClientPtr client)
 {
 REQUEST(xPanoramiXQueryVersionReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps(>length,n);
 REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
 return SiSProcXineramaQueryVersion(client);
@@ -2347,7 +2363,9 @@ static int
 SiSSProcXineramaGetState(ClientPtr client)
 {
 REQUEST(xPanoramiXGetStateReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
 return SiSProcXineramaGetState(client);
@@ -2357,7 +2375,9 @@ static int
 SiSSProcXineramaGetScreenCount(ClientPtr client)
 {
 REQUEST(xPanoramiXGetScreenCountReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
 return SiSProcXineramaGetScreenCount(client);
@@ -2367,7 +2387,9 @@ static int
 SiSSProcXineramaGetScreenSize(ClientPtr client)
 {
 REQUEST(xPanoramiXGetScreenSizeReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
 return SiSProcXineramaGetScreenSize(client);
@@ -2377,7 +2399,9 @@ static int
 SiSSProcXineramaIsActive(ClientPtr client)
 {
 REQUEST(xXineramaIsActiveReq);
+#if 

CVS import: xsrc/external/mit/xf86-video-sis/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 11:28:45 UTC 2020

Update of /cvsroot/xsrc/external/mit/xf86-video-sis/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv8194

Log Message:
initial import of xf86-video-sis-0.12.0

Status:

Vendor Tag: xorg
Release Tags:   xf86-video-sis-0-12-0

U xsrc/external/mit/xf86-video-sis/dist/missing
U xsrc/external/mit/xf86-video-sis/dist/configure
U xsrc/external/mit/xf86-video-sis/dist/config.h.in
U xsrc/external/mit/xf86-video-sis/dist/INSTALL
U xsrc/external/mit/xf86-video-sis/dist/config.guess
U xsrc/external/mit/xf86-video-sis/dist/README
U xsrc/external/mit/xf86-video-sis/dist/Makefile.am
U xsrc/external/mit/xf86-video-sis/dist/compile
U xsrc/external/mit/xf86-video-sis/dist/ChangeLog
U xsrc/external/mit/xf86-video-sis/dist/install-sh
U xsrc/external/mit/xf86-video-sis/dist/config.sub
U xsrc/external/mit/xf86-video-sis/dist/COPYING
U xsrc/external/mit/xf86-video-sis/dist/Makefile.in
U xsrc/external/mit/xf86-video-sis/dist/ltmain.sh
U xsrc/external/mit/xf86-video-sis/dist/configure.ac
U xsrc/external/mit/xf86-video-sis/dist/depcomp
U xsrc/external/mit/xf86-video-sis/dist/aclocal.m4
U xsrc/external/mit/xf86-video-sis/dist/src/300vtbl.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_memcpy.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_dga.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_shadow.c
C xsrc/external/mit/xf86-video-sis/dist/src/sis_utility.c
U xsrc/external/mit/xf86-video-sis/dist/src/init.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_video.h
U xsrc/external/mit/xf86-video-sis/dist/src/oem300.h
U xsrc/external/mit/xf86-video-sis/dist/src/init.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.h
U xsrc/external/mit/xf86-video-sis/dist/src/compat-api.h
U xsrc/external/mit/xf86-video-sis/dist/src/initextx.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_common.h
U xsrc/external/mit/xf86-video-sis/dist/src/osdef.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_vb.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis6326_video.c
U xsrc/external/mit/xf86-video-sis/dist/src/Makefile.am
U xsrc/external/mit/xf86-video-sis/dist/src/sispcirename.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_setup.c
U xsrc/external/mit/xf86-video-sis/dist/src/310vtbl.h
U xsrc/external/mit/xf86-video-sis/dist/src/oem310.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_opt.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_dac.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_accel.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_dac.h
U xsrc/external/mit/xf86-video-sis/dist/src/Makefile.in
U xsrc/external/mit/xf86-video-sis/dist/src/sis310_accel.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis310_accel.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_cursor.h
U xsrc/external/mit/xf86-video-sis/dist/src/init301.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis300_accel.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_accel.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_regs.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_cursor.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_vga.c
U xsrc/external/mit/xf86-video-sis/dist/src/initextx.c
C xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c
U xsrc/external/mit/xf86-video-sis/dist/src/init301.h
U xsrc/external/mit/xf86-video-sis/dist/src/vstruct.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_videostr.h
U xsrc/external/mit/xf86-video-sis/dist/src/initdef.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis.h
U xsrc/external/mit/xf86-video-sis/dist/src/vgatypes.h
U xsrc/external/mit/xf86-video-sis/dist/src/sis_dri.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_video.c
U xsrc/external/mit/xf86-video-sis/dist/src/sis_dri.h
U xsrc/external/mit/xf86-video-sis/dist/man/sis.man
U xsrc/external/mit/xf86-video-sis/dist/man/Makefile.am
U xsrc/external/mit/xf86-video-sis/dist/man/Makefile.in

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jxorg:yesterday -jxorg 
xsrc/external/mit/xf86-video-sis/dist



CVS commit: src

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 11:17:03 UTC 2020

Modified Files:
src/distrib/sets/lists/xbase: mi
src/external/mit/xorg/lib/xkeyboard-config/compat: Makefile
src/external/mit/xorg/lib/xkeyboard-config/rules: base base.lst evdev
evdev.lst
src/external/mit/xorg/lib/xkeyboard-config/symbols: Makefile

Log Message:
updates for xkeyboard-config 2.29.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/distrib/sets/lists/xbase/mi
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile
cvs rdiff -u -r1.13 -r1.14 \
src/external/mit/xorg/lib/xkeyboard-config/rules/base \
src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst \
src/external/mit/xorg/lib/xkeyboard-config/rules/evdev.lst
cvs rdiff -u -r1.12 -r1.13 \
src/external/mit/xorg/lib/xkeyboard-config/rules/evdev
cvs rdiff -u -r1.14 -r1.15 \
src/external/mit/xorg/lib/xkeyboard-config/symbols/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/xbase/mi
diff -u src/distrib/sets/lists/xbase/mi:1.155 src/distrib/sets/lists/xbase/mi:1.156
--- src/distrib/sets/lists/xbase/mi:1.155	Sun Jan 19 00:58:13 2020
+++ src/distrib/sets/lists/xbase/mi	Sun Feb 23 11:17:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.155 2020/01/19 00:58:13 jmcneill Exp $
+# $NetBSD: mi,v 1.156 2020/02/23 11:17:03 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -630,6 +630,7 @@
 ./usr/X11R7/lib/X11/xkb/compat/japan			xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/compat/keypad			xbase-obsolete	obsolete
 ./usr/X11R7/lib/X11/xkb/compat/ledcaps			xbase-xkeyboard-config-lib	xorg
+./usr/X11R7/lib/X11/xkb/compat/ledcompose		xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/compat/lednum			xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/compat/ledscroll		xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/compat/level5			xbase-xkeyboard-config-lib	xorg
@@ -952,6 +953,7 @@
 ./usr/X11R7/lib/X11/xkb/symbols/jolla_vndr		base-x11-root	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/jolla_vndr/sbj		xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/jp			xbase-xkeyboard-config-lib	xorg
+./usr/X11R7/lib/X11/xkb/symbols/jv			xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/kan			xbase-obsolete	obsolete
 ./usr/X11R7/lib/X11/xkb/symbols/ke			xbase-xkeyboard-config-lib	xorg
 ./usr/X11R7/lib/X11/xkb/symbols/keypad			xbase-xkeyboard-config-lib	xorg

Index: src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile
diff -u src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile:1.4 src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile:1.5
--- src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile:1.4	Mon Feb 13 06:11:01 2017
+++ src/external/mit/xorg/lib/xkeyboard-config/compat/Makefile	Sun Feb 23 11:17:03 2020
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2017/02/13 06:11:01 snj Exp $
+#	$NetBSD: Makefile,v 1.5 2020/02/23 11:17:03 mrg Exp $
 
 .include 
 
 XKBNAME=	compat
 FILES=		README accessx basic caps complete iso9995 japan \
-		ledcaps lednum ledscroll level5 misc mousekeys \
+		ledcaps ledcompose lednum ledscroll level5 misc mousekeys \
 		olpc pc pc98 xfree86 xtest
 
 .include "../Makefile.xkbdata"

Index: src/external/mit/xorg/lib/xkeyboard-config/rules/base
diff -u src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.13 src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.14
--- src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.13	Wed Mar  6 11:05:18 2019
+++ src/external/mit/xorg/lib/xkeyboard-config/rules/base	Sun Feb 23 11:17:03 2020
@@ -1,4 +1,5 @@
-// DO NOT EDIT THIS FILE - IT WAS AUTOGENERATED BY merge.sh FROM rules/*.part
+// DO NOT EDIT THIS FILE - IT WAS AUTOGENERATED BY merge.py FROM rules/*.part
+//
 //
 //  Rules for resolving XKB components for use with XFree86
 //  Copyright 1996 by Joseph Moss
@@ -19,7 +20,7 @@
 ! $jollamodels = jollasbj
 
 // Microsoft models (using MS geometry)
-! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose
+! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose microsoftsurface
 
 // Nokia devices and keyboards
 ! $nokiamodels = nokiasu8w nokiarx44 nokiarx51
@@ -85,7 +86,6 @@
 
 ! $sun_compat = sun_type6 sun_type6_suncompat sun_type7_suncompat suncompat
 
-! $htcdreamlayouts = us it de
 
 ! $inetkbds = acer_c300 acer_ferrari4k acer_laptop \
   airkey \
@@ -104,7 +104,7 @@
   genius geniuscomfy2 \
   gyration honeywell_euroboard \
   hp250x hp5xx hp500fa hpdv5 \
-  hpi6 hpxe3gc hpxe3gf hpxe4xxx hpxt1000 hpzt11xx htcdream \
+  hpi6 hpxe3gc hpxe3gf hpxe4xxx hpxt1000 hpzt11xx \
   ibm_spacesaver ipaq inspiron intel \
  

CVS commit: xsrc/external/mit/xkeyboard-config/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 11:14:18 UTC 2020

Modified Files:
xsrc/external/mit/xkeyboard-config/dist: configure
xsrc/external/mit/xkeyboard-config/dist/rules: base.lo_s.part
base.ml_s.part base.o_k.part
xsrc/external/mit/xkeyboard-config/dist/symbols: Makefile.am
Makefile.in
xsrc/external/mit/xkeyboard-config/dist/symbols/sharp_vndr: Makefile.in
Removed Files:
xsrc/external/mit/xkeyboard-config/dist/rules: HDR evdev.lists.part
merge.sh
xsrc/external/mit/xkeyboard-config/dist/rules/bin: Makefile.am
Makefile.in ml1_s.sh ml1v1_s.sh ml1v_s.sh ml_s.sh mln_s.sh
mlnvn_s.sh mlv_s.sh

Log Message:
merge xkeyboard-config 2.29.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 xsrc/external/mit/xkeyboard-config/dist/configure
cvs rdiff -u -r1.1.1.3 -r0 xsrc/external/mit/xkeyboard-config/dist/rules/HDR
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xkeyboard-config/dist/rules/base.lo_s.part \
xsrc/external/mit/xkeyboard-config/dist/rules/base.o_k.part
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/xkeyboard-config/dist/rules/base.ml_s.part
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/xkeyboard-config/dist/rules/evdev.lists.part
cvs rdiff -u -r1.1.1.2 -r0 \
xsrc/external/mit/xkeyboard-config/dist/rules/merge.sh
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/Makefile.am \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/ml1_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/ml1v1_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/ml1v_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/ml_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/mln_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/mlnvn_s.sh \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/mlv_s.sh
cvs rdiff -u -r1.1.1.10 -r0 \
xsrc/external/mit/xkeyboard-config/dist/rules/bin/Makefile.in
cvs rdiff -u -r1.13 -r1.14 \
xsrc/external/mit/xkeyboard-config/dist/symbols/Makefile.am
cvs rdiff -u -r1.18 -r1.19 \
xsrc/external/mit/xkeyboard-config/dist/symbols/Makefile.in
cvs rdiff -u -r1.10 -r1.11 \
xsrc/external/mit/xkeyboard-config/dist/symbols/sharp_vndr/Makefile.in

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/xkeyboard-config/dist/configure
diff -u xsrc/external/mit/xkeyboard-config/dist/configure:1.18 xsrc/external/mit/xkeyboard-config/dist/configure:1.19
--- xsrc/external/mit/xkeyboard-config/dist/configure:1.18	Sat Jun  1 07:11:53 2019
+++ xsrc/external/mit/xkeyboard-config/dist/configure	Sun Feb 23 11:14:17 2020
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xkeyboard-config 2.27.
+# Generated by GNU Autoconf 2.69 for xkeyboard-config 2.29.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xkeyboard-config'
 PACKAGE_TARNAME='xkeyboard-config'
-PACKAGE_VERSION='2.27'
-PACKAGE_STRING='xkeyboard-config 2.27'
+PACKAGE_VERSION='2.29'
+PACKAGE_STRING='xkeyboard-config 2.29'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -636,6 +636,15 @@ DEPS_CFLAGS
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
 HAVE_XSLTPROC_FALSE
 HAVE_XSLTPROC_TRUE
 XSLTPROC
@@ -748,6 +757,7 @@ with_libintl_prefix
 host_alias
 target_alias
 XSLTPROC
+PYTHON
 PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
@@ -1299,7 +1309,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xkeyboard-config 2.27 to adapt to many kinds of systems.
+\`configure' configures xkeyboard-config 2.29 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1370,7 +1380,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of xkeyboard-config 2.27:";;
+ short | recursive ) echo "Configuration of xkeyboard-config 2.29:";;
esac
   cat <<\_ACEOF
 
@@ -1404,6 +1414,7 @@ Optional Packages:
 
 Some influential environment variables:
   XSLTPROCPath to xsltproc command
+  PYTHON  the Python interpreter
   PKG_CONFIG  path to pkg-config utility
   PKG_CONFIG_PATH
   directories to add to pkg-config's search path
@@ -1486,7 +1497,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xkeyboard-config configure 2.27
+xkeyboard-config configure 2.29
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 

CVS import: xsrc/external/mit/xkeyboard-config/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 11:13:41 UTC 2020

Update of /cvsroot/xsrc/external/mit/xkeyboard-config/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22115

Log Message:
initial import of xkeyboard-config-2.29

Status:

Vendor Tag: xorg
Release Tags:   xkeyboard-config-2-29

U xsrc/external/mit/xkeyboard-config/dist/install-sh
U xsrc/external/mit/xkeyboard-config/dist/README
U xsrc/external/mit/xkeyboard-config/dist/aclocal.m4
U xsrc/external/mit/xkeyboard-config/dist/compile
U xsrc/external/mit/xkeyboard-config/dist/Makefile.am
U xsrc/external/mit/xkeyboard-config/dist/config.rpath
U xsrc/external/mit/xkeyboard-config/dist/AUTHORS
C xsrc/external/mit/xkeyboard-config/dist/configure
U xsrc/external/mit/xkeyboard-config/dist/TODO
U xsrc/external/mit/xkeyboard-config/dist/xkeyboard-config.pc.in
U xsrc/external/mit/xkeyboard-config/dist/NEWS
U xsrc/external/mit/xkeyboard-config/dist/ABOUT-NLS
U xsrc/external/mit/xkeyboard-config/dist/Makefile.in
U xsrc/external/mit/xkeyboard-config/dist/config.sub
U xsrc/external/mit/xkeyboard-config/dist/COPYING
U xsrc/external/mit/xkeyboard-config/dist/missing
U xsrc/external/mit/xkeyboard-config/dist/config.guess
U xsrc/external/mit/xkeyboard-config/dist/configure.ac
U xsrc/external/mit/xkeyboard-config/dist/ChangeLog
U xsrc/external/mit/xkeyboard-config/dist/autogen.sh
U xsrc/external/mit/xkeyboard-config/dist/symbols/gb
U xsrc/external/mit/xkeyboard-config/dist/symbols/eu
U xsrc/external/mit/xkeyboard-config/dist/symbols/trans
U xsrc/external/mit/xkeyboard-config/dist/symbols/tw
U xsrc/external/mit/xkeyboard-config/dist/symbols/uz
U xsrc/external/mit/xkeyboard-config/dist/symbols/tg
U xsrc/external/mit/xkeyboard-config/dist/symbols/ara
U xsrc/external/mit/xkeyboard-config/dist/symbols/capslock
U xsrc/external/mit/xkeyboard-config/dist/symbols/inet
U xsrc/external/mit/xkeyboard-config/dist/symbols/se
U xsrc/external/mit/xkeyboard-config/dist/symbols/fr
U xsrc/external/mit/xkeyboard-config/dist/symbols/eurosign
U xsrc/external/mit/xkeyboard-config/dist/symbols/iq
U xsrc/external/mit/xkeyboard-config/dist/symbols/typo
U xsrc/external/mit/xkeyboard-config/dist/symbols/by
U xsrc/external/mit/xkeyboard-config/dist/symbols/kpdl
U xsrc/external/mit/xkeyboard-config/dist/symbols/az
U xsrc/external/mit/xkeyboard-config/dist/symbols/br
U xsrc/external/mit/xkeyboard-config/dist/symbols/cm
U xsrc/external/mit/xkeyboard-config/dist/symbols/de
U xsrc/external/mit/xkeyboard-config/dist/symbols/kz
U xsrc/external/mit/xkeyboard-config/dist/symbols/tj
C xsrc/external/mit/xkeyboard-config/dist/symbols/Makefile.am
U xsrc/external/mit/xkeyboard-config/dist/symbols/level3
U xsrc/external/mit/xkeyboard-config/dist/symbols/us
U xsrc/external/mit/xkeyboard-config/dist/symbols/es
U xsrc/external/mit/xkeyboard-config/dist/symbols/latam
U xsrc/external/mit/xkeyboard-config/dist/symbols/apl
U xsrc/external/mit/xkeyboard-config/dist/symbols/ph
U xsrc/external/mit/xkeyboard-config/dist/symbols/it
U xsrc/external/mit/xkeyboard-config/dist/symbols/bd
U xsrc/external/mit/xkeyboard-config/dist/symbols/tr
U xsrc/external/mit/xkeyboard-config/dist/symbols/cn
U xsrc/external/mit/xkeyboard-config/dist/symbols/gh
U xsrc/external/mit/xkeyboard-config/dist/symbols/ua
U xsrc/external/mit/xkeyboard-config/dist/symbols/empty
U xsrc/external/mit/xkeyboard-config/dist/symbols/et
U xsrc/external/mit/xkeyboard-config/dist/symbols/bt
U xsrc/external/mit/xkeyboard-config/dist/symbols/kg
U xsrc/external/mit/xkeyboard-config/dist/symbols/is
U xsrc/external/mit/xkeyboard-config/dist/symbols/ee
U xsrc/external/mit/xkeyboard-config/dist/symbols/tz
U xsrc/external/mit/xkeyboard-config/dist/symbols/am
U xsrc/external/mit/xkeyboard-config/dist/symbols/ma
U xsrc/external/mit/xkeyboard-config/dist/symbols/si
U xsrc/external/mit/xkeyboard-config/dist/symbols/ge
U xsrc/external/mit/xkeyboard-config/dist/symbols/id
U xsrc/external/mit/xkeyboard-config/dist/symbols/cz
U xsrc/external/mit/xkeyboard-config/dist/symbols/za
U xsrc/external/mit/xkeyboard-config/dist/symbols/au
U xsrc/external/mit/xkeyboard-config/dist/symbols/srvr_ctrl
U xsrc/external/mit/xkeyboard-config/dist/symbols/keypad
U xsrc/external/mit/xkeyboard-config/dist/symbols/ca
U xsrc/external/mit/xkeyboard-config/dist/symbols/shift
U xsrc/external/mit/xkeyboard-config/dist/symbols/mt
U xsrc/external/mit/xkeyboard-config/dist/symbols/gr
U xsrc/external/mit/xkeyboard-config/dist/symbols/ru
U xsrc/external/mit/xkeyboard-config/dist/symbols/olpc
U xsrc/external/mit/xkeyboard-config/dist/symbols/compose
U xsrc/external/mit/xkeyboard-config/dist/symbols/mm
U xsrc/external/mit/xkeyboard-config/dist/symbols/fi
N xsrc/external/mit/xkeyboard-config/dist/symbols/jv
U xsrc/external/mit/xkeyboard-config/dist/symbols/af
U xsrc/external/mit/xkeyboard-config/dist/symbols/hr
U xsrc/external/mit/xkeyboard-config/dist/symbols/at
U xsrc/external/mit/xkeyboard-config/dist/symbols/fo
U 

CVS commit: xsrc/external/mit/xorg-server/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 11:09:41 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/include: version-config.h

Log Message:
and one more version here too..


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
xsrc/external/mit/xorg-server/include/version-config.h

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/xorg-server/include/version-config.h
diff -u xsrc/external/mit/xorg-server/include/version-config.h:1.9 xsrc/external/mit/xorg-server/include/version-config.h:1.10
--- xsrc/external/mit/xorg-server/include/version-config.h:1.9	Sat Jun  1 06:55:44 2019
+++ xsrc/external/mit/xorg-server/include/version-config.h	Sun Feb 23 11:09:41 2020
@@ -5,13 +5,13 @@
 #define VERSION_CONFIG_H
 
 /* Vendor man version */
-#define VENDOR_MAN_VERSION "Version 1.20.5"
+#define VENDOR_MAN_VERSION "Version 1.20.6"
 
 /* Vendor name */
 /* #define VENDOR_NAME "The X.Org Foundation" */
 
 /* Vendor release */
-#define VENDOR_RELEASE (((1) * 1000) + ((20) * 10) + ((5) * 1000) + 0)
+#define VENDOR_RELEASE (((1) * 1000) + ((20) * 10) + ((6) * 1000) + 0)
 
 #endif /* VERSION_CONFIG_H */
 



CVS commit: xsrc/external/mit/xorg-server/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:58:12 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/include: xorg-server.h

Log Message:
update version here too.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
xsrc/external/mit/xorg-server/include/xorg-server.h

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/xorg-server/include/xorg-server.h
diff -u xsrc/external/mit/xorg-server/include/xorg-server.h:1.19 xsrc/external/mit/xorg-server/include/xorg-server.h:1.20
--- xsrc/external/mit/xorg-server/include/xorg-server.h:1.19	Sat Jun  1 06:55:44 2019
+++ xsrc/external/mit/xorg-server/include/xorg-server.h	Sun Feb 23 10:58:12 2020
@@ -140,7 +140,7 @@
 #define XORGSERVER 1
 
 /* Current Xorg version */
-#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((5) * 1000) + 0)
+#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((6) * 1000) + 0)
 
 /* Build Xv Extension */
 #define XvExtension 1



CVS commit: src/distrib/utils/embedded/conf

2020-02-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb 23 10:56:03 UTC 2020

Modified Files:
src/distrib/utils/embedded/conf: arm64.conf

Log Message:
RPi4 has a different root device, so use config.txt conditionals to load
an alternate cmdline txt file (cmdline-pi4.txt) on these boards.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/utils/embedded/conf/arm64.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/arm64.conf
diff -u src/distrib/utils/embedded/conf/arm64.conf:1.8 src/distrib/utils/embedded/conf/arm64.conf:1.9
--- src/distrib/utils/embedded/conf/arm64.conf:1.8	Mon Dec 16 11:00:30 2019
+++ src/distrib/utils/embedded/conf/arm64.conf	Sun Feb 23 10:56:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: arm64.conf,v 1.8 2019/12/16 11:00:30 skrll Exp $
+# $NetBSD: arm64.conf,v 1.9 2020/02/23 10:56:03 jmcneill Exp $
 # ARM64 customization script used by mkimage
 #
 board=arm64
@@ -73,6 +73,10 @@ populate_rpi() {
 root=ld0a console=${console}
 EOF
 
+	cat > "${mnt}/boot/cmdline-pi4.txt" << EOF
+root=ld1a console=${console}
+EOF
+
 	cat > "${mnt}/boot/config.txt" << EOF
 #
 upstream_kernel=1
@@ -82,6 +86,11 @@ kernel=netbsd.img
 kernel_address=0x20
 enable_uart=1
 force_turbo=0
+#
+[pi4]
+cmdline=cmdline-pi4.txt
+#
+[all]
 EOF
 
 	echo "${bar} installing firmware files ${bar}"



CVS commit: src/distrib/common

2020-02-23 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Feb 23 10:51:12 UTC 2020

Modified Files:
src/distrib/common: mtree.zfsroot zfsroot.rc

Log Message:
ramdisk-zfsroot: We no longer need to have /etc/zfs in mtree

Now that mountall doesn't rely on /etc/zfs/zpool.cache being present.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/mtree.zfsroot \
src/distrib/common/zfsroot.rc

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

Modified files:

Index: src/distrib/common/mtree.zfsroot
diff -u src/distrib/common/mtree.zfsroot:1.2 src/distrib/common/mtree.zfsroot:1.3
--- src/distrib/common/mtree.zfsroot:1.2	Sun Feb 23 05:15:54 2020
+++ src/distrib/common/mtree.zfsroot	Sun Feb 23 10:51:12 2020
@@ -1,7 +1,5 @@
-#	$NetBSD: mtree.zfsroot,v 1.2 2020/02/23 05:15:54 roy Exp $
+#	$NetBSD: mtree.zfsroot,v 1.3 2020/02/23 10:51:12 roy Exp $
 
 .
 ./altroot
-./etc
-./etc/zfs
 ./rpool
Index: src/distrib/common/zfsroot.rc
diff -u src/distrib/common/zfsroot.rc:1.2 src/distrib/common/zfsroot.rc:1.3
--- src/distrib/common/zfsroot.rc:1.2	Sun Feb 23 05:15:54 2020
+++ src/distrib/common/zfsroot.rc	Sun Feb 23 10:51:12 2020
@@ -1,6 +1,6 @@
 #/bin/sh
 #
-#	$NetBSD: zfsroot.rc,v 1.2 2020/02/23 05:15:54 roy Exp $
+#	$NetBSD: zfsroot.rc,v 1.3 2020/02/23 10:51:12 roy Exp $
 
 echo "Starting root on ZFS boot strapper"
 
@@ -46,10 +46,5 @@ echo "Importing $rpool"
 echo "Mounting $rpool/$rroot to /altroot"
 /sbin/mount -t zfs "$rpool/$rroot" /altroot;
 
-# This ensures that rc.d/mountall mounts all ZFS mounts set to automount.
-if [ ! -e /altroot/etc/zfs/zpool.cache ]; then
-	echo >/altroot/etc/zfs/zpool.cache
-fi
-
 echo "Pivoting to /altroot, welcome to root on ZFS"
 /sbin/sysctl -w init.root=/altroot



CVS commit: xsrc/external/mit/xorg-server/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:42:57 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/include: dix-config.h

Log Message:
missed one version update.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 xsrc/external/mit/xorg-server/include/dix-config.h

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/xorg-server/include/dix-config.h
diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.37 xsrc/external/mit/xorg-server/include/dix-config.h:1.38
--- xsrc/external/mit/xorg-server/include/dix-config.h:1.37	Sun Feb 23 10:39:59 2020
+++ xsrc/external/mit/xorg-server/include/dix-config.h	Sun Feb 23 10:42:56 2020
@@ -358,7 +358,7 @@
 #define XINERAMA 1
 
 /* Current Xorg version */
-#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((5) * 1000) + 0)
+#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((6) * 1000) + 0)
 
 /* Build Xv Extension */
 #define XvExtension 1



CVS commit: xsrc/external/mit/xorg-server/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:39:59 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/include: dix-config.h

Log Message:
fix merge botch in previous


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 xsrc/external/mit/xorg-server/include/dix-config.h

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/xorg-server/include/dix-config.h
diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.36 xsrc/external/mit/xorg-server/include/dix-config.h:1.37
--- xsrc/external/mit/xorg-server/include/dix-config.h:1.36	Sun Feb 23 10:26:56 2020
+++ xsrc/external/mit/xorg-server/include/dix-config.h	Sun Feb 23 10:39:59 2020
@@ -137,7 +137,7 @@
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_LINUX_FB_H */
 
-+ /* Define to 1 if you have the `memfd_create' function. */
+/* Define to 1 if you have the `memfd_create' function. */
 /* #undef HAVE_MEMFD_CREATE */
 
 /* Define to 1 if you have the `mkostemp' function. */



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

2020-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 23 10:30:43 UTC 2020

Modified Files:
src/sys/dev/pci/bktr: bktr_core.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/bktr/bktr_core.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/bktr/bktr_core.c
diff -u src/sys/dev/pci/bktr/bktr_core.c:1.56 src/sys/dev/pci/bktr/bktr_core.c:1.57
--- src/sys/dev/pci/bktr/bktr_core.c:1.56	Sun Feb  3 03:19:27 2019
+++ src/sys/dev/pci/bktr/bktr_core.c	Sun Feb 23 10:30:43 2020
@@ -1,6 +1,6 @@
 /* $SourceForge: bktr_core.c,v 1.6 2003/03/11 23:11:22 thomasklausner Exp $ */
 
-/*	$NetBSD: bktr_core.c,v 1.56 2019/02/03 03:19:27 mrg Exp $	*/
+/*	$NetBSD: bktr_core.c,v 1.57 2020/02/23 10:30:43 skrll Exp $	*/
 /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp$ */
 
 /*
@@ -98,7 +98,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.56 2019/02/03 03:19:27 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.57 2020/02/23 10:30:43 skrll Exp $");
 
 #include "opt_bktr.h"		/* Include any kernel config options */
 
@@ -2977,7 +2977,7 @@ rgb_prog(bktr_ptr_t bktr, char i_flag, i
 
 	buffer = target_buffer;
 
-	/* contruct sync : for video packet format */
+	/* construct sync : for video packet format */
 	*dma_prog++ = htole32(OP_SYNC | BKTR_RESYNC | BKTR_FM1);
 
 	/* sync, mode indicator packed data */
@@ -3132,7 +3132,7 @@ yuvpack_prog(bktr_ptr_t bktr, char i_fla
 
 	buffer = target_buffer;
 
-	/* contruct sync : for video packet format */
+	/* construct sync : for video packet format */
 	/* sync, mode indicator packed data */
 	*dma_prog++ = htole32(OP_SYNC | BKTR_RESYNC | BKTR_FM1);
 	*dma_prog++ = htole32(0);  /* NULL WORD */
@@ -3255,7 +3255,7 @@ yuv422_prog(bktr_ptr_t bktr, char i_flag
 
 	t1 = buffer;
 
-	/* contruct sync : for video packet format */
+	/* construct sync : for video packet format */
 	*dma_prog++ = htole32(OP_SYNC | BKTR_RESYNC | BKTR_FM3); /*sync, mode indicator packed data*/
 	*dma_prog++ = htole32(0);  /* NULL WORD */
 



CVS commit: src/share/mk

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 10:28:16 UTC 2020

Modified Files:
src/share/mk: bsd.x11.mk

Log Message:
update for xorg-server 1.20.6.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/share/mk/bsd.x11.mk

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

Modified files:

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.133 src/share/mk/bsd.x11.mk:1.134
--- src/share/mk/bsd.x11.mk:1.133	Fri Sep 13 10:23:07 2019
+++ src/share/mk/bsd.x11.mk	Sun Feb 23 10:28:16 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.133 2019/09/13 10:23:07 maya Exp $
+#	$NetBSD: bsd.x11.mk,v 1.134 2020/02/23 10:28:16 mrg Exp $
 
 .include 
 
@@ -134,7 +134,7 @@ XORG_SERVER_MINOR=	10
 XORG_SERVER_TEENY=	6
 .else
 XORG_SERVER_MINOR=	20
-XORG_SERVER_TEENY=	5
+XORG_SERVER_TEENY=	6
 .endif
   
 XVENDORNAMESHORT=	'"X.Org"'



CVS commit: xsrc/external/mit/xorg-server/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:26:23 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/dist: configure configure.ac
xsrc/external/mit/xorg-server/dist/Xext: shm.c sync.c
xsrc/external/mit/xorg-server/dist/dix: dispatch.c events.c
xsrc/external/mit/xorg-server/dist/glx: glxcmds.c
xsrc/external/mit/xorg-server/dist/hw/xfree86/common: compiler.h
xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting:
driver.h present.c vblank.c
xsrc/external/mit/xorg-server/dist/hw/xfree86/modes: xf86RandR12.c
xsrc/external/mit/xorg-server/dist/include: dix-config.h.in
xsrc/external/mit/xorg-server/dist/mi: miscrinit.c
xsrc/external/mit/xorg-server/dist/os: connection.c
xsrc/external/mit/xorg-server/dist/render: render.c
xsrc/external/mit/xorg-server/dist/xkb: xkb.c

Log Message:
merge xorg-server 1.20.6.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/configure
cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/xorg-server/dist/configure.ac
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xorg-server/dist/Xext/shm.c
cvs rdiff -u -r1.11 -r1.12 xsrc/external/mit/xorg-server/dist/Xext/sync.c
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/dix/dispatch.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xorg-server/dist/dix/events.c
cvs rdiff -u -r1.12 -r1.13 xsrc/external/mit/xorg-server/dist/glx/glxcmds.c
cvs rdiff -u -r1.15 -r1.16 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/driver.h \
xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/present.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/vblank.c
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86RandR12.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/include/dix-config.h.in
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/mi/miscrinit.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/os/connection.c
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/render/render.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/xkb/xkb.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/xorg-server/dist/configure
diff -u xsrc/external/mit/xorg-server/dist/configure:1.6 xsrc/external/mit/xorg-server/dist/configure:1.7
--- xsrc/external/mit/xorg-server/dist/configure:1.6	Sat Jun  1 06:55:44 2019
+++ xsrc/external/mit/xorg-server/dist/configure	Sun Feb 23 10:26:21 2020
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xorg-server 1.20.5.
+# Generated by GNU Autoconf 2.69 for xorg-server 1.20.6.
 #
 # Report bugs to .
 #
@@ -651,8 +651,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xorg-server'
 PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.20.5'
-PACKAGE_STRING='xorg-server 1.20.5'
+PACKAGE_VERSION='1.20.6'
+PACKAGE_STRING='xorg-server 1.20.6'
 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues'
 PACKAGE_URL=''
 
@@ -1383,7 +1383,6 @@ enable_local_transport
 enable_secure_rpc
 enable_input_thread
 with_systemd_daemon
-with_shared_memory_dir
 enable_xtrans_send_fds
 with_xkb_bin_directory
 with_sha1
@@ -2033,7 +2032,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xorg-server 1.20.5 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.20.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2103,7 +2102,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of xorg-server 1.20.5:";;
+ short | recursive ) echo "Configuration of xorg-server 1.20.6:";;
esac
   cat <<\_ACEOF
 
@@ -2294,10 +2293,10 @@ Optional Packages:
   org.x)
   --with-bundle-version=VERSION
   Version to use for X11.app's CFBundleVersion
-  (default: 1.20.5)
+  (default: 1.20.6)
   --with-bundle-version-string=VERSION
   Version to use for X11.app's
-  CFBundleShortVersionString (default: 1.20.5)
+  CFBundleShortVersionString (default: 1.20.6)
   --with-sparkle-feed-url=URL
   URL for the Sparkle feed (default:
   

CVS commit: xsrc/external/mit/xorg-server/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:26:56 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/include: dix-config.h xf86Build.h
xorg-config.h

Log Message:
updates for xorg-server 1.20.6.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 xsrc/external/mit/xorg-server/include/dix-config.h
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xorg-server/include/xf86Build.h
cvs rdiff -u -r1.19 -r1.20 \
xsrc/external/mit/xorg-server/include/xorg-config.h

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/xorg-server/include/dix-config.h
diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.35 xsrc/external/mit/xorg-server/include/dix-config.h:1.36
--- xsrc/external/mit/xorg-server/include/dix-config.h:1.35	Sat Jun  1 06:55:44 2019
+++ xsrc/external/mit/xorg-server/include/dix-config.h	Sun Feb 23 10:26:56 2020
@@ -137,6 +137,9 @@
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_LINUX_FB_H */
 
++ /* Define to 1 if you have the `memfd_create' function. */
+/* #undef HAVE_MEMFD_CREATE */
+
 /* Define to 1 if you have the `mkostemp' function. */
 #define HAVE_MKOSTEMP 1
 
@@ -473,9 +476,6 @@
 /* Wrap SIGBUS to catch MIT-SHM faults */
 #define BUSFAULT 1
 
-/* Directory for shared memory temp files */
-#define SHMDIR "/var/shm"
-
 /* Don't let Xdefs.h define 'pointer' */
 #define _XTYPEDEF_POINTER
 
@@ -532,4 +532,7 @@
 /* Have epoll_create1() */
 /* #undef HAVE_EPOLL_CREATE1 */
 
+/* Have isastream */
+/* #undef HAVE_ISASTREAM */
+
 #endif /* _DIX_CONFIG_H_ */

Index: xsrc/external/mit/xorg-server/include/xf86Build.h
diff -u xsrc/external/mit/xorg-server/include/xf86Build.h:1.10 xsrc/external/mit/xorg-server/include/xf86Build.h:1.11
--- xsrc/external/mit/xorg-server/include/xf86Build.h:1.10	Sun Mar  3 22:43:54 2019
+++ xsrc/external/mit/xorg-server/include/xf86Build.h	Sun Feb 23 10:26:56 2020
@@ -1,2 +1,2 @@
-#define BUILD_DATE 20190303
+#define BUILD_DATE 20200223
 #define BUILD_TIME 71123

Index: xsrc/external/mit/xorg-server/include/xorg-config.h
diff -u xsrc/external/mit/xorg-server/include/xorg-config.h:1.19 xsrc/external/mit/xorg-server/include/xorg-config.h:1.20
--- xsrc/external/mit/xorg-server/include/xorg-config.h:1.19	Sat Jun  1 06:55:44 2019
+++ xsrc/external/mit/xorg-server/include/xorg-config.h	Sun Feb 23 10:26:56 2020
@@ -17,7 +17,7 @@
 #define XORGSERVER 1
 
 /* Current X.Org version. */
-#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((5) * 1000) + 0)
+#define XORG_VERSION_CURRENT (((1) * 1000) + ((20) * 10) + ((6) * 1000) + 0)
 
 /* Name of X server. */
 #define __XSERVERNAME__ "Xorg"



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

2020-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Feb 23 10:22:07 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
type in comment


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.392 src/sys/arch/arm/arm32/pmap.c:1.393
--- src/sys/arch/arm/arm32/pmap.c:1.392	Wed Feb 12 17:36:41 2020
+++ src/sys/arch/arm/arm32/pmap.c	Sun Feb 23 10:22:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.392 2020/02/12 17:36:41 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.393 2020/02/23 10:22:07 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -198,7 +198,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.392 2020/02/12 17:36:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.393 2020/02/23 10:22:07 skrll Exp $");
 
 #include 
 #include 
@@ -6730,7 +6730,7 @@ pmap_postinit(void)
  * find them as necessary.
  *
  * Note that the data on this list MUST remain valid after initarm() returns,
- * as pmap_bootstrap() uses it to contruct L2 table metadata.
+ * as pmap_bootstrap() uses it to construct L2 table metadata.
  */
 SLIST_HEAD(, pv_addr) kernel_pt_list = SLIST_HEAD_INITIALIZER(kernel_pt_list);
 



CVS import: xsrc/external/mit/xorg-server/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:17:51 UTC 2020

Update of /cvsroot/xsrc/external/mit/xorg-server/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv26097

Log Message:
initial import of xorg-server-1.20.6

Status:

Vendor Tag: xorg
Release Tags:   xorg-server-1-20-6

U xsrc/external/mit/xorg-server/dist/Makefile.am
C xsrc/external/mit/xorg-server/dist/configure.ac
U xsrc/external/mit/xorg-server/dist/config.sub
U xsrc/external/mit/xorg-server/dist/missing
U xsrc/external/mit/xorg-server/dist/README.md
U xsrc/external/mit/xorg-server/dist/ltmain.sh
U xsrc/external/mit/xorg-server/dist/xorg-server.m4
U xsrc/external/mit/xorg-server/dist/config.guess
U xsrc/external/mit/xorg-server/dist/xorg-server.pc.in
U xsrc/external/mit/xorg-server/dist/COPYING
U xsrc/external/mit/xorg-server/dist/test-driver
U xsrc/external/mit/xorg-server/dist/compile
U xsrc/external/mit/xorg-server/dist/depcomp
U xsrc/external/mit/xorg-server/dist/INSTALL
U xsrc/external/mit/xorg-server/dist/Makefile.in
U xsrc/external/mit/xorg-server/dist/install-sh
U xsrc/external/mit/xorg-server/dist/manpages.am
C xsrc/external/mit/xorg-server/dist/configure
U xsrc/external/mit/xorg-server/dist/ylwrap
U xsrc/external/mit/xorg-server/dist/docbook.am
U xsrc/external/mit/xorg-server/dist/aclocal.m4
U xsrc/external/mit/xorg-server/dist/devbook.am
U xsrc/external/mit/xorg-server/dist/meson_options.txt
U xsrc/external/mit/xorg-server/dist/xserver.ent.in
U xsrc/external/mit/xorg-server/dist/autogen.sh
U xsrc/external/mit/xorg-server/dist/meson.build
U xsrc/external/mit/xorg-server/dist/ChangeLog
U xsrc/external/mit/xorg-server/dist/config/config-backends.h
U xsrc/external/mit/xorg-server/dist/config/Makefile.am
U xsrc/external/mit/xorg-server/dist/config/dbus-core.c
U xsrc/external/mit/xorg-server/dist/config/10-quirks.conf
U xsrc/external/mit/xorg-server/dist/config/fdi2iclass.py
U xsrc/external/mit/xorg-server/dist/config/x11-input.fdi
U xsrc/external/mit/xorg-server/dist/config/wscons.c
U xsrc/external/mit/xorg-server/dist/config/Makefile.in
U xsrc/external/mit/xorg-server/dist/config/hal.c
U xsrc/external/mit/xorg-server/dist/config/config.c
U xsrc/external/mit/xorg-server/dist/config/udev.c
U xsrc/external/mit/xorg-server/dist/config/meson.build
U xsrc/external/mit/xorg-server/dist/mi/mipolyseg.c
U xsrc/external/mit/xorg-server/dist/mi/mizerline.c
U xsrc/external/mit/xorg-server/dist/mi/misprite.h
U xsrc/external/mit/xorg-server/dist/mi/Makefile.am
U xsrc/external/mit/xorg-server/dist/mi/mioverlay.c
U xsrc/external/mit/xorg-server/dist/mi/micmap.h
U xsrc/external/mit/xorg-server/dist/mi/mieq.c
U xsrc/external/mit/xorg-server/dist/mi/mivalidate.h
U xsrc/external/mit/xorg-server/dist/mi/mipushpxl.c
U xsrc/external/mit/xorg-server/dist/mi/mibitblt.c
U xsrc/external/mit/xorg-server/dist/mi/miarc.c
U xsrc/external/mit/xorg-server/dist/mi/mi.h
U xsrc/external/mit/xorg-server/dist/mi/midispcur.c
U xsrc/external/mit/xorg-server/dist/mi/mifillarc.h
U xsrc/external/mit/xorg-server/dist/mi/miscanfill.h
U xsrc/external/mit/xorg-server/dist/mi/mipointer.c
U xsrc/external/mit/xorg-server/dist/mi/micoord.h
U xsrc/external/mit/xorg-server/dist/mi/miglblt.c
U xsrc/external/mit/xorg-server/dist/mi/mioverlay.h
C xsrc/external/mit/xorg-server/dist/mi/miscrinit.c
U xsrc/external/mit/xorg-server/dist/mi/mivaltree.c
U xsrc/external/mit/xorg-server/dist/mi/mizerclip.c
U xsrc/external/mit/xorg-server/dist/mi/mifpoly.h
U xsrc/external/mit/xorg-server/dist/mi/midash.c
U xsrc/external/mit/xorg-server/dist/mi/miinitext.c
U xsrc/external/mit/xorg-server/dist/mi/miexpose.c
U xsrc/external/mit/xorg-server/dist/mi/mifillarc.c
U xsrc/external/mit/xorg-server/dist/mi/mipolypnt.c
U xsrc/external/mit/xorg-server/dist/mi/mipolytext.c
U xsrc/external/mit/xorg-server/dist/mi/misprite.c
U xsrc/external/mit/xorg-server/dist/mi/mizerarc.c
U xsrc/external/mit/xorg-server/dist/mi/Makefile.in
U xsrc/external/mit/xorg-server/dist/mi/migc.c
U xsrc/external/mit/xorg-server/dist/mi/micmap.c
U xsrc/external/mit/xorg-server/dist/mi/mipolyrect.c
U xsrc/external/mit/xorg-server/dist/mi/miwindow.c
U xsrc/external/mit/xorg-server/dist/mi/mizerarc.h
U xsrc/external/mit/xorg-server/dist/mi/miwideline.h
U xsrc/external/mit/xorg-server/dist/mi/mipointer.h
U xsrc/external/mit/xorg-server/dist/mi/mipoly.h
U xsrc/external/mit/xorg-server/dist/mi/mipoly.c
U xsrc/external/mit/xorg-server/dist/mi/micopy.c
U xsrc/external/mit/xorg-server/dist/mi/miline.h
U xsrc/external/mit/xorg-server/dist/mi/migc.h
U xsrc/external/mit/xorg-server/dist/mi/miwideline.c
U xsrc/external/mit/xorg-server/dist/mi/meson.build
U xsrc/external/mit/xorg-server/dist/mi/mifillrct.c
U xsrc/external/mit/xorg-server/dist/mi/mipointrst.h
U xsrc/external/mit/xorg-server/dist/mi/mistruct.h
U xsrc/external/mit/xorg-server/dist/glamor/glamor_trapezoid.c
U xsrc/external/mit/xorg-server/dist/glamor/glamor_segs.c
U xsrc/external/mit/xorg-server/dist/glamor/glamor_window.c
U 

CVS commit: xsrc/external/mit

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:10:10 UTC 2020

Removed Files:
xsrc/external/mit/font-util/dist: README
xsrc/external/mit/fonttosfnt/dist: README

Log Message:
merge font-util 1.3.2 and fonttosfnt 1.1.0.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 xsrc/external/mit/font-util/dist/README
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/fonttosfnt/dist/README

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



CVS import: xsrc/external/mit/font-util/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:08:50 UTC 2020

Update of /cvsroot/xsrc/external/mit/font-util/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29657

Log Message:
initial import of font-util-1.3.2

Status:

Vendor Tag: xorg
Release Tags:   font-util-1-3-2

U xsrc/external/mit/font-util/dist/compile
U xsrc/external/mit/font-util/dist/Makefile.am
U xsrc/external/mit/font-util/dist/configure.ac
U xsrc/external/mit/font-util/dist/map-ISO8859-10
U xsrc/external/mit/font-util/dist/bdftruncate.c
U xsrc/external/mit/font-util/dist/map-ISO8859-7
U xsrc/external/mit/font-util/dist/COPYING
U xsrc/external/mit/font-util/dist/missing
U xsrc/external/mit/font-util/dist/depcomp
U xsrc/external/mit/font-util/dist/fontutil.pc.in
U xsrc/external/mit/font-util/dist/Makefile.in
U xsrc/external/mit/font-util/dist/map-ISO8859-14
U xsrc/external/mit/font-util/dist/map-ISO8859-3
U xsrc/external/mit/font-util/dist/map-ISO8859-9
U xsrc/external/mit/font-util/dist/map-KOI8-R
U xsrc/external/mit/font-util/dist/map-ISO8859-4
U xsrc/external/mit/font-util/dist/config.sub
U xsrc/external/mit/font-util/dist/map-ISO8859-13
U xsrc/external/mit/font-util/dist/ucs2any.c
U xsrc/external/mit/font-util/dist/configure
U xsrc/external/mit/font-util/dist/INSTALL
U xsrc/external/mit/font-util/dist/map-JISX0201.1976-0
U xsrc/external/mit/font-util/dist/map-ISO8859-11
U xsrc/external/mit/font-util/dist/map-ISO8859-6
N xsrc/external/mit/font-util/dist/README.md
U xsrc/external/mit/font-util/dist/map-ISO8859-1
U xsrc/external/mit/font-util/dist/map-ISO8859-16
U xsrc/external/mit/font-util/dist/fontutil.m4.in
U xsrc/external/mit/font-util/dist/ChangeLog
U xsrc/external/mit/font-util/dist/aclocal.m4
U xsrc/external/mit/font-util/dist/config.guess
U xsrc/external/mit/font-util/dist/map-ISO8859-5
U xsrc/external/mit/font-util/dist/install-sh
U xsrc/external/mit/font-util/dist/map-ISO8859-15
U xsrc/external/mit/font-util/dist/map-ISO8859-8
U xsrc/external/mit/font-util/dist/map-ISO8859-2
U xsrc/external/mit/font-util/dist/config.h.in
U xsrc/external/mit/font-util/dist/man/Makefile.in
U xsrc/external/mit/font-util/dist/man/bdftruncate.man
U xsrc/external/mit/font-util/dist/man/Makefile.am
U xsrc/external/mit/font-util/dist/man/ucs2any.man

No conflicts created by this import



CVS import: xsrc/external/mit/fonttosfnt/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 10:08:51 UTC 2020

Update of /cvsroot/xsrc/external/mit/fonttosfnt/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv4539

Log Message:
initial import of fonttosfnt-1.1.0

Status:

Vendor Tag: xorg
Release Tags:   fonttosfnt-1-1-0

U xsrc/external/mit/fonttosfnt/dist/configure
U xsrc/external/mit/fonttosfnt/dist/config.sub
U xsrc/external/mit/fonttosfnt/dist/configure.ac
U xsrc/external/mit/fonttosfnt/dist/fonttosfnt.c
U xsrc/external/mit/fonttosfnt/dist/env.c
C xsrc/external/mit/fonttosfnt/dist/struct.c
U xsrc/external/mit/fonttosfnt/dist/util.c
U xsrc/external/mit/fonttosfnt/dist/ChangeLog
N xsrc/external/mit/fonttosfnt/dist/README.md
U xsrc/external/mit/fonttosfnt/dist/aclocal.m4
U xsrc/external/mit/fonttosfnt/dist/Makefile.in
U xsrc/external/mit/fonttosfnt/dist/fonttosfnt.h
U xsrc/external/mit/fonttosfnt/dist/COPYING
U xsrc/external/mit/fonttosfnt/dist/config.guess
U xsrc/external/mit/fonttosfnt/dist/install-sh
U xsrc/external/mit/fonttosfnt/dist/missing
U xsrc/external/mit/fonttosfnt/dist/Makefile.am
U xsrc/external/mit/fonttosfnt/dist/depcomp
U xsrc/external/mit/fonttosfnt/dist/INSTALL
U xsrc/external/mit/fonttosfnt/dist/compile
U xsrc/external/mit/fonttosfnt/dist/read.c
U xsrc/external/mit/fonttosfnt/dist/write.c
U xsrc/external/mit/fonttosfnt/dist/config.h.in
U xsrc/external/mit/fonttosfnt/dist/man/fonttosfnt.man
U xsrc/external/mit/fonttosfnt/dist/man/Makefile.in
U xsrc/external/mit/fonttosfnt/dist/man/Makefile.am

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jxorg:yesterday -jxorg xsrc/external/mit/fonttosfnt/dist



CVS commit: xsrc/external/mit/libdrm/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:59:00 UTC 2020

Modified Files:
xsrc/external/mit/libdrm/dist: xf86drm.c xf86drm.h

Log Message:
merge libdrm 2.4.100 and libpciaccess 0.16.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 xsrc/external/mit/libdrm/dist/xf86drm.c
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/libdrm/dist/xf86drm.h

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/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.24 xsrc/external/mit/libdrm/dist/xf86drm.c:1.25
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.24	Mon Jul 15 05:42:34 2019
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Feb 23 09:59:00 2020
@@ -71,16 +71,6 @@
 
 #include "util_math.h"
 
-#ifdef __OpenBSD__
-#define DRM_PRIMARY_MINOR_NAME  "drm"
-#define DRM_CONTROL_MINOR_NAME  "drmC"
-#define DRM_RENDER_MINOR_NAME   "drmR"
-#else
-#define DRM_PRIMARY_MINOR_NAME  "card"
-#define DRM_CONTROL_MINOR_NAME  "controlD"
-#define DRM_RENDER_MINOR_NAME   "renderD"
-#endif
-
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #define DRM_MAJOR 145
 #endif
@@ -314,6 +304,19 @@ static int chown_check_return(const char
 }
 #endif
 
+static const char *drmGetDeviceName(int type)
+{
+switch (type) {
+case DRM_NODE_PRIMARY:
+return DRM_DEV_NAME;
+case DRM_NODE_CONTROL:
+return DRM_CONTROL_DEV_NAME;
+case DRM_NODE_RENDER:
+return DRM_RENDER_DEV_NAME;
+}
+return NULL;
+}
+
 /**
  * Open the DRM device, creating it if necessary.
  *
@@ -330,8 +333,8 @@ static int chown_check_return(const char
 static int drmOpenDevice(dev_t dev, int minor, int type)
 {
 stat_t  st;
-const char  *dev_name;
-charbuf[64];
+const char  *dev_name = drmGetDeviceName(type);
+charbuf[DRM_NODE_NAME_MAX];
 int fd;
 mode_t  devmode = DRM_DEV_MODE, serv_mode;
 gid_t   serv_group;
@@ -341,19 +344,8 @@ static int drmOpenDevice(dev_t dev, int 
 gid_t   group   = DRM_DEV_GID;
 #endif
 
-switch (type) {
-case DRM_NODE_PRIMARY:
-dev_name = DRM_DEV_NAME;
-break;
-case DRM_NODE_CONTROL:
-dev_name = DRM_CONTROL_DEV_NAME;
-break;
-case DRM_NODE_RENDER:
-dev_name = DRM_RENDER_DEV_NAME;
-break;
-default:
+if (!dev_name)
 return -EINVAL;
-};
 
 sprintf(buf, dev_name, DRM_DIR_NAME, minor);
 drmMsg("drmOpenDevice: node name is %s\n", buf);
@@ -459,25 +451,14 @@ wait_for_udev:
 static int drmOpenMinor(int minor, int create, int type)
 {
 int  fd;
-char buf[64];
-const char *dev_name;
+char buf[DRM_NODE_NAME_MAX];
+const char *dev_name = drmGetDeviceName(type);
 
 if (create)
 return drmOpenDevice(makedev(DRM_MAJOR, minor), minor, type);
 
-switch (type) {
-case DRM_NODE_PRIMARY:
-dev_name = DRM_DEV_NAME;
-break;
-case DRM_NODE_CONTROL:
-dev_name = DRM_CONTROL_DEV_NAME;
-break;
-case DRM_NODE_RENDER:
-dev_name = DRM_RENDER_DEV_NAME;
-break;
-default:
+if (!dev_name)
 return -EINVAL;
-};
 
 sprintf(buf, dev_name, DRM_DIR_NAME, minor);
 if ((fd = open(buf, O_RDWR | O_CLOEXEC, 0)) >= 0)
@@ -2906,9 +2887,9 @@ static char *drmGetMinorNameForFD(int fd
 #else
 struct stat sbuf;
 char buf[PATH_MAX + 1];
-const char *dev_name;
+const char *dev_name = drmGetDeviceName(type);
 unsigned int maj, min;
-int n, base;
+int n;
 
 if (fstat(fd, ))
 return NULL;
@@ -2919,25 +2900,10 @@ static char *drmGetMinorNameForFD(int fd
 if (!drmNodeIsDRM(maj, min) || !S_ISCHR(sbuf.st_mode))
 return NULL;
 
-switch (type) {
-case DRM_NODE_PRIMARY:
-dev_name = DRM_DEV_NAME;
-break;
-case DRM_NODE_CONTROL:
-dev_name = DRM_CONTROL_DEV_NAME;
-break;
-case DRM_NODE_RENDER:
-dev_name = DRM_RENDER_DEV_NAME;
-break;
-default:
-return NULL;
-};
-
-base = drmGetMinorBase(type);
-if (base < 0)
+if (!dev_name)
 return NULL;
 
-n = snprintf(buf, sizeof(buf), dev_name, DRM_DIR_NAME, min - base);
+n = snprintf(buf, sizeof(buf), dev_name, DRM_DIR_NAME, min);
 if (n == -1 || n >= sizeof(buf))
 return NULL;
 
@@ -3271,10 +3237,6 @@ drm_public int drmDevicesEqual(drmDevice
 
 static int drmGetNodeType(const char *name)
 {
-if (strncmp(name, DRM_PRIMARY_MINOR_NAME,
-sizeof(DRM_PRIMARY_MINOR_NAME) - 1) == 0)
-return DRM_NODE_PRIMARY;
-
 if (strncmp(name, DRM_CONTROL_MINOR_NAME,
 sizeof(DRM_CONTROL_MINOR_NAME ) - 1) == 0)
 return DRM_NODE_CONTROL;
@@ -3283,6 +3245,10 @@ static int drmGetNodeType(const char *na
 sizeof(DRM_RENDER_MINOR_NAME) - 1) == 

CVS import: xsrc/external/mit/libpciaccess/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:57:48 UTC 2020

Update of /cvsroot/xsrc/external/mit/libpciaccess/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv9897

Log Message:
initial import of libpciaccess-0.16

Status:

Vendor Tag: xorg
Release Tags:   libpciaccess-0-16

U xsrc/external/mit/libpciaccess/dist/Makefile.am
U xsrc/external/mit/libpciaccess/dist/configure
U xsrc/external/mit/libpciaccess/dist/configure.ac
U xsrc/external/mit/libpciaccess/dist/aclocal.m4
U xsrc/external/mit/libpciaccess/dist/Makefile.in
U xsrc/external/mit/libpciaccess/dist/config.h.in
U xsrc/external/mit/libpciaccess/dist/pciaccess.pc.in
U xsrc/external/mit/libpciaccess/dist/AUTHORS
U xsrc/external/mit/libpciaccess/dist/COPYING
U xsrc/external/mit/libpciaccess/dist/ChangeLog
U xsrc/external/mit/libpciaccess/dist/INSTALL
U xsrc/external/mit/libpciaccess/dist/compile
U xsrc/external/mit/libpciaccess/dist/config.guess
U xsrc/external/mit/libpciaccess/dist/config.sub
U xsrc/external/mit/libpciaccess/dist/install-sh
U xsrc/external/mit/libpciaccess/dist/ltmain.sh
U xsrc/external/mit/libpciaccess/dist/missing
U xsrc/external/mit/libpciaccess/dist/README.md
U xsrc/external/mit/libpciaccess/dist/depcomp
U xsrc/external/mit/libpciaccess/dist/m4/ax_define_dir.m4
U xsrc/external/mit/libpciaccess/dist/m4/libtool.m4
U xsrc/external/mit/libpciaccess/dist/m4/ltoptions.m4
U xsrc/external/mit/libpciaccess/dist/m4/ltsugar.m4
U xsrc/external/mit/libpciaccess/dist/m4/ltversion.m4
U xsrc/external/mit/libpciaccess/dist/m4/lt~obsolete.m4
U xsrc/external/mit/libpciaccess/dist/include/Makefile.am
U xsrc/external/mit/libpciaccess/dist/include/pciaccess.h
U xsrc/external/mit/libpciaccess/dist/include/Makefile.in
U xsrc/external/mit/libpciaccess/dist/man/Makefile.am
U xsrc/external/mit/libpciaccess/dist/man/Makefile.in
U xsrc/external/mit/libpciaccess/dist/man/scanpci.man
U xsrc/external/mit/libpciaccess/dist/src/Makefile.am
U xsrc/external/mit/libpciaccess/dist/src/Makefile.in
U xsrc/external/mit/libpciaccess/dist/src/common_bridge.c
U xsrc/external/mit/libpciaccess/dist/src/common_iterator.c
U xsrc/external/mit/libpciaccess/dist/src/common_init.c
U xsrc/external/mit/libpciaccess/dist/src/common_interface.c
U xsrc/external/mit/libpciaccess/dist/src/common_io.c
U xsrc/external/mit/libpciaccess/dist/src/common_capability.c
U xsrc/external/mit/libpciaccess/dist/src/common_device_name.c
U xsrc/external/mit/libpciaccess/dist/src/common_map.c
U xsrc/external/mit/libpciaccess/dist/src/pciaccess_private.h
U xsrc/external/mit/libpciaccess/dist/src/common_vgaarb_stub.c
U xsrc/external/mit/libpciaccess/dist/src/common_vgaarb.c
U xsrc/external/mit/libpciaccess/dist/src/x86_pci.c
U xsrc/external/mit/libpciaccess/dist/src/x86_pci.h
U xsrc/external/mit/libpciaccess/dist/src/freebsd_pci.c
U xsrc/external/mit/libpciaccess/dist/src/hurd_pci.c
U xsrc/external/mit/libpciaccess/dist/src/linux_sysfs.c
U xsrc/external/mit/libpciaccess/dist/src/linux_devmem.c
U xsrc/external/mit/libpciaccess/dist/src/linux_devmem.h
U xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
U xsrc/external/mit/libpciaccess/dist/src/openbsd_pci.c
U xsrc/external/mit/libpciaccess/dist/src/solx_devfs.c
U xsrc/external/mit/libpciaccess/dist/src/pci_tools.h
U xsrc/external/mit/libpciaccess/dist/scanpci/Makefile.am
U xsrc/external/mit/libpciaccess/dist/scanpci/Makefile.in
U xsrc/external/mit/libpciaccess/dist/scanpci/scanpci.c

No conflicts created by this import



CVS import: xsrc/external/mit/libdrm/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:57:45 UTC 2020

Update of /cvsroot/xsrc/external/mit/libdrm/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv10702

Log Message:
initial import of libdrm-2.4.100

Status:

Vendor Tag: xorg
Release Tags:   libdrm-2-4-100

U xsrc/external/mit/libdrm/dist/meson_options.txt
U xsrc/external/mit/libdrm/dist/libsync.h
U xsrc/external/mit/libdrm/dist/xf86atomic.h
U xsrc/external/mit/libdrm/dist/util_math.h
U xsrc/external/mit/libdrm/dist/util_double_list.h
U xsrc/external/mit/libdrm/dist/libdrm.pc.in
C xsrc/external/mit/libdrm/dist/xf86drm.c
U xsrc/external/mit/libdrm/dist/xf86drmHash.c
U xsrc/external/mit/libdrm/dist/config.h.in
U xsrc/external/mit/libdrm/dist/aclocal.m4
U xsrc/external/mit/libdrm/dist/xf86drmMode.c
U xsrc/external/mit/libdrm/dist/Makefile.sources
U xsrc/external/mit/libdrm/dist/xf86drmRandom.c
U xsrc/external/mit/libdrm/dist/meson.build
U xsrc/external/mit/libdrm/dist/libdrm_lists.h
U xsrc/external/mit/libdrm/dist/configure.ac
U xsrc/external/mit/libdrm/dist/xf86drmSL.c
U xsrc/external/mit/libdrm/dist/xf86drmMode.h
U xsrc/external/mit/libdrm/dist/Makefile.am
C xsrc/external/mit/libdrm/dist/xf86drm.h
U xsrc/external/mit/libdrm/dist/configure
U xsrc/external/mit/libdrm/dist/Makefile.in
U xsrc/external/mit/libdrm/dist/xf86drmRandom.h
U xsrc/external/mit/libdrm/dist/xf86drmHash.h
U xsrc/external/mit/libdrm/dist/libdrm_macros.h
U xsrc/external/mit/libdrm/dist/build-aux/config.guess
U xsrc/external/mit/libdrm/dist/build-aux/install-sh
U xsrc/external/mit/libdrm/dist/build-aux/config.sub
U xsrc/external/mit/libdrm/dist/build-aux/depcomp
U xsrc/external/mit/libdrm/dist/build-aux/compile
U xsrc/external/mit/libdrm/dist/build-aux/test-driver
U xsrc/external/mit/libdrm/dist/build-aux/ltmain.sh
U xsrc/external/mit/libdrm/dist/build-aux/missing
U xsrc/external/mit/libdrm/dist/tegra/tegra.c
U xsrc/external/mit/libdrm/dist/tegra/tegra-symbol-check
U xsrc/external/mit/libdrm/dist/tegra/tegra.h
U xsrc/external/mit/libdrm/dist/tegra/libdrm_tegra.pc.in
U xsrc/external/mit/libdrm/dist/tegra/meson.build
U xsrc/external/mit/libdrm/dist/tegra/Makefile.am
U xsrc/external/mit/libdrm/dist/tegra/private.h
U xsrc/external/mit/libdrm/dist/tegra/Makefile.in
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_internal.h
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_asic_id.c
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_vamgr.c
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_bo.c
U xsrc/external/mit/libdrm/dist/amdgpu/Makefile.sources
U xsrc/external/mit/libdrm/dist/amdgpu/libdrm_amdgpu.pc.in
U xsrc/external/mit/libdrm/dist/amdgpu/meson.build
U xsrc/external/mit/libdrm/dist/amdgpu/Makefile.am
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_device.c
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_gpu_info.c
U xsrc/external/mit/libdrm/dist/amdgpu/Makefile.in
U xsrc/external/mit/libdrm/dist/amdgpu/handle_table.c
U xsrc/external/mit/libdrm/dist/amdgpu/handle_table.h
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu.h
U xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_vm.c
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_device.c
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_bo.c
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_priv.h
U xsrc/external/mit/libdrm/dist/freedreno/freedreno-symbol-check
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_bo_cache.c
U xsrc/external/mit/libdrm/dist/freedreno/Makefile.sources
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_ringbuffer.h
U xsrc/external/mit/libdrm/dist/freedreno/libdrm_freedreno.pc.in
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_ringbuffer.c
U xsrc/external/mit/libdrm/dist/freedreno/meson.build
U xsrc/external/mit/libdrm/dist/freedreno/Makefile.am
U xsrc/external/mit/libdrm/dist/freedreno/Makefile.in
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_drmif.h
U xsrc/external/mit/libdrm/dist/freedreno/freedreno_pipe.c
U xsrc/external/mit/libdrm/dist/freedreno/msm/msm_bo.c
U xsrc/external/mit/libdrm/dist/freedreno/msm/msm_pipe.c
U xsrc/external/mit/libdrm/dist/freedreno/msm/msm_device.c
U xsrc/external/mit/libdrm/dist/freedreno/msm/msm_priv.h
U xsrc/external/mit/libdrm/dist/freedreno/msm/msm_ringbuffer.c
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_device.c
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/msm_kgsl.h
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_priv.h
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_bo.c
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_drm.h
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_ringbuffer.c
U xsrc/external/mit/libdrm/dist/freedreno/kgsl/kgsl_pipe.c
U xsrc/external/mit/libdrm/dist/include/drm/README
U xsrc/external/mit/libdrm/dist/include/drm/i915_drm.h
U xsrc/external/mit/libdrm/dist/include/drm/drm.h
U xsrc/external/mit/libdrm/dist/include/drm/qxl_drm.h
U xsrc/external/mit/libdrm/dist/include/drm/sis_drm.h
U 

CVS commit: src/lib/libc/stdlib

2020-02-23 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Feb 23 09:53:42 UTC 2020

Modified Files:
src/lib/libc/stdlib: _rand48.c

Log Message:
Change the previous cast from unsigned int to unsigned long

This code produces the same result and is consistent with the previous
lines. Only the least significant 16 bites (unsigned short) are meaningful.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/_rand48.c

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

Modified files:

Index: src/lib/libc/stdlib/_rand48.c
diff -u src/lib/libc/stdlib/_rand48.c:1.9 src/lib/libc/stdlib/_rand48.c:1.10
--- src/lib/libc/stdlib/_rand48.c:1.9	Sat Feb 22 14:07:57 2020
+++ src/lib/libc/stdlib/_rand48.c	Sun Feb 23 09:53:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _rand48.c,v 1.9 2020/02/22 14:07:57 kamil Exp $	*/
+/*	$NetBSD: _rand48.c,v 1.10 2020/02/23 09:53:42 kamil Exp $	*/
 
 /*
  * Copyright (c) 1993 Martin Birgmeier
@@ -15,7 +15,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _rand48.c,v 1.9 2020/02/22 14:07:57 kamil Exp $");
+__RCSID("$NetBSD: _rand48.c,v 1.10 2020/02/23 09:53:42 kamil Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -50,9 +50,9 @@ __dorand48(unsigned short xseed[3])
 	accu += (unsigned long) __rand48_mult[1] * (unsigned long) xseed[0];
 	temp[1] = (unsigned short) accu;	/* middle 16 bits */
 	accu >>= sizeof(unsigned short) * 8;
-	accu += (unsigned int) __rand48_mult[0] * (unsigned int) xseed[2];
-	accu += (unsigned int) __rand48_mult[1] * (unsigned int) xseed[1];
-	accu += (unsigned int) __rand48_mult[2] * (unsigned int) xseed[0];
+	accu += (unsigned long) __rand48_mult[0] * (unsigned long) xseed[2];
+	accu += (unsigned long) __rand48_mult[1] * (unsigned long) xseed[1];
+	accu += (unsigned long) __rand48_mult[2] * (unsigned long) xseed[0];
 	xseed[0] = temp[0];
 	xseed[1] = temp[1];
 	xseed[2] = (unsigned short) accu;



CVS commit: xsrc/external/mit

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:37:53 UTC 2020

Modified Files:
xsrc/external/mit/xkbprint/dist: compile
Removed Files:
xsrc/external/mit/viewres/dist: README
xsrc/external/mit/xkbprint/dist: README

Log Message:
merge viewres 1.0.6 and xkbprint 1.0.5.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/viewres/dist/README
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/xkbprint/dist/README
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xkbprint/dist/compile

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/xkbprint/dist/compile
diff -u xsrc/external/mit/xkbprint/dist/compile:1.3 xsrc/external/mit/xkbprint/dist/compile:1.4
--- xsrc/external/mit/xkbprint/dist/compile:1.3	Sun Jul 19 22:41:59 2015
+++ xsrc/external/mit/xkbprint/dist/compile	Sun Feb 23 09:37:52 2020
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 # Written by Tom Tromey .
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
+# along with this program.  If not, see .
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -255,7 +255,8 @@ EOF
 echo "compile $scriptversion"
 exit $?
 ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
 func_cl_wrapper "$@"  # Doesn't return...
 ;;
 esac
@@ -339,9 +340,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:



CVS import: xsrc/external/mit/xkbprint/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:37:05 UTC 2020

Update of /cvsroot/xsrc/external/mit/xkbprint/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv21817

Log Message:
initial import of xkbprint-1.0.5

Status:

Vendor Tag: xorg
Release Tags:   xkbprint-1-0-5

N xsrc/external/mit/xkbprint/dist/README.md
U xsrc/external/mit/xkbprint/dist/xkbprint.h
U xsrc/external/mit/xkbprint/dist/xkbprint.c
U xsrc/external/mit/xkbprint/dist/utils.h
U xsrc/external/mit/xkbprint/dist/utils.c
U xsrc/external/mit/xkbprint/dist/psgeom.c
U xsrc/external/mit/xkbprint/dist/isokeys.h
U xsrc/external/mit/xkbprint/dist/missing
U xsrc/external/mit/xkbprint/dist/install-sh
U xsrc/external/mit/xkbprint/dist/depcomp
U xsrc/external/mit/xkbprint/dist/config.sub
U xsrc/external/mit/xkbprint/dist/config.guess
C xsrc/external/mit/xkbprint/dist/compile
U xsrc/external/mit/xkbprint/dist/INSTALL
U xsrc/external/mit/xkbprint/dist/ChangeLog
U xsrc/external/mit/xkbprint/dist/COPYING
U xsrc/external/mit/xkbprint/dist/config.h.in
U xsrc/external/mit/xkbprint/dist/Makefile.in
U xsrc/external/mit/xkbprint/dist/aclocal.m4
U xsrc/external/mit/xkbprint/dist/configure.ac
U xsrc/external/mit/xkbprint/dist/configure
U xsrc/external/mit/xkbprint/dist/Makefile.am
U xsrc/external/mit/xkbprint/dist/man/xkbprint.man
U xsrc/external/mit/xkbprint/dist/man/Makefile.in
U xsrc/external/mit/xkbprint/dist/man/Makefile.am

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jxorg:yesterday -jxorg xsrc/external/mit/xkbprint/dist



CVS import: xsrc/external/mit/viewres/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:37:03 UTC 2020

Update of /cvsroot/xsrc/external/mit/viewres/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv14152

Log Message:
initial import of viewres-1.0.6

Status:

Vendor Tag: xorg
Release Tags:   viewres-1-0-6

U xsrc/external/mit/viewres/dist/Makefile.am
U xsrc/external/mit/viewres/dist/INSTALL
U xsrc/external/mit/viewres/dist/install-sh
U xsrc/external/mit/viewres/dist/Makefile.in
U xsrc/external/mit/viewres/dist/config.guess
U xsrc/external/mit/viewres/dist/aclocal.m4
U xsrc/external/mit/viewres/dist/viewres.c
U xsrc/external/mit/viewres/dist/depcomp
U xsrc/external/mit/viewres/dist/missing
U xsrc/external/mit/viewres/dist/configure.ac
U xsrc/external/mit/viewres/dist/ChangeLog
U xsrc/external/mit/viewres/dist/compile
N xsrc/external/mit/viewres/dist/README.md
U xsrc/external/mit/viewres/dist/COPYING
U xsrc/external/mit/viewres/dist/config.h.in
U xsrc/external/mit/viewres/dist/configure
U xsrc/external/mit/viewres/dist/config.sub
U xsrc/external/mit/viewres/dist/man/Makefile.in
U xsrc/external/mit/viewres/dist/man/Makefile.am
U xsrc/external/mit/viewres/dist/man/viewres.man
U xsrc/external/mit/viewres/dist/app-defaults/Viewres-color
U xsrc/external/mit/viewres/dist/app-defaults/Viewres

No conflicts created by this import



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

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 09:24:12 UTC 2020

Modified Files:
src/external/mit/xorg/lib/libXfont2: Makefile
src/external/mit/xorg/lib/libXvMCW: Makefile

Log Message:
fix libXfont2 build, and (for now) remove new XvMCW pkg-config file.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/lib/libXfont2/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libXvMCW/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libXfont2/Makefile
diff -u src/external/mit/xorg/lib/libXfont2/Makefile:1.5 src/external/mit/xorg/lib/libXfont2/Makefile:1.6
--- src/external/mit/xorg/lib/libXfont2/Makefile:1.5	Fri Aug  3 02:23:09 2018
+++ src/external/mit/xorg/lib/libXfont2/Makefile	Sun Feb 23 09:24:12 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2018/08/03 02:23:09 kamil Exp $
+#	$NetBSD: Makefile,v 1.6 2020/02/23 09:24:12 mrg Exp $
 
 .include 
 
@@ -25,7 +25,8 @@ SRCS.util=	\
 	miscutil.c \
 	patcache.c \
 	private.c \
-	utilbitmap.c
+	utilbitmap.c \
+	reallocarray.c
 .PATH:	${XFONT2DIR}/src/util
 
 SRCS.fontfile=	\
@@ -104,6 +105,7 @@ CPPFLAGS+=	-DHAS_SNPRINTF -DHAVE_CONFIG_
 CPPFLAGS+=  -DBDFFORMAT -DSNFFORMAT -DPCFFORMAT -DX_GZIP_FONT_COMPRESSION -DX_BZIP2_FONT_COMPRESSION
 CPPFLAGS+=	-DFONT_ENCODINGS_DIRECTORY=\"${X11LIBDIR}/X11/fonts/encodings/encodings.dir\" 
 CPPFLAGS+=	-I${XFONT2DIR}/src/stubs
+CPPFLAGS+=	-I${XFONT2DIR}
 CPPFLAGS+=	-I${XFONT2DIR}/include
 CPPFLAGS+=	-I${XFONT2DIR}/../include
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}

Index: src/external/mit/xorg/lib/libXvMCW/Makefile
diff -u src/external/mit/xorg/lib/libXvMCW/Makefile:1.4 src/external/mit/xorg/lib/libXvMCW/Makefile:1.5
--- src/external/mit/xorg/lib/libXvMCW/Makefile:1.4	Sun Feb 23 09:10:51 2020
+++ src/external/mit/xorg/lib/libXvMCW/Makefile	Sun Feb 23 09:24:12 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2020/02/23 09:10:51 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2020/02/23 09:24:12 mrg Exp $
 
 .include 
 
@@ -19,7 +19,9 @@ LIBDPLIBS=	Xext	${.CURDIR}/../libXext \
 
 COPTS.XvMCWrapper.c=	${GCC_NO_STRINGOP_OVERFLOW}
 
-PKGDIST=	xvmc-wrapper
+# XXX
+#PKGDIST=	xvmc-wrapper
+#.PATH:	${X11SRCDIR.XvMC}
 
 .include 
 .include 



CVS commit: xsrc/external/mit/libXfont2/include

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:18:51 UTC 2020

Modified Files:
xsrc/external/mit/libXfont2/include: config.h

Log Message:
update for libXfont2 2.0.4.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/libXfont2/include/config.h

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/libXfont2/include/config.h
diff -u xsrc/external/mit/libXfont2/include/config.h:1.1 xsrc/external/mit/libXfont2/include/config.h:1.2
--- xsrc/external/mit/libXfont2/include/config.h:1.1	Sun Mar 11 09:29:01 2018
+++ xsrc/external/mit/libXfont2/include/config.h	Sun Feb 23 09:18:51 2020
@@ -28,6 +28,9 @@
 /* Define to 1 if you have the `readlink' function. */
 #define HAVE_READLINK 1
 
+/* Define to 1 if you have the `reallocarray' function. */
+/* #undef HAVE_REALLOCARRAY */
+
 /* Define to 1 if the system has the type `socklen_t'. */
 #define HAVE_SOCKLEN_T 1
 
@@ -43,6 +46,12 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_POLL_H 1
 
@@ -75,7 +84,7 @@
 #define PACKAGE_NAME "libXfont2"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libXfont2 2.0.3"
+#define PACKAGE_STRING "libXfont2 2.0.4"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libXfont2"
@@ -84,7 +93,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.3"
+#define PACKAGE_VERSION "2.0.4"
 
 /* Major version of this package */
 #define PACKAGE_VERSION_MAJOR 2
@@ -93,7 +102,7 @@
 #define PACKAGE_VERSION_MINOR 0
 
 /* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 3
+#define PACKAGE_VERSION_PATCHLEVEL 4
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -127,7 +136,7 @@
 
 
 /* Version number of package */
-#define VERSION "2.0.3"
+#define VERSION "2.0.4"
 
 /* Support bdf format bitmap font files */
 #define XFONT_BDFFORMAT 1



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

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 09:14:05 UTC 2020

Modified Files:
src/external/mit/xorg/lib/libX11/extensions: Makefile

Log Message:
find the moved header.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/libX11/extensions/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libX11/extensions/Makefile
diff -u src/external/mit/xorg/lib/libX11/extensions/Makefile:1.1 src/external/mit/xorg/lib/libX11/extensions/Makefile:1.2
--- src/external/mit/xorg/lib/libX11/extensions/Makefile:1.1	Sun Feb 23 09:10:50 2020
+++ src/external/mit/xorg/lib/libX11/extensions/Makefile	Sun Feb 23 09:14:05 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/02/23 09:10:50 mrg Exp $
+# $NetBSD: Makefile,v 1.2 2020/02/23 09:14:05 mrg Exp $
 
 NOPROG=	yes
 
@@ -6,4 +6,7 @@ INCS=  XKBgeom.h
 INCSDIR=${X11INCDIR}/X11/extensions
 
 .include 
+
+.PATH:		${X11SRCDIR.X11}/include/X11/extensions
+
 .include 



CVS commit: src/external/mit/xorg

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 09:10:51 UTC 2020

Modified Files:
src/external/mit/xorg/include/xorgproto/X11/extensions: Makefile
src/external/mit/xorg/lib/libX11: Makefile
src/external/mit/xorg/lib/libXvMC: Makefile
src/external/mit/xorg/lib/libXvMCW: Makefile
Added Files:
src/external/mit/xorg/lib/libX11/extensions: Makefile

Log Message:
updates for xorgproto 2019.2, libX11 1.6.9, and libXvMC 1.0.12.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/mit/xorg/lib/libX11/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/libX11/extensions/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libXvMC/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/lib/libXvMCW/Makefile

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

Modified files:

Index: src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile
diff -u src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile:1.1 src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile:1.2
--- src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile:1.1	Wed Mar 14 08:55:36 2018
+++ src/external/mit/xorg/include/xorgproto/X11/extensions/Makefile	Sun Feb 23 09:10:50 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2018/03/14 08:55:36 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2020/02/23 09:10:50 mrg Exp $
 
 .include 
 
@@ -11,7 +11,6 @@ INCS=	EVI.h \
 	XI2proto.h \
 	XIproto.h \
 	XKB.h \
-	XKBgeom.h \
 	XKBproto.h \
 	XKBsrv.h \
 	XKBstr.h \
@@ -70,7 +69,6 @@ INCS=	EVI.h \
 	syncconst.h \
 	syncproto.h \
 	syncstr.h \
-	vldXvMC.h \
 	xcmiscproto.h \
 	xcmiscstr.h \
 	xf86bigfont.h \

Index: src/external/mit/xorg/lib/libX11/Makefile
diff -u src/external/mit/xorg/lib/libX11/Makefile:1.13 src/external/mit/xorg/lib/libX11/Makefile:1.14
--- src/external/mit/xorg/lib/libX11/Makefile:1.13	Sun Jul 19 08:18:32 2015
+++ src/external/mit/xorg/lib/libX11/Makefile	Sun Feb 23 09:10:50 2020
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile,v 1.13 2015/07/19 08:18:32 mrg Exp $
+#	$NetBSD: Makefile,v 1.14 2020/02/23 09:10:50 mrg Exp $
 
 .include 
 
 SUBDIR=		dynamic .WAIT libX11-xcb static \
-		ximcp xlcDef xlcUTF8Load xlibi18n xomGeneric
+		ximcp xlcDef xlcUTF8Load xlibi18n xomGeneric \
+		extensions
 
 INCS=		ImUtil.h XKBlib.h Xcms.h Xlib-xcb.h Xlib.h XlibConf.h \
 		Xlibint.h Xlocale.h Xregion.h Xresource.h Xutil.h \

Index: src/external/mit/xorg/lib/libXvMC/Makefile
diff -u src/external/mit/xorg/lib/libXvMC/Makefile:1.4 src/external/mit/xorg/lib/libXvMC/Makefile:1.5
--- src/external/mit/xorg/lib/libXvMC/Makefile:1.4	Sun Mar 16 22:53:17 2014
+++ src/external/mit/xorg/lib/libXvMC/Makefile	Sun Feb 23 09:10:50 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/03/16 22:53:17 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2020/02/23 09:10:50 mrg Exp $
 
 .include 
 
@@ -8,7 +8,7 @@ LIB=	XvMC
 
 SRCS=	XvMC.c
 
-INCS=	XvMClib.h
+INCS=	XvMClib.h vldXvMC.h
 INCSDIR=${X11INCDIR}/X11/extensions
 
 CPPFLAGS+=	${X11FLAGS.THREADLIB}

Index: src/external/mit/xorg/lib/libXvMCW/Makefile
diff -u src/external/mit/xorg/lib/libXvMCW/Makefile:1.3 src/external/mit/xorg/lib/libXvMCW/Makefile:1.4
--- src/external/mit/xorg/lib/libXvMCW/Makefile:1.3	Sun Oct 13 07:28:08 2019
+++ src/external/mit/xorg/lib/libXvMCW/Makefile	Sun Feb 23 09:10:51 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2019/10/13 07:28:08 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2020/02/23 09:10:51 mrg Exp $
 
 .include 
 
@@ -19,5 +19,7 @@ LIBDPLIBS=	Xext	${.CURDIR}/../libXext \
 
 COPTS.XvMCWrapper.c=	${GCC_NO_STRINGOP_OVERFLOW}
 
+PKGDIST=	xvmc-wrapper
+
 .include 
 .include 

Added files:

Index: src/external/mit/xorg/lib/libX11/extensions/Makefile
diff -u /dev/null src/external/mit/xorg/lib/libX11/extensions/Makefile:1.1
--- /dev/null	Sun Feb 23 09:10:51 2020
+++ src/external/mit/xorg/lib/libX11/extensions/Makefile	Sun Feb 23 09:10:50 2020
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2020/02/23 09:10:50 mrg Exp $
+
+NOPROG=	yes
+
+INCS=  XKBgeom.h
+INCSDIR=${X11INCDIR}/X11/extensions
+
+.include 
+.include 



CVS import: xsrc/external/mit/xorgproto/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:09:25 UTC 2020

Update of /cvsroot/xsrc/external/mit/xorgproto/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17822

Log Message:
initial import of xorgproto-2019.2

Status:

Vendor Tag: xorg
Release Tags:   xorgproto-2019-2

U xsrc/external/mit/xorgproto/dist/Makefile.am
U xsrc/external/mit/xorgproto/dist/configure
U xsrc/external/mit/xorgproto/dist/configure.ac
U xsrc/external/mit/xorgproto/dist/aclocal.m4
U xsrc/external/mit/xorgproto/dist/compositeproto.txt
U xsrc/external/mit/xorgproto/dist/damageproto.txt
U xsrc/external/mit/xorgproto/dist/dri2proto.txt
U xsrc/external/mit/xorgproto/dist/dri3proto.txt
U xsrc/external/mit/xorgproto/dist/fixesproto.txt
U xsrc/external/mit/xorgproto/dist/PM_spec
U xsrc/external/mit/xorgproto/dist/presentproto.txt
U xsrc/external/mit/xorgproto/dist/randrproto.txt
U xsrc/external/mit/xorgproto/dist/renderproto.txt
U xsrc/external/mit/xorgproto/dist/resproto.txt
U xsrc/external/mit/xorgproto/dist/xv-protocol-v2.txt
U xsrc/external/mit/xorgproto/dist/Makefile.in
U xsrc/external/mit/xorgproto/dist/applewmproto.pc.in
U xsrc/external/mit/xorgproto/dist/bigreqsproto.pc.in
U xsrc/external/mit/xorgproto/dist/compositeproto.pc.in
U xsrc/external/mit/xorgproto/dist/damageproto.pc.in
U xsrc/external/mit/xorgproto/dist/dmxproto.pc.in
U xsrc/external/mit/xorgproto/dist/dri2proto.pc.in
U xsrc/external/mit/xorgproto/dist/dri3proto.pc.in
U xsrc/external/mit/xorgproto/dist/evieproto.pc.in
U xsrc/external/mit/xorgproto/dist/fixesproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontcacheproto.pc.in
U xsrc/external/mit/xorgproto/dist/fontsproto.pc.in
U xsrc/external/mit/xorgproto/dist/glproto.pc.in
U xsrc/external/mit/xorgproto/dist/inputproto.pc.in
U xsrc/external/mit/xorgproto/dist/kbproto.pc.in
U xsrc/external/mit/xorgproto/dist/lg3dproto.pc.in
U xsrc/external/mit/xorgproto/dist/presentproto.pc.in
U xsrc/external/mit/xorgproto/dist/printproto.pc.in
U xsrc/external/mit/xorgproto/dist/randrproto.pc.in
U xsrc/external/mit/xorgproto/dist/recordproto.pc.in
U xsrc/external/mit/xorgproto/dist/renderproto.pc.in
U xsrc/external/mit/xorgproto/dist/resourceproto.pc.in
U xsrc/external/mit/xorgproto/dist/scrnsaverproto.pc.in
U xsrc/external/mit/xorgproto/dist/trapproto.pc.in
U xsrc/external/mit/xorgproto/dist/videoproto.pc.in
U xsrc/external/mit/xorgproto/dist/windowswmproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcalibrateproto.pc.in
U xsrc/external/mit/xorgproto/dist/xcmiscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xextproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86bigfontproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86dgaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86driproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86miscproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86rushproto.pc.in
U xsrc/external/mit/xorgproto/dist/xf86vidmodeproto.pc.in
U xsrc/external/mit/xorgproto/dist/xineramaproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproto.pc.in
U xsrc/external/mit/xorgproto/dist/xproxymngproto.pc.in
U xsrc/external/mit/xorgproto/dist/AUTHORS
U xsrc/external/mit/xorgproto/dist/INSTALL
U xsrc/external/mit/xorgproto/dist/compile
U xsrc/external/mit/xorgproto/dist/config.guess
U xsrc/external/mit/xorgproto/dist/config.sub
U xsrc/external/mit/xorgproto/dist/install-sh
U xsrc/external/mit/xorgproto/dist/missing
U xsrc/external/mit/xorgproto/dist/COPYING-applewmproto
U xsrc/external/mit/xorgproto/dist/COPYING-bigreqsproto
U xsrc/external/mit/xorgproto/dist/COPYING-compositeproto
U xsrc/external/mit/xorgproto/dist/COPYING-damageproto
U xsrc/external/mit/xorgproto/dist/COPYING-dmxproto
U xsrc/external/mit/xorgproto/dist/COPYING-dri2proto
U xsrc/external/mit/xorgproto/dist/COPYING-dri3proto
U xsrc/external/mit/xorgproto/dist/COPYING-evieproto
U xsrc/external/mit/xorgproto/dist/COPYING-fixesproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontcacheproto
U xsrc/external/mit/xorgproto/dist/COPYING-fontsproto
U xsrc/external/mit/xorgproto/dist/COPYING-glproto
U xsrc/external/mit/xorgproto/dist/COPYING-inputproto
U xsrc/external/mit/xorgproto/dist/COPYING-kbproto
U xsrc/external/mit/xorgproto/dist/COPYING-lg3dproto
U xsrc/external/mit/xorgproto/dist/COPYING-pmproto
U xsrc/external/mit/xorgproto/dist/COPYING-presentproto
U xsrc/external/mit/xorgproto/dist/COPYING-printproto
U xsrc/external/mit/xorgproto/dist/COPYING-randrproto
U xsrc/external/mit/xorgproto/dist/COPYING-recordproto
U xsrc/external/mit/xorgproto/dist/COPYING-renderproto
U xsrc/external/mit/xorgproto/dist/COPYING-resourceproto
U xsrc/external/mit/xorgproto/dist/COPYING-scrnsaverproto
U xsrc/external/mit/xorgproto/dist/COPYING-trapproto
U xsrc/external/mit/xorgproto/dist/COPYING-videoproto
U xsrc/external/mit/xorgproto/dist/COPYING-windowswmproto
U xsrc/external/mit/xorgproto/dist/COPYING-x11proto
U xsrc/external/mit/xorgproto/dist/COPYING-xcmiscproto
U xsrc/external/mit/xorgproto/dist/COPYING-xextproto
U 

CVS commit: xsrc/external/mit

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:05:17 UTC 2020

Modified Files:
xsrc/external/mit/libX11/dist/m4: libtool.m4
xsrc/external/mit/libX11/dist/man: XCreateGC.man
xsrc/external/mit/libX11/dist/src: XlibInt.c
Removed Files:
xsrc/external/mit/libXfont2/dist: README
xsrc/external/mit/libXpm/dist: README

Log Message:
merge libX11 1.6.9, libXfont2 2.0.4, libXpm 3.5.13, and libXvMC 1.0.12.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/libX11/dist/m4/libtool.m4
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libX11/dist/man/XCreateGC.man
cvs rdiff -u -r1.11 -r1.12 xsrc/external/mit/libX11/dist/src/XlibInt.c
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/libXfont2/dist/README
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/libXpm/dist/README

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/m4/libtool.m4
diff -u xsrc/external/mit/libX11/dist/m4/libtool.m4:1.7 xsrc/external/mit/libX11/dist/m4/libtool.m4:1.8
--- xsrc/external/mit/libX11/dist/m4/libtool.m4:1.7	Tue Aug  6 11:57:13 2019
+++ xsrc/external/mit/libX11/dist/m4/libtool.m4	Sun Feb 23 09:05:16 2020
@@ -1417,10 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
 	  x86_64-*linux*)
 	LD="${LD-ld} -m elf_x86_64"
 	;;
-	  powerpcle-*linux*|powerpc64le-*linux*)
+	  powerpcle-*linux*)
 	LD="${LD-ld} -m elf64lppc"
 	;;
-	  powerpc-*linux*|powerpc64-*linux*)
+	  powerpc-*linux*)
 	LD="${LD-ld} -m elf64ppc"
 	;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -2666,14 +2666,7 @@ freebsd* | dragonfly*)
 *) objformat=elf ;;
 esac
   fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-gentoo)
-  version_type=linux ;;
-*)
-  version_type=freebsd-$objformat ;;
-  esac
-
+  version_type=freebsd-$objformat
   case $version_type in
 freebsd-elf*)
   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2685,12 +2678,6 @@ freebsd* | dragonfly*)
   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   need_version=yes
   ;;
-linux)
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  need_lib_prefix=no
-  need_version=no
-  ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
@@ -2880,6 +2867,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Ideally, we could use ldconfig to report *all* directores which are
   # searched for libraries, however this is still not possible.  Aside from not
   # being certain /sbin/ldconfig is available, command
@@ -2888,7 +2878,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
   # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on

Index: xsrc/external/mit/libX11/dist/man/XCreateGC.man
diff -u xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.4 xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.5
--- xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.4	Sun Jul 19 08:13:11 2015
+++ xsrc/external/mit/libX11/dist/man/XCreateGC.man	Sun Feb 23 09:05:17 2020
@@ -39,46 +39,13 @@
 .\" to this documentation without specific, written prior permission.
 .\" Digital and Tektronix makes no representations about the suitability
 .\" of this documentation for any purpose.
-.\" It is provided ``as is'' without express or implied warranty.
-.\" 
+.\" It is provided "as is" without express or implied warranty.
+.\"
 .\"
 .ds xT X Toolkit Intrinsics \- C Language Interface
 .ds xW Athena X Widgets \- C Language X Toolkit Interface
 .ds xL Xlib \- C Language X Interface
 .ds xC Inter-Client Communication Conventions Manual
-.na
-.de Ds
-.nf
-.\\$1D \\$2 \\$1
-.ft CW
-.\".ps \\n(PS
-.\".if \\n(VS>=40 .vs \\n(VSu
-.\".if \\n(VS<=39 .vs \\n(VSp
-..
-.de De
-.ce 0
-.if \\n(BD .DF
-.nr BD 0
-.in \\n(OIu
-.if \\n(TM .ls 2
-.sp \\n(DDu
-.fi
-..
-.de IN		\" send an index entry to the stderr
-..
-.de Pn
-.ie t \\$1\fB\^\\$2\^\fR\\$3
-.el \\$1\fI\^\\$2\^\fP\\$3
-..
-.de ZN
-.ie t \fB\^\\$1\^\fR\\$2
-.el 

CVS import: xsrc/external/mit/libX11/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:01:42 UTC 2020

Update of /cvsroot/xsrc/external/mit/libX11/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7825

Log Message:
initial import of libX11-1.6.9

Status:

Vendor Tag: xorg
Release Tags:   libX11-1-6-9

U xsrc/external/mit/libX11/dist/Makefile.am
U xsrc/external/mit/libX11/dist/configure
U xsrc/external/mit/libX11/dist/configure.ac
U xsrc/external/mit/libX11/dist/aclocal.m4
U xsrc/external/mit/libX11/dist/Makefile.in
U xsrc/external/mit/libX11/dist/x11-xcb.pc.in
U xsrc/external/mit/libX11/dist/x11.pc.in
U xsrc/external/mit/libX11/dist/AUTHORS
U xsrc/external/mit/libX11/dist/COPYING
U xsrc/external/mit/libX11/dist/ChangeLog
U xsrc/external/mit/libX11/dist/INSTALL
U xsrc/external/mit/libX11/dist/NEWS
U xsrc/external/mit/libX11/dist/compile
U xsrc/external/mit/libX11/dist/config.guess
U xsrc/external/mit/libX11/dist/config.sub
U xsrc/external/mit/libX11/dist/install-sh
U xsrc/external/mit/libX11/dist/ltmain.sh
U xsrc/external/mit/libX11/dist/missing
U xsrc/external/mit/libX11/dist/README.md
U xsrc/external/mit/libX11/dist/depcomp
U xsrc/external/mit/libX11/dist/cpprules.in
U xsrc/external/mit/libX11/dist/test-driver
U xsrc/external/mit/libX11/dist/docbook.am
U xsrc/external/mit/libX11/dist/include/Makefile.am
U xsrc/external/mit/libX11/dist/include/Makefile.in
U xsrc/external/mit/libX11/dist/include/X11/XlibConf.h.in
U xsrc/external/mit/libX11/dist/include/X11/XKBlib.h
U xsrc/external/mit/libX11/dist/include/X11/Xcms.h
U xsrc/external/mit/libX11/dist/include/X11/Xlib.h
U xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
U xsrc/external/mit/libX11/dist/include/X11/Xlocale.h
U xsrc/external/mit/libX11/dist/include/X11/Xresource.h
U xsrc/external/mit/libX11/dist/include/X11/Xutil.h
U xsrc/external/mit/libX11/dist/include/X11/cursorfont.h
U xsrc/external/mit/libX11/dist/include/X11/Xregion.h
U xsrc/external/mit/libX11/dist/include/X11/ImUtil.h
U xsrc/external/mit/libX11/dist/include/X11/Xlib-xcb.h
N xsrc/external/mit/libX11/dist/include/X11/extensions/XKBgeom.h
U xsrc/external/mit/libX11/dist/m4/ax_define_dir.m4
C xsrc/external/mit/libX11/dist/m4/libtool.m4
U xsrc/external/mit/libX11/dist/m4/ltoptions.m4
U xsrc/external/mit/libX11/dist/m4/ltsugar.m4
U xsrc/external/mit/libX11/dist/m4/ltversion.m4
U xsrc/external/mit/libX11/dist/m4/lt~obsolete.m4
U xsrc/external/mit/libX11/dist/modules/Makefile.am
U xsrc/external/mit/libX11/dist/modules/Makefile.in
U xsrc/external/mit/libX11/dist/modules/im/Makefile.am
U xsrc/external/mit/libX11/dist/modules/im/Makefile.in
U xsrc/external/mit/libX11/dist/modules/im/ximcp/Makefile.am
U xsrc/external/mit/libX11/dist/modules/im/ximcp/Makefile.in
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imCallbk.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imDefFlt.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imDefIc.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imDefIm.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imDefLkup.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imDispch.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imEvToWire.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imExten.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imImSw.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imInsClbk.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imInt.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcFlt.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcGIc.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcIc.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcIm.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcLkup.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcSIc.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imRmAttr.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imRm.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imThaiFlt.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imThaiIc.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imThaiIm.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imTrans.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imTransR.c
U xsrc/external/mit/libX11/dist/modules/im/ximcp/imTrX.c
U xsrc/external/mit/libX11/dist/modules/lc/Makefile.am
U xsrc/external/mit/libX11/dist/modules/lc/Makefile.in
U xsrc/external/mit/libX11/dist/modules/lc/Utf8/Makefile.am
U xsrc/external/mit/libX11/dist/modules/lc/Utf8/Makefile.in
U xsrc/external/mit/libX11/dist/modules/lc/Utf8/lcUTF8Load.c
U xsrc/external/mit/libX11/dist/modules/lc/def/Makefile.am
U xsrc/external/mit/libX11/dist/modules/lc/def/Makefile.in
U xsrc/external/mit/libX11/dist/modules/lc/def/lcDefConv.c
U xsrc/external/mit/libX11/dist/modules/lc/gen/Makefile.am
U xsrc/external/mit/libX11/dist/modules/lc/gen/Makefile.in
U xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c
U xsrc/external/mit/libX11/dist/modules/om/Makefile.am
U 

CVS import: xsrc/external/mit/libXvMC/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:01:51 UTC 2020

Update of /cvsroot/xsrc/external/mit/libXvMC/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18130

Log Message:
initial import of libXvMC-1.0.12

Status:

Vendor Tag: xorg
Release Tags:   libXvMC-1-0-12

U xsrc/external/mit/libXvMC/dist/Makefile.am
U xsrc/external/mit/libXvMC/dist/configure
U xsrc/external/mit/libXvMC/dist/configure.ac
U xsrc/external/mit/libXvMC/dist/aclocal.m4
U xsrc/external/mit/libXvMC/dist/XvMC_API.txt
U xsrc/external/mit/libXvMC/dist/Makefile.in
U xsrc/external/mit/libXvMC/dist/config.h.in
N xsrc/external/mit/libXvMC/dist/xvmc-wrapper.pc.in
U xsrc/external/mit/libXvMC/dist/xvmc.pc.in
U xsrc/external/mit/libXvMC/dist/COPYING
U xsrc/external/mit/libXvMC/dist/ChangeLog
U xsrc/external/mit/libXvMC/dist/INSTALL
U xsrc/external/mit/libXvMC/dist/compile
U xsrc/external/mit/libXvMC/dist/config.guess
U xsrc/external/mit/libXvMC/dist/config.sub
U xsrc/external/mit/libXvMC/dist/install-sh
U xsrc/external/mit/libXvMC/dist/ltmain.sh
U xsrc/external/mit/libXvMC/dist/missing
U xsrc/external/mit/libXvMC/dist/README.md
U xsrc/external/mit/libXvMC/dist/depcomp
U xsrc/external/mit/libXvMC/dist/src/Makefile.am
U xsrc/external/mit/libXvMC/dist/src/Makefile.in
U xsrc/external/mit/libXvMC/dist/src/XvMC.c
U xsrc/external/mit/libXvMC/dist/src/XvMClibint.h
U xsrc/external/mit/libXvMC/dist/include/Makefile.am
U xsrc/external/mit/libXvMC/dist/include/Makefile.in
U xsrc/external/mit/libXvMC/dist/include/X11/Makefile.am
U xsrc/external/mit/libXvMC/dist/include/X11/Makefile.in
U xsrc/external/mit/libXvMC/dist/include/X11/extensions/Makefile.am
U xsrc/external/mit/libXvMC/dist/include/X11/extensions/XvMClib.h
N xsrc/external/mit/libXvMC/dist/include/X11/extensions/vldXvMC.h
U xsrc/external/mit/libXvMC/dist/include/X11/extensions/Makefile.in
U xsrc/external/mit/libXvMC/dist/wrapper/Makefile.am
U xsrc/external/mit/libXvMC/dist/wrapper/Makefile.in
U xsrc/external/mit/libXvMC/dist/wrapper/XvMCWrapper.c

No conflicts created by this import



CVS import: xsrc/external/mit/libXpm/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:01:47 UTC 2020

Update of /cvsroot/xsrc/external/mit/libXpm/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1289

Log Message:
initial import of libXpm-3.5.13

Status:

Vendor Tag: xorg
Release Tags:   libXpm-3-5-13

U xsrc/external/mit/libXpm/dist/configure
U xsrc/external/mit/libXpm/dist/config.sub
U xsrc/external/mit/libXpm/dist/COPYRIGHT
U xsrc/external/mit/libXpm/dist/configure.ac
U xsrc/external/mit/libXpm/dist/AUTHORS
U xsrc/external/mit/libXpm/dist/ChangeLog
N xsrc/external/mit/libXpm/dist/README.md
U xsrc/external/mit/libXpm/dist/aclocal.m4
U xsrc/external/mit/libXpm/dist/Makefile.in
U xsrc/external/mit/libXpm/dist/ltmain.sh
U xsrc/external/mit/libXpm/dist/COPYING
U xsrc/external/mit/libXpm/dist/config.guess
U xsrc/external/mit/libXpm/dist/install-sh
U xsrc/external/mit/libXpm/dist/missing
U xsrc/external/mit/libXpm/dist/Makefile.am
U xsrc/external/mit/libXpm/dist/depcomp
U xsrc/external/mit/libXpm/dist/xpm.pc.in
U xsrc/external/mit/libXpm/dist/INSTALL
U xsrc/external/mit/libXpm/dist/compile
U xsrc/external/mit/libXpm/dist/config.h.in
U xsrc/external/mit/libXpm/dist/sxpm/sxpm.c
U xsrc/external/mit/libXpm/dist/sxpm/plaid_mask.xpm
U xsrc/external/mit/libXpm/dist/sxpm/plaid_ext.xpm
U xsrc/external/mit/libXpm/dist/sxpm/Makefile.in
U xsrc/external/mit/libXpm/dist/sxpm/plaid.xpm
U xsrc/external/mit/libXpm/dist/sxpm/Makefile.am
U xsrc/external/mit/libXpm/dist/include/Makefile.in
U xsrc/external/mit/libXpm/dist/include/Makefile.am
U xsrc/external/mit/libXpm/dist/include/X11/xpm.h
U xsrc/external/mit/libXpm/dist/cxpm/Makefile.in
U xsrc/external/mit/libXpm/dist/cxpm/cxpm.c
U xsrc/external/mit/libXpm/dist/cxpm/Makefile.am
U xsrc/external/mit/libXpm/dist/src/WrFFrI.c
U xsrc/external/mit/libXpm/dist/src/CrPFrI.c
U xsrc/external/mit/libXpm/dist/src/RdFToI.c
U xsrc/external/mit/libXpm/dist/src/CrIFrBuf.c
U xsrc/external/mit/libXpm/dist/src/parse.c
U xsrc/external/mit/libXpm/dist/src/XpmI.h
U xsrc/external/mit/libXpm/dist/src/rgb.c
U xsrc/external/mit/libXpm/dist/src/RdFToDat.c
U xsrc/external/mit/libXpm/dist/src/amigax.c
U xsrc/external/mit/libXpm/dist/src/RdFToP.c
U xsrc/external/mit/libXpm/dist/src/rgbtab.h
U xsrc/external/mit/libXpm/dist/src/WrFFrP.c
U xsrc/external/mit/libXpm/dist/src/CrBufFrI.c
U xsrc/external/mit/libXpm/dist/src/Info.c
U xsrc/external/mit/libXpm/dist/src/Makefile.in
U xsrc/external/mit/libXpm/dist/src/amigax.h
U xsrc/external/mit/libXpm/dist/src/WrFFrDat.c
U xsrc/external/mit/libXpm/dist/src/scan.c
U xsrc/external/mit/libXpm/dist/src/CrDatFrP.c
U xsrc/external/mit/libXpm/dist/src/misc.c
U xsrc/external/mit/libXpm/dist/src/RdFToBuf.c
U xsrc/external/mit/libXpm/dist/src/CrDatFrI.c
U xsrc/external/mit/libXpm/dist/src/CrIFrP.c
U xsrc/external/mit/libXpm/dist/src/hashtab.c
U xsrc/external/mit/libXpm/dist/src/WrFFrBuf.c
U xsrc/external/mit/libXpm/dist/src/simx.c
U xsrc/external/mit/libXpm/dist/src/Image.c
U xsrc/external/mit/libXpm/dist/src/Makefile.am
U xsrc/external/mit/libXpm/dist/src/simx.h
U xsrc/external/mit/libXpm/dist/src/Attrib.c
U xsrc/external/mit/libXpm/dist/src/CrIFrDat.c
U xsrc/external/mit/libXpm/dist/src/create.c
U xsrc/external/mit/libXpm/dist/src/CrPFrBuf.c
U xsrc/external/mit/libXpm/dist/src/data.c
U xsrc/external/mit/libXpm/dist/src/CrBufFrP.c
U xsrc/external/mit/libXpm/dist/src/CrPFrDat.c
U xsrc/external/mit/libXpm/dist/doc/xpm.PS.gz
U xsrc/external/mit/libXpm/dist/doc/README.MSW
U xsrc/external/mit/libXpm/dist/doc/Makefile.in
U xsrc/external/mit/libXpm/dist/doc/Makefile.am
U xsrc/external/mit/libXpm/dist/doc/FAQ.html
U xsrc/external/mit/libXpm/dist/doc/README.html
U xsrc/external/mit/libXpm/dist/doc/README.AMIGA
U xsrc/external/mit/libXpm/dist/m4/ax_define_dir.m4
U xsrc/external/mit/libXpm/dist/m4/libtool.m4
U xsrc/external/mit/libXpm/dist/m4/ltversion.m4
U xsrc/external/mit/libXpm/dist/m4/ltsugar.m4
U xsrc/external/mit/libXpm/dist/m4/ltoptions.m4
U xsrc/external/mit/libXpm/dist/m4/lt~obsolete.m4
U xsrc/external/mit/libXpm/dist/man/sxpm.man
U xsrc/external/mit/libXpm/dist/man/Makefile.in
U xsrc/external/mit/libXpm/dist/man/Makefile.am
U xsrc/external/mit/libXpm/dist/man/cxpm.man

No conflicts created by this import



CVS import: xsrc/external/mit/libXfont2/dist

2020-02-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Sun Feb 23 09:01:45 UTC 2020

Update of /cvsroot/xsrc/external/mit/libXfont2/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24893

Log Message:
initial import of libXfont2-2.0.4

Status:

Vendor Tag: xorg
Release Tags:   libXfont2-2-0-4

U xsrc/external/mit/libXfont2/dist/aclocal.m4
U xsrc/external/mit/libXfont2/dist/configure.ac
U xsrc/external/mit/libXfont2/dist/Makefile.am
U xsrc/external/mit/libXfont2/dist/install-sh
U xsrc/external/mit/libXfont2/dist/ltmain.sh
U xsrc/external/mit/libXfont2/dist/xfont2.pc.in
U xsrc/external/mit/libXfont2/dist/Makefile.in
U xsrc/external/mit/libXfont2/dist/INSTALL
U xsrc/external/mit/libXfont2/dist/config.sub
U xsrc/external/mit/libXfont2/dist/depcomp
U xsrc/external/mit/libXfont2/dist/missing
U xsrc/external/mit/libXfont2/dist/devbook.am
U xsrc/external/mit/libXfont2/dist/COPYING
U xsrc/external/mit/libXfont2/dist/config.guess
U xsrc/external/mit/libXfont2/dist/ChangeLog
U xsrc/external/mit/libXfont2/dist/config.h.in
U xsrc/external/mit/libXfont2/dist/configure
U xsrc/external/mit/libXfont2/dist/AUTHORS
N xsrc/external/mit/libXfont2/dist/README.md
U xsrc/external/mit/libXfont2/dist/compile
U xsrc/external/mit/libXfont2/dist/src/stubs/atom.c
U xsrc/external/mit/libXfont2/dist/src/stubs/libxfontstubs.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/register.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/catalogue.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/gunzip.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/renderers.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/bunzip2.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/defaults.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/fontfile.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/bufio.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/bitsource.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/fileio.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/decompress.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/fontscale.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/dirfile.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/fontencc.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/filewr.c
U xsrc/external/mit/libXfont2/dist/src/fontfile/fontdir.c
U xsrc/external/mit/libXfont2/dist/src/fc/fslibos.h
U xsrc/external/mit/libXfont2/dist/src/fc/fsio.c
U xsrc/external/mit/libXfont2/dist/src/fc/fserve.h
U xsrc/external/mit/libXfont2/dist/src/fc/fstrans.c
U xsrc/external/mit/libXfont2/dist/src/fc/fservestr.h
U xsrc/external/mit/libXfont2/dist/src/fc/fsconvert.c
U xsrc/external/mit/libXfont2/dist/src/fc/fsio.h
U xsrc/external/mit/libXfont2/dist/src/fc/fserve.c
U xsrc/external/mit/libXfont2/dist/src/builtins/file.c
U xsrc/external/mit/libXfont2/dist/src/builtins/builtin.h
U xsrc/external/mit/libXfont2/dist/src/builtins/render.c
U xsrc/external/mit/libXfont2/dist/src/builtins/buildfont
U xsrc/external/mit/libXfont2/dist/src/builtins/fpe.c
U xsrc/external/mit/libXfont2/dist/src/builtins/dir.c
U xsrc/external/mit/libXfont2/dist/src/builtins/fonts.c
U xsrc/external/mit/libXfont2/dist/src/FreeType/xttcap.c
U xsrc/external/mit/libXfont2/dist/src/FreeType/ftenc.c
U xsrc/external/mit/libXfont2/dist/src/FreeType/ftfuncs.c
U xsrc/external/mit/libXfont2/dist/src/FreeType/xttcap.h
U xsrc/external/mit/libXfont2/dist/src/FreeType/fttools.c
U xsrc/external/mit/libXfont2/dist/src/FreeType/ft.h
U xsrc/external/mit/libXfont2/dist/src/FreeType/ftfuncs.h
U xsrc/external/mit/libXfont2/dist/src/bitmap/bitmapfunc.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/bitmaputil.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/snfread.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/bdfutils.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/pcfwrite.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/fontink.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/bdfread.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/bitscale.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/snfstr.h
U xsrc/external/mit/libXfont2/dist/src/bitmap/pcfread.c
U xsrc/external/mit/libXfont2/dist/src/bitmap/bitmap.c
U xsrc/external/mit/libXfont2/dist/src/util/fontnames.c
N xsrc/external/mit/libXfont2/dist/src/util/replace.h
U xsrc/external/mit/libXfont2/dist/src/util/miscutil.c
N xsrc/external/mit/libXfont2/dist/src/util/strlcpy.c
U xsrc/external/mit/libXfont2/dist/src/util/format.c
N xsrc/external/mit/libXfont2/dist/src/util/reallocarray.c
U xsrc/external/mit/libXfont2/dist/src/util/fontutil.c
U xsrc/external/mit/libXfont2/dist/src/util/patcache.c
U xsrc/external/mit/libXfont2/dist/src/util/fontaccel.c
N xsrc/external/mit/libXfont2/dist/src/util/strlcat.c
U xsrc/external/mit/libXfont2/dist/src/util/private.c
U xsrc/external/mit/libXfont2/dist/src/util/utilbitmap.c
U xsrc/external/mit/libXfont2/dist/src/util/fontxlfd.c
N xsrc/external/mit/libXfont2/dist/test/utils/lsfontdir.c
N xsrc/external/mit/libXfont2/dist/test/utils/font-test-utils.c
N xsrc/external/mit/libXfont2/dist/test/utils/README
N 

CVS commit: src/share/man/man9

2020-02-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 23 08:57:44 UTC 2020

Modified Files:
src/share/man/man9: Makefile

Log Message:
install rw_lock_op link too.


To generate a diff of this commit:
cvs rdiff -u -r1.447 -r1.448 src/share/man/man9/Makefile

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/Makefile
diff -u src/share/man/man9/Makefile:1.447 src/share/man/man9/Makefile:1.448
--- src/share/man/man9/Makefile:1.447	Fri Feb  7 13:02:35 2020
+++ src/share/man/man9/Makefile	Sun Feb 23 08:57:44 2020
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.447 2020/02/07 13:02:35 thorpej Exp $
+#   $NetBSD: Makefile,v 1.448 2020/02/23 08:57:44 mrg Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -808,7 +808,8 @@ MLINKS+=rwlock.9 rw.9 rwlock.9 rw_init.9
 	rwlock.9 rw_enter.9 rwlock.9 rw_exit.9 \
 	rwlock.9 rw_tryenter.9 rwlock.9 rw_tryupgrade.9 \
 	rwlock.9 rw_downgrade.9 rwlock.9 rw_read_held.9 \
-	rwlock.9 rw_write_held.9 rwlock.9 rw_lock_held.9
+	rwlock.9 rw_write_held.9 rwlock.9 rw_lock_held.9 \
+	rwlock.9 rw_lock_op.9
 MLINKS+=STACK.9 STACK_ALLOC.9 \
 	STACK.9 STACK_MAX.9 \
 	STACK.9 STACK_ALIGN.9 \



CVS commit: src/sys/dev/usb

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:54:47 UTC 2020

Modified Files:
src/sys/dev/usb: motg.c

Log Message:
Fix mistake in use of usbd_xfer_schedule_timeout in motg.

This code path is used both for xfers that are new, and xfers that
are being done piece by piece and are partway done.  For the latter
case, skip usbd_xfer_schedule_timeout so we schedule it only once per
xfer.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/motg.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/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.31 src/sys/dev/usb/motg.c:1.32
--- src/sys/dev/usb/motg.c:1.31	Wed Feb 19 16:01:37 2020
+++ src/sys/dev/usb/motg.c	Sun Feb 23 08:54:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.31 2020/02/19 16:01:37 riastradh Exp $	*/
+/*	$NetBSD: motg.c,v 1.32 2020/02/23 08:54:47 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.31 2020/02/19 16:01:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.32 2020/02/23 08:54:47 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1350,8 +1350,12 @@ motg_device_ctrl_start1(struct motg_soft
 		err = USBD_NOT_STARTED;
 		goto end;
 	}
-	usbd_xfer_schedule_timeout(xfer);
-	xfer->ux_status = USBD_IN_PROGRESS;
+	if (xfer->ux_status == USBD_NOT_STARTED) {
+		usbd_xfer_schedule_timeout(xfer);
+		xfer->ux_status = USBD_IN_PROGRESS;
+	} else {
+		KASSERT(xfer->ux_status == USBD_IN_PROGRESS);
+	}
 	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
 	KASSERT(xfer->ux_rqflags & URQ_REQUEST);
@@ -1807,8 +1811,12 @@ motg_device_data_start1(struct motg_soft
 		err = USBD_NOT_STARTED;
 		goto end;
 	}
-	usbd_xfer_schedule_timeout(xfer);
-	xfer->ux_status = USBD_IN_PROGRESS;
+	if (xfer->ux_status == USBD_NOT_STARTED) {
+		usbd_xfer_schedule_timeout(xfer);
+		xfer->ux_status = USBD_IN_PROGRESS;
+	} else {
+		KASSERT(xfer->ux_status == USBD_IN_PROGRESS);
+	}
 	KASSERT(otgpipe == MOTG_PIPE2MPIPE(xfer->ux_pipe));
 	KASSERT(otgpipe->hw_ep == ep);
 	KASSERT(!(xfer->ux_rqflags & URQ_REQUEST));



CVS commit: src/sys/dev/usb

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:54:55 UTC 2020

Modified Files:
src/sys/dev/usb: motg.c

Log Message:
Simplify some branches and kassert some redundant assignments.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/usb/motg.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/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.32 src/sys/dev/usb/motg.c:1.33
--- src/sys/dev/usb/motg.c:1.32	Sun Feb 23 08:54:47 2020
+++ src/sys/dev/usb/motg.c	Sun Feb 23 08:54:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.32 2020/02/23 08:54:47 riastradh Exp $	*/
+/*	$NetBSD: motg.c,v 1.33 2020/02/23 08:54:55 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.32 2020/02/23 08:54:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.33 2020/02/23 08:54:55 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1284,7 +1284,7 @@ motg_device_ctrl_transfer(struct usbd_xf
 	/* Insert last in queue. */
 	mutex_enter(>sc_lock);
 	err = usb_insert_transfer(xfer);
-	xfer->ux_status = USBD_NOT_STARTED;
+	KASSERT(xfer->ux_status == USBD_NOT_STARTED);
 	mutex_exit(>sc_lock);
 	if (err)
 		return err;
@@ -1304,9 +1304,7 @@ motg_device_ctrl_start(struct usbd_xfer 
 	mutex_enter(>sc_lock);
 	err = motg_device_ctrl_start1(sc);
 	mutex_exit(>sc_lock);
-	if (err != USBD_IN_PROGRESS)
-		return err;
-	return USBD_IN_PROGRESS;
+	return err;
 }
 
 static usbd_status
@@ -1741,7 +1739,7 @@ motg_device_data_transfer(struct usbd_xf
 	mutex_enter(>sc_lock);
 	DPRINTF("xfer %#jx status %jd", (uintptr_t)xfer, xfer->ux_status, 0, 0);
 	err = usb_insert_transfer(xfer);
-	xfer->ux_status = USBD_NOT_STARTED;
+	KASSERT(xfer->ux_status == USBD_NOT_STARTED);
 	mutex_exit(>sc_lock);
 	if (err)
 		return err;
@@ -1766,9 +1764,7 @@ motg_device_data_start(struct usbd_xfer 
 	DPRINTF("xfer %#jx status %jd", (uintptr_t)xfer, xfer->ux_status, 0, 0);
 	err = motg_device_data_start1(sc, otgpipe->hw_ep);
 	mutex_exit(>sc_lock);
-	if (err != USBD_IN_PROGRESS)
-		return err;
-	return USBD_IN_PROGRESS;
+	return err;
 }
 
 static usbd_status



CVS commit: src/etc/rc.d

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:53:26 UTC 2020

Modified Files:
src/etc/rc.d: mountall

Log Message:
If zfs=YES, unconditioally do zfs mount/unmount -a.

If you set zfs=YES, presumably you positively want the automatic rc.d
actions, so if there's no /sbin/zfs or if zfs can't find pools with
/etc/zfs/zpool.cache, presumably you would like feedback about that
in rc.log.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/etc/rc.d/mountall

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

Modified files:

Index: src/etc/rc.d/mountall
diff -u src/etc/rc.d/mountall:1.11 src/etc/rc.d/mountall:1.12
--- src/etc/rc.d/mountall:1.11	Sun Sep 15 19:38:09 2019
+++ src/etc/rc.d/mountall	Sun Feb 23 08:53:25 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mountall,v 1.11 2019/09/15 19:38:09 brad Exp $
+# $NetBSD: mountall,v 1.12 2020/02/23 08:53:25 riastradh Exp $
 #
 
 # REQUIRE: mountcritremote named ypbind
@@ -17,7 +17,7 @@ mountall_start()
 	echo 'Mounting all file systems...'
 	# Mount file systems noted in fstab.
 	mount -a
-	if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
+	if checkyesno zfs; then
 		# Mount ZFS file systems.
 		zfs mount -a
 	fi
@@ -26,7 +26,7 @@ mountall_start()
 mountall_stop()
 {
 	echo 'Unmounting all file systems...'
-	if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
+	if checkyesno zfs; then
 		# Unmount ZFS file systems.
 		zfs unmount -a
 	fi



CVS commit: src/etc/rc.d

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:53:14 UTC 2020

Modified Files:
src/etc/rc.d: random_seed

Log Message:
Allow random seed on zfs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/random_seed

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

Modified files:

Index: src/etc/rc.d/random_seed
diff -u src/etc/rc.d/random_seed:1.7 src/etc/rc.d/random_seed:1.8
--- src/etc/rc.d/random_seed:1.7	Tue Jul 22 17:11:09 2014
+++ src/etc/rc.d/random_seed	Sun Feb 23 08:53:14 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: random_seed,v 1.7 2014/07/22 17:11:09 wiz Exp $
+# $NetBSD: random_seed,v 1.8 2020/02/23 08:53:14 riastradh Exp $
 #
 
 # PROVIDE: random_seed
@@ -47,7 +47,7 @@ fs_safe()
 	#
 	fstype="$(getfstype "$1")"
 	case "${fstype}" in
-	ffs|lfs|ext2fs|msdos|v7fs)
+	ffs|lfs|ext2fs|msdos|v7fs|zfs)
 		return 0
 		;;
 	*)



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:49:46 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_alloc.c lfs_extern.h lfs_vfsops.c

Log Message:
Dust off the orphan detection code and try to make it work.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -u -r1.117 -r1.118 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.372 -r1.373 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_alloc.c
diff -u src/sys/ufs/lfs/lfs_alloc.c:1.140 src/sys/ufs/lfs/lfs_alloc.c:1.141
--- src/sys/ufs/lfs/lfs_alloc.c:1.140	Sun Feb 23 08:49:34 2020
+++ src/sys/ufs/lfs/lfs_alloc.c	Sun Feb 23 08:49:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_alloc.c,v 1.140 2020/02/23 08:49:34 riastradh Exp $	*/
+/*	$NetBSD: lfs_alloc.c,v 1.141 2020/02/23 08:49:46 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.140 2020/02/23 08:49:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.141 2020/02/23 08:49:46 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -705,16 +705,16 @@ lfs_vfree(struct vnode *vp, ino_t ino, i
  * Takes the segmenet lock.
  */
 void
-lfs_order_freelist(struct lfs *fs)
+lfs_order_freelist(struct lfs *fs, ino_t **orphanp, size_t *norphanp)
 {
 	CLEANERINFO *cip;
 	IFILE *ifp = NULL;
 	struct buf *bp;
 	ino_t ino, firstino, lastino, maxino;
-#ifdef notyet
-	struct vnode *vp;
-#endif
-	
+	ino_t *orphan = NULL;
+	size_t norphan = 0;
+	size_t norphan_alloc = 0;
+
 	ASSERT_NO_SEGLOCK(fs);
 	lfs_seglock(fs, SEGM_PROT);
 
@@ -745,7 +745,6 @@ lfs_order_freelist(struct lfs *fs)
 		if (ino == LFS_UNUSED_INUM || ino == LFS_IFILE_INUM)
 			continue;
 
-#ifdef notyet
 		/*
 		 * Address orphaned files.
 		 *
@@ -757,40 +756,26 @@ lfs_order_freelist(struct lfs *fs)
 		 * but presumably it doesn't work... not sure what
 		 * happens to such files currently. -- dholland 20160806
 		 */
-		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE(fs) &&
-		VFS_VGET(fs->lfs_ivnode->v_mount, ino, LK_EXCLUSIVE, )
-		 == 0) {
-			unsigned segno;
-
-			/* get the segment the inode in on disk  */
-			segno = lfs_dtosn(fs, lfs_if_getdaddr(fs, ifp));
-
-			/* truncate the inode */
-			lfs_truncate(vp, 0, 0, NOCRED);
-			vput(vp);
-
-			/* load the segment summary */
-			LFS_SEGENTRY(sup, fs, segno, bp);
-			/* update the number of bytes in the segment */
-			KASSERT(sup->su_nbytes >= DINOSIZE(fs));
-			sup->su_nbytes -= DINOSIZE(fs);
-			/* write the segment summary */
-			LFS_WRITESEGENTRY(sup, fs, segno, bp);
-
-			/* Drop the on-disk address */
-			lfs_if_setdaddr(fs, ifp, LFS_UNUSED_DADDR);
-			/* write the ifile entry */
-			LFS_BWRITE_LOG(bp);
-
-			/*
-			 * and reload it (XXX: why? I guess
-			 * LFS_BWRITE_LOG drops it...)
-			 */
-			LFS_IENTRY(ifp, fs, ino, bp);
-
-			/* Fall through to next if block */
+		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE(fs)) {
+			if (orphan == NULL) {
+norphan_alloc = 32; /* XXX pulled from arse */
+orphan = kmem_zalloc(sizeof(orphan[0]) *
+norphan_alloc, KM_SLEEP);
+			} else if (norphan == norphan_alloc) {
+ino_t *orphan_new;
+if (norphan_alloc >= 4096)
+	norphan_alloc += 4096;
+else
+	norphan_alloc *= 2;
+orphan_new = kmem_zalloc(sizeof(orphan[0]) *
+norphan_alloc, KM_SLEEP);
+memcpy(orphan_new, orphan, sizeof(orphan[0]) *
+norphan);
+kmem_free(orphan, sizeof(orphan[0]) * norphan);
+orphan = orphan_new;
+			}
+			orphan[norphan++] = ino;
 		}
-#endif
 
 		if (lfs_if_getdaddr(fs, ifp) == LFS_UNUSED_DADDR) {
 
@@ -837,6 +822,22 @@ lfs_order_freelist(struct lfs *fs)
 
 	/* done */
 	lfs_segunlock(fs);
+
+	/*
+	 * Shrink the array of orphans so we don't have to carry around
+	 * the allocation size.
+	 */
+	if (norphan < norphan_alloc) {
+		ino_t *orphan_new = kmem_alloc(sizeof(orphan[0]) * norphan,
+		KM_SLEEP);
+		memcpy(orphan_new, orphan, sizeof(orphan[0]) * norphan);
+		kmem_free(orphan, sizeof(orphan[0]) * norphan_alloc);
+		orphan = orphan_new;
+		norphan_alloc = norphan;
+	}
+
+	*orphanp = orphan;
+	*norphanp = norphan;
 }
 
 /*
@@ -855,3 +856,82 @@ lfs_orphan(struct lfs *fs, ino_t ino)
 	lfs_if_setnextfree(fs, ifp, LFS_ORPHAN_NEXTFREE(fs));
 	LFS_BWRITE_LOG(bp);
 }
+
+/*
+ * Free orphans discovered during mount.  This is a separate stage
+ * because it requires fs->lfs_suflags to be set up, which is not done
+ * by the time we run lfs_order_freelist.  It's possible that we could
+ * run lfs_order_freelist later (i.e., set up fs->lfs_suflags sooner)
+ * but that requires more thought than I can put into this at the
+ * moment.
+ */
+void
+lfs_free_orphans(struct lfs *fs, ino_t *orphan, size_t norphan)
+{
+	size_t i;
+
+	

CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:49:34 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs.h lfs_alloc.c

Log Message:
Teach LFS_ORPHAN_NEXTFREE about lfs64.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/ufs/lfs/lfs.h
cvs rdiff -u -r1.139 -r1.140 src/sys/ufs/lfs/lfs_alloc.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/ufs/lfs/lfs.h
diff -u src/sys/ufs/lfs/lfs.h:1.204 src/sys/ufs/lfs/lfs.h:1.205
--- src/sys/ufs/lfs/lfs.h:1.204	Thu Jan 10 06:31:04 2019
+++ src/sys/ufs/lfs/lfs.h	Sun Feb 23 08:49:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs.h,v 1.204 2019/01/10 06:31:04 martin Exp $	*/
+/*	$NetBSD: lfs.h,v 1.205 2020/02/23 08:49:34 riastradh Exp $	*/
 
 /*  from NetBSD: dinode.h,v 1.25 2016/01/22 23:06:10 dholland Exp  */
 /*  from NetBSD: dir.h,v 1.25 2015/09/01 06:16:03 dholland Exp  */
@@ -596,8 +596,9 @@ typedef union iinfo {
 
 /* magic value for daddrs */
 #define	LFS_UNUSED_DADDR	0	/* out-of-band daddr */
-/* magic value for if_nextfree */
-#define LFS_ORPHAN_NEXTFREE	(~(uint32_t)0) /* indicate orphaned file */
+/* magic value for if_nextfree -- indicate orphaned file */
+#define LFS_ORPHAN_NEXTFREE(fs) \
+	((fs)->lfs_is64 ? ~(uint64_t)0 : ~(uint32_t)0)
 
 typedef struct ifile64 IFILE64;
 struct ifile64 {

Index: src/sys/ufs/lfs/lfs_alloc.c
diff -u src/sys/ufs/lfs/lfs_alloc.c:1.139 src/sys/ufs/lfs/lfs_alloc.c:1.140
--- src/sys/ufs/lfs/lfs_alloc.c:1.139	Sat Feb 22 00:32:08 2020
+++ src/sys/ufs/lfs/lfs_alloc.c	Sun Feb 23 08:49:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_alloc.c,v 1.139 2020/02/22 00:32:08 kamil Exp $	*/
+/*	$NetBSD: lfs_alloc.c,v 1.140 2020/02/23 08:49:34 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.139 2020/02/22 00:32:08 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.140 2020/02/23 08:49:34 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -757,7 +757,7 @@ lfs_order_freelist(struct lfs *fs)
 		 * but presumably it doesn't work... not sure what
 		 * happens to such files currently. -- dholland 20160806
 		 */
-		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE &&
+		if (lfs_if_getnextfree(fs, ifp) == LFS_ORPHAN_NEXTFREE(fs) &&
 		VFS_VGET(fs->lfs_ivnode->v_mount, ino, LK_EXCLUSIVE, )
 		 == 0) {
 			unsigned segno;
@@ -852,6 +852,6 @@ lfs_orphan(struct lfs *fs, ino_t ino)
 	struct buf *bp;
 
 	LFS_IENTRY(ifp, fs, ino, bp);
-	lfs_if_setnextfree(fs, ifp, LFS_ORPHAN_NEXTFREE);
+	lfs_if_setnextfree(fs, ifp, LFS_ORPHAN_NEXTFREE(fs));
 	LFS_BWRITE_LOG(bp);
 }



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:42:53 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_extern.h lfs_subr.c

Log Message:
lfs_writer_enter can't fail; keep it simple and don't pretend it can.

Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.99 -r1.100 src/sys/ufs/lfs/lfs_subr.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/ufs/lfs/lfs_extern.h
diff -u src/sys/ufs/lfs/lfs_extern.h:1.116 src/sys/ufs/lfs/lfs_extern.h:1.117
--- src/sys/ufs/lfs/lfs_extern.h:1.116	Sun Feb 23 08:40:37 2020
+++ src/sys/ufs/lfs/lfs_extern.h	Sun Feb 23 08:42:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_extern.h,v 1.116 2020/02/23 08:40:37 riastradh Exp $	*/
+/*	$NetBSD: lfs_extern.h,v 1.117 2020/02/23 08:42:53 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -210,7 +210,7 @@ void lfs_free(struct lfs *, void *, int)
 int lfs_seglock(struct lfs *, unsigned long);
 void lfs_segunlock(struct lfs *);
 void lfs_segunlock_relock(struct lfs *);
-int lfs_writer_enter(struct lfs *, const char *);
+void lfs_writer_enter(struct lfs *, const char *);
 int lfs_writer_tryenter(struct lfs *);
 void lfs_writer_leave(struct lfs *);
 void lfs_wakeup_cleaner(struct lfs *);

Index: src/sys/ufs/lfs/lfs_subr.c
diff -u src/sys/ufs/lfs/lfs_subr.c:1.99 src/sys/ufs/lfs/lfs_subr.c:1.100
--- src/sys/ufs/lfs/lfs_subr.c:1.99	Sun Feb 23 08:40:37 2020
+++ src/sys/ufs/lfs/lfs_subr.c	Sun Feb 23 08:42:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_subr.c,v 1.99 2020/02/23 08:40:37 riastradh Exp $	*/
+/*	$NetBSD: lfs_subr.c,v 1.100 2020/02/23 08:42:53 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.99 2020/02/23 08:40:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.100 2020/02/23 08:42:53 riastradh Exp $");
 
 #include 
 #include 
@@ -561,6 +561,7 @@ lfs_segunlock(struct lfs *fs)
 			lfs_unmark_dirop(fs);
 	} else {
 		--fs->lfs_seglock;
+		KASSERT(fs->lfs_seglock != 0);
 		mutex_exit(_lock);
 	}
 }
@@ -570,10 +571,10 @@ lfs_segunlock(struct lfs *fs)
  *
  * No simple_locks are held when we enter and none are held when we return.
  */
-int
+void
 lfs_writer_enter(struct lfs *fs, const char *wmesg)
 {
-	int error = 0;
+	int error;
 
 	ASSERT_NO_SEGLOCK(fs);
 	mutex_enter(_lock);
@@ -585,15 +586,11 @@ lfs_writer_enter(struct lfs *fs, const c
 		++fs->lfs_diropwait;
 		error = mtsleep(>lfs_writer, PRIBIO+1, wmesg, 0,
 _lock);
+		KASSERT(error == 0);
 		--fs->lfs_diropwait;
 	}
 
-	if (error)
-		fs->lfs_writer--;
-
 	mutex_exit(_lock);
-
-	return error;
 }
 
 int



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:41:08 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_rename.c

Log Message:
Call lfs_orphan in lfs_rename while we're still in the dirop.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/ufs/lfs/lfs_rename.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/ufs/lfs/lfs_rename.c
diff -u src/sys/ufs/lfs/lfs_rename.c:1.22 src/sys/ufs/lfs/lfs_rename.c:1.23
--- src/sys/ufs/lfs/lfs_rename.c:1.22	Sat Jun 10 05:29:36 2017
+++ src/sys/ufs/lfs/lfs_rename.c	Sun Feb 23 08:41:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_rename.c,v 1.22 2017/06/10 05:29:36 maya Exp $	*/
+/*	$NetBSD: lfs_rename.c,v 1.23 2020/02/23 08:41:07 riastradh Exp $	*/
 /*  from NetBSD: ufs_rename.c,v 1.12 2015/03/27 17:27:56 riastradh Exp  */
 
 /*-
@@ -89,7 +89,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.22 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.23 2020/02/23 08:41:07 riastradh Exp $");
 
 #include 
 #include 
@@ -1061,6 +1061,9 @@ lfs_gro_rename(struct mount *mp, kauth_c
 	fdvp, fcnp, fde, fvp,
 	tdvp, tcnp, tde, tvp);
 
+	if (tvp && VTOI(tvp)->i_nlink == 0)
+		lfs_orphan(VTOI(tvp)->i_lfs, VTOI(tvp)->i_number);
+
 	UNMARK_VNODE(fdvp);
 	UNMARK_VNODE(fvp);
 	UNMARK_VNODE(tdvp);



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:59 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_inode.c

Log Message:
In lfs_update, hold lfs_writer around lfs_vflush.

Otherwise, we might do

lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
   -> lfs_writer_enter

which is the reverse of the lfs_writer -> lfs_seglock ordering.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/ufs/lfs/lfs_inode.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/ufs/lfs/lfs_inode.c
diff -u src/sys/ufs/lfs/lfs_inode.c:1.157 src/sys/ufs/lfs/lfs_inode.c:1.158
--- src/sys/ufs/lfs/lfs_inode.c:1.157	Sat Jun 10 05:29:36 2017
+++ src/sys/ufs/lfs/lfs_inode.c	Sun Feb 23 08:40:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_inode.c,v 1.157 2017/06/10 05:29:36 maya Exp $	*/
+/*	$NetBSD: lfs_inode.c,v 1.158 2020/02/23 08:40:58 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.157 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.158 2020/02/23 08:40:58 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -133,6 +133,7 @@ lfs_update(struct vnode *vp, const struc
 	struct inode *ip;
 	struct lfs *fs = VFSTOULFS(vp->v_mount)->um_lfs;
 	int flags;
+	int error;
 
 	ASSERT_NO_SEGLOCK(fs);
 	if (vp->v_mount->mnt_flag & MNT_RDONLY)
@@ -175,7 +176,7 @@ lfs_update(struct vnode *vp, const struc
 			  vp->v_iflag | vp->v_vflag | vp->v_uflag,
 			  ip->i_state));
 			if (fs->lfs_dirops == 0)
-lfs_flush_fs(fs, SEGM_SYNC);
+break;
 			else
 mtsleep(>lfs_writer, PRIBIO+1, "lfs_fsync",
 	0, _lock);
@@ -183,8 +184,18 @@ lfs_update(struct vnode *vp, const struc
 			twice? */
 		}
 		--fs->lfs_diropwait;
+		fs->lfs_writer++;
+		if (vp->v_uflag & VU_DIROP) {
+			KASSERT(fs->lfs_dirops == 0);
+			lfs_flush_fs(fs, SEGM_SYNC);
+		}
+		mutex_exit(_lock);
+		error = lfs_vflush(vp);
+		mutex_enter(_lock);
+		if (--fs->lfs_writer == 0)
+			cv_broadcast(>lfs_diropscv);
 		mutex_exit(_lock);
-		return lfs_vflush(vp);
+		return error;
 	}
 	return 0;
 }



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:49 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_vfsops.c

Log Message:
Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.371 src/sys/ufs/lfs/lfs_vfsops.c:1.372
--- src/sys/ufs/lfs/lfs_vfsops.c:1.371	Sun Feb 23 08:39:18 2020
+++ src/sys/ufs/lfs/lfs_vfsops.c	Sun Feb 23 08:40:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vfsops.c,v 1.371 2020/02/23 08:39:18 riastradh Exp $	*/
+/*	$NetBSD: lfs_vfsops.c,v 1.372 2020/02/23 08:40:49 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.371 2020/02/23 08:39:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.372 2020/02/23 08:40:49 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_lfs.h"
@@ -356,6 +356,7 @@ lfs_modcmd(modcmd_t cmd, void *arg)
 			break;
 		}
 		lfs_sysctl_setup(_sysctl_log);
+		cv_init(_allclean_wakeup, "segment");
 		break;
 	case MODULE_CMD_FINI:
 		error = vfs_detach(_vfsops);
@@ -363,6 +364,7 @@ lfs_modcmd(modcmd_t cmd, void *arg)
 			break;
 		syscall_disestablish(NULL, lfs_syscalls);
 		sysctl_teardown(_sysctl_log);
+		cv_destroy(_allclean_wakeup);
 		break;
 	default:
 		error = ENOTTY;
@@ -857,7 +859,6 @@ lfs_checkmagic(struct lfs *fs)
 int
 lfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
 {
-	static bool lfs_mounted_once = false;
 	struct lfs *primarysb, *altsb, *thesb;
 	struct buf *primarybuf, *altbuf;
 	struct lfs *fs;
@@ -1091,12 +1092,6 @@ lfs_mountfs(struct vnode *devvp, struct 
 	cv_init(>lfs_stopcv, "lfsstop");
 	cv_init(>lfs_nextsegsleep, "segment");
 
-	/* Initialize values for all LFS mounts */
-	if (!lfs_mounted_once) {
-		cv_init(_allclean_wakeup, "segment");
-		lfs_mounted_once = true;
-	}
-
 	/* Set the file system readonly/modify bits. */
 	fs->lfs_ronly = ronly;
 	if (ronly == 0)



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:08 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_segment.c lfs_vnops.c

Log Message:
Change some cheap KDASSERT into KASSERT.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.327 -r1.328 src/sys/ufs/lfs/lfs_vnops.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/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.283 src/sys/ufs/lfs/lfs_segment.c:1.284
--- src/sys/ufs/lfs/lfs_segment.c:1.283	Sat Feb 22 22:20:47 2020
+++ src/sys/ufs/lfs/lfs_segment.c	Sun Feb 23 08:40:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.283 2020/02/22 22:20:47 ad Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.284 2020/02/23 08:40:08 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.283 2020/02/22 22:20:47 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.284 2020/02/23 08:40:08 riastradh Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -396,7 +396,7 @@ lfs_vflush(struct vnode *vp)
 	 * still not done with this vnode.
 	 * XXX we can do better than this.
 	 */
-	KDASSERT(ip->i_number != LFS_IFILE_INUM);
+	KASSERT(ip->i_number != LFS_IFILE_INUM);
 	lfs_writeinode(fs, sp, ip);
 	mutex_enter(_lock);
 	LFS_SET_UINO(ip, IN_MODIFIED);

Index: src/sys/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.327 src/sys/ufs/lfs/lfs_vnops.c:1.328
--- src/sys/ufs/lfs/lfs_vnops.c:1.327	Sun Feb 23 08:39:39 2020
+++ src/sys/ufs/lfs/lfs_vnops.c	Sun Feb 23 08:40:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.327 2020/02/23 08:39:39 riastradh Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.328 2020/02/23 08:40:08 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.327 2020/02/23 08:39:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.328 2020/02/23 08:40:08 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1707,7 +1707,7 @@ lfs_flush_dirops(struct lfs *fs)
 break;
 			}
 		}
-		KDASSERT(ip->i_number != LFS_IFILE_INUM);
+		KASSERT(ip->i_number != LFS_IFILE_INUM);
 		error = lfs_writeinode(fs, sp, ip);
 		mutex_enter(_lock);
 		if (error && (sp->seg_flags & SEGM_SINGLE)) {
@@ -1829,7 +1829,7 @@ lfs_flush_pchain(struct lfs *fs)
 			LFS_SET_UINO(ip, IN_MODIFIED);
 			mutex_exit(_lock);
 		}
-		KDASSERT(ip->i_number != LFS_IFILE_INUM);
+		KASSERT(ip->i_number != LFS_IFILE_INUM);
 		error2 = lfs_writeinode(fs, sp, ip);
 
 		VOP_UNLOCK(vp);



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:19 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_vnops.c

Log Message:
Take a reference and fix assertions in lfs_flush_dirops.

Fixes panic:

KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/ufs/lfs/lfs_vnops.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/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.328 src/sys/ufs/lfs/lfs_vnops.c:1.329
--- src/sys/ufs/lfs/lfs_vnops.c:1.328	Sun Feb 23 08:40:08 2020
+++ src/sys/ufs/lfs/lfs_vnops.c	Sun Feb 23 08:40:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.328 2020/02/23 08:40:08 riastradh Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.328 2020/02/23 08:40:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.329 2020/02/23 08:40:19 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1623,7 +1623,6 @@ lfs_flush_dirops(struct lfs *fs)
 		return EROFS;
 
 	mutex_enter(_lock);
-	KASSERT(fs->lfs_writer);
 	if (TAILQ_FIRST(>lfs_dchainhd) == NULL) {
 		mutex_exit(_lock);
 		return 0;
@@ -1667,13 +1666,33 @@ lfs_flush_dirops(struct lfs *fs)
 			lfs_dchain_marker_pass_flush.ev_count++;
 			continue;
 		}
-		mutex_exit(_lock);
 		vp = ITOV(ip);
-		mutex_enter(vp->v_interlock);
 
+		/*
+		 * Prevent the vnode from going away if it's just been
+		 * put out in the segment and lfs_unmark_dirop is about
+		 * to release it.  While it is on the list it is always
+		 * referenced, so it cannot be reclaimed until we
+		 * release it.
+		 */
+		vref(vp);
+
+		/*
+		 * Since we hold lfs_writer, the node can't be in an
+		 * active dirop.  Since it's on the list and we hold a
+		 * reference to it, it can't be reclaimed now.
+		 */
 		KASSERT((ip->i_state & IN_ADIROP) == 0);
 		KASSERT(vp->v_uflag & VU_DIROP);
-		KASSERT(vdead_check(vp, VDEAD_NOWAIT) == 0);
+
+		/*
+		 * After we release lfs_lock, if we were in the middle
+		 * of writing a segment, lfs_unmark_dirop may end up
+		 * clearing VU_DIROP, and we have no way to stop it.
+		 * That should be OK -- we'll just have less to do
+		 * here.
+		 */
+		mutex_exit(_lock);
 
 		/*
 		 * All writes to directories come from dirops; all
@@ -1683,15 +1702,6 @@ lfs_flush_dirops(struct lfs *fs)
 		 * directory blocks inodes and file inodes.  So we don't
 		 * really need to lock.
 		 */
-		if (vdead_check(vp, VDEAD_NOWAIT) != 0) {
-			mutex_exit(vp->v_interlock);
-			mutex_enter(_lock);
-			continue;
-		}
-		mutex_exit(vp->v_interlock);
-		/* XXX see below
-		 * waslocked = VOP_ISLOCKED(vp);
-		 */
 		if (vp->v_type != VREG &&
 		((ip->i_state & IN_ALLMOD) || !VPISEMPTY(vp))) {
 			error = lfs_writefile(fs, sp, vp);
@@ -1702,6 +1712,7 @@ lfs_flush_dirops(struct lfs *fs)
 				mutex_exit(_lock);
 			}
 			if (error && (sp->seg_flags & SEGM_SINGLE)) {
+vrele(vp);
 mutex_enter(_lock);
 error = EAGAIN;
 break;
@@ -1709,8 +1720,9 @@ lfs_flush_dirops(struct lfs *fs)
 		}
 		KASSERT(ip->i_number != LFS_IFILE_INUM);
 		error = lfs_writeinode(fs, sp, ip);
-		mutex_enter(_lock);
 		if (error && (sp->seg_flags & SEGM_SINGLE)) {
+			vrele(vp);
+			mutex_enter(_lock);
 			error = EAGAIN;
 			break;
 		}
@@ -1723,7 +1735,12 @@ lfs_flush_dirops(struct lfs *fs)
 		 * write them.
 		 */
 		/* XXX only for non-directories? --KS */
+		mutex_enter(_lock);
 		LFS_SET_UINO(ip, IN_MODIFIED);
+		mutex_exit(_lock);
+
+		vrele(vp);
+		mutex_enter(_lock);
 	}
 	TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
 	mutex_exit(_lock);



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:28 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_pages.c

Log Message:
Don't lfs_writer_enter while holding v_interlock.

There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/ufs/lfs/lfs_pages.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/ufs/lfs/lfs_pages.c
diff -u src/sys/ufs/lfs/lfs_pages.c:1.20 src/sys/ufs/lfs/lfs_pages.c:1.21
--- src/sys/ufs/lfs/lfs_pages.c:1.20	Wed Jan 15 17:55:44 2020
+++ src/sys/ufs/lfs/lfs_pages.c	Sun Feb 23 08:40:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_pages.c,v 1.20 2020/01/15 17:55:44 ad Exp $	*/
+/*	$NetBSD: lfs_pages.c,v 1.21 2020/02/23 08:40:27 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2019 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.20 2020/01/15 17:55:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.21 2020/02/23 08:40:27 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -671,29 +671,30 @@ retry:
 	(vp->v_uflag & VU_DIROP)) {
 		DLOG((DLOG_PAGE, "lfs_putpages: flushing VU_DIROP\n"));
 
- 		lfs_writer_enter(fs, "ppdirop");
+		/*
+		 * NB: lfs_flush_fs can recursively call lfs_putpages,
+		 * but it won't reach this branch because it passes
+		 * PGO_LOCKED.
+		 */
 
-		/* Note if we hold the vnode locked */
-		if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE)
-		{
-		DLOG((DLOG_PAGE, "lfs_putpages: dirop inode already locked\n"));
-		} else {
-		DLOG((DLOG_PAGE, "lfs_putpages: dirop inode not locked\n"));
-		}
 		mutex_exit(vp->v_interlock);
-
 		mutex_enter(_lock);
 		lfs_flush_fs(fs, sync ? SEGM_SYNC : 0);
 		mutex_exit(_lock);
-
 		mutex_enter(vp->v_interlock);
-		lfs_writer_leave(fs);
 
 		/*
 		 * The flush will have cleaned out this vnode as well,
 		 *  no need to do more to it.
 		 *  XXX then why are we falling through and continuing?
 		 */
+
+		/*
+		 * XXX State may have changed while we dropped the
+		 * lock; start over just in case.  The above comment
+		 * suggests this should maybe instead be goto out.
+		 */
+		goto retry;
 	}
 
 	/*



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:40:37 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_extern.h lfs_segment.c lfs_subr.c

Log Message:
Break deadlock in PR kern/52301.

The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):

(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.

(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:

(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.

(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.284 -r1.285 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.98 -r1.99 src/sys/ufs/lfs/lfs_subr.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/ufs/lfs/lfs_extern.h
diff -u src/sys/ufs/lfs/lfs_extern.h:1.115 src/sys/ufs/lfs/lfs_extern.h:1.116
--- src/sys/ufs/lfs/lfs_extern.h:1.115	Tue Feb 18 20:23:17 2020
+++ src/sys/ufs/lfs/lfs_extern.h	Sun Feb 23 08:40:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_extern.h,v 1.115 2020/02/18 20:23:17 chs Exp $	*/
+/*	$NetBSD: lfs_extern.h,v 1.116 2020/02/23 08:40:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -211,6 +211,7 @@ int lfs_seglock(struct lfs *, unsigned l
 void lfs_segunlock(struct lfs *);
 void lfs_segunlock_relock(struct lfs *);
 int lfs_writer_enter(struct lfs *, const char *);
+int lfs_writer_tryenter(struct lfs *);
 void lfs_writer_leave(struct lfs *);
 void lfs_wakeup_cleaner(struct lfs *);
 

Index: src/sys/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.284 src/sys/ufs/lfs/lfs_segment.c:1.285
--- src/sys/ufs/lfs/lfs_segment.c:1.284	Sun Feb 23 08:40:08 2020
+++ src/sys/ufs/lfs/lfs_segment.c	Sun Feb 23 08:40:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.284 2020/02/23 08:40:08 riastradh Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.285 2020/02/23 08:40:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.284 2020/02/23 08:40:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.285 2020/02/23 08:40:37 riastradh Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -621,6 +621,15 @@ lfs_segwrite(struct mount *mp, int flags
 	 */
 	do_ckp = LFS_SHOULD_CHECKPOINT(fs, flags);
 
+	/*
+	 * If we know we're gonna need the writer lock, take it now to
+	 * preserve the lock order lfs_writer -> lfs_seglock.
+	 */
+	if (do_ckp) {
+		lfs_writer_enter(fs, "ckpwriter");
+		writer_set = 1;
+	}
+
 	/* We can't do a partial write and checkpoint at the same time. */
 	if (do_ckp)
 		flags &= ~SEGM_SINGLE;
@@ -650,11 +659,10 @@ lfs_segwrite(struct mount *mp, int flags
 break;
 			}
 
-			if (do_ckp || fs->lfs_dirops == 0) {
-if (!writer_set) {
-	lfs_writer_enter(fs, "lfs writer");
-	writer_set = 1;
-}
+			if (do_ckp ||
+			(writer_set = lfs_writer_tryenter(fs)) != 0) {
+KASSERT(writer_set);
+KASSERT(fs->lfs_writer);
 error = lfs_writevnodes(fs, mp, sp, VN_DIROP);
 if (um_error == 0)
 	um_error = error;

Index: src/sys/ufs/lfs/lfs_subr.c
diff -u src/sys/ufs/lfs/lfs_subr.c:1.98 src/sys/ufs/lfs/lfs_subr.c:1.99
--- src/sys/ufs/lfs/lfs_subr.c:1.98	Sun Feb 23 08:38:58 2020
+++ src/sys/ufs/lfs/lfs_subr.c	Sun Feb 23 08:40:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_subr.c,v 1.98 2020/02/23 08:38:58 riastradh Exp $	*/
+/*	$NetBSD: lfs_subr.c,v 1.99 2020/02/23 08:40:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.98 2020/02/23 08:38:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.99 2020/02/23 08:40:37 riastradh Exp $");
 
 #include 
 #include 
@@ -575,7 +575,7 @@ lfs_writer_enter(struct lfs *fs, const c
 {
 	int error = 0;
 
-	ASSERT_MAYBE_SEGLOCK(fs);
+	ASSERT_NO_SEGLOCK(fs);
 	mutex_enter(_lock);
 
 	/* disallow dirops during flush */
@@ -596,6 +596,21 @@ lfs_writer_enter(struct lfs *fs, const c
 	return error;
 }
 
+int

CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:39:19 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_vfsops.c

Log Message:
Teach lfs to transition ro<->rw.


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.370 src/sys/ufs/lfs/lfs_vfsops.c:1.371
--- src/sys/ufs/lfs/lfs_vfsops.c:1.370	Tue Feb 18 20:23:17 2020
+++ src/sys/ufs/lfs/lfs_vfsops.c	Sun Feb 23 08:39:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vfsops.c,v 1.370 2020/02/18 20:23:17 chs Exp $	*/
+/*	$NetBSD: lfs_vfsops.c,v 1.371 2020/02/23 08:39:18 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.370 2020/02/18 20:23:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.371 2020/02/23 08:39:18 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_lfs.h"
@@ -120,6 +120,7 @@ MODULE(MODULE_CLASS_VFS, lfs, NULL);
 
 static int lfs_gop_write(struct vnode *, struct vm_page **, int, int);
 static int lfs_mountfs(struct vnode *, struct mount *, struct lwp *);
+static int lfs_flushfiles(struct mount *, int);
 
 static struct sysctllog *lfs_sysctl_log;
 
@@ -755,23 +756,18 @@ lfs_mount(struct mount *mp, const char *
 		ump = VFSTOULFS(mp);
 		fs = ump->um_lfs;
 
-		if (fs->lfs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
+		if (!fs->lfs_ronly && (mp->mnt_iflag & IMNT_WANTRDONLY)) {
 			/*
 			 * Changing from read/write to read-only.
-			 * XXX: shouldn't we sync here? or does vfs do that?
 			 */
-#ifdef LFS_QUOTA2
-			/* XXX: quotas should remain on when readonly */
-			if (fs->lfs_use_quota2) {
-error = lfsquota2_umount(mp, 0);
-if (error) {
-	return error;
-}
-			}
-#endif
-		}
-
-		if (fs->lfs_ronly && (mp->mnt_iflag & IMNT_WANTRDWR)) {
+			int flags = WRITECLOSE;
+			if (mp->mnt_flag & MNT_FORCE)
+flags |= FORCECLOSE;
+			error = lfs_flushfiles(mp, flags);
+			if (error)
+return error;
+			fs->lfs_ronly = 1;
+		} else if (fs->lfs_ronly && (mp->mnt_iflag & IMNT_WANTRDWR)) {
 			/*
 			 * Changing from read-only to read/write.
 			 * Note in the superblocks that we're writing.
@@ -805,8 +801,9 @@ lfs_mount(struct mount *mp, const char *
 lfs_writesuper(fs, lfs_sb_getsboff(fs, 1));
 			}
 		}
+
 		if (args->fspec == NULL)
-			return EINVAL;
+			return 0;
 	}
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->fspec,
@@ -1137,6 +1134,7 @@ lfs_mountfs(struct vnode *devvp, struct 
 	mp->mnt_stat.f_iosize = lfs_sb_getbsize(fs);
 	mp->mnt_flag |= MNT_LOCAL;
 	mp->mnt_fs_bshift = lfs_sb_getbshift(fs);
+	mp->mnt_iflag |= IMNT_CAN_RWTORO;
 	if (fs->um_maxsymlinklen > 0)
 		mp->mnt_iflag |= IMNT_DTYPE;
 	else
@@ -1328,22 +1326,72 @@ out:
 int
 lfs_unmount(struct mount *mp, int mntflags)
 {
-	struct lwp *l = curlwp;
 	struct ulfsmount *ump;
 	struct lfs *fs;
-	int error, flags, ronly;
-	vnode_t *vp;
+	int error, ronly;
+
+	ump = VFSTOULFS(mp);
+	fs = ump->um_lfs;
 
-	flags = 0;
-	if (mntflags & MNT_FORCE)
-		flags |= FORCECLOSE;
+	error = lfs_flushfiles(mp, mntflags & MNT_FORCE ? FORCECLOSE : 0);
+	if (error)
+		return error;
+
+	/* Finish with the Ifile, now that we're done with it */
+	vgone(fs->lfs_ivnode);
+
+	ronly = !fs->lfs_ronly;
+	if (fs->lfs_devvp->v_type != VBAD)
+		spec_node_setmountedfs(fs->lfs_devvp, NULL);
+	vn_lock(fs->lfs_devvp, LK_EXCLUSIVE | LK_RETRY);
+	error = VOP_CLOSE(fs->lfs_devvp,
+	ronly ? FREAD : FREAD|FWRITE, NOCRED);
+	vput(fs->lfs_devvp);
+
+	/* Complain about page leakage */
+	if (fs->lfs_pages > 0)
+		printf("lfs_unmount: still claim %d pages (%d in subsystem)\n",
+			fs->lfs_pages, lfs_subsys_pages);
+
+	/* Free per-mount data structures */
+	free(fs->lfs_ino_bitmap, M_SEGMENT);
+	free(fs->lfs_suflags[0], M_SEGMENT);
+	free(fs->lfs_suflags[1], M_SEGMENT);
+	free(fs->lfs_suflags, M_SEGMENT);
+	lfs_free_resblks(fs);
+	cv_destroy(>lfs_sleeperscv);
+	cv_destroy(>lfs_diropscv);
+	cv_destroy(>lfs_stopcv);
+	cv_destroy(>lfs_nextsegsleep);
+
+	rw_destroy(>lfs_fraglock);
+	rw_destroy(>lfs_iflock);
+
+	kmem_free(fs, sizeof(struct lfs));
+	kmem_free(ump, sizeof(*ump));
+
+	mp->mnt_data = NULL;
+	mp->mnt_flag &= ~MNT_LOCAL;
+	return (error);
+}
+
+static int
+lfs_flushfiles(struct mount *mp, int flags)
+{
+	struct lwp *l = curlwp;
+	struct ulfsmount *ump;
+	struct lfs *fs;
+	struct vnode *vp;
+	int error;
 
 	ump = VFSTOULFS(mp);
 	fs = ump->um_lfs;
 
 	/* Two checkpoints */
-	lfs_segwrite(mp, SEGM_CKP | SEGM_SYNC);
-	lfs_segwrite(mp, SEGM_CKP | SEGM_SYNC);
+	if (!fs->lfs_ronly) {
+		lfs_segwrite(mp, SEGM_CKP | SEGM_SYNC);
+		lfs_segwrite(mp, SEGM_CKP | SEGM_SYNC);
+	}
 
 	/* wake up the cleaner so it can die */
 	/* XXX: shouldn't this be *after* the error cases below? */
@@ -1383,51 +1431,18 @@ 

CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:39:48 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_balloc.c

Log Message:
Serialize access to the splay tree with lfs_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/ufs/lfs/lfs_balloc.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/ufs/lfs/lfs_balloc.c
diff -u src/sys/ufs/lfs/lfs_balloc.c:1.94 src/sys/ufs/lfs/lfs_balloc.c:1.95
--- src/sys/ufs/lfs/lfs_balloc.c:1.94	Sat Jun 10 05:29:36 2017
+++ src/sys/ufs/lfs/lfs_balloc.c	Sun Feb 23 08:39:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_balloc.c,v 1.94 2017/06/10 05:29:36 maya Exp $	*/
+/*	$NetBSD: lfs_balloc.c,v 1.95 2020/02/23 08:39:48 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.94 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.95 2020/02/23 08:39:48 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -660,9 +660,10 @@ lfs_register_block(struct vnode *vp, dad
 static void
 lfs_do_deregister(struct lfs *fs, struct inode *ip, struct lbnentry *lbp)
 {
+
+	KASSERT(mutex_owned(_lock));
 	ASSERT_MAYBE_SEGLOCK(fs);
 
-	mutex_enter(_lock);
 	--ip->i_lfs_nbtree;
 	SPLAY_REMOVE(lfs_splay, >i_lfs_lbtree, lbp);
 	if (fs->lfs_favail > lfs_btofsb(fs, (1 << lfs_sb_getbshift(fs
@@ -671,9 +672,12 @@ lfs_do_deregister(struct lfs *fs, struct
 	if (locked_fakequeue_count > 0)
 		--locked_fakequeue_count;
 	lfs_subsys_pages -= lfs_sb_getbsize(fs) >> PAGE_SHIFT;
-	mutex_exit(_lock);
 
+	mutex_exit(_lock);
 	pool_put(_lbnentry_pool, lbp);
+	mutex_enter(_lock);
+
+	KASSERT(mutex_owned(_lock));
 }
 
 void
@@ -690,19 +694,18 @@ lfs_deregister_block(struct vnode *vp, d
 	if (lbn < 0 || vp->v_type != VREG || ip->i_number == LFS_IFILE_INUM)
 		return;
 
+	mutex_enter(_lock);
 	fs = ip->i_lfs;
 	tmp.lbn = lbn;
-	lbp = SPLAY_FIND(lfs_splay, >i_lfs_lbtree, );
-	if (lbp == NULL)
-		return;
-
-	lfs_do_deregister(fs, ip, lbp);
+	if ((lbp = SPLAY_FIND(lfs_splay, >i_lfs_lbtree, )) != NULL)
+		lfs_do_deregister(fs, ip, lbp);
+	mutex_exit(_lock);
 }
 
 void
 lfs_deregister_all(struct vnode *vp)
 {
-	struct lbnentry *lbp, *nlbp;
+	struct lbnentry *lbp;
 	struct lfs_splay *hd;
 	struct lfs *fs;
 	struct inode *ip;
@@ -711,8 +714,8 @@ lfs_deregister_all(struct vnode *vp)
 	fs = ip->i_lfs;
 	hd = >i_lfs_lbtree;
 
-	for (lbp = SPLAY_MIN(lfs_splay, hd); lbp != NULL; lbp = nlbp) {
-		nlbp = SPLAY_NEXT(lfs_splay, hd, lbp);
+	mutex_enter(_lock);
+	while ((lbp = SPLAY_MIN(lfs_splay, hd)) != NULL)
 		lfs_do_deregister(fs, ip, lbp);
-	}
+	mutex_exit(_lock);
 }



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:39:28 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_bio.c

Log Message:
Prevent new dirops while we issue lfs_flush_dirops.

lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0))
that vnodes on the dchain will not become involved in active dirops
even while holding no other locks (lfs_lock, v_interlock), so we must
set lfs_writer here.  All other callers already set lfs_writer.

We set fs->lfs_writer++ without explicitly doing lfs_writer_enter
because

(a) we already waited for the dirops to drain, and
(b) we hold lfs_lock and cannot drop it before setting lfs_writer.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/ufs/lfs/lfs_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/ufs/lfs/lfs_bio.c
diff -u src/sys/ufs/lfs/lfs_bio.c:1.145 src/sys/ufs/lfs/lfs_bio.c:1.146
--- src/sys/ufs/lfs/lfs_bio.c:1.145	Tue Feb 18 20:23:17 2020
+++ src/sys/ufs/lfs/lfs_bio.c	Sun Feb 23 08:39:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_bio.c,v 1.145 2020/02/18 20:23:17 chs Exp $	*/
+/*	$NetBSD: lfs_bio.c,v 1.146 2020/02/23 08:39:28 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.145 2020/02/18 20:23:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.146 2020/02/23 08:39:28 riastradh Exp $");
 
 #include 
 #include 
@@ -653,9 +653,14 @@ lfs_check(struct vnode *vp, daddr_t blkn
 	/* If there are too many pending dirops, we have to flush them. */
 	if (fs->lfs_dirvcount > LFS_MAX_FSDIROP(fs) ||
 	lfs_dirvcount > LFS_MAX_DIROP || fs->lfs_diropwait > 0) {
+		KASSERT(fs->lfs_dirops == 0);
+		fs->lfs_writer++;
 		mutex_exit(_lock);
 		lfs_flush_dirops(fs);
 		mutex_enter(_lock);
+		if (--fs->lfs_writer == 0)
+			cv_broadcast(>lfs_diropscv);
+		KASSERT(fs->lfs_dirops == 0);
 	} else if (locked_queue_count + INOCOUNT(fs) > LFS_MAX_BUFS ||
 	locked_queue_bytes + INOBYTES(fs) > LFS_MAX_BYTES ||
 	lfs_subsys_pages > LFS_MAX_PAGES ||



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:39:39 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_vnops.c

Log Message:
Assert lfs_writer where I think we can now prove it.


To generate a diff of this commit:
cvs rdiff -u -r1.326 -r1.327 src/sys/ufs/lfs/lfs_vnops.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/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.326 src/sys/ufs/lfs/lfs_vnops.c:1.327
--- src/sys/ufs/lfs/lfs_vnops.c:1.326	Sun Feb 23 08:38:58 2020
+++ src/sys/ufs/lfs/lfs_vnops.c	Sun Feb 23 08:39:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.326 2020/02/23 08:38:58 riastradh Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.327 2020/02/23 08:39:39 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.326 2020/02/23 08:38:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.327 2020/02/23 08:39:39 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1616,12 +1616,14 @@ lfs_flush_dirops(struct lfs *fs)
 	int error = 0;
 
 	ASSERT_MAYBE_SEGLOCK(fs);
-	KASSERT(fs->lfs_nadirop == 0);
+	KASSERT(fs->lfs_nadirop == 0); /* stable during lfs_writer */
+	KASSERT(fs->lfs_dirops == 0);  /* stable during lfs_writer */
 
 	if (fs->lfs_ronly)
 		return EROFS;
 
 	mutex_enter(_lock);
+	KASSERT(fs->lfs_writer);
 	if (TAILQ_FIRST(>lfs_dchainhd) == NULL) {
 		mutex_exit(_lock);
 		return 0;
@@ -1655,6 +1657,7 @@ lfs_flush_dirops(struct lfs *fs)
 	 *
 	 */
 	mutex_enter(_lock);
+	KASSERT(fs->lfs_writer);
 	TAILQ_INSERT_HEAD(>lfs_dchainhd, marker, i_lfs_dchain);
 	while ((ip = TAILQ_NEXT(marker, i_lfs_dchain)) != NULL) {
 		TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
@@ -1755,6 +1758,7 @@ lfs_flush_pchain(struct lfs *fs)
 	int error, error2;
 
 	ASSERT_NO_SEGLOCK(fs);
+	KASSERT(fs->lfs_writer);
 
 	if (fs->lfs_ronly)
 		return EROFS;



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:39:09 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_debug.c

Log Message:
Just use VOP_BWRITE for lfs_bwrite_log.

Hope this doesn't cause trouble with vfs_suspend.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/ufs/lfs/lfs_debug.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/ufs/lfs/lfs_debug.c
diff -u src/sys/ufs/lfs/lfs_debug.c:1.54 src/sys/ufs/lfs/lfs_debug.c:1.55
--- src/sys/ufs/lfs/lfs_debug.c:1.54	Tue Sep  1 06:12:04 2015
+++ src/sys/ufs/lfs/lfs_debug.c	Sun Feb 23 08:39:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_debug.c,v 1.54 2015/09/01 06:12:04 dholland Exp $	*/
+/*	$NetBSD: lfs_debug.c,v 1.55 2020/02/23 08:39:09 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_debug.c,v 1.54 2015/09/01 06:12:04 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_debug.c,v 1.55 2020/02/23 08:39:09 riastradh Exp $");
 
 #ifdef DEBUG
 
@@ -84,16 +84,12 @@ struct lfs_log_entry lfs_log[LFS_LOGLENG
 int
 lfs_bwrite_log(struct buf *bp, const char *file, int line)
 {
-	struct vop_bwrite_args a;
-
-	a.a_desc = VDESC(vop_bwrite);
-	a.a_bp = bp;
 
 	if (!(bp->b_flags & B_GATHERED) && !(bp->b_oflags & BO_DELWRI)) {
 		LFS_ENTER_LOG("write", file, line, bp->b_lblkno, bp->b_flags,
 			curproc->p_pid);
 	}
-	return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), ));
+	return VOP_BWRITE(bp->b_vp, bp);
 }
 
 void



CVS commit: src/sys/ufs/lfs

2020-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 23 08:38:58 UTC 2020

Modified Files:
src/sys/ufs/lfs: lfs_inode.h lfs_subr.c lfs_vnops.c

Log Message:
Use a marker node to iterate lfs_dchainhd / i_lfs_dchain.

I believe elements can be removed while the lock is dropped,
including the next node we're hanging on to.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/ufs/lfs/lfs_inode.h
cvs rdiff -u -r1.97 -r1.98 src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -u -r1.325 -r1.326 src/sys/ufs/lfs/lfs_vnops.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/ufs/lfs/lfs_inode.h
diff -u src/sys/ufs/lfs/lfs_inode.h:1.24 src/sys/ufs/lfs/lfs_inode.h:1.25
--- src/sys/ufs/lfs/lfs_inode.h:1.24	Tue Feb 18 20:23:17 2020
+++ src/sys/ufs/lfs/lfs_inode.h	Sun Feb 23 08:38:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_inode.h,v 1.24 2020/02/18 20:23:17 chs Exp $	*/
+/*	$NetBSD: lfs_inode.h,v 1.25 2020/02/23 08:38:58 riastradh Exp $	*/
 /*  from NetBSD: ulfs_inode.h,v 1.5 2013/06/06 00:51:50 dholland Exp  */
 /*  from NetBSD: inode.h,v 1.72 2016/06/03 15:36:03 christos Exp  */
 
@@ -123,6 +123,7 @@ struct inode {
 /* 	   unused	0x0400 */	/* was FFS-only IN_SPACECOUNTED */
 #define	IN_PAGING   0x1000		/* LFS: file is on paging queue */
 #define IN_CDIROP   0x4000  /* LFS: dirop completed pending i/o */
+#define	IN_MARKER	0x0001	/* LFS: marker inode for iteration */
 
 /* XXX this is missing some of the flags */
 #define IN_ALLMOD (IN_MODIFIED|IN_ACCESS|IN_CHANGE|IN_UPDATE|IN_MODIFY|IN_ACCESSED|IN_CLEANING)

Index: src/sys/ufs/lfs/lfs_subr.c
diff -u src/sys/ufs/lfs/lfs_subr.c:1.97 src/sys/ufs/lfs/lfs_subr.c:1.98
--- src/sys/ufs/lfs/lfs_subr.c:1.97	Wed Jul 26 16:42:37 2017
+++ src/sys/ufs/lfs/lfs_subr.c	Sun Feb 23 08:38:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_subr.c,v 1.97 2017/07/26 16:42:37 maya Exp $	*/
+/*	$NetBSD: lfs_subr.c,v 1.98 2020/02/23 08:38:58 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.97 2017/07/26 16:42:37 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.98 2020/02/23 08:38:58 riastradh Exp $");
 
 #include 
 #include 
@@ -337,10 +337,14 @@ lfs_seglock(struct lfs *fs, unsigned lon
 
 static void lfs_unmark_dirop(struct lfs *);
 
+static struct evcnt lfs_dchain_marker_pass_dirop =
+EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "lfs", "dchain marker pass dirop");
+EVCNT_ATTACH_STATIC(lfs_dchain_marker_pass_dirop);
+
 static void
 lfs_unmark_dirop(struct lfs *fs)
 {
-	struct inode *ip, *nip;
+	struct inode *ip, *marker;
 	struct vnode *vp;
 	int doit;
 
@@ -349,13 +353,28 @@ lfs_unmark_dirop(struct lfs *fs)
 	doit = !(fs->lfs_flags & LFS_UNDIROP);
 	if (doit)
 		fs->lfs_flags |= LFS_UNDIROP;
-	if (!doit) {
-		mutex_exit(_lock);
+	mutex_exit(_lock);
+
+	if (!doit)
 		return;
-	}
 
-	for (ip = TAILQ_FIRST(>lfs_dchainhd); ip != NULL; ip = nip) {
-		nip = TAILQ_NEXT(ip, i_lfs_dchain);
+	marker = pool_get(_inode_pool, PR_WAITOK);
+	KASSERT(fs != NULL);
+	memset(marker, 0, sizeof(*marker));
+	marker->inode_ext.lfs = pool_get(_inoext_pool, PR_WAITOK);
+	memset(marker->inode_ext.lfs, 0, sizeof(*marker->inode_ext.lfs));
+	marker->i_state |= IN_MARKER;
+
+	mutex_enter(_lock);
+	TAILQ_INSERT_HEAD(>lfs_dchainhd, marker, i_lfs_dchain);
+	while ((ip = TAILQ_NEXT(marker, i_lfs_dchain)) != NULL) {
+		TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
+		TAILQ_INSERT_AFTER(>lfs_dchainhd, ip, marker,
+		i_lfs_dchain);
+		if (ip->i_state & IN_MARKER) {
+			lfs_dchain_marker_pass_dirop.ev_count++;
+			continue;
+		}
 		vp = ITOV(ip);
 		if ((ip->i_state & (IN_ADIROP | IN_CDIROP)) == IN_CDIROP) {
 			--lfs_dirvcount;
@@ -371,10 +390,13 @@ lfs_unmark_dirop(struct lfs *fs)
 			ip->i_state &= ~IN_CDIROP;
 		}
 	}
-
+	TAILQ_REMOVE(>lfs_dchainhd, marker, i_lfs_dchain);
 	fs->lfs_flags &= ~LFS_UNDIROP;
 	wakeup(>lfs_flags);
 	mutex_exit(_lock);
+
+	pool_put(_inoext_pool, marker->inode_ext.lfs);
+	pool_put(_inode_pool, marker);
 }
 
 static void

Index: src/sys/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.325 src/sys/ufs/lfs/lfs_vnops.c:1.326
--- src/sys/ufs/lfs/lfs_vnops.c:1.325	Wed Sep 18 17:59:15 2019
+++ src/sys/ufs/lfs/lfs_vnops.c	Sun Feb 23 08:38:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.325 2019/09/18 17:59:15 christos Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.326 2020/02/23 08:38:58 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.325 2019/09/18 17:59:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.326 2020/02/23 08:38:58 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1595,6 +1595,10 @@ lfs_strategy(void *v)
 	return VOP_STRATEGY(vp, bp);
 }