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

2014-07-18 Thread Hikaru Abe
Module Name:src
Committed By:   hikaru
Date:   Sat Jul 19 06:12:24 UTC 2014

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

Log Message:
Correct return value handling.
m_defrag(9) is different from OpenBSD one,
it returns new mbuf pointer on success, not zero.


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

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

Modified files:

Index: src/sys/arch/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.3 src/sys/arch/x86/pci/if_vmx.c:1.4
--- src/sys/arch/x86/pci/if_vmx.c:1.3	Thu Jun 19 13:20:28 2014
+++ src/sys/arch/x86/pci/if_vmx.c	Sat Jul 19 06:12:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.3 2014/06/19 13:20:28 hikaru Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.4 2014/07/19 06:12:24 hikaru Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.3 2014/06/19 13:20:28 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.4 2014/07/19 06:12:24 hikaru Exp $");
 
 #include 
 #include 
@@ -1145,11 +1145,13 @@ vmxnet3_load_mbuf(struct vmxnet3_softc *
 	case 0:
 		break;
 	case EFBIG:
-		if (m_defrag(m, M_DONTWAIT) == 0 &&
-		bus_dmamap_load_mbuf(sc->sc_dmat, map, m,
-		 BUS_DMA_NOWAIT) == 0)
-			break;
-
+		mp = m_defrag(m, M_DONTWAIT);
+		if (mp != NULL) {
+			m = mp;
+			if (bus_dmamap_load_mbuf(sc->sc_dmat, map, m,
+			BUS_DMA_NOWAIT) == 0)
+break;
+		}
 		/* FALLTHROUGH */
 	default:
 		m_freem(m);



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

2014-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 18 22:54:53 UTC 2014

Modified Files:
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
fix typo reported in PR/48948


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.40 src/sys/arch/arm/vfp/vfp_init.c:1.41
--- src/sys/arch/arm/vfp/vfp_init.c:1.40	Sun Jun 15 23:07:36 2014
+++ src/sys/arch/arm/vfp/vfp_init.c	Fri Jul 18 22:54:53 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.40 2014/06/15 23:07:36 matt Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.41 2014/07/18 22:54:53 matt Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -334,7 +334,7 @@ vfp_attach(struct cpu_info *ci)
 	cpu_media_and_vfp_features[1] = armreg_mvfr1_read();
 	if (fpsid != 0) {
 		uint32_t f0 = armreg_mvfr0_read();
-		uint32_t f1 = armreg_mvfr0_read();
+		uint32_t f1 = armreg_mvfr1_read();
 		aprint_normal("vfp%d at %s: %s%s%s%s%s\n",
 		device_unit(ci->ci_dev),
 		device_xname(ci->ci_dev),



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

2014-07-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 18 19:48:34 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gpu_error.c

Log Message:
Fix formatting and locking errors.

Format time_t by casting to intmax_t and using PRIdMAX, since we have
no PRIxyz for time_t.

We already hold the irq lock on entry to i915_record_ring_state, so
don't take it again.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c:1.2	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gpu_error.c	Fri Jul 18 19:48:34 2014
@@ -334,7 +334,7 @@ int i915_error_state_to_str(struct drm_i
 	}
 
 	err_printf(m, "%s\n", error->error_msg);
-	err_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
+	err_printf(m, "Time: %"PRIdMAX" s %ld us\n", (intmax_t)error->time.tv_sec,
 		   (long)error->time.tv_usec);
 #ifndef __NetBSD__		/* XXX kernel version */
 	err_printf(m, "Kernel: " UTS_RELEASE "\n");
@@ -809,10 +809,8 @@ static void i915_record_ring_state(struc
 	}
 
 #ifdef __NetBSD__
-	spin_lock(&dev_priv->irq_lock);
 	ering->waiting = DRM_SPIN_WAITERS_P(&ring->irq_queue,
 	&dev_priv->irq_lock);
-	spin_unlock(&dev_priv->irq_lock);
 #else
 	ering->waiting = waitqueue_active(&ring->irq_queue);
 #endif



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2014-07-18 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Fri Jul 18 19:38:02 UTC 2014

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h

Log Message:
Disable FPU in kernel space.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h

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

Modified files:

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.10 src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.11
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.10	Tue Jun 17 19:36:45 2014
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h	Fri Jul 18 19:38:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljitConfig.h,v 1.10 2014/06/17 19:36:45 alnsn Exp $	*/
+/*	$NetBSD: sljitConfig.h,v 1.11 2014/07/18 19:38:02 alnsn Exp $	*/
 
 /*
  *Stack-less Just-In-Time compiler
@@ -90,6 +90,10 @@
 #endif
 
 #ifdef _KERNEL
+#define SLJIT_IS_FPU_AVAILABLE 0
+#endif
+
+#ifdef _KERNEL
 #include 
 #include 
 #include 



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

2014-07-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 18 19:34:59 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_cmd_parser.c

Log Message:
Don't cast ptrdiff_t to unsigned long before formatting it with %td.

Noted by Robert Swindells and Patrick Welche.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.2	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c	Fri Jul 18 19:34:59 2014
@@ -416,7 +416,7 @@ int i915_parse_cmds(struct intel_ring_bu
 			DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%td\n",
 	 *cmd,
 	 length,
-	 (unsigned long)(batch_end - cmd));
+	 batch_end - cmd);
 			ret = -EINVAL;
 			break;
 		}



CVS commit: src/sys/arch/luna68k/dev

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 18:17:54 UTC 2014

Modified Files:
src/sys/arch/luna68k/dev: lunafb.c

Log Message:
Use kmem(9) instead of malloc(9).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/luna68k/dev/lunafb.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/luna68k/dev/lunafb.c
diff -u src/sys/arch/luna68k/dev/lunafb.c:1.32 src/sys/arch/luna68k/dev/lunafb.c:1.33
--- src/sys/arch/luna68k/dev/lunafb.c:1.32	Fri Jul 18 18:03:36 2014
+++ src/sys/arch/luna68k/dev/lunafb.c	Fri Jul 18 18:17:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lunafb.c,v 1.32 2014/07/18 18:03:36 tsutsui Exp $ */
+/* $NetBSD: lunafb.c,v 1.33 2014/07/18 18:17:54 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,14 +31,14 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.32 2014/07/18 18:03:36 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.33 2014/07/18 18:17:54 tsutsui Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -206,8 +206,8 @@ omfbattach(device_t parent, device_t sel
 		sc->sc_dc = &omfb_console_dc;
 		sc->nscreens = 1;
 	} else {
-		sc->sc_dc = malloc(sizeof(struct om_hwdevconfig),
-		M_DEVBUF, M_WAITOK | M_ZERO);
+		sc->sc_dc = kmem_zalloc(sizeof(struct om_hwdevconfig),
+		KM_SLEEP);
 		omfb_getdevconfig(OMFB_FB_WADDR, sc->sc_dc);
 	}
 	aprint_normal(": %d x %d, %dbpp\n", sc->sc_dc->dc_wid, sc->sc_dc->dc_ht,



CVS commit: src/sys/arch/luna68k/dev

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 18:03:36 UTC 2014

Modified Files:
src/sys/arch/luna68k/dev: lunafb.c

Log Message:
Use C99 struct initialization for wsdisplay_accessops.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/luna68k/dev/lunafb.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/luna68k/dev/lunafb.c
diff -u src/sys/arch/luna68k/dev/lunafb.c:1.31 src/sys/arch/luna68k/dev/lunafb.c:1.32
--- src/sys/arch/luna68k/dev/lunafb.c:1.31	Sun Jul 13 16:00:32 2014
+++ src/sys/arch/luna68k/dev/lunafb.c	Fri Jul 18 18:03:36 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lunafb.c,v 1.31 2014/07/13 16:00:32 tsutsui Exp $ */
+/* $NetBSD: lunafb.c,v 1.32 2014/07/18 18:03:36 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.31 2014/07/13 16:00:32 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.32 2014/07/18 18:03:36 tsutsui Exp $");
 
 #include 
 #include 
@@ -156,12 +156,14 @@ static int   omfb_show_screen(void *, vo
 			  void (*) (void *, int, int), void *);
 
 static const struct wsdisplay_accessops omfb_accessops = {
-	omfbioctl,
-	omfbmmap,
-	omfb_alloc_screen,
-	omfb_free_screen,
-	omfb_show_screen,
-	0 /* load_font */
+	.ioctl= omfbioctl,
+	.mmap = omfbmmap,
+	.alloc_screen = omfb_alloc_screen,
+	.free_screen  = omfb_free_screen,
+	.show_screen  = omfb_show_screen,
+	.load_font= NULL,
+	.pollc= NULL,
+	.scroll   = NULL
 };
 
 static int  omfbmatch(device_t, cfdata_t, void *);



CVS commit: src/sys/arch/luna68k/dev

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 18:02:08 UTC 2014

Modified Files:
src/sys/arch/luna68k/dev: lunaws.c siotty.c

Log Message:
Minor KNF.  No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/luna68k/dev/lunaws.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/luna68k/dev/siotty.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/luna68k/dev/lunaws.c
diff -u src/sys/arch/luna68k/dev/lunaws.c:1.28 src/sys/arch/luna68k/dev/lunaws.c:1.29
--- src/sys/arch/luna68k/dev/lunaws.c:1.28	Sun Feb  2 15:35:06 2014
+++ src/sys/arch/luna68k/dev/lunaws.c	Fri Jul 18 18:02:08 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.28 2014/02/02 15:35:06 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.29 2014/07/18 18:02:08 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.28 2014/02/02 15:35:06 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.29 2014/07/18 18:02:08 tsutsui Exp $");
 
 #include "wsmouse.h"
 
@@ -199,7 +199,7 @@ wsintr(void *arg)
 	int rr;
 
 	rr = getsiocsr(sio);
-	if (rr & RR_RXRDY) {
+	if ((rr & RR_RXRDY) != 0) {
 		do {
 			code = sio->sio_data;
 			if (rr & (RR_FRAMING | RR_OVERRUN | RR_PARITY)) {
@@ -208,10 +208,10 @@ wsintr(void *arg)
 			}
 			sc->sc_rxq[sc->sc_rxqtail] = code;
 			sc->sc_rxqtail = OMKBD_NEXTRXQ(sc->sc_rxqtail);
-		} while ((rr = getsiocsr(sio)) & RR_RXRDY);
+		} while (((rr = getsiocsr(sio)) & RR_RXRDY) != 0);
 		softint_schedule(sc->sc_si);
 	}
-	if (rr & RR_TXRDY)
+	if ((rr & RR_TXRDY) != 0)
 		sio->sio_cmd = WR0_RSTPEND;
 	/* not capable of transmit, yet */
 }
@@ -241,9 +241,9 @@ wssoftintr(void *arg)
 			code = (code & 07) ^ 07;
 			/* LMR->RML: wsevent counts 0 for leftmost */
 			sc->sc_msbuttons = (code & 02);
-			if (code & 01)
+			if ((code & 01) != 0)
 sc->sc_msbuttons |= 04;
-			if (code & 04)
+			if ((code & 04) != 0)
 sc->sc_msbuttons |= 01;
 			sc->sc_msreport = 1;
 		} else if (sc->sc_msreport == 1) {

Index: src/sys/arch/luna68k/dev/siotty.c
diff -u src/sys/arch/luna68k/dev/siotty.c:1.40 src/sys/arch/luna68k/dev/siotty.c:1.41
--- src/sys/arch/luna68k/dev/siotty.c:1.40	Sun Mar 16 05:20:24 2014
+++ src/sys/arch/luna68k/dev/siotty.c	Fri Jul 18 18:02:08 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.40 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: siotty.c,v 1.41 2014/07/18 18:02:08 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.40 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.41 2014/07/18 18:02:08 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -231,7 +231,7 @@ siottyintr(void *arg)
 		sio->sio_cmd = WR0_RSTINT;
 		cn_check_magic(sc->sc_tty->t_dev, CNC_BREAK, siotty_cnm_state);
 	}
-	if (rr & RR_RXRDY) {
+	if ((rr & RR_RXRDY) != 0) {
 		do {
 			if (cc > 0) {
 c = sio->sio_data;
@@ -250,9 +250,9 @@ siottyintr(void *arg)
 			sc->sc_rbput = put;
 			sc->sc_rbavail = cc;
 			sc->sc_rx_ready = true;
-		} while ((rr = getsiocsr(sio)) & RR_RXRDY);
+		} while (((rr = getsiocsr(sio)) & RR_RXRDY) != 0);
 	}
-	if (rr & RR_TXRDY) {
+	if ((rr & RR_TXRDY) != 0) {
 		sio->sio_cmd = WR0_RSTPEND;
 		if (sc->sc_tbc > 0) {
 			sio->sio_data = *sc->sc_tba;
@@ -349,7 +349,7 @@ siostart(struct tty *tp)
 
 	sc = device_lookup_private(&siotty_cd, minor(tp->t_dev));
 	s = splserial();
-	if (tp->t_state & (TS_BUSY|TS_TIMEOUT|TS_TTSTOP))
+	if ((tp->t_state & (TS_BUSY|TS_TIMEOUT|TS_TTSTOP)) != 0)
 		goto out;
 	if (!ttypull(tp))
 		goto out;
@@ -397,11 +397,11 @@ sioparam(struct tty *tp, struct termios 
 	if (wr4 < 0)
 		return EINVAL;
 
-	if (sc->sc_flags & TIOCFLAG_SOFTCAR) {
+	if ((sc->sc_flags & TIOCFLAG_SOFTCAR) != 0) {
 		t->c_cflag |= CLOCAL;
 		t->c_cflag &= ~HUPCL;
 	}
-	if (sc->sc_flags & TIOCFLAG_CLOCAL)
+	if ((sc->sc_flags & TIOCFLAG_CLOCAL) != 0)
 		t->c_cflag |= CLOCAL;
 
 	/*
@@ -426,7 +426,7 @@ sioparam(struct tty *tp, struct termios 
 		sc->sc_wr[WR3] |= WR3_RX8BIT; sc->sc_wr[WR5] |= WR5_TX8BIT;
 		break;
 	}
-	if (tp->t_cflag & PARENB) {
+	if ((tp->t_cflag & PARENB) != 0) {
 		wr4 |= WR4_PARENAB;
 		if ((tp->t_cflag & PARODD) == 0)
 			wr4 |= WR4_EPARITY;
@@ -451,11 +451,11 @@ siomctl(struct siotty_softc *sc, int con
 	uint16_t rr;
 
 	val = 0;
-	if (control & TIOCM_BREAK)
+	if ((control & TIOCM_BREAK) != 0)
 		val |= WR5_BREAK;
-	if (control & TIOCM_DTR)
+	if ((control & TIOCM_DTR) != 0)
 		val |= WR5_DTR;
-	if (control & TIOCM_RTS)
+	if ((control & TIOCM_RTS) != 0)
 		val |= WR5_RTS;
 	s = splserial();
 	wr5 = sc->sc_wr[WR5];
@@ -472,13 +472,13 @@ siomctl(struct siotty_softc *sc, int con
 	case DMGET:
 		val = 0;
 		rr = getsiocsr(sc->sc_ctl);
-		if (wr5 & WR5_DTR)
+		if ((wr5 & W

CVS commit: src/sys/arch/hp300/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:59:12 UTC 2014

Modified Files:
src/sys/arch/hp300/conf: GENERIC

Log Message:
More tweaks to GENERIC.

- reduce maxusers from 32 to 8 as other m68k ports
- make NFS_BOOT_DHCP default rather than NFS_BOOT_BOOTP
  (and move these options in "Networking options" block)
- use 8x16 font instead of 12x22 for machines with small screen like HP362


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/arch/hp300/conf/GENERIC

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/hp300/conf/GENERIC
diff -u src/sys/arch/hp300/conf/GENERIC:1.183 src/sys/arch/hp300/conf/GENERIC:1.184
--- src/sys/arch/hp300/conf/GENERIC:1.183	Fri Jul 18 17:51:27 2014
+++ src/sys/arch/hp300/conf/GENERIC	Fri Jul 18 17:59:12 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.183 2014/07/18 17:51:27 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.184 2014/07/18 17:59:12 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,11 +22,11 @@ include 	"arch/hp300/conf/std.hp300"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.183 $"
+#ident 		"GENERIC-$Revision: 1.184 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
-maxusers	32		# estimated number of users
+maxusers	8		# estimated number of users
 
 # Support for various CPU types
 options 	HP320
@@ -129,7 +129,6 @@ options 	WAPBL		# File system journaling
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
 options 	NFSSERVER	# Network filesystem server
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags
-options 	NFS_BOOT_BOOTP	# use bootp for NFS boot
 options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 
 # Networking options
@@ -163,6 +162,9 @@ options 	IPFILTER_COMPAT # Compat for IP
 #options 	ALTQ_RIO	# RED with IN/OUT
 #options 	ALTQ_WFQ	# Weighted Fair Queueing
 
+#options 	NFS_BOOT_BOOTP	# use bootp for NFS boot
+options 	NFS_BOOT_DHCP	# use dhcp for NFS boot
+
 # Options for HP hardware
 options 	USELEDS		# make the lights twinkle
 #options 	PANICBUTTON	# two fast s on HIL dump kernel
@@ -181,8 +183,8 @@ options 	WSDISPLAY_COMPAT_RAWKBD
 options 	WS_KERNEL_FG=WSCOL_GREEN
 #options 	WS_KERNEL_BG=WSCOL_BLACK
 
-options 	FONT_GALLANT12x22
-#options 	FONT_VT220ISO8x16
+#options 	FONT_GALLANT12x22
+options 	FONT_VT220ISO8x16
 
 config		netbsd root on ? type ?
 



CVS commit: [netbsd-6] src/doc

2014-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Jul 18 17:52:30 UTC 2014

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Spell "sequential" correctly.  Pointed out by kre in PR misc/49015.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.124 src/doc/CHANGES-6.2:1.1.2.125
--- src/doc/CHANGES-6.2:1.1.2.124	Fri Jul 18 02:42:02 2014
+++ src/doc/CHANGES-6.2	Fri Jul 18 17:52:30 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.124 2014/07/18 02:42:02 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.125 2014/07/18 17:52:30 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -2381,7 +2381,7 @@ sys/dev/dkvar.h	1.19 via patch
 
 	Avoid xbd(4) reordering requests, which, depending on the
 	underlying hardware, can badly affect write performances. This
-	can give up to a 5x performance gain in sequencial writes.
+	can give up to a 5x performance gain in sequential writes.
 	[bouyer, ticket #1075]
 
 include/stdio.h	1.89-1.90



CVS commit: src/sys/arch/hp300/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:51:27 UTC 2014

Modified Files:
src/sys/arch/hp300/conf: GENERIC

Log Message:
Shrink GENERIC and enable MODULAR instead.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/hp300/conf/GENERIC

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/hp300/conf/GENERIC
diff -u src/sys/arch/hp300/conf/GENERIC:1.182 src/sys/arch/hp300/conf/GENERIC:1.183
--- src/sys/arch/hp300/conf/GENERIC:1.182	Sat Jul  5 09:15:38 2014
+++ src/sys/arch/hp300/conf/GENERIC	Fri Jul 18 17:51:27 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.182 2014/07/05 09:15:38 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.183 2014/07/18 17:51:27 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/hp300/conf/std.hp300"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.182 $"
+#ident 		"GENERIC-$Revision: 1.183 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -59,7 +59,7 @@ options 	SYSVSHM		# System V-style share
 options 	SYSVMSG		# System V-style message queues
 options 	SYSVSEM		# System V-style semaphores
 
-#options 	MODULAR		# new style module(7) framework
+options 	MODULAR		# new style module(7) framework
 
 # Enable experimental buffer queue strategy for better responsiveness under
 # high disk I/O load. Use it with caution - it's not proven to be stable yet.
@@ -97,26 +97,26 @@ options 	COMPAT_60	# NetBSD 6.0 compatib
 options 	COMPAT_AOUT_M68K	# NetBSD/m68k a.out binary compatibility
 options 	COMPAT_M68K4K	# NetBSD/m68k4k binary compatibility
 options 	COMPAT_SUNOS	# SunOS4 m68k binary compatibility
-options 	COMPAT_LINUX	# Linux/m68k binary compatibility
-options 	COMPAT_SVR4	# SVR4 binary compatibility
+#options 	COMPAT_LINUX	# Linux/m68k binary compatibility
+#options 	COMPAT_SVR4	# SVR4 binary compatibility
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Filesystems
 file-system	CD9660		# CD-ROM ISO-9660 filesystem
-file-system	EXT2FS		# second extended file system (linux)
+#file-system	EXT2FS		# second extended file system (linux)
 file-system	FDESC		# user file descriptor filesystem
 file-system	FFS		# fast filesystem
 file-system	KERNFS		# kernel data-structure filesystem
-file-system	LFS		# log-structured file system
+#file-system	LFS		# log-structured file system
 file-system	MFS		# Memory-based filesystem
 file-system	NFS		# Network filesystem client
 file-system	NULLFS		# loopback file system
-file-system	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
 file-system	PROCFS		# /proc filesystem
-file-system	UMAPFS		# NULLFS + uid and gid remapping
-file-system	UNION		# Union filesystem (req. for FDESC)
-file-system	CODA		# Coda File System; also needs vcoda (below)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# Union filesystem (req. for FDESC)
+#file-system	CODA		# Coda File System; also needs vcoda (below)
 file-system	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
@@ -130,7 +130,7 @@ options 	WAPBL		# File system journaling
 options 	NFSSERVER	# Network filesystem server
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags
 options 	NFS_BOOT_BOOTP	# use bootp for NFS boot
-#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 
 # Networking options
 options 	INET		# Internet protocols
@@ -141,8 +141,8 @@ options 	GATEWAY		# IP forwarding
 options 	MROUTING	# Multicast routing
 options 	PIM		# Protocol Independent Multicast
 options 	NETATALK	# AppleTalk networking protocols
-options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
-options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
 options 	IPFILTER_LOG	# ipmon(8) log support
 options 	IPFILTER_LOOKUP	# ippool(8) support
@@ -294,7 +294,7 @@ options 	RAID_AUTOCONFIG		# auto-configu
 #options 	RF_INCLUDE_INTERDECLUSTER=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
-pseudo-device	fss			# file system snapshot device
+#pseudo-device	fss			# file system snapshot device
 pseudo-device	md			# memory disk device (ramdisk)
 pseudo-device	vnd			# vnode pseudo-disks
 #options 	VND_COMPRESSION		# compressed vnd(4)
@@ -320,17 +320,17 @@ pseudo-device	vlan			# IEEE 802.1q encap
 
 #
 # accept filters
-pseudo-device   accf_data		# "dataready" accept filter
-pseudo-device   accf_http		# "

CVS commit: src/sys/arch/luna68k/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:30:52 UTC 2014

Modified Files:
src/sys/arch/luna68k/conf: GENERIC

Log Message:
Enable INET6 (for modern network) and MODULAR, and disable accept filters.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/luna68k/conf/GENERIC

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/luna68k/conf/GENERIC
diff -u src/sys/arch/luna68k/conf/GENERIC:1.111 src/sys/arch/luna68k/conf/GENERIC:1.112
--- src/sys/arch/luna68k/conf/GENERIC:1.111	Sat Jul  5 09:16:45 2014
+++ src/sys/arch/luna68k/conf/GENERIC	Fri Jul 18 17:30:52 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.111 2014/07/05 09:16:45 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.112 2014/07/18 17:30:52 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/luna68k/conf/std.luna68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.111 $"
+#ident 		"GENERIC-$Revision: 1.112 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -40,6 +40,9 @@ options 	KTRACE
 options 	SYSVMSG			# System V message queues
 options 	SYSVSEM			# System V semaphores
 options 	SYSVSHM			# System V shared memory
+
+options 	MODULAR			# new style module(7) framework
+
 options 	USERCONF		# userconf(4) support
 #options	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
@@ -104,7 +107,7 @@ options 	WAPBL		# File system journaling
 
 # Networking options
 options 	INET		# IP protocol stack support
-#options 	INET6		# IPV6
+options 	INET6		# IPV6
 #options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	GATEWAY		# IP packet forwarding
@@ -174,8 +177,8 @@ cd* at scsibus? target ? lun ?		# SCSI C
 
 #
 # accept filters
-pseudo-device   accf_data		# "dataready" accept filter
-pseudo-device   accf_http		# "httpready" accept filter
+#pseudo-device   accf_data		# "dataready" accept filter
+#pseudo-device   accf_http		# "httpready" accept filter
 
 pseudo-device	bpfilter		# Berkeley Packet Filter
 #pseudo-device	carp			# Common Address Redundancy Protocol



CVS commit: src/sys/fs/msdosfs

2014-07-18 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul 18 17:24:34 UTC 2014

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
Make DPRINTF more understandable, and replace my previous #ifdef DIAGNOSTIC...


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/fs/msdosfs/msdosfs_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/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.114 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.115
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.114	Wed Jul 16 20:09:00 2014
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Jul 18 17:24:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.114 2014/07/16 20:09:00 maxv Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.115 2014/07/18 17:24:34 maxv Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.114 2014/07/16 20:09:00 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.115 2014/07/18 17:24:34 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -88,9 +88,9 @@ __KERNEL_RCSID(0, "$NetBSD: msdosfs_vfso
 MODULE(MODULE_CLASS_VFS, msdos, NULL);
 
 #ifdef MSDOSFS_DEBUG
-#define DPRINTF(a) uprintf a
+#define DPRINTF(fmt, ...) uprintf("%s(): " fmt "\n", __func__, ##__VA_ARGS__)
 #else
-#define DPRINTF(a)
+#define DPRINTF(fmt, ...)
 #endif
 
 #define GEMDOSFS_BSIZE	512
@@ -337,7 +337,7 @@ msdosfs_mount(struct mount *mp, const ch
 			/* not yet implemented */
 			error = EOPNOTSUPP;
 		if (error) {
-			DPRINTF(("vflush %d\n", error));
+			DPRINTF("vflush %d", error);
 			return (error);
 		}
 		if ((pmp->pm_flags & MSDOSFSMNT_RONLY) &&
@@ -357,14 +357,14 @@ msdosfs_mount(struct mount *mp, const ch
 			KAUTH_SYSTEM_MOUNT, KAUTH_REQ_SYSTEM_MOUNT_DEVICE,
 			mp, devvp, KAUTH_ARG(VREAD | VWRITE));
 			VOP_UNLOCK(devvp);
-			DPRINTF(("KAUTH_REQ_SYSTEM_MOUNT_DEVICE %d\n", error));
+			DPRINTF("KAUTH_REQ_SYSTEM_MOUNT_DEVICE %d", error);
 			if (error)
 return (error);
 
 			pmp->pm_flags &= ~MSDOSFSMNT_RONLY;
 		}
 		if (args->fspec == NULL) {
-			DPRINTF(("missing fspec\n"));
+			DPRINTF("missing fspec");
 			return EINVAL;
 		}
 	}
@@ -375,17 +375,17 @@ msdosfs_mount(struct mount *mp, const ch
 	error = namei_simple_user(args->fspec,
 NSM_FOLLOW_NOEMULROOT, &devvp);
 	if (error != 0) {
-		DPRINTF(("namei %d\n", error));
+		DPRINTF("namei %d", error);
 		return (error);
 	}
 
 	if (devvp->v_type != VBLK) {
-		DPRINTF(("not block\n"));
+		DPRINTF("not block");
 		vrele(devvp);
 		return (ENOTBLK);
 	}
 	if (bdevsw_lookup(devvp->v_rdev) == NULL) {
-		DPRINTF(("no block switch\n"));
+		DPRINTF("no block switch");
 		vrele(devvp);
 		return (ENXIO);
 	}
@@ -401,7 +401,7 @@ msdosfs_mount(struct mount *mp, const ch
 	KAUTH_REQ_SYSTEM_MOUNT_DEVICE, mp, devvp, KAUTH_ARG(accessmode));
 	VOP_UNLOCK(devvp);
 	if (error) {
-		DPRINTF(("KAUTH_REQ_SYSTEM_MOUNT_DEVICE %d\n", error));
+		DPRINTF("KAUTH_REQ_SYSTEM_MOUNT_DEVICE %d", error);
 		vrele(devvp);
 		return (error);
 	}
@@ -416,12 +416,12 @@ msdosfs_mount(struct mount *mp, const ch
 		error = VOP_OPEN(devvp, xflags, FSCRED);
 		VOP_UNLOCK(devvp);
 		if (error) {
-			DPRINTF(("VOP_OPEN %d\n", error));
+			DPRINTF("VOP_OPEN %d", error);
 			goto fail;
 		}
 		error = msdosfs_mountfs(devvp, mp, l, args);
 		if (error) {
-			DPRINTF(("msdosfs_mountfs %d\n", error));
+			DPRINTF("msdosfs_mountfs %d", error);
 			vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
 			(void) VOP_CLOSE(devvp, xflags, NOCRED);
 			VOP_UNLOCK(devvp);
@@ -433,14 +433,13 @@ msdosfs_mount(struct mount *mp, const ch
 	} else {
 		vrele(devvp);
 		if (devvp != pmp->pm_devvp) {
-			DPRINTF(("devvp %p pmp %p\n", 
-			devvp, pmp->pm_devvp));
+			DPRINTF("devvp %p pmp %p", devvp, pmp->pm_devvp);
 			return (EINVAL);	/* needs translation */
 		}
 	}
 	if ((error = update_mp(mp, args)) != 0) {
 		msdosfs_unmount(mp, MNT_FORCE);
-		DPRINTF(("update_mp %d\n", error));
+		DPRINTF("update_mp %d", error);
 		return error;
 	}
 
@@ -494,17 +493,14 @@ msdosfs_mountfs(struct vnode *devvp, str
 		error = 0;
 	}
 	if (secsize < DEV_BSIZE) {
-#ifdef DIAGNOSTIC /* XXX: to be converted to DPRINTF */
-		printf("%s(): Invalid block secsize (%d < DEV_BSIZE)\n", __func__,
-		secsize);
-#endif
+		DPRINTF("Invalid block secsize (%d < DEV_BSIZE)", secsize);
 		error = EINVAL;
 		goto error_exit;
 	}
 
 	if (argp->flags & MSDOSFSMNT_GEMDOSFS) {
 		if (secsize != GEMDOSFS_BSIZE) {
-			DPRINTF(("Invalid block secsize %d for GEMDOS\n", secsize));
+			DPRINTF("Invalid block secsize %d for GEMDOS", secsize);
 			error = EINVAL;
 			goto error_exit;
 		}
@@ -524,9 +520,9 @@ msdosfs_mountfs(struct vnode *devvp, str
 	if (!(argp->flags & MSDOSFSMNT_GEMDOSFS)) {
 		if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
 		|| bsp->bs50.bsBootSectSig1 != BOOTSIG1) {

CVS commit: src/sys/arch/news68k/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:19:36 UTC 2014

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Shrink GENERIC and enable MODULAR instead.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/news68k/conf/GENERIC

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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.119 src/sys/arch/news68k/conf/GENERIC:1.120
--- src/sys/arch/news68k/conf/GENERIC:1.119	Sat Jul  5 09:14:02 2014
+++ src/sys/arch/news68k/conf/GENERIC	Fri Jul 18 17:19:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.119 2014/07/05 09:14:02 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.120 2014/07/18 17:19:35 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include		"arch/news68k/conf/std.news68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.119 $"
+#ident 		"GENERIC-$Revision: 1.120 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -40,7 +40,7 @@ options 	SYSVMSG			# System V message qu
 options 	SYSVSEM			# System V semaphores
 options 	SYSVSHM			# System V shared memory
 
-#options 	MODULAR			# new style module(7) framework
+options 	MODULAR			# new style module(7) framework
 
 options 	USERCONF		# userconf(4) support
 #options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
@@ -85,7 +85,7 @@ options 	COMPAT_BSDPTY		# /dev/[pt]ty?? 
 
 # Filesystem options
 file-system	FFS		# Berkeley Fast Filesystem
-file-system	LFS		# log-structured file system
+#file-system	LFS		# log-structured file system
 file-system	NFS		# Sun NFS-compatible filesystem client
 file-system	MFS		# memory-based filesystem
 file-system	CD9660		# ISO 9660 + Rock Ridge file system
@@ -94,10 +94,10 @@ file-system	KERNFS		# /kern
 file-system	PROCFS		# /proc
 file-system	FDESC		# /dev/fd/*
 file-system	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
-file-system	UMAPFS		# NULLFS + uid and gid remapping
-file-system	UNION		# union file system
+#file-system 	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
 #file-system	CODA		# Coda File System; also needs vcode (below)
 file-system	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
@@ -108,7 +108,7 @@ options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas
 #options 	FFS_EI		# ffs endian independent support
 options 	WAPBL		# File system journaling support
-#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
 
 # Networking options
@@ -120,8 +120,8 @@ options 	INET6		# IPV6
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
 #options 	NETATALK	# AppleTalk networking protocols
-options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
-options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
 options 	IPFILTER_LOG	# ipmon(8) log support
 options 	IPFILTER_LOOKUP	# ippool(8) support
@@ -223,8 +223,8 @@ uk*	at scsibus? target ? lun ?		# unknow
 
 #
 # accept filters
-pseudo-device   accf_data		# "dataready" accept filter
-pseudo-device   accf_http		# "httpready" accept filter
+#pseudo-device   accf_data		# "dataready" accept filter
+#pseudo-device   accf_http		# "httpready" accept filter
 
 # Misc.
 pseudo-device	loop			# loopback interface; required
@@ -244,7 +244,7 @@ pseudo-device	raid			# RAIDframe disk dr
 #options 	RF_INCLUDE_INTERDECLUSTER=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
-pseudo-device	fss			# file system snapshot device
+#pseudo-device	fss			# file system snapshot device
 pseudo-device	sl			# SLIP interfaces
 pseudo-device	ppp			# PPP interfaces
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)



CVS commit: src/sys/arch/x68k/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:06:13 UTC 2014

Modified Files:
src/sys/arch/x68k/conf: GENERIC

Log Message:
Enable NULLFS and MODULAR, and disable UMAPFS, accf_data and accf_http.

No particular comments on port-x68k@.


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/arch/x68k/conf/GENERIC

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/x68k/conf/GENERIC
diff -u src/sys/arch/x68k/conf/GENERIC:1.173 src/sys/arch/x68k/conf/GENERIC:1.174
--- src/sys/arch/x68k/conf/GENERIC:1.173	Sat Jul  5 09:18:47 2014
+++ src/sys/arch/x68k/conf/GENERIC	Fri Jul 18 17:06:13 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.173 2014/07/05 09:18:47 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.174 2014/07/18 17:06:13 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include 	"arch/x68k/conf/std.x68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.173 $"
+#ident 		"GENERIC-$Revision: 1.174 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -80,7 +80,7 @@ options 	SYSVSEM		# System V semaphores
 options 	SYSVSHM		# System V shared memory
 
 ## Loadable kernel module support
-#options 	MODULAR		# new style module(7) framework
+options 	MODULAR		# new style module(7) framework
 
 options 	USERCONF	# userconf(4) support
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
@@ -175,11 +175,11 @@ options 	COMPAT_BSDPTY	# /dev/[pt]ty?? p
 file-system	FFS		# Berkeley Fast Filesystem
 file-system	NFS		# Sun NFS-compatible filesystem client
 file-system	KERNFS		# kernel data-structure filesystem
-#file-system	NULLFS		# NULL layered filesystem
+file-system	NULLFS		# NULL layered filesystem
 #file-system 	OVERLAY		# overlay file system
 file-system	MFS		# memory-based filesystem
 #file-system	FDESC		# user file descriptor filesystem
-file-system	UMAPFS		# uid/gid remapping filesystem
+#file-system	UMAPFS		# uid/gid remapping filesystem
 #file-system	LFS		# Log-structured filesystem (experimental)
 file-system	PROCFS		# /proc
 file-system	CD9660		# ISO 9660 + Rock Ridge file system
@@ -428,8 +428,8 @@ bmd*	at intio0 addr 0xecebf0		# Nereid
 
 #
 # accept filters
-pseudo-device   accf_data		# "dataready" accept filter
-pseudo-device   accf_http		# "httpready" accept filter
+#pseudo-device   accf_data		# "dataready" accept filter
+#pseudo-device   accf_http		# "httpready" accept filter
 
 ## A disk-like interface to files.  Can be used to create floppy, CD,
 ## miniroot images, etc.



CVS commit: src/sys/rump/dev/lib/libnetsmb

2014-07-18 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul 18 16:25:17 UTC 2014

Modified Files:
src/sys/rump/dev/lib/libnetsmb: netsmb_component.c

Log Message:
Fix the ATF failures caused by my recent smbfs change (smbfs_vfsops.c -r1.103).

ok pooka@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libnetsmb/netsmb_component.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/rump/dev/lib/libnetsmb/netsmb_component.c
diff -u src/sys/rump/dev/lib/libnetsmb/netsmb_component.c:1.1 src/sys/rump/dev/lib/libnetsmb/netsmb_component.c:1.2
--- src/sys/rump/dev/lib/libnetsmb/netsmb_component.c:1.1	Thu Mar 13 01:57:29 2014
+++ src/sys/rump/dev/lib/libnetsmb/netsmb_component.c	Fri Jul 18 16:25:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netsmb_component.c,v 1.1 2014/03/13 01:57:29 pooka Exp $	*/
+/*	$NetBSD: netsmb_component.c,v 1.2 2014/07/18 16:25:17 maxv Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netsmb_component.c,v 1.1 2014/03/13 01:57:29 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netsmb_component.c,v 1.2 2014/07/18 16:25:17 maxv Exp $");
 
 #include 
 #include 
@@ -48,7 +48,8 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV)
 	int error;
 
 	bmaj = cmaj = NODEVMAJOR;
-	if ((error = devsw_attach("nsmb", NULL, &bmaj, &nsmb_cdevsw, &cmaj))!=0)
+	error = devsw_attach("nsmb", NULL, &bmaj, &nsmb_cdevsw, &cmaj);
+	if (error && error != EEXIST)
 		panic("nsmb devsw attach failed: %d", error);
 	if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/nsmb", '0',
 	cmaj, 0, 4)) != 0)



CVS commit: src/lib/libc/sys

2014-07-18 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 18 16:02:50 UTC 2014

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

Log Message:
Remove
 Users should not depend on the memory sharing semantics of vfork() as
 other ways of speeding up the fork process may be developed in the
 future.

as we are not planning to deprecate vfork. Besides NetBSD's
compatibility policy means we wouldn't change it anyway but introduce
something new.

Add
 Portable applications should not depend on the memory sharing semantics
 of vfork() as implementations exist that implement vfork() as plain
 fork(2).

because this is or used to be a real hazard.

ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/vfork.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/vfork.2
diff -u src/lib/libc/sys/vfork.2:1.26 src/lib/libc/sys/vfork.2:1.27
--- src/lib/libc/sys/vfork.2:1.26	Fri Jul 18 15:58:51 2014
+++ src/lib/libc/sys/vfork.2	Fri Jul 18 16:02:50 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vfork.2,v 1.26 2014/07/18 15:58:51 dholland Exp $
+.\"	$NetBSD: vfork.2,v 1.27 2014/07/18 16:02:50 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -118,10 +118,13 @@ the address space.
 The original semantics were reintroduced in
 .Nx 1.4 .
 .Sh BUGS
-Users should not depend on the memory sharing semantics of
+Portable applications should not depend on the memory sharing
+semantics of
 .Fn vfork
-as other ways of speeding up the fork process may be developed in
-the future.
+as implementations exist that implement
+.Fn vfork
+as plain
+.Xr fork 2 .
 .Pp
 To avoid a possible deadlock situation, processes that are children
 in the middle of a



CVS commit: src/sys/arch/i386/conf

2014-07-18 Thread Patrick Welche
Module Name:src
Committed By:   prlw1
Date:   Fri Jul 18 16:01:08 UTC 2014

Modified Files:
src/sys/arch/i386/conf: DRMKMS

Log Message:
drmkmsbus has gone away


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/conf/DRMKMS

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/i386/conf/DRMKMS
diff -u src/sys/arch/i386/conf/DRMKMS:1.1 src/sys/arch/i386/conf/DRMKMS:1.2
--- src/sys/arch/i386/conf/DRMKMS:1.1	Thu Apr  3 19:18:51 2014
+++ src/sys/arch/i386/conf/DRMKMS	Fri Jul 18 16:01:07 2014
@@ -1,6 +1,5 @@
 include "arch/i386/conf/NO_DRM"
 
-drmkms* 	at drmkmsbus?
 i915drmkms* 	at pci? dev ? function ?
 
 no options 	DIAGNOSTIC



CVS commit: src/lib/libc/sys

2014-07-18 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 18 15:58:51 UTC 2014

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

Log Message:
Clarify HISTORY and bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/vfork.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/vfork.2
diff -u src/lib/libc/sys/vfork.2:1.25 src/lib/libc/sys/vfork.2:1.26
--- src/lib/libc/sys/vfork.2:1.25	Fri Jul 18 15:56:44 2014
+++ src/lib/libc/sys/vfork.2	Fri Jul 18 15:58:51 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vfork.2,v 1.25 2014/07/18 15:56:44 dholland Exp $
+.\"	$NetBSD: vfork.2,v 1.26 2014/07/18 15:58:51 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)vfork.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd January 3, 1998
+.Dd July 18, 2014
 .Dt VFORK 2
 .Os
 .Sh NAME
@@ -113,13 +113,11 @@ function call appeared in
 .Bx 3.0 .
 In
 .Bx 4.4 ,
-the semantics were changed to only suspend the parent.
+the semantics were changed to only suspend the parent and not share
+the address space.
 The original semantics were reintroduced in
 .Nx 1.4 .
 .Sh BUGS
-.\" XXX We reintroduced the original semantics.
-.\" This system call will be eliminated when proper system sharing
-.\" mechanisms are implemented.
 Users should not depend on the memory sharing semantics of
 .Fn vfork
 as other ways of speeding up the fork process may be developed in



CVS commit: src/lib/libc/sys

2014-07-18 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jul 18 15:56:44 UTC 2014

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

Log Message:
fix typo and minor usage issue


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/vfork.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/vfork.2
diff -u src/lib/libc/sys/vfork.2:1.24 src/lib/libc/sys/vfork.2:1.25
--- src/lib/libc/sys/vfork.2:1.24	Thu Aug  7 16:44:11 2003
+++ src/lib/libc/sys/vfork.2	Fri Jul 18 15:56:44 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vfork.2,v 1.24 2003/08/07 16:44:11 agc Exp $
+.\"	$NetBSD: vfork.2,v 1.25 2014/07/18 15:56:44 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -73,12 +73,12 @@ The
 .Nm
 system call can normally be used just like
 .Xr fork 2 .
-It does not work, however, to return while running in the childs context
+It does not work, however, to return while running in the child's context
 from the procedure that called
 .Fn vfork
 since the eventual return from
 .Fn vfork
-would then return to a no longer existent stack frame.
+would then return to a no longer existing stack frame.
 Be careful, also, to call
 .Xr _exit 2
 rather than



CVS commit: src/lib/libc/sys

2014-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 18 12:39:18 UTC 2014

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

Log Message:
Document MAP_INHERIT_ZERO.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/sys/minherit.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/minherit.2
diff -u src/lib/libc/sys/minherit.2:1.18 src/lib/libc/sys/minherit.2:1.19
--- src/lib/libc/sys/minherit.2:1.18	Fri Oct 13 16:52:57 2006
+++ src/lib/libc/sys/minherit.2	Fri Jul 18 08:39:17 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: minherit.2,v 1.18 2006/10/13 20:52:57 wiz Exp $
+.\"	$NetBSD: minherit.2,v 1.19 2014/07/18 12:39:17 christos Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)minherit.2	8.1 (Berkeley) 6/9/93
 .\"
-.Dd October 7, 2006
+.Dd July 18, 2014
 .Dt MINHERIT 2
 .Os
 .Sh NAME
@@ -51,8 +51,9 @@ fork-time inheritance characteristic
 which can be set to
 .Dv MAP_INHERIT_NONE ,
 .Dv MAP_INHERIT_COPY ,
+.Dv MAP_INHERIT_SHARE ,
 or
-.Dv MAP_INHERIT_SHARE .
+.Dv MAP_INHERIT_ZERO .
 Also possible is
 .Dv MAP_INHERIT_DEFAULT ,
 which defaults to
@@ -71,6 +72,10 @@ Pages or regions marked
 are shared between the address spaces, while pages or regions marked
 .Dv MAP_INHERIT_NONE
 will be unmapped in the child.
+Finally pages or regions marked
+.Dv MAP_INHERIT_ZERO
+will still be present at the child, but will be initialized to
+.Dv 0 .
 .Sh RETURN VALUES
 .Rv -std minherit
 .Sh ERRORS



CVS commit: src/sys

2014-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 18 12:36:57 UTC 2014

Modified Files:
src/sys/sys: mman.h
src/sys/uvm: uvm_map.c

Log Message:
Add MAP_INHERIT_ZERO


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/mman.h
cvs rdiff -u -r1.329 -r1.330 src/sys/uvm/uvm_map.c

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

Modified files:

Index: src/sys/sys/mman.h
diff -u src/sys/sys/mman.h:1.46 src/sys/sys/mman.h:1.47
--- src/sys/sys/mman.h:1.46	Mon Jun 30 17:46:33 2014
+++ src/sys/sys/mman.h	Fri Jul 18 08:36:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mman.h,v 1.46 2014/06/30 21:46:33 matt Exp $	*/
+/*	$NetBSD: mman.h,v 1.47 2014/07/18 12:36:57 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -161,6 +161,7 @@ typedef	__off_t		off_t;		/* file offset 
 #define	MAP_INHERIT_NONE	2	/* absent from child */
 #define	MAP_INHERIT_DONATE_COPY	3	/* copy and delete -- not
 	   implemented in UVM */
+#define	MAP_INHERIT_ZERO	4	/* zero in child */
 #define	MAP_INHERIT_DEFAULT	MAP_INHERIT_COPY
 #endif
 

Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.329 src/sys/uvm/uvm_map.c:1.330
--- src/sys/uvm/uvm_map.c:1.329	Fri Jul 18 08:19:09 2014
+++ src/sys/uvm/uvm_map.c	Fri Jul 18 08:36:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.329 2014/07/18 12:19:09 christos Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.330 2014/07/18 12:36:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.329 2014/07/18 12:19:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.330 2014/07/18 12:36:57 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -3097,6 +3097,7 @@ uvm_map_inherit(struct vm_map *map, vadd
 	case MAP_INHERIT_NONE:
 	case MAP_INHERIT_COPY:
 	case MAP_INHERIT_SHARE:
+	case MAP_INHERIT_ZERO:
 		break;
 	default:
 		UVMHIST_LOG(maphist,"<- done (INVALID ARG)",0,0,0,0);
@@ -4346,6 +4347,35 @@ uvm_mapent_forkcopy(struct vm_map *new_m
 }
 
 /*
+ * zero the mapping: the new entry will be zero initialized
+ */
+static void
+uvm_mapent_forkzero(struct vm_map *new_map, struct vm_map *old_map,
+struct vm_map_entry *old_entry)
+{
+	struct vm_map_entry *new_entry;
+
+	new_entry = uvm_mapent_clone(new_map, old_entry, 0);
+
+	new_entry->etype |=
+	(UVM_ET_COPYONWRITE|UVM_ET_NEEDSCOPY);
+
+	if (new_entry->aref.ar_amap) {
+		uvm_map_unreference_amap(new_entry, 0);
+		new_entry->aref.ar_pageoff = 0;
+		new_entry->aref.ar_amap = NULL;
+	}
+
+	if (UVM_ET_ISOBJ(new_entry)) {
+		if (new_entry->object.uvm_obj->pgops->pgo_detach)
+			new_entry->object.uvm_obj->pgops->pgo_detach(
+			new_entry->object.uvm_obj);
+		new_entry->object.uvm_obj = NULL;
+		new_entry->etype &= ~UVM_ET_OBJ;
+	}
+}
+
+/*
  *   F O R K   -   m a i n   e n t r y   p o i n t
  */
 /*
@@ -4405,6 +4435,9 @@ uvmspace_fork(struct vmspace *vm1)
 			uvm_mapent_forkcopy(new_map, old_map, old_entry);
 			break;
 
+		case MAP_INHERIT_ZERO:
+			uvm_mapent_forkzero(new_map, old_map, old_entry);
+			break;
 		default:
 			KASSERT(0);
 			break;



CVS commit: src/distrib/sets/lists

2014-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 18 12:36:18 UTC 2014

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
Add t_minherit.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.581 -r1.582 src/distrib/sets/lists/tests/mi

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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.72 src/distrib/sets/lists/debug/mi:1.73
--- src/distrib/sets/lists/debug/mi:1.72	Thu Jul 17 08:04:05 2014
+++ src/distrib/sets/lists/debug/mi	Fri Jul 18 08:36:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.72 2014/07/17 12:04:05 prlw1 Exp $
+# $NetBSD: mi,v 1.73 2014/07/18 12:36:18 christos Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -1973,6 +1973,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_lwp_create.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_lwp_ctl.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_mincore.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/sys/t_minherit.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_mkdir.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_mkfifo.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/sys/t_mknod.debug		tests-lib-debug		debug,atf

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.581 src/distrib/sets/lists/tests/mi:1.582
--- src/distrib/sets/lists/tests/mi:1.581	Sat Jul 12 11:42:56 2014
+++ src/distrib/sets/lists/tests/mi	Fri Jul 18 08:36:18 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.581 2014/07/12 15:42:56 dholland Exp $
+# $NetBSD: mi,v 1.582 2014/07/18 12:36:18 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2651,6 +2651,7 @@
 ./usr/tests/lib/libc/sys/t_lwp_create		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_lwp_ctl		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_mincore		tests-lib-tests		atf
+./usr/tests/lib/libc/sys/t_minherit		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_mkdir		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_mkfifo		tests-lib-tests		atf
 ./usr/tests/lib/libc/sys/t_mknod		tests-lib-tests		atf



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

2014-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 18 12:34:52 UTC 2014

Modified Files:
src/tests/lib/libc/sys: Makefile
Added Files:
src/tests/lib/libc/sys: t_minherit.c

Log Message:
Add new minherit test.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_minherit.c

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

Modified files:

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.35 src/tests/lib/libc/sys/Makefile:1.36
--- src/tests/lib/libc/sys/Makefile:1.35	Tue Jun 10 00:28:39 2014
+++ src/tests/lib/libc/sys/Makefile	Fri Jul 18 08:34:52 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2014/06/10 04:28:39 he Exp $
+# $NetBSD: Makefile,v 1.36 2014/07/18 12:34:52 christos Exp $
 
 MKMAN=	no
 
@@ -30,6 +30,7 @@ TESTS_C+=		t_link
 TESTS_C+=		t_listen
 TESTS_C+=		t_lwp_ctl
 TESTS_C+=		t_lwp_create
+TESTS_C+=		t_minherit
 TESTS_C+=		t_mincore
 TESTS_C+=		t_mkdir
 TESTS_C+=		t_mkfifo

Added files:

Index: src/tests/lib/libc/sys/t_minherit.c
diff -u /dev/null src/tests/lib/libc/sys/t_minherit.c:1.1
--- /dev/null	Fri Jul 18 08:34:52 2014
+++ src/tests/lib/libc/sys/t_minherit.c	Fri Jul 18 08:34:52 2014
@@ -0,0 +1,200 @@
+/* $NetBSD: t_minherit.c,v 1.1 2014/07/18 12:34:52 christos Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include 
+__RCSID("$NetBSD: t_minherit.c,v 1.1 2014/07/18 12:34:52 christos Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static long page;
+
+static void *
+makemap(int v, int f) {
+	void *map = mmap(NULL, page, PROT_READ|PROT_WRITE,
+	MAP_SHARED|MAP_ANON, -1, 0);
+	ATF_REQUIRE(map != MAP_FAILED);
+	memset(map, v, page);
+	if (f != 666)
+		ATF_REQUIRE(minherit(map, page, f) == 0);
+	else
+		ATF_REQUIRE(minherit(map, page, f) == -1);
+	return map;
+}
+
+ATF_TC(minherit_copy);
+ATF_TC_HEAD(minherit_copy, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Test for MAP_INHERIT_COPY from minherit(2)");
+}
+
+ATF_TC_BODY(minherit_copy, tc)
+{
+	void *map1 = makemap(1, MAP_INHERIT_COPY);
+	void *map2 = makemap(1, MAP_INHERIT_COPY);
+	switch (fork()) {
+	default:
+		ATF_REQUIRE(wait(NULL) != -1);
+		ATF_REQUIRE(memcmp(map1, map2, page) == 0);
+		break;
+	case -1:
+		ATF_REQUIRE(0);
+		break;
+	case 0:
+		ATF_REQUIRE(memcmp(map1, map2, page) == 0);
+		memset(map1, 0, page);
+		exit(0);
+	}
+}
+
+ATF_TC(minherit_share);
+ATF_TC_HEAD(minherit_share, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Test for MAP_INHERIT_SHARE from minherit(2)");
+}
+
+ATF_TC_BODY(minherit_share, tc)
+{
+	void *map1 = makemap(1, MAP_INHERIT_SHARE);
+	void *map2 = makemap(1, MAP_INHERIT_SHARE);
+
+	switch (fork()) {
+	default:
+		ATF_REQUIRE(wait(NULL) != -1);
+		memset(map2, 0, page);
+		ATF_REQUIRE(memcmp(map1, map2, page) == 0);
+		break;
+	case -1:
+		ATF_REQUIRE(0);
+		break;
+	case 0:
+		ATF_REQUIRE(memcmp(map1, map2, page) == 0);
+		memset(map1, 0, page);
+		exit(0);
+	}
+}
+
+static void
+segv(int n) {
+	_exit(n);
+}
+
+ATF_TC(minherit_none);
+ATF_TC_HEAD(minherit_none, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	"Test for MAP_INHERIT_NONE from minherit(2)");
+}
+
+ATF_TC_BODY(minherit_none, tc)
+{
+	void *map1 = makemap(0, MAP_INHERIT_NONE);
+	int status;
+
+	switch (fork()) {
+	default:
+		ATF_REQUIRE(wait(&status) != -1);
+		ATF_REQUIRE(WEXITSTATUS(status)

CVS commit: src/sys/uvm

2014-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 18 12:19:10 UTC 2014

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

Log Message:
Split out the minherit code into separate functions for readability (allows
us to indent them properly), and merge the new vm_map_entry creation into
a common function to avoid code duplication. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/uvm/uvm_map.c

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

Modified files:

Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.328 src/sys/uvm/uvm_map.c:1.329
--- src/sys/uvm/uvm_map.c:1.328	Wed Mar  5 00:35:55 2014
+++ src/sys/uvm/uvm_map.c	Fri Jul 18 08:19:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.329 2014/07/18 12:19:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.328 2014/03/05 05:35:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.329 2014/07/18 12:19:09 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -4183,6 +4183,168 @@ uvmspace_free(struct vmspace *vm)
 	pool_cache_put(&uvm_vmspace_cache, vm);
 }
 
+static struct vm_map_entry *
+uvm_mapent_clone(struct vm_map *new_map, struct vm_map_entry *old_entry,
+int flags)
+{
+	struct vm_map_entry *new_entry;
+
+	new_entry = uvm_mapent_alloc(new_map, 0);
+	/* old_entry -> new_entry */
+	uvm_mapent_copy(old_entry, new_entry);
+
+	/* new pmap has nothing wired in it */
+	new_entry->wired_count = 0;
+
+	/*
+	 * gain reference to object backing the map (can't
+	 * be a submap, already checked this case).
+	 */
+
+	if (new_entry->aref.ar_amap)
+		uvm_map_reference_amap(new_entry, flags);
+
+	if (new_entry->object.uvm_obj &&
+	new_entry->object.uvm_obj->pgops->pgo_reference)
+		new_entry->object.uvm_obj->pgops->pgo_reference(
+			new_entry->object.uvm_obj);
+
+	/* insert entry at end of new_map's entry list */
+	uvm_map_entry_link(new_map, new_map->header.prev,
+	new_entry);
+
+	return new_entry;
+}
+
+/*
+ * share the mapping: this means we want the old and
+ * new entries to share amaps and backing objects.
+ */
+static void
+uvm_mapent_forkshared(struct vm_map *new_map, struct vm_map *old_map,
+struct vm_map_entry *old_entry)
+{
+	/*
+	 * if the old_entry needs a new amap (due to prev fork)
+	 * then we need to allocate it now so that we have
+	 * something we own to share with the new_entry.   [in
+	 * other words, we need to clear needs_copy]
+	 */
+
+	if (UVM_ET_ISNEEDSCOPY(old_entry)) {
+		/* get our own amap, clears needs_copy */
+		amap_copy(old_map, old_entry, AMAP_COPY_NOCHUNK,
+		0, 0);
+		/* XXXCDC: WAITOK??? */
+	}
+
+	uvm_mapent_clone(new_map, old_entry, AMAP_SHARED);
+}
+
+
+static void
+uvm_mapent_forkcopy(struct vm_map *new_map, struct vm_map *old_map,
+struct vm_map_entry *old_entry)
+{
+	struct vm_map_entry *new_entry;
+
+	/*
+	 * copy-on-write the mapping (using mmap's
+	 * MAP_PRIVATE semantics)
+	 *
+	 * allocate new_entry, adjust reference counts.
+	 * (note that new references are read-only).
+	 */
+
+	new_entry = uvm_mapent_clone(new_map, old_entry, 0);
+
+	new_entry->etype |=
+	(UVM_ET_COPYONWRITE|UVM_ET_NEEDSCOPY);
+
+	/*
+	 * the new entry will need an amap.  it will either
+	 * need to be copied from the old entry or created
+	 * from scratch (if the old entry does not have an
+	 * amap).  can we defer this process until later
+	 * (by setting "needs_copy") or do we need to copy
+	 * the amap now?
+	 *
+	 * we must copy the amap now if any of the following
+	 * conditions hold:
+	 * 1. the old entry has an amap and that amap is
+	 *being shared.  this means that the old (parent)
+	 *process is sharing the amap with another
+	 *process.  if we do not clear needs_copy here
+	 *we will end up in a situation where both the
+	 *parent and child process are refering to the
+	 *same amap with "needs_copy" set.  if the
+	 *parent write-faults, the fault routine will
+	 *clear "needs_copy" in the parent by allocating
+	 *a new amap.   this is wrong because the
+	 *parent is supposed to be sharing the old amap
+	 *and the new amap will break that.
+	 *
+	 * 2. if the old entry has an amap and a non-zero
+	 *wire count then we are going to have to call
+	 *amap_cow_now to avoid page faults in the
+	 *parent process.   since amap_cow_now requires
+	 *"needs_copy" to be clear we might as well
+	 *clear it here as well.
+	 *
+	 */
+
+	if (old_entry->aref.ar_amap != NULL) {
+		if ((amap_flags(old_entry->aref.ar_amap) & AMAP_SHARED) != 0 ||
+		VM_MAPENT_ISWIRED(old_entry)) {
+
+			amap_copy(new_map, new_entry,
+			AMAP_COPY_NOCHUNK, 0, 0);
+			/* XXXCDC: M_WAITOK ... ok? */
+		}
+	}
+
+	/*
+	 * if the parent's en

CVS commit: src/share/man/man4

2014-07-18 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Jul 18 11:14:18 UTC 2014

Modified Files:
src/share/man/man4: asus.4

Log Message:
Add missing end list (El) macro.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/asus.4

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/man4/asus.4
diff -u src/share/man/man4/asus.4:1.2 src/share/man/man4/asus.4:1.3
--- src/share/man/man4/asus.4:1.2	Sun Jul 13 12:04:07 2014
+++ src/share/man/man4/asus.4	Fri Jul 18 11:14:18 2014
@@ -1,4 +1,4 @@
-.\" $NetBSD: asus.4,v 1.2 2014/07/13 12:04:07 wiz Exp $
+.\" $NetBSD: asus.4,v 1.3 2014/07/18 11:14:18 njoly Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,6 +53,7 @@ Toggle audio
 Volume down
 .It \&Fn + F9
 Volume up
+.El
 .Sh SEE ALSO
 .Xr acpi 4 ,
 .Xr powerd 8