CVS commit: src/games/atc

2011-02-15 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Tue Feb 15 08:25:26 UTC 2011

Modified Files:
src/games/atc: update.c

Log Message:
Bug fix: in a game with 26 planes, the last one to be allocated wouldn't
be allocated if it was the only eligible one.
From Jonathan David Amery via Debian Bug report 214626.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/games/atc/update.c

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

Modified files:

Index: src/games/atc/update.c
diff -u src/games/atc/update.c:1.21 src/games/atc/update.c:1.22
--- src/games/atc/update.c:1.21	Wed Aug 12 04:48:03 2009
+++ src/games/atc/update.c	Tue Feb 15 08:25:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: update.c,v 1.21 2009/08/12 04:48:03 dholland Exp $	*/
+/*	$NetBSD: update.c,v 1.22 2011/02/15 08:25:25 is Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = @(#)update.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: update.c,v 1.21 2009/08/12 04:48:03 dholland Exp $);
+__RCSID($NetBSD: update.c,v 1.22 2011/02/15 08:25:25 is Exp $);
 #endif
 #endif /* not lint */
 
@@ -302,7 +302,7 @@
 	break;
 }
 	} while (found  last_plane != start_plane);
-	if (last_plane == start_plane)
+	if (found)
 		return (-1);
 	return (last_plane);
 }



CVS commit: src/sys/dev/pci

2011-02-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb 15 08:56:11 UTC 2011

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

Log Message:
print AGP mode (v3/v2compat/v2) with aprint_debug instead of aprint_normal


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/agp_via.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/agp_via.c
diff -u src/sys/dev/pci/agp_via.c:1.19 src/sys/dev/pci/agp_via.c:1.20
--- src/sys/dev/pci/agp_via.c:1.19	Sat Nov 13 13:52:05 2010
+++ src/sys/dev/pci/agp_via.c	Tue Feb 15 08:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_via.c,v 1.19 2010/11/13 13:52:05 uebayasi Exp $	*/
+/*	$NetBSD: agp_via.c,v 1.20 2011/02/15 08:56:11 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp_via.c,v 1.19 2010/11/13 13:52:05 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp_via.c,v 1.20 2011/02/15 08:56:11 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -105,14 +105,14 @@
 		agpsel = pci_conf_read(pa-pa_pc, pa-pa_tag, AGP_VIA_AGPSEL);
 		if ((agpsel  (1  9)) == 0) {
 			asc-regs = via_v3_regs;
-			aprint_normal( (v3));
+			aprint_debug( (v3));
 		} else {
 			asc-regs = via_v2_regs;
-			aprint_normal( (v2 compat mode));
+			aprint_debug( (v2 compat mode));
 		}
 	} else {
 		asc-regs = via_v2_regs;
-		aprint_normal( (v2));
+		aprint_debug( (v2));
 	}
 
 	if (agp_map_aperture(pa, sc, AGP_APBASE) != 0) {



CVS commit: src/sys

2011-02-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb 15 08:57:02 UTC 2011

Modified Files:
src/sys/dev/pci: agp.c
src/sys/sys: agpio.h

Log Message:
add AGP v3 support to agp_generic_enable from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/agp.c
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/agpio.h

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

Modified files:

Index: src/sys/dev/pci/agp.c
diff -u src/sys/dev/pci/agp.c:1.76 src/sys/dev/pci/agp.c:1.77
--- src/sys/dev/pci/agp.c:1.76	Sat Nov 13 13:52:04 2010
+++ src/sys/dev/pci/agp.c	Tue Feb 15 08:57:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp.c,v 1.76 2010/11/13 13:52:04 uebayasi Exp $	*/
+/*	$NetBSD: agp.c,v 1.77 2011/02/15 08:57:01 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.76 2010/11/13 13:52:04 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.77 2011/02/15 08:57:01 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -100,6 +100,10 @@
 static int agp_deallocate_user(struct agp_softc *, int);
 static int agp_bind_user(struct agp_softc *, agp_bind *);
 static int agp_unbind_user(struct agp_softc *, agp_unbind *);
+static int agp_generic_enable_v2(struct agp_softc *, struct pci_attach_args *,
+ int, u_int32_t);
+static int agp_generic_enable_v3(struct agp_softc *, struct pci_attach_args *,
+ int, u_int32_t);
 static int agpdev_match(struct pci_attach_args *);
 static bool agp_resume(device_t, const pmf_qual_t *);
 
@@ -456,8 +460,7 @@
 {
 	struct pci_attach_args pa;
 	pcireg_t tstatus, mstatus;
-	pcireg_t command;
-	int rq, sba, fw, rate, capoff;
+	int capoff;
 
 	if (pci_find_device(pa, agpdev_match) == 0 ||
 	pci_get_capability(pa.pa_pc, pa.pa_tag, PCI_CAP_AGP,
@@ -471,6 +474,27 @@
 	mstatus = pci_conf_read(pa.pa_pc, pa.pa_tag,
 	capoff + AGP_STATUS);
 
+	if (AGP_MODE_GET_MODE_3(mode) 
+	AGP_MODE_GET_MODE_3(tstatus) 
+	AGP_MODE_GET_MODE_3(mstatus))
+		return agp_generic_enable_v3(sc, pa, capoff, mode);
+	else
+		return agp_generic_enable_v2(sc, pa, capoff, mode);
+}
+
+static int
+agp_generic_enable_v2(struct agp_softc *sc, struct pci_attach_args *pa,
+int capoff, u_int32_t mode)
+{
+	pcireg_t tstatus, mstatus;
+	pcireg_t command;
+	int rq, sba, fw, rate;
+
+	tstatus = pci_conf_read(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_STATUS);
+	mstatus = pci_conf_read(pa-pa_pc, pa-pa_tag,
+	capoff + AGP_STATUS);
+
 	/* Set RQ to the min of mode, tstatus and mstatus */
 	rq = AGP_MODE_GET_RQ(mode);
 	if (AGP_MODE_GET_RQ(tstatus)  rq)
@@ -492,22 +516,89 @@
 	rate = (AGP_MODE_GET_RATE(tstatus)
 		 AGP_MODE_GET_RATE(mstatus)
 		 AGP_MODE_GET_RATE(mode));
-	if (rate  AGP_MODE_RATE_4x)
-		rate = AGP_MODE_RATE_4x;
-	else if (rate  AGP_MODE_RATE_2x)
-		rate = AGP_MODE_RATE_2x;
+	if (rate  AGP_MODE_V2_RATE_4x)
+		rate = AGP_MODE_V2_RATE_4x;
+	else if (rate  AGP_MODE_V2_RATE_2x)
+		rate = AGP_MODE_V2_RATE_2x;
+	else
+		rate = AGP_MODE_V2_RATE_1x;
+
+	/* Construct the new mode word and tell the hardware */
+	command = AGP_MODE_SET_RQ(0, rq);
+	command = AGP_MODE_SET_SBA(command, sba);
+	command = AGP_MODE_SET_FW(command, fw);
+	command = AGP_MODE_SET_RATE(command, rate);
+	command = AGP_MODE_SET_AGP(command, 1);
+	pci_conf_write(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_COMMAND, command);
+	pci_conf_write(pa-pa_pc, pa-pa_tag, capoff + AGP_COMMAND, command);
+
+	return 0;
+}
+
+static int
+agp_generic_enable_v3(struct agp_softc *sc, struct pci_attach_args *pa,
+int capoff, u_int32_t mode)
+{
+	pcireg_t tstatus, mstatus;
+	pcireg_t command;
+	int rq, sba, fw, rate, arqsz, cal;
+
+	tstatus = pci_conf_read(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_STATUS);
+	mstatus = pci_conf_read(pa-pa_pc, pa-pa_tag,
+	capoff + AGP_STATUS);
+
+	/* Set RQ to the min of mode, tstatus and mstatus */
+	rq = AGP_MODE_GET_RQ(mode);
+	if (AGP_MODE_GET_RQ(tstatus)  rq)
+		rq = AGP_MODE_GET_RQ(tstatus);
+	if (AGP_MODE_GET_RQ(mstatus)  rq)
+		rq = AGP_MODE_GET_RQ(mstatus);
+
+	/*
+	 * ARQSZ - Set the value to the maximum one.
+	 * Don't allow the mode register to override values.
+	 */
+	arqsz = AGP_MODE_GET_ARQSZ(mode);
+	if (AGP_MODE_GET_ARQSZ(tstatus)  arqsz)
+		arqsz = AGP_MODE_GET_ARQSZ(tstatus);
+	if (AGP_MODE_GET_ARQSZ(mstatus)  arqsz)
+		arqsz = AGP_MODE_GET_ARQSZ(mstatus);
+
+	/* Calibration cycle - don't allow override by mode register */
+	cal = AGP_MODE_GET_CAL(tstatus);
+	if (AGP_MODE_GET_CAL(mstatus)  cal)
+		cal = AGP_MODE_GET_CAL(mstatus);
+
+	/* SBA must be supported for AGP v3. */
+	sba = 1;
+
+	/* Set FW if all three support it. */
+	fw = (AGP_MODE_GET_FW(tstatus)
+	AGP_MODE_GET_FW(mstatus)
+	AGP_MODE_GET_FW(mode));
+
+	/* Figure out the max rate */
+	rate = (AGP_MODE_GET_RATE(tstatus)
+		 AGP_MODE_GET_RATE(mstatus)
+		 AGP_MODE_GET_RATE(mode));
+	if (rate  

CVS commit: src/sys/arch/sparc/sparc

2011-02-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb 15 09:05:15 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: cpu.c cpuvar.h intr.c

Log Message:
remove unused CPUFLG_READY and CPU_NOTREADY() macro.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/arch/sparc/sparc/cpu.c
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/sparc/sparc/cpuvar.h
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/sparc/sparc/intr.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/sparc/sparc/cpu.c
diff -u src/sys/arch/sparc/sparc/cpu.c:1.229 src/sys/arch/sparc/sparc/cpu.c:1.230
--- src/sys/arch/sparc/sparc/cpu.c:1.229	Mon Feb 14 03:18:10 2011
+++ src/sys/arch/sparc/sparc/cpu.c	Tue Feb 15 09:05:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.229 2011/02/14 03:18:10 mrg Exp $ */
+/*	$NetBSD: cpu.c,v 1.230 2011/02/15 09:05:14 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.229 2011/02/14 03:18:10 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.230 2011/02/15 09:05:14 mrg Exp $);
 
 #include opt_multiprocessor.h
 #include opt_lockdebug.h
@@ -555,12 +555,10 @@
 			continue;
 
 		printf( cpu%d, cpi-ci_cpuid);
-		cpi-flags |= CPUFLG_READY;
 		cpu_ready_mask |= (1  n);
 	}
 
 	/* Mark the boot CPU as ready */
-	cpuinfo.flags |= CPUFLG_READY;
 	cpu_ready_mask |= (1  0);
 
 	/* Tell the other CPU's to start up.  */

Index: src/sys/arch/sparc/sparc/cpuvar.h
diff -u src/sys/arch/sparc/sparc/cpuvar.h:1.87 src/sys/arch/sparc/sparc/cpuvar.h:1.88
--- src/sys/arch/sparc/sparc/cpuvar.h:1.87	Mon Feb 14 03:18:10 2011
+++ src/sys/arch/sparc/sparc/cpuvar.h	Tue Feb 15 09:05:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.87 2011/02/14 03:18:10 mrg Exp $ */
+/*	$NetBSD: cpuvar.h,v 1.88 2011/02/15 09:05:14 mrg Exp $ */
 
 /*
  *  Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -419,7 +419,6 @@
 #define CPUFLG_HATCHED		0x1000	/* CPU is alive */
 #define CPUFLG_PAUSED		0x2000	/* CPU is paused */
 #define CPUFLG_GOTMSG		0x4000	/* CPU got an lev13 IPI */
-#define CPUFLG_READY		0x8000	/* CPU available for IPI */
 
 
 #define CPU_INFO_ITERATOR		int
@@ -435,11 +434,6 @@
 #define CPU_INFO_FOREACH(cii, cp)	cii = 0, cp = curcpu(); cp != NULL; cp = NULL
 #endif
 
-/*
- * Useful macros.
- */
-#define CPU_NOTREADY(cpi)	((cpi) == NULL || cpuinfo.mid == (cpi)-mid || \
-((cpi)-flags  CPUFLG_READY) == 0)
 
 /*
  * Related function prototypes

Index: src/sys/arch/sparc/sparc/intr.c
diff -u src/sys/arch/sparc/sparc/intr.c:1.111 src/sys/arch/sparc/sparc/intr.c:1.112
--- src/sys/arch/sparc/sparc/intr.c:1.111	Thu Jan 27 06:24:59 2011
+++ src/sys/arch/sparc/sparc/intr.c	Tue Feb 15 09:05:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.111 2011/01/27 06:24:59 mrg Exp $ */
+/*	$NetBSD: intr.c,v 1.112 2011/02/15 09:05:14 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.111 2011/01/27 06:24:59 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.112 2011/02/15 09:05:14 mrg Exp $);
 
 #include opt_multiprocessor.h
 #include opt_sparc_arch.h
@@ -305,7 +305,6 @@
 		case OPENPROM_MBX_WD:
 			/* In case there's an xcall in progress (unlikely) */
 			spl0();
-			cpuinfo.flags = ~CPUFLG_READY;
 #ifdef MULTIPROCESSOR
 			cpu_ready_mask = ~(1  cpu_number());
 #endif



CVS commit: src/sys/arch/sparc/sparc

2011-02-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb 15 09:56:33 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: intr.c pmap.c timer_sun4m.c

Log Message:
sprinkle some kpreempt_{dis,en}able() in various strategic points
we will need when we get to actually enabling kernel preemption.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/sparc/sparc/intr.c
cvs rdiff -u -r1.340 -r1.341 src/sys/arch/sparc/sparc/pmap.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sparc/sparc/timer_sun4m.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/sparc/sparc/intr.c
diff -u src/sys/arch/sparc/sparc/intr.c:1.112 src/sys/arch/sparc/sparc/intr.c:1.113
--- src/sys/arch/sparc/sparc/intr.c:1.112	Tue Feb 15 09:05:14 2011
+++ src/sys/arch/sparc/sparc/intr.c	Tue Feb 15 09:56:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.112 2011/02/15 09:05:14 mrg Exp $ */
+/*	$NetBSD: intr.c,v 1.113 2011/02/15 09:56:32 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.112 2011/02/15 09:05:14 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.113 2011/02/15 09:56:32 mrg Exp $);
 
 #include opt_multiprocessor.h
 #include opt_sparc_arch.h
@@ -353,6 +353,8 @@
 xcallintr(void *v)
 {
 
+	kpreempt_disable();
+
 	/* Tally */
 	if (v != xcallintr)
 		cpuinfo.ci_sintrcnt[13].ev_count++;
@@ -370,6 +372,8 @@
 	}
 	cpuinfo.msg.tag = 0;
 	cpuinfo.msg.complete = 1;
+
+	kpreempt_enable();
 }
 #endif /* MULTIPROCESSOR */
 #endif /* SUN4M || SUN4D */
@@ -843,6 +847,11 @@
 bool
 cpu_intr_p(void)
 {
+	int idepth;
+
+	kpreempt_disable();
+	idepth = curcpu()-ci_idepth;
+	kpreempt_enable();
 
-	return curcpu()-ci_idepth != 0;
+	return idepth != 0;
 }

Index: src/sys/arch/sparc/sparc/pmap.c
diff -u src/sys/arch/sparc/sparc/pmap.c:1.340 src/sys/arch/sparc/sparc/pmap.c:1.341
--- src/sys/arch/sparc/sparc/pmap.c:1.340	Mon Apr 26 09:26:25 2010
+++ src/sys/arch/sparc/sparc/pmap.c	Tue Feb 15 09:56:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.340 2010/04/26 09:26:25 martin Exp $ */
+/*	$NetBSD: pmap.c,v 1.341 2011/02/15 09:56:32 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.340 2010/04/26 09:26:25 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.341 2011/02/15 09:56:32 mrg Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -818,7 +818,9 @@
 setpgt4m(int *ptep, int pte)
 {
 
+	kpreempt_disable();
 	swap(ptep, pte);
+	kpreempt_enable();
 }
 
 inline void
@@ -829,9 +831,11 @@
 #if defined(MULTIPROCESSOR)
 	updatepte4m(va, ptep, 0x, pte, pageflush ? ctx : 0, cpuset);
 #else
+	kpreempt_disable();
 	if (__predict_true(pageflush))
 		tlb_flush_page(va, ctx, 0);
 	setpgt4m(ptep, pte);
+	kpreempt_enable();
 #endif /* MULTIPROCESSOR */
 }
 
@@ -6247,6 +6251,7 @@
 	rp = pm-pm_regmap[vr];
 	sp = rp-rg_segmap[vs];
 
+	kpreempt_disable();
 	s = splvm();		/* XXX way too conservative */
 	PMAP_LOCK();
 
@@ -6261,9 +6266,8 @@
 		if ((tpte  SRMMU_PPNMASK) == (pteproto  SRMMU_PPNMASK)) {
 			/* just changing protection and/or wiring */
 			pmap_changeprot4m(pm, va, prot, flags);
-			PMAP_UNLOCK();
-			splx(s);
-			return (0);
+			error = 0;
+			goto out;
 		}
 
 		if ((tpte  SRMMU_PGTYPE) == PG_SUN4M_OBMEM) {
@@ -6309,6 +6313,7 @@
 out:
 	PMAP_UNLOCK();
 	splx(s);
+	kpreempt_enable();
 	return (error);
 }
 
@@ -6438,9 +6443,8 @@
 /* just changing prot and/or wiring */
 /* caller should call this directly: */
 pmap_changeprot4m(pm, va, prot, flags);
-PMAP_UNLOCK();
-splx(s);
-return (0);
+error = 0;
+goto out;
 			}
 			/*
 			 * Switcheroo: changing pa for this va.
@@ -6551,6 +6555,7 @@
 	 * The kernel pmap doesn't need to be locked, but the demap lock
 	 * in updatepte() requires interrupt protection.
 	 */
+	kpreempt_disable();
 	s = splvm();
 
 	endva = va + len;
@@ -6596,6 +6601,7 @@
 		}
 	}
 	splx(s);
+	kpreempt_enable();
 }
 
 /*
@@ -6616,6 +6622,7 @@
 	 * The kernel pmap doesn't need to be locked, but the demap lock
 	 * in updatepte() requires interrupt protection.
 	 */
+	kpreempt_disable();
 	s = splvm();
 
 	while (size  0) {
@@ -6639,6 +6646,7 @@
 		size -= NBPG;
 	}
 	splx(s);
+	kpreempt_enable();
 }
 #endif /* SUN4M || SUN4D */
 
@@ -6654,6 +6662,7 @@
 	struct segmap *sp;
 	bool owired;
 
+	kpreempt_disable();
 	vr = VA_VREG(va);
 	vs = VA_VSEG(va);
 	rp = pm-pm_regmap[vr];
@@ -6672,6 +6681,7 @@
 	if (!owired) {
 		pmap_stats.ps_useless_changewire++;
 		return;
+		kpreempt_enable();
 	}
 
 	pm-pm_stats.wired_count--;
@@ -6686,6 +6696,7 @@
 			mmu_pmeg_unlock(sp-sg_pmeg);
 	}
 #endif /* SUN4 || SUN4C */
+	kpreempt_enable();
 }
 
 /*
@@ -7088,6 +7099,7 @@
 	void *va;
 	int pte;
 
+	kpreempt_disable();
 	if ((pg = PHYS_TO_VM_PAGE(pa)) != NULL) {
 		/*
 		 * The following VAC flush might not be necessary since the
@@ -7115,6 

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

2011-02-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Feb 15 10:11:25 UTC 2011

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
update cpuid bits


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.49 src/sys/arch/x86/include/specialreg.h:1.50
--- src/sys/arch/x86/include/specialreg.h:1.49	Tue Oct 12 00:39:08 2010
+++ src/sys/arch/x86/include/specialreg.h	Tue Feb 15 10:11:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.49 2010/10/12 00:39:08 jakllsch Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.50 2011/02/15 10:11:25 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -158,7 +158,7 @@
 /* Intel Fn8001 extended features - %ecx */
 #define	CPUID_LAHF	0x0001	/* LAHF/SAHF in IA-32e mode, 64bit sub*/
 
-#define	CPUID_INTEL_FLAGS4	\20\1LAHF
+#define	CPUID_INTEL_FLAGS4	\20\1LAHF\02B02\03B03
 
 
 /* AMD/VIA Fn8001 extended features - %edx */
@@ -173,8 +173,9 @@
 #define CPUID_3DNOW2	0x4000	/* 3DNow! Instruction Extension */
 #define CPUID_3DNOW	0x8000	/* 3DNow! Instructions */
 
-#define CPUID_EXT_FLAGS	\20\14SYSCALL/SYSRET\24MPC\25NOX\27MXX\32FFXSR \
-			\33P1GB\34RDTSCP\36LONG\0373DNOW2\0403DNOW
+#define CPUID_EXT_FLAGS	\20\14SYSCALL/SYSRET\24MPC\25NOX \
+			\27MXX\32FFXSR\33P1GB\34RDTSCP \
+			\36LONG\0373DNOW2\0403DNOW \
 
 /* AMD Fn8001 extended features - %ecx */
 #define CPUID_LAHF	0x0001	/* LAHF/SAHF instruction */
@@ -188,24 +189,40 @@
 #define CPUID_3DNOWPF	0x0100	/* 3DNow Prefetch */
 #define CPUID_OSVW	0x0200	/* OS visible workarounds */
 #define CPUID_IBS	0x0400	/* Instruction Based Sampling */
-#define CPUID_SSE5	0x0800	/* SSE5 instruction set */
+#define CPUID_XOP	0x0800	/* XOP instruction set */
 #define CPUID_SKINIT	0x1000	/* SKINIT */
 #define CPUID_WDT	0x2000	/* watchdog timer support */
+#define CPUID_LWP	0x8000	/* Light Weight Profiling */
+#define CPUID_FMA4	0x0001	/* FMA4 instructions */
+#define CPUID_NODEID	0x0008	/* NodeID MSR available*/
+#define CPUID_TBM	0x0020	/* TBM instructions */
+#define CPUID_TOPOEXT	0x0040	/* cpuid Topology Extension */
 
 #define CPUID_AMD_FLAGS4	\20\1LAHF\2CMPLEGACY\3SVM\4EAPIC\5ALTMOVCR0 \
 \6LZCNT\7SSE4A\10MISALIGNSSE \
 \0113DNOWPREFETCH\12OSVW\13IBS \
-\14SSE5\15SKINIT\16WDT
+\14XOP\15SKINIT\16WDT\20LWP \
+\21FMA4\22B17\23B18\24NodeID\25B20\26TBM \
+\27TopoExt\30B23\31B24 \
+\32B25\33B25\34B26 \
+\35B27\36B28\37B29\40B30\41B31\42B32
 
 /* AMD Fn800a %edx features (SVM features) */
 #define	CPUID_AMD_SVM_NP		0x0001
 #define	CPUID_AMD_SVM_LbrVirt		0x0002
 #define	CPUID_AMD_SVM_SVML		0x0004
 #define	CPUID_AMD_SVM_NRIPS		0x0008
-#define	CPUID_AMD_SVM_Ssse3Sse5Dis	0x0200
+#define	CPUID_AMD_SVM_TSCRateCtrl	0x0010
+#define	CPUID_AMD_SVM_VMCBCleanBits	0x0020
+#define	CPUID_AMD_SVM_FlushByASID	0x0040
+#define	CPUID_AMD_SVM_DecodeAssist	0x0080
 #define	CPUID_AMD_SVM_PauseFilter	0x0400
 #define	CPUID_AMD_SVM_FLAGS	 \20\1NP\2LbrVirt\3SVML\4NRIPS \
-\12Ssse3Sse5Dis\13PauseFilter
+\5TSCRate\6VMCBCleanBits\7FlushByASID \
+\10DecodeAssist\11B08 \
+\12B09\13PauseFilter \
+\14B11\15B12 \
+\16B13\17B17\20B18\21B19
 
 /*
  * AMD Advanced Power Management
@@ -221,9 +238,10 @@
 #define CPUID_APM_HWP	0x0080	/* HW P-State control */
 #define CPUID_APM_TSC	0x0100	/* TSC invariant */
 #define CPUID_APM_CPB	0x0200	/* Core performance boost */
+#define CPUID_APM_EFF	0x0400	/* Effective Frequency (read-only) */
 
 #define CPUID_APM_FLAGS		\20\1TS\2FID\3VID\4TTP\5HTC\6STC\007100 \
-\10HWP\11TSC\12CPB
+\10HWP\11TSC\12CPB\13EffFreq\14B11\15B12
 
 /*
  * Centaur Extended Feature flags
@@ -246,6 +264,7 @@
  */
 
 #define	CPUID2_SSE3	0x0001	/* Streaming SIMD Extensions 3 */
+#define	CPUID2_PCLMUL	0x0002	/* PCLMULQDQ instructions */
 #define	CPUID2_DTES64	0x0004	/* 64-bit Debug Trace */
 #define	CPUID2_MONITOR	0x0008	/* MONITOR/MWAIT instructions */
 #define	CPUID2_DS_CPL	0x0010	/* CPL Qualified Debug Store */
@@ -263,13 +282,18 @@
 #define	CPUID2_SSE42	0x0010	/* Streaming SIMD Extensions 4.2 */
 #define	CPUID2_X2APIC	0x0020	/* xAPIC Extensions */
 #define	CPUID2_POPCNT	0x0080	/* popcount instruction available */
+#define	CPUID2_AES	0x0200	/* AES instructions */
+#define	CPUID2_XSAVE	0x0400	/* XSAVE instructions */
+#define	CPUID2_OSXSAVE	0x0800	/* XGETBV/XSETBV instructions */
+#define	CPUID2_AVX	0x1000	/* AVX instructions */
+#define	CPUID2_F16C	0x2000	/* half precision conversion */
 #define	CPUID2_RAZ	0x8000	/* 

CVS commit: src/sys/arch/hp700

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 10:32:57 UTC 2011

Modified Files:
src/sys/arch/hp700/conf: GENERIC files.hp700
Added Files:
src/sys/arch/hp700/gsc: hil_gsc.c
src/sys/arch/hp700/include: hil_machdep.h

Log Message:
Add MI HIL (keyboard/mouse) support from OpenBSD.
Tested on 735/125 and ok'ed by skrll@.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp700/conf/GENERIC
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp700/conf/files.hp700
cvs rdiff -u -r0 -r1.1 src/sys/arch/hp700/gsc/hil_gsc.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/hp700/include/hil_machdep.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/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.105 src/sys/arch/hp700/conf/GENERIC:1.106
--- src/sys/arch/hp700/conf/GENERIC:1.105	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hp700/conf/GENERIC	Tue Feb 15 10:32:56 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.105 2010/11/23 11:13:59 hannken Exp $
+# $NetBSD: GENERIC,v 1.106 2011/02/15 10:32:56 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		GENERIC-$Revision: 1.105 $
+#ident 		GENERIC-$Revision: 1.106 $
 
 maxusers	32		# estimated number of users
 
@@ -296,9 +296,10 @@
 # Console Devices
 
 # Human Interface Loop
-#hil*		at gsc?
-#hkbd*		at hil? code 0	# keyboard
-#hms*		at hil? code 1	# mice  trackballs
+hil*		at gsc? irq 1	# Human Interface Loop, kbd and mouse
+hilkbd*		at hil?		# keyboard, knob and buttons
+hilms*		at hil?		# mouse and tablets
+hilid*		at hil?		# ID module
 
 # wscons
 gsckbc*		at gsc?			# pc keyboard controller
@@ -306,8 +307,8 @@
 pms*		at gsckbc?		# PS/2 mouse for wsmouse
 wskbd*		at pckbd? console ?
 wsmouse*	at pms? mux 0
-#wskbd*		at hkbd? console ?
-#wsmouse*	at hms? mux 0
+wskbd*		at hilkbd? console ?
+wsmouse*	at hilms? mux 0
 wsdisplay*	at sti?
 
 # Serial Devices

Index: src/sys/arch/hp700/conf/files.hp700
diff -u src/sys/arch/hp700/conf/files.hp700:1.24 src/sys/arch/hp700/conf/files.hp700:1.25
--- src/sys/arch/hp700/conf/files.hp700:1.24	Tue Nov  9 12:24:47 2010
+++ src/sys/arch/hp700/conf/files.hp700	Tue Feb 15 10:32:56 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.hp700,v 1.24 2010/11/09 12:24:47 skrll Exp $
+#	$NetBSD: files.hp700,v 1.25 2011/02/15 10:32:56 tsutsui Exp $
 #
 #	$OpenBSD: files.hp700,v 1.31 2001/06/26 02:41:25 mickey Exp $
 #
@@ -53,6 +53,11 @@
 #
 include dev/eisa/files.eisa
 
+#
+# HIL Human Interface Loop devices
+#
+include dev/hil/files.hil
+
 
 #
 # Gonzo System Connect Bus
@@ -213,9 +218,8 @@
 attach	oosiop at gsc with oosiop_gsc
 file	arch/hp700/gsc/oosiop_gsc.c	oosiop_gsc
 
-device	hil: tty
-attach	hil at gsc
-file	arch/hp700/gsc/hil.c		hil
+attach	hil at gsc with hil_gsc
+file	arch/hp700/gsc/hil_gsc.c	hil_gsc
 
 device	gsckbc: pckbport
 attach	gsckbc at gsc

Added files:

Index: src/sys/arch/hp700/gsc/hil_gsc.c
diff -u /dev/null src/sys/arch/hp700/gsc/hil_gsc.c:1.1
--- /dev/null	Tue Feb 15 10:32:57 2011
+++ src/sys/arch/hp700/gsc/hil_gsc.c	Tue Feb 15 10:32:56 2011
@@ -0,0 +1,99 @@
+/*	$NetBSD: hil_gsc.c,v 1.1 2011/02/15 10:32:56 tsutsui Exp $	*/
+/*	$OpenBSD: hil_gsc.c,v 1.5 2005/12/22 07:09:52 miod Exp $	*/
+/*
+ * Copyright (c) 2003, Miodrag Vallat.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/cpu.h
+#include sys/bus.h
+
+#include machine/intr.h
+#include machine/iomod.h
+#include machine/autoconf.h
+
+#include 

CVS commit: src/sys/rump

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 10:35:06 UTC 2011

Modified Files:
src/sys/rump/include/rump: rumpuser.h
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Add an exec callback for the proxy code.  The client can now
notify the rump kernel of an exec having taken place.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.229 -r1.230 src/sys/rump/librump/rumpkern/rump.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/include/rump/rumpuser.h
diff -u src/sys/rump/include/rump/rumpuser.h:1.65 src/sys/rump/include/rump/rumpuser.h:1.66
--- src/sys/rump/include/rump/rumpuser.h:1.65	Fri Jan 28 19:21:29 2011
+++ src/sys/rump/include/rump/rumpuser.h	Tue Feb 15 10:35:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.h,v 1.65 2011/01/28 19:21:29 pooka Exp $	*/
+/*	$NetBSD: rumpuser.h,v 1.66 2011/02/15 10:35:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -36,7 +36,7 @@
 #include stdint.h
 #endif
 
-#define RUMPUSER_VERSION 12
+#define RUMPUSER_VERSION 13
 int rumpuser_getversion(void);
 
 int rumpuser_daemonize_begin(void);
@@ -219,6 +219,7 @@
 	struct lwp * (*spop_lwproc_curlwp)(void);
 	int (*spop_syscall)(int, void *, register_t *);
 	void (*spop_procexit)(void);
+	void (*spop_execnotify)(const char *);
 	pid_t (*spop_getpid)(void);
 };
 

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.229 src/sys/rump/librump/rumpkern/rump.c:1.230
--- src/sys/rump/librump/rumpkern/rump.c:1.229	Thu Feb 10 13:31:55 2011
+++ src/sys/rump/librump/rumpkern/rump.c	Tue Feb 15 10:35:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.229 2011/02/10 13:31:55 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.230 2011/02/15 10:35:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.229 2011/02/10 13:31:55 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.230 2011/02/15 10:35:05 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -102,6 +102,7 @@
 static int rump_proxy_syscall(int, void *, register_t *);
 static int rump_proxy_rfork(void *, int, const char *);
 static void rump_proxy_procexit(void);
+static void rump_proxy_execnotify(const char *);
 
 static char rump_msgbuf[16*1024]; /* 16k should be enough for std rump needs */
 
@@ -214,6 +215,7 @@
 	.spop_lwproc_curlwp	= rump_lwproc_curlwp,
 	.spop_procexit		= rump_proxy_procexit,
 	.spop_syscall		= rump_proxy_syscall,
+	.spop_execnotify	= rump_proxy_execnotify,
 	.spop_getpid		= spgetpid,
 };
 
@@ -780,6 +782,17 @@
 }
 
 static void
+rump_proxy_execnotify(const char *comm)
+{
+	struct proc *p = curproc;
+
+	strlcpy(p-p_comm, comm, sizeof(p-p_comm));
+
+	/* TODO: apply CLOEXEC */
+	/* TODO: other stuff? */
+}
+
+static void
 rump_proxy_procexit(void)
 {
 	struct proc *p = curproc;



CVS commit: src/sys/arch/hp700/gsc

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 10:35:39 UTC 2011

Modified Files:
src/sys/arch/hp700/gsc: hil_gsc.c

Log Message:
- make local functions static
- remove parentheses from return
- use aprint_error(9)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp700/gsc/hil_gsc.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/hp700/gsc/hil_gsc.c
diff -u src/sys/arch/hp700/gsc/hil_gsc.c:1.1 src/sys/arch/hp700/gsc/hil_gsc.c:1.2
--- src/sys/arch/hp700/gsc/hil_gsc.c:1.1	Tue Feb 15 10:32:56 2011
+++ src/sys/arch/hp700/gsc/hil_gsc.c	Tue Feb 15 10:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_gsc.c,v 1.1 2011/02/15 10:32:56 tsutsui Exp $	*/
+/*	$NetBSD: hil_gsc.c,v 1.2 2011/02/15 10:35:39 tsutsui Exp $	*/
 /*	$OpenBSD: hil_gsc.c,v 1.5 2005/12/22 07:09:52 miod Exp $	*/
 /*
  * Copyright (c) 2003, Miodrag Vallat.
@@ -45,8 +45,8 @@
 
 #include dev/hil/hilvar.h
 
-int	hil_gsc_match(device_t, cfdata_t, void *);
-void	hil_gsc_attach(device_t, device_t, void *);
+static int	hil_gsc_match(device_t, cfdata_t, void *);
+static void	hil_gsc_attach(device_t, device_t, void *);
 
 struct hil_gsc_softc {
 	struct hil_softc sc_hs;
@@ -64,9 +64,9 @@
 
 	if (ga-ga_type.iodc_type != HPPA_TYPE_FIO ||
 	ga-ga_type.iodc_sv_model != HPPA_FIO_HIL)
-		return (0);
+		return 0;
 
-	return (1);
+	return 1;
 }
 
 void
@@ -81,7 +81,7 @@
 	sc-sc_bst = ga-ga_iot;
 	if (bus_space_map(ga-ga_iot, ga-ga_hpa,
 	HILMAPSIZE, 0, sc-sc_bsh)) {
-		printf(: couldn't map hil controller\n);
+		aprint_error(: couldn't map hil controller\n);
 		return;
 	}
 



CVS commit: src/lib

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 10:37:08 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumpuser: rumpuser_sp.c sp_common.c

Log Message:
support HANDSHAKE_EXEC


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.40 -r1.41 src/lib/librumpuser/rumpuser_sp.c
cvs rdiff -u -r1.27 -r1.28 src/lib/librumpuser/sp_common.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/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.28 src/lib/librumpclient/rumpclient.c:1.29
--- src/lib/librumpclient/rumpclient.c:1.28	Mon Feb 14 14:56:23 2011
+++ src/lib/librumpclient/rumpclient.c	Tue Feb 15 10:37:07 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.28 2011/02/14 14:56:23 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.29 2011/02/15 10:37:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -84,7 +84,7 @@
 static sigset_t fullset;
 
 static int doconnect(bool);
-static int handshake_req(struct spclient *, uint32_t *, int, bool);
+static int handshake_req(struct spclient *, int, void *, int, bool);
 
 time_t retrytimo = RUMPCLIENT_RETRYCONN_ONCE;
 
@@ -146,7 +146,8 @@
 
 			if ((rv = doconnect(false)) != 0)
 continue;
-			if ((rv = handshake_req(clispc, NULL, 0, true)) != 0)
+			if ((rv = handshake_req(clispc, HANDSHAKE_GUEST,
+			NULL, 0, true)) != 0)
 continue;
 
 			/*
@@ -305,7 +306,8 @@
 }
 
 static int
-handshake_req(struct spclient *spc, uint32_t *auth, int cancel, bool haslock)
+handshake_req(struct spclient *spc, int type, void *data,
+	int cancel, bool haslock)
 {
 	struct handshake_fork rf;
 	struct rsp_hdr rhdr;
@@ -314,7 +316,7 @@
 	size_t bonus;
 	int rv;
 
-	if (auth) {
+	if (type == HANDSHAKE_FORK) {
 		bonus = sizeof(rf);
 	} else {
 		bonus = strlen(getprogname())+1;
@@ -324,10 +326,7 @@
 	rhdr.rsp_len = sizeof(rhdr) + bonus;
 	rhdr.rsp_class = RUMPSP_REQ;
 	rhdr.rsp_type = RUMPSP_HANDSHAKE;
-	if (auth)
-		rhdr.rsp_handshake = HANDSHAKE_FORK;
-	else
-		rhdr.rsp_handshake = HANDSHAKE_GUEST;
+	rhdr.rsp_handshake = type;
 
 	pthread_sigmask(SIG_SETMASK, fullset, omask);
 	if (haslock)
@@ -335,8 +334,8 @@
 	else
 		putwait(spc, rw, rhdr);
 	rv = dosend(spc, rhdr, sizeof(rhdr));
-	if (auth) {
-		memcpy(rf.rf_auth, auth, AUTHLEN*sizeof(*auth));
+	if (type == HANDSHAKE_FORK) {
+		memcpy(rf.rf_auth, data, sizeof(rf.rf_auth)); /* uh, why? */
 		rf.rf_cancel = cancel;
 		rv = send_with_recon(spc, rf, sizeof(rf));
 	} else {
@@ -710,12 +709,19 @@
 }
 
 void *(*rumpclient_dlsym)(void *, const char *);
+static int init_done = 0;
 
 int
 rumpclient_init()
 {
 	char *p;
 	int error;
+	int rv = -1;
+	int hstype;
+
+	if (init_done)
+		return 0;
+	init_done = 1;
 
 	sigfillset(fullset);
 
@@ -753,38 +759,43 @@
 	if ((p = getenv(RUMP__PARSEDSERVER)) == NULL) {
 		if ((p = getenv(RUMP_SERVER)) == NULL) {
 			errno = ENOENT;
-			return -1;
+			goto out;
 		}
 	}
 
 	if ((error = parseurl(p, serv_sa, ptab_idx, 0)) != 0) {
 		errno = error;
-		return -1;
+		goto out;
 	}
 
 	if (doinit() == -1)
-		return -1;
+		goto out;
 
 	if ((p = getenv(RUMPCLIENT__EXECFD)) != NULL) {
 		sscanf(p, %d,%d, clispc.spc_fd, kq);
 		unsetenv(RUMPCLIENT__EXECFD);
-		return 0;
+		hstype = HANDSHAKE_EXEC;
+	} else {
+		if (doconnect(true) == -1)
+			goto out;
+		hstype = HANDSHAKE_GUEST;
 	}
 
-	if (doconnect(true) == -1)
-		return -1;
-
-	error = handshake_req(clispc, NULL, 0, false);
+	error = handshake_req(clispc, hstype, NULL, 0, false);
 	if (error) {
 		pthread_mutex_destroy(clispc.spc_mtx);
 		pthread_cond_destroy(clispc.spc_cv);
 		if (clispc.spc_fd != -1)
 			host_close(clispc.spc_fd);
 		errno = error;
-		return -1;
+		goto out;
 	}
+	rv = 0;
 
-	return 0;
+ out:
+	if (rv == -1)
+		init_done = 0;
+	return rv;
 }
 
 struct rumpclient_fork {
@@ -836,7 +847,8 @@
 	if (doconnect(false) == -1)
 		return -1;
 
-	error = handshake_req(clispc, rpf-fork_auth, 0, false);
+	error = handshake_req(clispc, HANDSHAKE_FORK, rpf-fork_auth,
+	0, false);
 	if (error) {
 		pthread_mutex_destroy(clispc.spc_mtx);
 		pthread_cond_destroy(clispc.spc_cv);

Index: src/lib/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.40 src/lib/librumpuser/rumpuser_sp.c:1.41
--- src/lib/librumpuser/rumpuser_sp.c:1.40	Tue Feb  8 11:21:22 2011
+++ src/lib/librumpuser/rumpuser_sp.c	Tue Feb 15 10:37:07 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.40 2011/02/08 11:21:22 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: rumpuser_sp.c,v 1.40 2011/02/08 11:21:22 pooka Exp $);
+__RCSID($NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $);
 
 #include 

CVS commit: src/sys/arch/sparc/sparc

2011-02-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb 15 10:59:25 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: intr.c locore.s

Log Message:
- move nmi_sun4m intr counting into nmi_soft/nmi_hard.
- request the appropriate stack space for nmi_sun4m, in particular,
  make sure we have space for %g2...%g5.  now entering ddb via eg,
  serial break no longer causes cpu1 to fault.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc/sparc/intr.c
cvs rdiff -u -r1.260 -r1.261 src/sys/arch/sparc/sparc/locore.s

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/sparc/sparc/intr.c
diff -u src/sys/arch/sparc/sparc/intr.c:1.113 src/sys/arch/sparc/sparc/intr.c:1.114
--- src/sys/arch/sparc/sparc/intr.c:1.113	Tue Feb 15 09:56:32 2011
+++ src/sys/arch/sparc/sparc/intr.c	Tue Feb 15 10:59:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.113 2011/02/15 09:56:32 mrg Exp $ */
+/*	$NetBSD: intr.c,v 1.114 2011/02/15 10:59:25 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.113 2011/02/15 09:56:32 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.114 2011/02/15 10:59:25 mrg Exp $);
 
 #include opt_multiprocessor.h
 #include opt_sparc_arch.h
@@ -205,6 +205,7 @@
 
 	/* Tally */
 	cpuinfo.ci_intrcnt[15].ev_count++;
+	cpuinfo.ci_data.cpu_nintr++;
 
 	afsr = afva = 0;
 	if ((*cpuinfo.get_asyncflt)(afsr, afva) == 0) {
@@ -296,6 +297,7 @@
 
 	/* Tally */
 	cpuinfo.ci_sintrcnt[15].ev_count++;
+	cpuinfo.ci_data.cpu_nintr++;
 
 	if (cpuinfo.mailbox) {
 		/* Check PROM messages */

Index: src/sys/arch/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.260 src/sys/arch/sparc/sparc/locore.s:1.261
--- src/sys/arch/sparc/sparc/locore.s:1.260	Thu Jan 27 06:24:59 2011
+++ src/sys/arch/sparc/sparc/locore.s	Tue Feb 15 10:59:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.260 2011/01/27 06:24:59 mrg Exp $	*/
+/*	$NetBSD: locore.s,v 1.261 2011/02/15 10:59:25 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -3062,9 +3062,7 @@
 
 #if defined(SUN4M)
 _ENTRY(_C_LABEL(nmi_sun4m))
-	INTR_SETUP(-CCFSZ-80)
-	! tally intr (curcpu()-cpu_data.cpu_nintr++) (clobbers %o0,%o1,%o2)
-	INCR64(CPUINFO_VA + CPUINFO_NINTR)
+	INTR_SETUP(-CCFSZ-80-8-8)	! normal frame, plus g2..g5
 
 #if !defined(MSIIEP) /* normal sun4m */
 



CVS commit: src/sys/dev/hil

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 11:05:51 UTC 2011

Modified Files:
src/sys/dev/hil: hil.c hildevs.h hilid.c hilkbd.c hilkbdmap.c
hilkbdmap.h hilms.c hilvar.h

Log Message:
- make local functions static
- use aprint_normal(9) and variants
- misc KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hil/hil.c src/sys/dev/hil/hildevs.h \
src/sys/dev/hil/hilid.c src/sys/dev/hil/hilkbd.c \
src/sys/dev/hil/hilkbdmap.c src/sys/dev/hil/hilkbdmap.h \
src/sys/dev/hil/hilms.c src/sys/dev/hil/hilvar.h

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

Modified files:

Index: src/sys/dev/hil/hil.c
diff -u src/sys/dev/hil/hil.c:1.1 src/sys/dev/hil/hil.c:1.2
--- src/sys/dev/hil/hil.c:1.1	Sun Feb  6 18:26:54 2011
+++ src/sys/dev/hil/hil.c	Tue Feb 15 11:05:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil.c,v 1.1 2011/02/06 18:26:54 tsutsui Exp $	*/
+/*	$NetBSD: hil.c,v 1.2 2011/02/15 11:05:51 tsutsui Exp $	*/
 /*	$OpenBSD: hil.c,v 1.24 2010/11/20 16:45:46 miod Exp $	*/
 /*
  * Copyright (c) 2003, 2004, Miodrag Vallat.
@@ -86,15 +86,15 @@
 
 #include hilkbd.h
 
-void	hilconfig(struct hil_softc *, u_int);
-void	hilempty(struct hil_softc *);
-int	hilsubmatch(device_t, cfdata_t, const int *, void *);
-void	hil_process_int(struct hil_softc *, u_int8_t, u_int8_t);
-int	hil_process_poll(struct hil_softc *, u_int8_t, u_int8_t);
-void	hil_thread(void *);
-int	send_device_cmd(struct hil_softc *sc, u_int device, u_int cmd);
-void	polloff(struct hil_softc *);
-void	pollon(struct hil_softc *);
+static void	hilconfig(struct hil_softc *, u_int);
+static void	hilempty(struct hil_softc *);
+static int	hilsubmatch(device_t, cfdata_t, const int *, void *);
+static void	hil_process_int(struct hil_softc *, uint8_t, uint8_t);
+static int	hil_process_poll(struct hil_softc *, uint8_t, uint8_t);
+static void	hil_thread(void *);
+static int	send_device_cmd(struct hil_softc *sc, u_int device, u_int cmd);
+static void	polloff(struct hil_softc *);
+static void	pollon(struct hil_softc *);
 
 static int hilwait(struct hil_softc *);
 static int hildatawait(struct hil_softc *);
@@ -113,7 +113,7 @@
 			break;
 	}
 
-	return (cnt);
+	return cnt;
 }
 
 static __inline int
@@ -128,7 +128,7 @@
 			break;
 	}
 
-	return (cnt);
+	return cnt;
 }
 
 /*
@@ -138,7 +138,8 @@
 void
 hil_attach(struct hil_softc *sc, int *hil_is_console)
 {
-	printf(\n);
+
+	aprint_normal(\n);
 
 	/*
 	 * Initialize loop information
@@ -161,15 +162,15 @@
 	struct hil_attach_args *ha = aux;
 
 	if (pnp != NULL) {
-		printf(\%s\ at %s id %x,
+		aprint_normal(\%s\ at %s id %x,
 		ha-ha_descr, pnp, ha-ha_id);
 	}
-	printf( code %d, ha-ha_code);
+	aprint_normal( code %d, ha-ha_code);
 	if (pnp == NULL) {
-		printf(: %s, ha-ha_descr);
+		aprint_normal(: %s, ha-ha_descr);
 	}
 
-	return (UNCONF);
+	return UNCONF;
 }
 
 int
@@ -179,7 +180,7 @@
 
 	if (cf-cf_loc[0] != -1 
 	cf-cf_loc[0] != ha-ha_code)
-		return (0);
+		return 0;
 
 	return config_match(parent, cf, aux);
 }
@@ -189,7 +190,7 @@
 {
 	struct hil_softc *sc = device_private(self);
 	int tries;
-	u_int8_t db;
+	uint8_t db;
 
 	sc-sc_status = HIL_STATUS_BUSY;
 
@@ -224,15 +225,14 @@
 		}
 
 #ifdef HILDEBUG
-		printf(%s: loop not ready, retrying...\n,
-		device_xname(sc-sc_dev));
+		aprint_debug(self, %s: loop not ready, retrying...\n);
 #endif
 
 		DELAY(100);
 }
 
 	if (tries == 0 || (db  LPS_CONFFAIL)) {
-		printf(%s: no devices\n, device_xname(sc-sc_dev));
+		aprint_normal_dev(self, no devices\n);
 		sc-sc_pending = 0;
 		if (tries == 0)
 			return;
@@ -243,8 +243,7 @@
 	 */
 	if (kthread_create(PRI_NONE, 0, NULL, hil_thread, sc, sc-sc_thread,
 	%s, device_xname(sc-sc_dev)) != 0) {
-		printf(%s: unable to create event thread\n,
-		device_xname(sc-sc_dev));
+		aprint_error_dev(self, unable to create event thread\n);
 		return;
 	}
 
@@ -268,10 +267,10 @@
 hil_intr(void *v)
 {
 	struct hil_softc *sc = v;
-	u_int8_t c, stat;
+	uint8_t c, stat;
 
 	if (cold)
-		return (0);
+		return 0;
 
 	stat = bus_space_read_1(sc-sc_bst, sc-sc_bsh, HILP_STAT);
 
@@ -280,7 +279,7 @@
 	 * loop.
 	 */
 	if ((stat  HIL_DATA_RDY) == 0)
-		return (0);	/* not for us */
+		return 0;	/* not for us */
 
 	c = bus_space_read_1(sc-sc_bst, sc-sc_bsh,
 	HILP_DATA);	/* clears interrupt */
@@ -291,11 +290,11 @@
 	if (sc-sc_status != HIL_STATUS_BUSY)
 		hil_process_pending(sc);
 
-	return (1);
+	return 1;
 }
 
 void
-hil_process_int(struct hil_softc *sc, u_int8_t stat, u_int8_t c)
+hil_process_int(struct hil_softc *sc, uint8_t stat, uint8_t c)
 {
 	device_t child;
 	struct hildev_softc *hdsc;
@@ -362,9 +361,9 @@
  * of buffering it.
  */
 int
-hil_process_poll(struct hil_softc *sc, u_int8_t stat, u_int8_t c)
+hil_process_poll(struct hil_softc *sc, uint8_t stat, uint8_t c)
 {
-	u_int8_t db;
+	uint8_t db;
 
 	switch ((stat  HIL_SSHIFT)  HIL_SMASK) {
 	case HIL_STATUS:
@@ -484,7 +483,7 @@

CVS commit: src/doc

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 11:18:49 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
Note hp700 HIL support.


To generate a diff of this commit:
cvs rdiff -u -r1.1503 -r1.1504 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1503 src/doc/CHANGES:1.1504
--- src/doc/CHANGES:1.1503	Sat Feb 12 22:30:04 2011
+++ src/doc/CHANGES	Tue Feb 15 11:18:49 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1503 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1504 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -855,3 +855,4 @@
 		disk. Those with very, very old NetBSD installations may
 		need to use fdisk(8) to change the NetBSD partition ids
 		from 0x165 to 0x169. [dholland 20110212]
+	hp700: Add support for HIL devices. From OpenBSD. [tsutsui 20110215]



CVS commit: src/doc

2011-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb 15 11:21:32 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
Fix partition ids in the previous disklabel(8)'s COMPAT_386BSD_MBRPART entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1504 -r1.1505 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.1504 src/doc/CHANGES:1.1505
--- src/doc/CHANGES:1.1504	Tue Feb 15 11:18:49 2011
+++ src/doc/CHANGES	Tue Feb 15 11:21:32 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1504 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1505 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -849,10 +849,10 @@
 		[tsutsui 20110212]
 	disklabel(8): Disable COMPAT_386BSD_MBRPART. The related kernel
 		compat option was disabled by default four years ago, and
-		NetBSD has not used partition id 0x165 for much longer.
+		NetBSD has not used partition id 165 (0xA5) for much longer.
 		Meanwhile the presence of this code in disklabel can
 		cause sysinst to clobber FreeBSD installs on the same
 		disk. Those with very, very old NetBSD installations may
 		need to use fdisk(8) to change the NetBSD partition ids
-		from 0x165 to 0x169. [dholland 20110212]
+		from 165 (0xA5) to 169 (0xA9). [dholland 20110212]
 	hp700: Add support for HIL devices. From OpenBSD. [tsutsui 20110215]



CVS commit: src/sys/arch/sparc/sparc

2011-02-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Feb 15 11:30:22 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: locore.s

Log Message:
give memfault_sun*() some entry points that both gdb and ddb will find.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/arch/sparc/sparc/locore.s

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/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.261 src/sys/arch/sparc/sparc/locore.s:1.262
--- src/sys/arch/sparc/sparc/locore.s:1.261	Tue Feb 15 10:59:25 2011
+++ src/sys/arch/sparc/sparc/locore.s	Tue Feb 15 11:30:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.261 2011/02/15 10:59:25 mrg Exp $	*/
+/*	$NetBSD: locore.s,v 1.262 2011/02/15 11:30:21 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -1786,6 +1786,7 @@
  */
 
 #if defined(SUN4)
+_ENTRY(memfault_sun4)
 memfault_sun4:
 	TRAP_SETUP(-CCFSZ-80)
 	! tally interrupt (curcpu()-cpu_data.cpu_nfault++) (clobbers %o0,%o1)
@@ -1851,8 +1852,9 @@
 #endif /* SUN4C || SUN4M */
 #endif /* SUN4 */
 
-memfault_sun4c:
 #if defined(SUN4C)
+_ENTRY(memfault_sun4c)
+memfault_sun4c:
 	TRAP_SETUP(-CCFSZ-80)
 	! tally fault (curcpu()-cpu_data.cpu_nfault++) (clobbers %o0,%o1,%o2)
 	INCR64(CPUINFO_VA + CPUINFO_NFAULT)
@@ -1951,6 +1953,7 @@
 #endif /* SUN4C */
 
 #if defined(SUN4M)
+_ENTRY(memfault_sun4m)
 memfault_sun4m:
 	sethi	%hi(CPUINFO_VA), %l4
 	ld	[%l4 + %lo(CPUINFO_VA+CPUINFO_GETSYNCFLT)], %l5



CVS commit: src/sys/kern

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 11:43:54 UTC 2011

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

Log Message:
augment comment


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/exec_elf.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/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.27 src/sys/kern/exec_elf.c:1.28
--- src/sys/kern/exec_elf.c:1.27	Thu Oct  7 02:14:02 2010
+++ src/sys/kern/exec_elf.c	Tue Feb 15 11:43:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.27 2010/10/07 02:14:02 chs Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.28 2011/02/15 11:43:53 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.27 2010/10/07 02:14:02 chs Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.28 2011/02/15 11:43:53 pooka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -454,6 +454,9 @@
 
 #ifdef notyet /* XXX cgd 960926 */
 	XXX cgd 960926: (maybe) VOP_OPEN it (and VOP_CLOSE in copyargs?)
+
+	XXXps: this problem will make it impossible to use an interpreter
+	from a file system which actually does something in VOP_OPEN
 #endif
 
 	error = vn_marktext(vp);



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

2011-02-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb 15 12:06:22 UTC 2011

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

Log Message:
retire azalia from GENERIC


To generate a diff of this commit:
cvs rdiff -u -r1.1014 -r1.1015 src/sys/arch/i386/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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1014 src/sys/arch/i386/conf/GENERIC:1.1015
--- src/sys/arch/i386/conf/GENERIC:1.1014	Mon Feb 14 08:50:39 2011
+++ src/sys/arch/i386/conf/GENERIC	Tue Feb 15 12:06:22 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1014 2011/02/14 08:50:39 hannken Exp $
+# $NetBSD: GENERIC,v 1.1015 2011/02/15 12:06:22 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1014 $
+#ident 		GENERIC-$Revision: 1.1015 $
 
 maxusers	64		# estimated number of users
 
@@ -1334,7 +1334,7 @@
 auixp*	at pci? dev ? function ?	# ATI IXP AC'97 Audio
 autri*	at pci? dev ? function ?	# Trident 4DWAVE based AC'97 Audio
 auvia*	at pci? dev ? function ?	# VIA VT82C686A integrated AC'97 Audio
-azalia* at pci? dev ? function ?	# High Definition Audio
+#azalia* at pci? dev ? function ?	# High Definition Audio
 clcs*	at pci? dev ? function ?	# Cirrus Logic CS4280
 clct*	at pci? dev ? function ?	# Cirrus Logic CS4281
 cmpci*	at pci? dev ? function ?	# C-Media CMI8338/8738



CVS commit: src/lib/librumphijack

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 13:59:28 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Properly implement fcntl commands: F_DUPFD, F_CLOSEM, F_MAXFD


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.39 src/lib/librumphijack/hijack.c:1.40
--- src/lib/librumphijack/hijack.c:1.39	Mon Feb 14 14:56:23 2011
+++ src/lib/librumphijack/hijack.c	Tue Feb 15 13:59:28 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.39 2011/02/14 14:56:23 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.40 2011/02/15 13:59:28 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.39 2011/02/14 14:56:23 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.40 2011/02/15 13:59:28 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -142,8 +142,12 @@
 int	(*host_daemon)(int, int);
 int	(*host_execve)(const char *, char *const[], char *const[]);
 
-static unsigned dup2mask;
-#define ISDUP2D(fd) ((fd  32)  (1(fd)  dup2mask))
+static uint32_t dup2mask;
+#define ISDUP2D(fd) (((fd)  32)  (1(fd)  dup2mask))
+#define SETDUP2(fd) \
+do { if ((fd)  32) dup2mask |= (1(fd)); } while (/*CONSTCOND*/0)
+#define CLRDUP2(fd) \
+do { if ((fd)  32) dup2mask = ~(1(fd)); } while (/*CONSTCOND*/0)
 
 //#define DEBUGJACK
 #ifdef DEBUGJACK
@@ -277,13 +281,12 @@
 	}
 
 	if (getenv_r(RUMPHIJACK__DUP2MASK, buf, sizeof(buf)) == 0) {
-		dup2mask = atoi(buf);
+		dup2mask = strtoul(buf, NULL, 10);
 	}
 }
 
 /* XXX: need runtime selection.  low for now due to FD_SETSIZE */
 #define HIJACK_FDOFF 128
-#define HIJACK_ASSERT 128 /* XXX */
 static int
 fd_rump2host(int fd)
 {
@@ -313,8 +316,33 @@
 	return ISDUP2D(fd) || fd = HIJACK_FDOFF;
 }
 
-#define assertfd(_fd_) assert(ISDUP2D(_fd_) || (_fd_) = HIJACK_ASSERT)
-#undef HIJACK_FDOFF
+#define assertfd(_fd_) assert(ISDUP2D(_fd_) || (_fd_) = HIJACK_FDOFF)
+
+static int
+dodup(int oldd, int minfd)
+{
+	int (*op_fcntl)(int, int, ...);
+	int newd;
+	int isrump;
+
+	DPRINTF((dup - %d (minfd %d)\n, oldd, minfd));
+	if (fd_isrump(oldd)) {
+		op_fcntl = GETSYSCALL(rump, FCNTL);
+		oldd = fd_host2rump(oldd);
+		isrump = 1;
+	} else {
+		op_fcntl = GETSYSCALL(host, FCNTL);
+		isrump = 0;
+	}
+
+	newd = op_fcntl(oldd, F_DUPFD, minfd);
+
+	if (isrump)
+		newd = fd_rump2host(newd);
+	DPRINTF((dup - %d\n, newd));
+
+	return newd;
+}
 
 int __socket30(int, int, int);
 int
@@ -388,31 +416,99 @@
 	return rv;
 }
 
-
-/* TODO: support F_DUPFD, F_CLOSEM, F_MAXFD */
+#include syslog.h
 int
 fcntl(int fd, int cmd, ...)
 {
 	int (*op_fcntl)(int, int, ...);
 	va_list ap;
-	int rv;
+	int rv, minfd, i;
 
-	DPRINTF((fcntl - %d\n, fd));
-	if (fd_isrump(fd)) {
-		fd = fd_host2rump(fd);
-		op_fcntl = GETSYSCALL(rump, FCNTL);
-	} else {
-		op_fcntl = GETSYSCALL(host, FCNTL);
-		if (cmd == F_CLOSEM)
-			if (rumpclient__closenotify(fd,
+	DPRINTF((fcntl - %d (cmd %d)\n, fd, cmd));
+
+	switch (cmd) {
+	case F_DUPFD:
+		va_start(ap, cmd);
+		minfd = va_arg(ap, int);
+		va_end(ap);
+		return dodup(fd, minfd);
+
+	case F_CLOSEM:
+		/*
+		 * So, if fd  HIJACKOFF, we want to do a host closem.
+		 */
+
+		if (fd  HIJACK_FDOFF) {
+			int closemfd = fd;
+
+			if (rumpclient__closenotify(closemfd,
 			RUMPCLIENT_CLOSE_FCLOSEM) == -1)
 return -1;
-	}
+			op_fcntl = GETSYSCALL(host, FCNTL);
+			rv = op_fcntl(closemfd, cmd);
+			if (rv)
+return rv;
+		}
 
-	va_start(ap, cmd);
-	rv = op_fcntl(fd, cmd, va_arg(ap, void *));
-	va_end(ap);
-	return rv;
+		/*
+		 * Additionally, we want to do a rump closem, but only
+		 * for the file descriptors not within the dup2mask.
+		 */
+
+		/* why don't we offer fls()? */
+		for (i = 31; i = 0; i--) {
+			if (dup2mask  1i)
+break;
+		}
+		
+		if (fd = HIJACK_FDOFF)
+			fd -= HIJACK_FDOFF;
+		else
+			fd = 0;
+		fd = MAX(i+1, fd);
+
+		/* hmm, maybe we should close rump fd's not within dup2mask? */
+
+		return rump_sys_fcntl(fd, F_CLOSEM);
+
+	case F_MAXFD:
+		/*
+		 * For maxfd, if there's a rump kernel fd, return
+		 * it hostified.  Otherwise, return host's MAXFD
+		 * return value.
+		 */
+		if ((rv = rump_sys_fcntl(fd, F_MAXFD)) != -1) {
+			/*
+			 * This might go a little wrong in case
+			 * of dup2 to [012], but I'm not sure if
+			 * there's a justification for tracking
+			 * that info.  Consider e.g.
+			 * dup2(rumpfd, 2) followed by rump_sys_open()
+			 * returning 1.  We should return 1+HIJACKOFF,
+			 * not 2+HIJACKOFF.  However, if [01] is not
+			 * open, the correct return value is 2.
+			 */
+			return fd_rump2host(fd);
+		} else {
+			op_fcntl = GETSYSCALL(host, FCNTL);
+			return op_fcntl(fd, F_MAXFD);
+		}
+		/*NOTREACHED*/
+
+	default:
+		if (fd_isrump(fd)) {
+		

CVS commit: src/lib/librumphijack

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 14:01:52 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
dup() is now implemented using fcntl()


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/librumphijack/hijack.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/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.40 src/lib/librumphijack/hijack.c:1.41
--- src/lib/librumphijack/hijack.c:1.40	Tue Feb 15 13:59:28 2011
+++ src/lib/librumphijack/hijack.c	Tue Feb 15 14:01:52 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.40 2011/02/15 13:59:28 pooka Exp $	*/
+/*  $NetBSD: hijack.c,v 1.41 2011/02/15 14:01:52 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hijack.c,v 1.40 2011/02/15 13:59:28 pooka Exp $);
+__RCSID($NetBSD: hijack.c,v 1.41 2011/02/15 14:01:52 pooka Exp $);
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -66,7 +66,7 @@
 	DUALCALL_GETSOCKOPT, DUALCALL_SETSOCKOPT,
 	DUALCALL_SHUTDOWN,
 	DUALCALL_READ, DUALCALL_READV,
-	DUALCALL_DUP, DUALCALL_DUP2,
+	DUALCALL_DUP2,
 	DUALCALL_CLOSE,
 	DUALCALL_POLLTS,
 	DUALCALL_KEVENT,
@@ -124,7 +124,6 @@
 	{ DUALCALL_WRITEV,	writev,	RSYS_NAME(WRITEV)	},
 	{ DUALCALL_IOCTL,	ioctl,	RSYS_NAME(IOCTL)	},
 	{ DUALCALL_FCNTL,	fcntl,	RSYS_NAME(FCNTL)	},
-	{ DUALCALL_DUP,		dup,		RSYS_NAME(DUP)		},
 	{ DUALCALL_DUP2,	dup2,		RSYS_NAME(DUP2)		},
 	{ DUALCALL_CLOSE,	close,	RSYS_NAME(CLOSE)	},
 	{ DUALCALL_POLLTS,	S(REALPOLLTS),	RSYS_NAME(POLLTS)	},



CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2011-02-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb 15 14:24:23 UTC 2011

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_memory.c drm_vm.c

Log Message:
map the framebuffer and agp with BUS_SPACE_MAP_PREFETCHABLE


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm/dist/bsd-core/drm_vm.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/drm/dist/bsd-core/drm_memory.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.9 src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.10
--- src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.9	Sat Feb 12 14:49:54 2011
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c	Tue Feb 15 14:24:23 2011
@@ -197,7 +197,8 @@
 			dev-agp_map_data[i].mapped++;
 			dev-agp_map_data[i].base = map-offset;
 			dev-agp_map_data[i].size = map-size;
-			dev-agp_map_data[i].flags = BUS_SPACE_MAP_LINEAR;
+			dev-agp_map_data[i].flags = BUS_SPACE_MAP_LINEAR |
+			BUS_SPACE_MAP_PREFETCHABLE;
 			dev-agp_map_data[i].maptype = PCI_MAPREG_TYPE_MEM;
 			map-fullmap = (dev-agp_map_data[i]);
 			map-mapsize = dev-agp_map_data[i].size;

Index: src/sys/external/bsd/drm/dist/bsd-core/drm_vm.c
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_vm.c:1.5 src/sys/external/bsd/drm/dist/bsd-core/drm_vm.c:1.6
--- src/sys/external/bsd/drm/dist/bsd-core/drm_vm.c:1.5	Sat Jun 20 01:07:09 2009
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_vm.c	Tue Feb 15 14:24:23 2011
@@ -45,6 +45,7 @@
 #elif   defined(__NetBSD__)
 	paddr_t phys;
 	unsigned long map_offs;
+	int flags = 0;
 #endif
 
 #if defined(__FreeBSD__)
@@ -135,8 +136,11 @@
 	case _DRM_REGISTERS:
 	case _DRM_AGP:
 #if	defined(__NetBSD__)
+		flags = BUS_SPACE_MAP_LINEAR;
+		if (type == _DRM_FRAME_BUFFER || type == _DRM_AGP)
+			flags |= BUS_SPACE_MAP_PREFETCHABLE;
 		phys = bus_space_mmap(dev-pa.pa_memt, map-offset,
-offset - map-offset, prot, BUS_SPACE_MAP_LINEAR);
+offset - map-offset, prot, flags);
 		if (phys == -1) {
 			DRM_ERROR(bus_space_mmap for % PRIx64  failed\n, offset);
 			return -1;	



CVS commit: src/tests/lib/librumpclient

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 15:16:46 UTC 2011

Modified Files:
src/tests/lib/librumpclient: Makefile
Added Files:
src/tests/lib/librumpclient: Atffile h_exec.c t_exec.sh

Log Message:
add some exec() tests


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/lib/librumpclient/Atffile \
src/tests/lib/librumpclient/h_exec.c \
src/tests/lib/librumpclient/t_exec.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/librumpclient/Makefile

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/librumpclient/Makefile
diff -u src/tests/lib/librumpclient/Makefile:1.1 src/tests/lib/librumpclient/Makefile:1.2
--- src/tests/lib/librumpclient/Makefile:1.1	Wed Feb  9 14:32:45 2011
+++ src/tests/lib/librumpclient/Makefile	Tue Feb 15 15:16:46 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/02/09 14:32:45 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2011/02/15 15:16:46 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -6,6 +6,14 @@
 TESTSDIR=	${TESTSBASE}/lib/librumpclient
 
 TESTS_C=	t_fd
+TESTS_C+=	h_exec
+
+TESTS_SH=	t_exec
+
+# what do you mean I missed?
+LINKS+=		${TESTSDIR}/h_exec ${TESTSDIR}/h_ution
+
+ATFFILE=	yes
 
 LDADD+= -lrumpclient
 

Added files:

Index: src/tests/lib/librumpclient/Atffile
diff -u /dev/null src/tests/lib/librumpclient/Atffile:1.1
--- /dev/null	Tue Feb 15 15:16:46 2011
+++ src/tests/lib/librumpclient/Atffile	Tue Feb 15 15:16:46 2011
@@ -0,0 +1,6 @@
+Content-Type: application/X-atf-atffile; version=1
+X-NetBSD-Id: $NetBSD: Atffile,v 1.1 2011/02/15 15:16:46 pooka Exp $
+
+prop: test-suite = NetBSD
+
+tp-glob: t_*
Index: src/tests/lib/librumpclient/h_exec.c
diff -u /dev/null src/tests/lib/librumpclient/h_exec.c:1.1
--- /dev/null	Tue Feb 15 15:16:46 2011
+++ src/tests/lib/librumpclient/h_exec.c	Tue Feb 15 15:16:46 2011
@@ -0,0 +1,102 @@
+/*	$NetBSD: h_exec.c,v 1.1 2011/02/15 15:16:46 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE 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 sys/types.h
+#include sys/socket.h
+
+#include netinet/in.h
+
+#include err.h
+#include errno.h
+#include fcntl.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+/*
+ * Uses rumphijack because it's convenient with exec.  XXX: fixme to
+ * have sensible exec support in rumpclient.
+ */
+
+int
+main(int argc, char *argv[])
+{
+	struct sockaddr_in sin;
+	socklen_t slen;
+	int s1, s2;
+	char buf[12];
+
+	if (argc  1) {
+		if (strcmp(argv[1], _didexec) == 0) {
+			daemon(0, 0); /* detach-me-notnot ergo detach */
+			s1 = atoi(argv[2]);
+			slen = sizeof(sin);
+			/* see below */
+			accept(s1, (struct sockaddr *)sin, slen);
+		}
+	}
+
+	/* open and listenize two TCP4 suckets */
+	if ((s1 = socket(PF_INET, SOCK_STREAM, 0)) == -1)
+		err(1, socket 1);
+	if ((s2 = socket(PF_INET, SOCK_STREAM, 0)) == -1)
+		err(1, socket 2);
+
+	memset(sin, 0, sizeof(sin));
+	sin.sin_len = sizeof(sin);
+	sin.sin_family = AF_INET;
+	sin.sin_port = htons(1234);
+
+	if (bind(s1, (struct sockaddr *)sin, sizeof(sin)) == -1)
+		err(1, bind1);
+	sin.sin_port = htons(2345);
+	if (bind(s2, (struct sockaddr *)sin, sizeof(sin)) == -1)
+		err(1, bind2);
+
+	if (listen(s1, 1) == -1)
+		err(1, listen1);
+	if (listen(s2, 1) == -1)
+		err(1, listen2);
+
+	if (argc == 1) {
+		daemon(0, 0);
+		slen = sizeof(sin);
+		/*
+		 * pause(), but conveniently gets rid of this helper
+		 * since we were called with RUMPCLIENT_RETRYCONN_DIE set
+		 */
+		accept(s1, (struct sockaddr *)sin, slen);
+	}
+
+	/* omstart! */
+	sprintf(buf, %d, s1);
+	if (execl(argv[1], 

CVS commit: src/distrib/sets/lists/tests

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 15:18:37 UTC 2011

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

Log Message:
another day, another tp


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.247 src/distrib/sets/lists/tests/mi:1.248
--- src/distrib/sets/lists/tests/mi:1.247	Mon Feb 14 15:15:40 2011
+++ src/distrib/sets/lists/tests/mi	Tue Feb 15 15:18:37 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.247 2011/02/14 15:15:40 pooka Exp $
+# $NetBSD: mi,v 1.248 2011/02/15 15:18:37 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -470,6 +470,8 @@
 ./usr/libdata/debug/usr/tests/lib/librt	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librumpclient	tests-lib-debug
+./usr/libdata/debug/usr/tests/lib/librumpclient/h_exec.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/librumpclient/h_ution.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librumpclient/t_fd.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/librumphijack	tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/librumphijack/h_client.debug			tests-lib-debug		debug,atf
@@ -1899,6 +1901,9 @@
 ./usr/tests/lib/librt/t_sem			tests-lib-tests		atf
 ./usr/tests/lib/librumpclienttests-lib-tests		atf
 ./usr/tests/lib/librumpclient/Atffile			tests-lib-tests		atf
+./usr/tests/lib/librumpclient/h_exec			tests-lib-tests		atf
+./usr/tests/lib/librumpclient/h_ution			tests-lib-tests		atf
+./usr/tests/lib/librumpclient/t_exec			tests-lib-tests		atf
 ./usr/tests/lib/librumpclient/t_fd			tests-lib-tests		atf
 ./usr/tests/lib/librumphijack			tests-lib-tests		atf
 ./usr/tests/lib/librumphijack/Atffile			tests-lib-tests		atf



CVS commit: src/sys

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 15:54:29 UTC 2011

Modified Files:
src/sys/kern: kern_descrip.c kern_exec.c subr_exec_fd.c vfs_cwd.c
src/sys/rump/librump/rumpkern: rump.c
src/sys/sys: filedesc.h

Log Message:
Support FD_CLOEXEC in rump kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.305 -r1.306 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_exec_fd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/vfs_cwd.c
cvs rdiff -u -r1.230 -r1.231 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.57 -r1.58 src/sys/sys/filedesc.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_descrip.c
diff -u src/sys/kern/kern_descrip.c:1.210 src/sys/kern/kern_descrip.c:1.211
--- src/sys/kern/kern_descrip.c:1.210	Fri Jan 28 18:44:44 2011
+++ src/sys/kern/kern_descrip.c	Tue Feb 15 15:54:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_descrip.c,v 1.210 2011/01/28 18:44:44 pooka Exp $	*/
+/*	$NetBSD: kern_descrip.c,v 1.211 2011/02/15 15:54:28 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.210 2011/01/28 18:44:44 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.211 2011/02/15 15:54:28 pooka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1691,6 +1691,57 @@
 }
 
 /*
+ * Close open files on exec.
+ */
+void
+fd_closeexec(void)
+{
+	proc_t *p;
+	filedesc_t *fdp;
+	fdfile_t *ff;
+	lwp_t *l;
+	fdtab_t *dt;
+	int fd;
+
+	l = curlwp;
+	p = l-l_proc;
+	fdp = p-p_fd;
+
+	if (fdp-fd_refcnt  1) {
+		fdp = fd_copy();
+		fd_free();
+		p-p_fd = fdp;
+		l-l_fd = fdp;
+	}
+	if (!fdp-fd_exclose) {
+		return;
+	}
+	fdp-fd_exclose = false;
+	dt = fdp-fd_dt;
+
+	for (fd = 0; fd = fdp-fd_lastfile; fd++) {
+		if ((ff = dt-dt_ff[fd]) == NULL) {
+			KASSERT(fd = NDFDFILE);
+			continue;
+		}
+		KASSERT(fd = NDFDFILE ||
+		ff == (fdfile_t *)fdp-fd_dfdfile[fd]);
+		if (ff-ff_file == NULL)
+			continue;
+		if (ff-ff_exclose) {
+			/*
+			 * We need a reference to close the file.
+			 * No other threads can see the fdfile_t at
+			 * this point, so don't bother locking.
+			 */
+			KASSERT((ff-ff_refcnt  FR_CLOSING) == 0);
+			ff-ff_refcnt++;
+			fd_close(fd);
+		}
+	}
+}
+
+/*
  * Sets descriptor owner. If the owner is a process, 'pgid'
  * is set to positive value, process ID. If the owner is process group,
  * 'pgid' is set to -pg_id.

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.305 src/sys/kern/kern_exec.c:1.306
--- src/sys/kern/kern_exec.c:1.305	Tue Jan 18 08:21:03 2011
+++ src/sys/kern/kern_exec.c	Tue Feb 15 15:54:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.305 2011/01/18 08:21:03 matt Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.306 2011/02/15 15:54:28 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.305 2011/01/18 08:21:03 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.306 2011/02/15 15:54:28 pooka Exp $);
 
 #include opt_ktrace.h
 #include opt_modular.h
@@ -951,6 +951,7 @@
 		goto exec_abort;
 	}
 
+	cwdexec();
 	fd_closeexec();		/* handle close on exec */
 	execsigs(p);		/* reset catched signals */
 

Index: src/sys/kern/subr_exec_fd.c
diff -u src/sys/kern/subr_exec_fd.c:1.4 src/sys/kern/subr_exec_fd.c:1.5
--- src/sys/kern/subr_exec_fd.c:1.4	Fri Nov 19 06:44:43 2010
+++ src/sys/kern/subr_exec_fd.c	Tue Feb 15 15:54:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_exec_fd.c,v 1.4 2010/11/19 06:44:43 dholland Exp $	*/
+/*	$NetBSD: subr_exec_fd.c,v 1.5 2011/02/15 15:54:28 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,12 +26,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
- * File descriptor related subroutines for exec.
- */
-
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_exec_fd.c,v 1.4 2010/11/19 06:44:43 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_exec_fd.c,v 1.5 2011/02/15 15:54:28 pooka Exp $);
 
 #include sys/param.h
 #include sys/file.h
@@ -42,63 +38,6 @@
 #include sys/vnode.h
 
 /*
- * Close open files on exec.
- */
-void
-fd_closeexec(void)
-{
-	proc_t *p;
-	filedesc_t *fdp;
-	fdfile_t *ff;
-	lwp_t *l;
-	fdtab_t *dt;
-	int fd;
-
-	l = curlwp;
-	p = l-l_proc;
-	fdp = p-p_fd;
-
-	cwdunshare(p);
-
-	if (p-p_cwdi-cwdi_edir) {
-		vrele(p-p_cwdi-cwdi_edir);
-	}
-
-	if (fdp-fd_refcnt  1) {
-		fdp = fd_copy();
-		fd_free();
-		p-p_fd = fdp;
-		l-l_fd = fdp;
-	}
-	if (!fdp-fd_exclose) {
-		return;
-	}
-	fdp-fd_exclose = false;
-	dt = fdp-fd_dt;
-
-	for (fd = 0; fd = fdp-fd_lastfile; fd++) {
-		if ((ff = dt-dt_ff[fd]) == NULL) {
-			KASSERT(fd = NDFDFILE);
-			continue;
-		}
-		KASSERT(fd = NDFDFILE ||
-		ff == (fdfile_t *)fdp-fd_dfdfile[fd]);
-		if (ff-ff_file == NULL)
-			

CVS commit: src/tests/lib/librumpclient

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 15:54:56 UTC 2011

Modified Files:
src/tests/lib/librumpclient: h_exec.c t_exec.sh

Log Message:
test FD_CLOEXEC


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/librumpclient/h_exec.c \
src/tests/lib/librumpclient/t_exec.sh

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

Modified files:

Index: src/tests/lib/librumpclient/h_exec.c
diff -u src/tests/lib/librumpclient/h_exec.c:1.1 src/tests/lib/librumpclient/h_exec.c:1.2
--- src/tests/lib/librumpclient/h_exec.c:1.1	Tue Feb 15 15:16:46 2011
+++ src/tests/lib/librumpclient/h_exec.c	Tue Feb 15 15:54:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_exec.c,v 1.1 2011/02/15 15:16:46 pooka Exp $	*/
+/*	$NetBSD: h_exec.c,v 1.2 2011/02/15 15:54:56 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -56,10 +56,10 @@
 	if (argc  1) {
 		if (strcmp(argv[1], _didexec) == 0) {
 			daemon(0, 0); /* detach-me-notnot ergo detach */
-			s1 = atoi(argv[2]);
+			s2 = atoi(argv[2]);
 			slen = sizeof(sin);
 			/* see below */
-			accept(s1, (struct sockaddr *)sin, slen);
+			accept(s2, (struct sockaddr *)sin, slen);
 		}
 	}
 
@@ -92,11 +92,18 @@
 		 * pause(), but conveniently gets rid of this helper
 		 * since we were called with RUMPCLIENT_RETRYCONN_DIE set
 		 */
-		accept(s1, (struct sockaddr *)sin, slen);
+		accept(s2, (struct sockaddr *)sin, slen);
+	}
+
+	if (argc == 3  strcmp(argv[2], cloexec1) == 0) {
+		if (fcntl(s1, F_SETFD, FD_CLOEXEC) == -1) {
+			fprintf(stderr, repomies jumalauta %d!\n, errno);
+			err(1, cloexec failed);
+		}
 	}
 
 	/* omstart! */
-	sprintf(buf, %d, s1);
+	sprintf(buf, %d, s2);
 	if (execl(argv[1], h_ution, _didexec, buf, NULL) == -1)
 		err(1, exec);
 }
Index: src/tests/lib/librumpclient/t_exec.sh
diff -u src/tests/lib/librumpclient/t_exec.sh:1.1 src/tests/lib/librumpclient/t_exec.sh:1.2
--- src/tests/lib/librumpclient/t_exec.sh:1.1	Tue Feb 15 15:16:46 2011
+++ src/tests/lib/librumpclient/t_exec.sh	Tue Feb 15 15:54:56 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_exec.sh,v 1.1 2011/02/15 15:16:46 pooka Exp $
+#   $NetBSD: t_exec.sh,v 1.2 2011/02/15 15:54:56 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -77,9 +77,33 @@
 	rump.halt
 }
 
+atf_test_case cloexec cleanup
+cloexec_head()
+{
+atf_set descr check that FD_CLOEXEC works
+}
+
+cloexec_body()
+{
+
+	atf_check -s exit:0 ${rumpsrv} ${RUMP_SERVER}
+	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
+	$(atf_get_srcdir)/h_exec $(atf_get_srcdir)/h_ution cloexec1
+	atf_check -s exit:0 -o save:sstat.out rump.sockstat
+	atf_check -s exit:0 -o inline:'2\n' sed -n '$=' sstat.out
+	atf_check -s exit:0 -o match:'^root.*h_ution.*tcp.*\*\.2345' \
+	sed -n 2p sstat.out
+}
+
+cloexec_cleanup()
+{
+	rump.halt
+}
+
 
 atf_init_test_cases()
 {
 	atf_add_test_case noexec
 	atf_add_test_case exec
+	atf_add_test_case cloexec
 }



CVS commit: src/tests/lib/librumpclient

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 15:57:34 UTC 2011

Modified Files:
src/tests/lib/librumpclient: h_exec.c

Log Message:
remove unnecessary debug printf


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumpclient/h_exec.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/librumpclient/h_exec.c
diff -u src/tests/lib/librumpclient/h_exec.c:1.2 src/tests/lib/librumpclient/h_exec.c:1.3
--- src/tests/lib/librumpclient/h_exec.c:1.2	Tue Feb 15 15:54:56 2011
+++ src/tests/lib/librumpclient/h_exec.c	Tue Feb 15 15:57:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_exec.c,v 1.2 2011/02/15 15:54:56 pooka Exp $	*/
+/*	$NetBSD: h_exec.c,v 1.3 2011/02/15 15:57:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -97,7 +97,6 @@
 
 	if (argc == 3  strcmp(argv[2], cloexec1) == 0) {
 		if (fcntl(s1, F_SETFD, FD_CLOEXEC) == -1) {
-			fprintf(stderr, repomies jumalauta %d!\n, errno);
 			err(1, cloexec failed);
 		}
 	}



CVS commit: src/lib/librumpuser

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 16:10:41 UTC 2011

Modified Files:
src/lib/librumpuser: rumpuser_sp.c

Log Message:
Cleanup server socket before sending back ok for halt.  Fixes
some occasionally-seen race conditions in tests which do server
restarts (e.g. the raidframe tests).


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/librumpuser/rumpuser_sp.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/librumpuser/rumpuser_sp.c
diff -u src/lib/librumpuser/rumpuser_sp.c:1.41 src/lib/librumpuser/rumpuser_sp.c:1.42
--- src/lib/librumpuser/rumpuser_sp.c:1.41	Tue Feb 15 10:37:07 2011
+++ src/lib/librumpuser/rumpuser_sp.c	Tue Feb 15 16:10:41 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $	*/
+/*  $NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: rumpuser_sp.c,v 1.41 2011/02/15 10:37:07 pooka Exp $);
+__RCSID($NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $);
 
 #include sys/types.h
 #include sys/atomic.h
@@ -1191,6 +1191,10 @@
 	struct spclient *spc = arg;
 	register_t retval[2] = {0, 0};
 
+	if (spclist[0].spc_fd) {
+		parsetab[cleanupidx].cleanup(cleanupsa);
+	}
+
 	/*
 	 * stuff response into the socket, since this process is just
 	 * about to exit
@@ -1199,7 +1203,6 @@
 		send_syscall_resp(spc, spc-spc_syscallreq, 0, retval);
 
 	if (spclist[0].spc_fd) {
-		parsetab[cleanupidx].cleanup(cleanupsa);
 		shutdown(spclist[0].spc_fd, SHUT_RDWR);
 		spfini = 1;
 	}



CVS commit: src/external/ibm-public/postfix

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 15 16:19:33 UTC 2011

Modified Files:
src/external/ibm-public/postfix: Makefile.inc

Log Message:
From Anon Ymous:

1) libsaslc is an SASL client only.
2) dovecot is an SASL server only.
3) cyrus-sasl is both a client and a server.
4) postfix allows us to have multiple SASL servers and clients.
5) The SASL server to use at runtime is determined by the setting of
   smtpd_sasl_type in main.cf (note that is smtpd_ not smtp_).  If
   that is not set, then it defaults to the value of
   DEF_SERVER_SASL_TYPE at build time, which if not set, defaults to
   cyrus.  See postfix/dist/src/global/mail_params.h.
6) The SASL client to use at runtime is determined by the setting of
   smtp_sasl_type in main.cf.  If that is not set, then it defaults
   to the value of DEF_CLIENT_SASL_TYPE at build time, which if not
   set, defaults to cyrus.  See postfix/dist/src/global/mail_params.h.
7) If MKCRYPTO is no, libsaslc will not link as it requires the
   crypto libraries, so libsaslc cannot be enabled (as it was before)
   without crypto.
8) I have made the definition of DEF_CLIENT_SASL_TYPE conditional on
   MKCRYPTO due to (7).  Without crypto it will default to cyrus.
9) HAVE_CYRUS_SASL is _never_ defined during a normal build and _never_
   should be!  It is there for the convenience of users who wish to
   install cyrus-sasl and rebuild postfix with it.  It is also very
   useful for testing if it is suspected that something might be wrong
   with libsaslc.  PLEASE DO NOT REMOVE IT!


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/ibm-public/postfix/Makefile.inc

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

Modified files:

Index: src/external/ibm-public/postfix/Makefile.inc
diff -u src/external/ibm-public/postfix/Makefile.inc:1.8 src/external/ibm-public/postfix/Makefile.inc:1.9
--- src/external/ibm-public/postfix/Makefile.inc:1.8	Sun Feb 13 00:45:47 2011
+++ src/external/ibm-public/postfix/Makefile.inc	Tue Feb 15 11:19:33 2011
@@ -1,9 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.8 2011/02/13 05:45:47 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.9 2011/02/15 16:19:33 christos Exp $
 
 .include bsd.own.mk
 
 USE_FORT?= yes	# network client and server
-USE_LIB_SASL?= saslc
 PKGROOT?= /usr/pkg
 
 WARNS?=	0
@@ -17,23 +16,25 @@
 	-I${PFIX_DISTDIR}/src/tls -I${PFIX_DISTDIR}/src/milter \
 	-I${PFIX_DISTDIR}/src/xsasl
 
-.if ${USE_LIB_SASL} == saslc
-CPPFLAGS+= -DUSE_SASL_AUTH -DUSE_SASLC_SASL
+CPPFLAGS+= -DUSE_SASL_AUTH
+CPPFLAGS+= -DDEF_SERVER_SASL_TYPE=\dovecot\
+
 .if (${MKCRYPTO} != no)
+CPPFLAGS+= -DUSE_SASLC_SASL
+CPPFLAGS+= -DDEF_CLIENT_SASL_TYPE=\saslc\
 DPADD+= ${LIBSASCL} ${LIBSSL}
 LDADD+= -lsaslc -lssl
-.if (${MKKERBEROS} != no)
+. if (${MKKERBEROS} != no)
 DPADD+= ${LIBGSSAPI}
 LDADD+= -lgssapi
+. endif
 .endif
-.endif
-.elif ${USE_LIB_SASL} == cyrus
+
+# XXX: Use only if you have cyrus-sasl installed; never part of a normal build!
+.if defined(HAVE_CYRUS_SASL)
 CPPFLAGS+= -DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
-	-DDEF_SERVER_SASL_TYPE=\cyrus\ \
 	-I${PKGROOT}/include/sasl
 LDADD+= -L${PKGROOT}/lib -Wl,-R${PKGROOT}/lib -lsasl2 
-.else
-CPPFLAGS+= -DDEF_SERVER_SASL_TYPE=\dovecot\
 .endif
 
 .if defined(HAVE_PCC)



CVS commit: src/lib/libc/gen

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 15 16:29:10 UTC 2011

Modified Files:
src/lib/libc/gen: getcwd.c

Log Message:
Fix non-fortify build.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/lib/libc/gen/getcwd.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/gen/getcwd.c
diff -u src/lib/libc/gen/getcwd.c:1.47 src/lib/libc/gen/getcwd.c:1.48
--- src/lib/libc/gen/getcwd.c:1.47	Wed Jan 19 21:57:00 2011
+++ src/lib/libc/gen/getcwd.c	Tue Feb 15 11:29:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcwd.c,v 1.47 2011/01/20 02:57:00 christos Exp $	*/
+/*	$NetBSD: getcwd.c,v 1.48 2011/02/15 16:29:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1995
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)getcwd.c	8.5 (Berkeley) 2/7/95;
 #else
-__RCSID($NetBSD: getcwd.c,v 1.47 2011/01/20 02:57:00 christos Exp $);
+__RCSID($NetBSD: getcwd.c,v 1.48 2011/02/15 16:29:09 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -58,9 +58,10 @@
 __weak_alias(_getcwd,_sys_getcwd)
 __weak_alias(realpath,_realpath)
 
-#if defined(_FORTIFY_SOURCE)  !defined(__lint__)
 #undef getcwd
 #define getcwd _sys_getcwd
+#if !defined(_FORTIFY_SOURCE)
+char *_sys_getcwd(char *, size_t);
 #endif
 
 #endif



CVS commit: [bouyer-quota2] src/sys

2011-02-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb 15 16:45:57 UTC 2011

Modified Files:
src/sys/compat/common [bouyer-quota2]: compat_mod.c vfs_syscalls_50.c
src/sys/kern [bouyer-quota2]: vfs_syscalls.c
src/sys/rump/fs/lib/libffs [bouyer-quota2]: Makefile
src/sys/rump/librump/rumpvfs [bouyer-quota2]: Makefile.rumpvfs
src/sys/ufs [bouyer-quota2]: files.ufs

Log Message:
Implement COMPAT_50 quotactl(2)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/compat/common/vfs_syscalls_50.c
cvs rdiff -u -r1.414.4.2 -r1.414.4.3 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/sys/rump/fs/lib/libffs/Makefile
cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
cvs rdiff -u -r1.24.6.3 -r1.24.6.4 src/sys/ufs/files.ufs

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/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.12 src/sys/compat/common/compat_mod.c:1.12.2.1
--- src/sys/compat/common/compat_mod.c:1.12	Wed Jan 19 10:21:16 2011
+++ src/sys/compat/common/compat_mod.c	Tue Feb 15 16:45:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.12 2011/01/19 10:21:16 tsutsui Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.12.2.1 2011/02/15 16:45:56 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.12 2011/01/19 10:21:16 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.12.2.1 2011/02/15 16:45:56 bouyer Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -230,6 +230,7 @@
 # endif
 	{ SYS_compat_50___fhstat40, 0, (sy_call_t *)compat_50_sys___fhstat40 },
 	{ SYS_compat_50_aio_suspend, 0, (sy_call_t *)compat_50_sys_aio_suspend },
+	{ SYS_compat_50_quotactl, 0, (sy_call_t *)compat_50_sys_quotactl },
 #endif
 	{ 0, 0, NULL },
 };

Index: src/sys/compat/common/vfs_syscalls_50.c
diff -u src/sys/compat/common/vfs_syscalls_50.c:1.6 src/sys/compat/common/vfs_syscalls_50.c:1.6.4.1
--- src/sys/compat/common/vfs_syscalls_50.c:1.6	Tue Jul 13 15:38:15 2010
+++ src/sys/compat/common/vfs_syscalls_50.c	Tue Feb 15 16:45:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_50.c,v 1.6 2010/07/13 15:38:15 pooka Exp $	*/
+/*	$NetBSD: vfs_syscalls_50.c,v 1.6.4.1 2011/02/15 16:45:56 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_50.c,v 1.6 2010/07/13 15:38:15 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_50.c,v 1.6.4.1 2011/02/15 16:45:56 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -312,3 +312,218 @@
 	return do_sys_mknod(l, SCARG(uap, path), SCARG(uap, mode),
 	SCARG(uap, dev), retval, UIO_USERSPACE);
 }
+
+#include ufs/ufs/quota1.h
+#include ufs/ufs/quota2_prop.h
+
+/* ARGSUSED */
+int   
+compat_50_sys_quotactl(struct lwp *l, const struct compat_50_sys_quotactl_args *uap, register_t *retval)
+{
+	/* {
+		syscallarg(const char *) path;
+		syscallarg(int) cmd;
+		syscallarg(int) uid;
+		syscallarg(void *) arg; 
+	} */
+	struct mount *mp;
+	int error;
+	uint8_t error8;
+	struct vnode *vp;
+	int q1cmd = SCARG(uap, cmd);
+	prop_dictionary_t dict, data, cmd;
+	prop_array_t cmds, datas;
+	char *bufpath;
+	struct dqblk dqblk;
+	struct quota2_entry q2e;
+	static const char *quotatypes[MAXQUOTAS] = INITQFNAMES;
+
+	error = namei_simple_user(SCARG(uap, path),
+NSM_FOLLOW_TRYEMULROOT, vp);
+	if (error != 0)
+		return (error);   
+	error = ENOMEM;
+	mp = vp-v_mount;
+	if ((dict = quota2_prop_create()) == NULL)
+		goto out;
+	if ((cmds = prop_array_create()) == NULL)
+		goto out_dict;
+	if ((datas = prop_array_create()) == NULL)
+		goto out_cmds;
+
+	switch((q1cmd  ~SUBCMDMASK)  SUBCMDSHIFT) {
+	case Q_QUOTAON:
+		data = prop_dictionary_create();
+		if (data == NULL)
+			goto out_datas;
+		bufpath = malloc(PATH_MAX * sizeof(char), M_TEMP, M_WAITOK);
+		if (bufpath == NULL)
+			goto out_data;
+		error = copyinstr(SCARG(uap, arg), bufpath, PATH_MAX, NULL);
+		if (error != 0) {
+			free(bufpath, M_TEMP);
+			goto out_data;
+		}
+		if (!prop_dictionary_set_cstring(data, quotafile, bufpath))
+			error = ENOMEM;
+		free(bufpath, M_TEMP);
+		if (error)
+			goto out_data;
+		error = ENOMEM;
+		if (!prop_array_add_and_rel(datas, data))
+			goto out_datas;
+		if (!quota2_prop_add_command(cmds, quotaon,
+		quotatypes[q1cmd  SUBCMDMASK], datas))
+			goto out_cmds;
+		goto do_quotaonoff;
+
+	case Q_QUOTAOFF:
+		error = ENOMEM;
+		if (!quota2_prop_add_command(cmds, quotaoff,
+		quotatypes[q1cmd  SUBCMDMASK], datas))
+			goto out_cmds;
+do_quotaonoff:
+		if (!prop_dictionary_set_and_rel(dict, commands, cmds))
+			goto out_dict;
+		error = VFS_QUOTACTL(mp, dict);

CVS commit: src/sys/kern

2011-02-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb 15 16:49:54 UTC 2011

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

Log Message:
fix snafu


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/kern/kern_exec.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_exec.c
diff -u src/sys/kern/kern_exec.c:1.306 src/sys/kern/kern_exec.c:1.307
--- src/sys/kern/kern_exec.c:1.306	Tue Feb 15 15:54:28 2011
+++ src/sys/kern/kern_exec.c	Tue Feb 15 16:49:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.306 2011/02/15 15:54:28 pooka Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.307 2011/02/15 16:49:54 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.306 2011/02/15 15:54:28 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.307 2011/02/15 16:49:54 pooka Exp $);
 
 #include opt_ktrace.h
 #include opt_modular.h
@@ -951,7 +951,7 @@
 		goto exec_abort;
 	}
 
-	cwdexec();
+	cwdexec(p);
 	fd_closeexec();		/* handle close on exec */
 	execsigs(p);		/* reset catched signals */
 



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

2011-02-15 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Feb 15 17:50:47 UTC 2011

Modified Files:
src/sys/arch/x86/acpi: acpi_cpu_md.c

Log Message:
Fix and add comments.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x86/acpi/acpi_cpu_md.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/acpi/acpi_cpu_md.c
diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.38 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.39
--- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.38	Thu Jan 13 03:40:50 2011
+++ src/sys/arch/x86/acpi/acpi_cpu_md.c	Tue Feb 15 17:50:46 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.38 2011/01/13 03:40:50 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.39 2011/02/15 17:50:46 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.38 2011/01/13 03:40:50 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.39 2011/02/15 17:50:46 jruoho Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -164,6 +164,10 @@
 	if ((ci-ci_feat_val[1]  CPUID2_MONITOR) != 0)
 		val |= ACPICPU_FLAG_C_FFH;
 
+	/*
+	 * By default, assume that the local APIC timer
+	 * as well as TSC are stalled during C3 sleep.
+	 */
 	val |= ACPICPU_FLAG_C_APIC | ACPICPU_FLAG_C_TSC;
 
 	switch (cpu_vendor) {
@@ -180,8 +184,19 @@
 
 	case CPUVENDOR_INTEL:
 
+		/*
+		 * Bus master control and arbitration should be
+		 * available on all supported Intel CPUs (to be
+		 * sure, this is double-checked later from the
+		 * firmware data). These flags imply that it is
+		 * not necessary to flush caches before C3 state.
+		 */
 		val |= ACPICPU_FLAG_C_BM | ACPICPU_FLAG_C_ARB;
 
+		/*
+		 * Check if we can use native, MSR-based,
+		 * access. If not, we have to resort to I/O.
+		 */
 		if ((ci-ci_feat_val[1]  CPUID2_EST) != 0)
 			val |= ACPICPU_FLAG_P_FFH;
 
@@ -503,7 +518,7 @@
 	 * Fill the P-state structures with MSR addresses that are
 	 * known to be correct. If we do not know the addresses,
 	 * leave the values intact. If a vendor uses XPSS, we do
-	 * not necessary need to do anything to support new CPUs.
+	 * not necessarily need to do anything to support new CPUs.
 	 */
 	while (i  sc-sc_pstate_count) {
 



CVS commit: [bouyer-quota2] src/sys/compat/netbsd32

2011-02-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Feb 15 17:52:52 UTC 2011

Modified Files:
src/sys/compat/netbsd32 [bouyer-quota2]: netbsd32.h
netbsd32_compat_50.c netbsd32_conv.h netbsd32_ioctl.h
netbsd32_netbsd.c

Log Message:
implement COMPAT_NETBSD32 quotactl syscalls (both new and COMPAT_50)


To generate a diff of this commit:
cvs rdiff -u -r1.84.8.1 -r1.84.8.2 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.24 -r1.24.4.1 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.29.4.1 -r1.29.4.2 src/sys/compat/netbsd32/netbsd32_ioctl.h
cvs rdiff -u -r1.168.4.2 -r1.168.4.3 \
src/sys/compat/netbsd32/netbsd32_netbsd.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/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.84.8.1 src/sys/compat/netbsd32/netbsd32.h:1.84.8.2
--- src/sys/compat/netbsd32/netbsd32.h:1.84.8.1	Tue Feb  8 16:19:47 2011
+++ src/sys/compat/netbsd32/netbsd32.h	Tue Feb 15 17:52:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.84.8.1 2011/02/08 16:19:47 bouyer Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.84.8.2 2011/02/15 17:52:51 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -789,6 +789,12 @@
 	netbsd32_long stbcnt;	/* stability limit exceeded (ro) */
 };
 
+/* prop/plistref.h */
+struct netbsd32_plistref {
+	netbsd32_pointer_t pref_plist;
+	netbsd32_size_t pref_len;
+};
+
 /* from ufs/lfs/lfs.h */
 typedef netbsd32_pointer_t netbsd32_block_infop_t;  /* XXX broken */
 

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.17 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.17.4.1
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.17	Sun May 30 19:31:39 2010
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Tue Feb 15 17:52:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.17 2010/05/30 19:31:39 drochner Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.17.4.1 2011/02/15 17:52:51 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.17 2010/05/30 19:31:39 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.17.4.1 2011/02/15 17:52:51 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -1069,3 +1069,21 @@
 	return error;
 }
 #endif
+
+int
+compat_50_netbsd32_quotactl(struct lwp *l, const struct compat_50_netbsd32_quotactl_args *uap, register_t *retval)
+{
+	/* {
+		syscallarg(const netbsd32_charp) path;
+		syscallarg(int) cmd;
+		syscallarg(int) uid;
+		syscallarg(netbsd32_voidp) arg;
+	} */
+	struct compat_50_sys_quotactl_args ua;
+
+	NETBSD32TOP_UAP(path, const char);
+	NETBSD32TO64_UAP(cmd);
+	NETBSD32TO64_UAP(uid);
+	NETBSD32TOP_UAP(arg, void *);
+	return (compat_50_sys_quotactl(l, ua, retval));
+}

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.24 src/sys/compat/netbsd32/netbsd32_conv.h:1.24.4.1
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.24	Sun Jan 16 23:21:16 2011
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Tue Feb 15 17:52:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.24 2011/01/16 23:21:16 njoly Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.24.4.1 2011/02/15 17:52:51 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -52,6 +52,8 @@
 
 #include compat/sys/dirent.h
 
+#include prop/plistref.h
+
 #include compat/netbsd32/netbsd32.h
 
 /* converters for structures that we need */
@@ -756,4 +758,30 @@
 	return ((char *)(void *)odp) - buf;
 }
 
+static inline int
+netbsd32_copyin_plistref(netbsd32_pointer_t n32p, struct plistref *p)
+{
+	struct netbsd32_plistref n32plist;
+	int error;
+
+	error = copyin(NETBSD32PTR64(n32p), n32plist,
+	sizeof(struct netbsd32_plistref));
+	if (error)
+		return error;
+	p-pref_plist = NETBSD32PTR64(n32plist.pref_plist);
+	p-pref_len = n32plist.pref_len;
+	return 0;
+}
+
+static inline int
+netbsd32_copyout_plistref(netbsd32_pointer_t n32p, struct plistref *p)
+{
+	struct netbsd32_plistref n32plist;
+
+	NETBSD32PTR32(n32plist.pref_plist, p-pref_plist);
+	n32plist.pref_len = p-pref_len;
+	return copyout(n32plist, NETBSD32PTR64(n32p),
+	sizeof(struct netbsd32_plistref));
+}
+
 #endif /* _COMPAT_NETBSD32_NETBSD32_CONV_H_ */

Index: src/sys/compat/netbsd32/netbsd32_ioctl.h
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.29.4.1 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.29.4.2
--- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.29.4.1	Tue Feb  8 16:19:47 2011
+++ src/sys/compat/netbsd32/netbsd32_ioctl.h	Tue Feb 15 17:52:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.h,v 1.29.4.1 2011/02/08 16:19:47 bouyer Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.h,v 1.29.4.2 2011/02/15 

CVS commit: [matt-nb5-mips64] src/lib/csu/mips

2011-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Feb 15 18:07:31 UTC 2011

Modified Files:
src/lib/csu/mips [matt-nb5-mips64]: crt0.c

Log Message:
Fix a BE64 bug not fetching argc correctly


To generate a diff of this commit:
cvs rdiff -u -r1.19.32.1 -r1.19.32.2 src/lib/csu/mips/crt0.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/csu/mips/crt0.c
diff -u src/lib/csu/mips/crt0.c:1.19.32.1 src/lib/csu/mips/crt0.c:1.19.32.2
--- src/lib/csu/mips/crt0.c:1.19.32.1	Sun Aug 30 09:59:26 2009
+++ src/lib/csu/mips/crt0.c	Tue Feb 15 18:07:30 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.19.32.1 2009/08/30 09:59:26 matt Exp $ */
+/* $NetBSD: crt0.c,v 1.19.32.2 2011/02/15 18:07:30 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -118,7 +118,7 @@
 #endif
 
 
-	argc = *(int *)ksp;
+	argc = *(long *)ksp;
 	argv = ksp + 1;
 	environ = ksp + 2 + argc;	/* 2: argc + NULL ending argv */
 
@@ -163,7 +163,7 @@
  *  is the entrypoint. (Only needed for old toolchains).
  */
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: crt0.c,v 1.19.32.1 2009/08/30 09:59:26 matt Exp $);
+__RCSID($NetBSD: crt0.c,v 1.19.32.2 2011/02/15 18:07:30 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include common.c



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

2011-02-15 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Feb 15 18:10:33 UTC 2011

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

Log Message:
Fix wrong assertion logic.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/genfb_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/genfb_machdep.c
diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.8 src/sys/arch/x86/x86/genfb_machdep.c:1.9
--- src/sys/arch/x86/x86/genfb_machdep.c:1.8	Thu Feb 10 10:21:40 2011
+++ src/sys/arch/x86/x86/genfb_machdep.c	Tue Feb 15 18:10:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.8 2011/02/10 10:21:40 jmcneill Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.9 2011/02/15 18:10:33 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill jmcne...@invisible.ca
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfb_machdep.c,v 1.8 2011/02/10 10:21:40 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfb_machdep.c,v 1.9 2011/02/15 18:10:33 jruoho Exp $);
 
 #include opt_mtrr.h
 
@@ -80,7 +80,7 @@
 void
 x86_genfb_set_console_dev(device_t dev)
 {
-	KASSERT(x86_genfb_console_dev != NULL);
+	KASSERT(x86_genfb_console_dev == NULL);
 	x86_genfb_console_dev = dev;
 }
 



CVS commit: src/crypto/external/bsd/libsaslc/dist

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 15 18:36:08 UTC 2011

Modified Files:
src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3
src/crypto/external/bsd/libsaslc/dist/src: mech_digestmd5.c

Log Message:
From Anon Ymous:
1) Fix a memory leak in cipher_context_create().
2) Fix a goof in the construction of the digest-uri.
3) Allow SASLC_PROP_SERVICENAME to be a hostname qualified comma
delimited list of service names to select from and update the manpage
to reflect this.
4) Make libsaslc.3 pass mdoclint(1).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c

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

Modified files:

Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.7 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.8
--- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.7	Sat Feb 12 18:21:32 2011
+++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3	Tue Feb 15 13:36:08 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: libsaslc.3,v 1.7 2011/02/12 23:21:32 christos Exp $
+.\	$NetBSD: libsaslc.3,v 1.8 2011/02/15 18:36:08 christos Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -34,7 +34,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 31, 2010
+.Dd February 14, 2011
 .Dt LIBSASLC 3
 .Os
 .Sh NAME
@@ -364,7 +364,7 @@
 	return 0;
 }
 .Ed
-.Sh CONFIGURATION
+.Ss CONFIGURATION
 .Nm
 uses three types of dictionaries: context (or global), session, and
 mechanism, and they are searched in that order by
@@ -456,7 +456,7 @@
 Any base supported by
 .Xr strtoll 3
 is allowed.
-.Sh PROPERTIES
+.Ss PROPERTIES
 Most of the control of the
 .Nm
 behavior is done via setting various properties in the context or
@@ -508,7 +508,11 @@
 .Pp
 The default value is
 .Qq des,3des,rc4,rc4_40,rc4_56,aes .
-.Pq Note that Qo aes Qc is not part of the official standard.
+.Po
+Note that
+.Qq aes
+is not part of the official standard.
+.Pc
 Used by the DIGEST-MD5 mechanism.
 .It SASLC_PROP_DEBUG Po Qo DEBUG Qc Pc
 If true, then enable debug messages.
@@ -526,7 +530,7 @@
 section below.
 .Pc
 .It SASLC_PROP_HOSTNAME Po Qo HOSTNAME Qc Pc
-The hostname.
+The fully qualified domain name of the server host.
 Used by the DIGEST-MD5 and GSSAPI mechanisms.
 .It SASLC_PROP_MAXBUF Po Qo MAXBUF Qc Pc
 The size of the decode buffer.
@@ -588,7 +592,23 @@
 The service being used, e.g., smtp, imap, etc.
 Used by the DIGEST-MD5 and GSSAPI mechanisms.
 .It SASLC_PROP_SERVICENAME Po Qo SERVICENAME Qc Pc
-The service name to use.
+A comma delimited list of possible service names with elements of the
+form
+.Qq Oo Ao hostname Ac : Oc Ns Ao serv-name Ac
+and with the same rules as for the SASLC_PROP_REALM list.
+This should only be used if the client uses a DNS name for the service
+that is different from the FQDN of the server.
+For example, the service name
+.Em example.com
+might resolve
+.Pq via SRV or MX records
+into a set of other DNS names, one of which,
+.Em mail3.example.com ,
+is the FQDN of the server.
+.Po
+See RFC 2831 section 2.1.2
+.Qq serv-name .
+.Pc
 Used by the DIGEST-MD5 mechanism.
 .El
 .Pp
@@ -613,7 +633,7 @@
 If set, turn on debugging messages.
 This turns on debugging as early as possible and is a global setting.
 .El
-.Sh GSSAPI and Kerberos
+.Ss GSSAPI and Kerberos
 The following is a minimal
 .Pq Heimdal
 Kerberos 5 setup for use with an smtp server that has been configured
@@ -742,13 +762,13 @@
 .Pp
 to obtain a ticket for the postfix user with the postfix credential
 and you should be good to go!
-.Sh STANDARDS
-RFC 2195, RFC , RFC 2245, RFC 2595, RFC 2831, RFC 4422, RFC 4505,
-RFC 4616, RFC 4752.
-.Sh OTHER IMPLEMENTATIONS
+.Sh COMPATIBILITY
 There exist other SASL client library implementations including Cyrus SASL
 (http://asg.web.cmu.edu/sasl/sasl-library.html) and GNU SASL
 (http://www.gnu.org/software/gsasl/).
+.Sh STANDARDS
+RFC 2195, RFC , RFC 2245, RFC 2595, RFC 2831, RFC 4422, RFC 4505,
+RFC 4616, RFC 4752.
 .Sh CAVEATS
 The API was heavily influenced by its use with
 .Xr postfix 1 .

Index: src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.7 src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.8
--- src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.7	Sat Feb 12 18:21:32 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c	Tue Feb 15 13:36:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_digestmd5.c,v 1.7 2011/02/12 23:21:32 christos Exp $ */
+/* $NetBSD: mech_digestmd5.c,v 1.8 2011/02/15 18:36:08 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD 

CVS commit: src/sys/arch/powerpc

2011-02-15 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Feb 15 19:39:13 UTC 2011

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h
src/sys/arch/powerpc/oea: pmap.c
src/sys/arch/powerpc/powerpc: bus_space.c

Log Message:
implement pmap_mmap_flags() and teach PowerPC's bus_space_mmap() to actually
use BUS_SPACE_MAP_PREFETCHABLE which, now that /dev/pci* knows how to use it,
helps improve X performance


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/powerpc/bus_space.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/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.21 src/sys/arch/powerpc/include/oea/pmap.h:1.22
--- src/sys/arch/powerpc/include/oea/pmap.h:1.21	Sat Feb 12 18:23:10 2011
+++ src/sys/arch/powerpc/include/oea/pmap.h	Tue Feb 15 19:39:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.21 2011/02/12 18:23:10 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.22 2011/02/15 19:39:12 macallan Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -117,8 +117,6 @@
 #define	pmap_is_modified(pg)		(pmap_query_bit((pg), PTE_CHG))
 #define	pmap_is_referenced(pg)		(pmap_query_bit((pg), PTE_REF))
 
-#define	pmap_phys_address(x)		(x)
-
 #define	pmap_resident_count(pmap)	((pmap)-pm_stats.resident_count)
 #define	pmap_wired_count(pmap)		((pmap)-pm_stats.wired_count)
 
@@ -142,6 +140,14 @@
 int pmap_pte_spill(pmap_t, vaddr_t, bool);
 void pmap_pinit(pmap_t);
 
+u_int powerpc_mmap_flags(paddr_t);
+#define POWERPC_MMAP_FLAG_MASK	0xf
+#define POWERPC_MMAP_FLAG_PREFETCHABLE	0x1
+#define POWERPC_MMAP_FLAG_CACHEABLE	0x2
+
+#define pmap_phys_address(ppn)		(ppn  ~POWERPC_MMAP_FLAG_MASK)
+#define pmap_mmap_flags(ppn)		powerpc_mmap_flags(ppn)
+
 static inline paddr_t vtophys (vaddr_t);
 
 /*
@@ -208,6 +214,7 @@
 #endif
 
 #define PMAP_MD_NOCACHE			0x100
+#define PMAP_MD_PREFETCHABLE		0x200
 #define PMAP_STEAL_MEMORY
 #define PMAP_NEED_PROCWR
 

Index: src/sys/arch/powerpc/oea/pmap.c
diff -u src/sys/arch/powerpc/oea/pmap.c:1.76 src/sys/arch/powerpc/oea/pmap.c:1.77
--- src/sys/arch/powerpc/oea/pmap.c:1.76	Sat Feb 12 18:23:10 2011
+++ src/sys/arch/powerpc/oea/pmap.c	Tue Feb 15 19:39:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.76 2011/02/12 18:23:10 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $	*/
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.76 2011/02/12 18:23:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.77 2011/02/15 19:39:12 macallan Exp $);
 
 #define	PMAP_NOOPNAMES
 
@@ -1927,7 +1927,11 @@
 	 * it's in our available memory array.  If it is in the memory array,
 	 * asssume it's in memory coherent memory.
 	 */
-	pte_lo = PTE_IG;
+	if (flags  PMAP_MD_PREFETCHABLE) {
+		pte_lo = 0;
+	} else
+		pte_lo = PTE_G;
+
 	if ((flags  PMAP_MD_NOCACHE) == 0) {
 		for (mp = mem; mp-size; mp++) {
 			if (pa = mp-start  pa  mp-start + mp-size) {
@@ -1935,6 +1939,8 @@
 break;
 			}
 		}
+	} else {
+		pte_lo |= PTE_I;
 	}
 
 	if (prot  VM_PROT_WRITE)
@@ -3514,3 +3520,16 @@
 	}
 #endif
 }
+
+u_int
+powerpc_mmap_flags(paddr_t pa)
+{
+	u_int flags = PMAP_MD_NOCACHE;
+
+	if (pa  POWERPC_MMAP_FLAG_PREFETCHABLE)
+		flags |= PMAP_MD_PREFETCHABLE;
+	if (pa  POWERPC_MMAP_FLAG_CACHEABLE)
+		flags = ~PMAP_MD_NOCACHE;
+	return flags;
+}
+

Index: src/sys/arch/powerpc/powerpc/bus_space.c
diff -u src/sys/arch/powerpc/powerpc/bus_space.c:1.24 src/sys/arch/powerpc/powerpc/bus_space.c:1.25
--- src/sys/arch/powerpc/powerpc/bus_space.c:1.24	Tue Jan 18 01:02:55 2011
+++ src/sys/arch/powerpc/powerpc/bus_space.c	Tue Feb 15 19:39:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.24 2011/01/18 01:02:55 matt Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.25 2011/02/15 19:39:12 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.24 2011/01/18 01:02:55 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.25 2011/02/15 19:39:12 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -499,6 +499,7 @@
 	paddr_t ret;
 	/* XXX what about stride? */
 	ret = trunc_page(t-pbs_offset + bpa + offset);
+
 #ifdef DEBUG
 	if (ret == 0) {
 		printf(%s: [%08x, %08x %08x] mmaps to 0?!\n, __func__,
@@ -506,6 +507,14 @@
 		return -1;
 	}
 #endif
+
+#ifdef POWERPC_MMAP_FLAG_MASK
+	if (flags  BUS_SPACE_MAP_PREFETCHABLE)
+		ret |= POWERPC_MMAP_FLAG_PREFETCHABLE;
+	if (flags  BUS_SPACE_MAP_CACHEABLE)
+		ret |= POWERPC_MMAP_FLAG_CACHEABLE;
+#endif
+
 	return ret;
 }
 



CVS commit: src/sys/dev/acpi

2011-02-15 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Feb 15 20:24:11 UTC 2011

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

Log Message:
Reset the firmware waking vector on resume. Adapted from FreeBSD and Linux.
No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/dev/acpi/acpi.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/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.234 src/sys/dev/acpi/acpi.c:1.235
--- src/sys/dev/acpi/acpi.c:1.234	Mon Jan 17 15:49:13 2011
+++ src/sys/dev/acpi/acpi.c	Tue Feb 15 20:24:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.234 2011/01/17 15:49:13 jmcneill Exp $	*/
+/*	$NetBSD: acpi.c,v 1.235 2011/02/15 20:24:11 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.234 2011/01/17 15:49:13 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.235 2011/02/15 20:24:11 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_pcifixup.h
@@ -1369,9 +1369,10 @@
 			if (state == ACPI_STATE_S4)
 AcpiEnable();
 
-			pmf_system_bus_resume(PMF_Q_NONE);
+			(void)pmf_system_bus_resume(PMF_Q_NONE);
 			(void)AcpiLeaveSleepState(state);
-			pmf_system_resume(PMF_Q_NONE);
+			(void)AcpiSetFirmwareWakingVector(0);
+			(void)pmf_system_resume(PMF_Q_NONE);
 		}
 
 		break;



CVS commit: src/external/ibm-public/postfix

2011-02-15 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Tue Feb 15 23:17:02 UTC 2011

Modified Files:
src/external/ibm-public/postfix: Makefile.inc

Log Message:
Move default definition of PKGROOT inside the HAVE_CYRUS_SASL block
as it shouldn't be used anywhere else.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/ibm-public/postfix/Makefile.inc

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

Modified files:

Index: src/external/ibm-public/postfix/Makefile.inc
diff -u src/external/ibm-public/postfix/Makefile.inc:1.9 src/external/ibm-public/postfix/Makefile.inc:1.10
--- src/external/ibm-public/postfix/Makefile.inc:1.9	Tue Feb 15 16:19:33 2011
+++ src/external/ibm-public/postfix/Makefile.inc	Tue Feb 15 23:17:02 2011
@@ -1,9 +1,8 @@
-#	$NetBSD: Makefile.inc,v 1.9 2011/02/15 16:19:33 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.10 2011/02/15 23:17:02 tron Exp $
 
 .include bsd.own.mk
 
 USE_FORT?= yes	# network client and server
-PKGROOT?= /usr/pkg
 
 WARNS?=	0
 
@@ -32,6 +31,7 @@
 
 # XXX: Use only if you have cyrus-sasl installed; never part of a normal build!
 .if defined(HAVE_CYRUS_SASL)
+PKGROOT?= /usr/pkg
 CPPFLAGS+= -DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
 	-I${PKGROOT}/include/sasl
 LDADD+= -L${PKGROOT}/lib -Wl,-R${PKGROOT}/lib -lsasl2 



CVS commit: src/crypto/external/bsd/libsaslc/dist

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 02:14:23 UTC 2011

Modified Files:
src/crypto/external/bsd/libsaslc/dist/include: saslc.h
src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3
src/crypto/external/bsd/libsaslc/dist/src: dict.c mech_digestmd5.c
src/crypto/external/bsd/libsaslc/dist/test/hash_tests: test_hash.c

Log Message:
Property name change:
  SASLC_PROP_SERVICENAME (SERVICENAME)
to
  SASLC_PROP_SERVNAME (SERVNAME)

Hopefully this will avoid confusion with SASLC_PROP_SERVICE (SERVICE).
SERVNAME is also closer to the name used in the RFC2831 (serv-name).
(Discussed with christos@.)

Change the hash parameters to keep that collision-less after the above
name change.

While here, go back to using .Sh in the manpage for unknown section
headers as the PostScript output from .Ss is slightly different.
(Discussed with wiz@.)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/libsaslc/dist/include/saslc.h
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/libsaslc/dist/src/dict.c
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/libsaslc/dist/test/hash_tests/test_hash.c

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

Modified files:

Index: src/crypto/external/bsd/libsaslc/dist/include/saslc.h
diff -u src/crypto/external/bsd/libsaslc/dist/include/saslc.h:1.4 src/crypto/external/bsd/libsaslc/dist/include/saslc.h:1.5
--- src/crypto/external/bsd/libsaslc/dist/include/saslc.h:1.4	Sat Feb 12 14:03:39 2011
+++ src/crypto/external/bsd/libsaslc/dist/include/saslc.h	Tue Feb 15 21:14:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: saslc.h,v 1.4 2011/02/12 19:03:39 christos Exp $	*/
+/*	$NetBSD: saslc.h,v 1.5 2011/02/16 02:14:22 christos Exp $	*/
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -53,7 +53,7 @@
 #define SASLC_PROP_REALM	REALM
 #define SASLC_PROP_SECURITY	SECURITY
 #define SASLC_PROP_SERVICE	SERVICE
-#define SASLC_PROP_SERVICENAME	SERVICENAME
+#define SASLC_PROP_SERVNAME	SERVNAME
 
 /* environment variables */
 #define SASLC_ENV_CONFIG	SASLC_CONFIG

Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.8 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.9
--- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.8	Tue Feb 15 13:36:08 2011
+++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3	Tue Feb 15 21:14:22 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: libsaslc.3,v 1.8 2011/02/15 18:36:08 christos Exp $
+.\	$NetBSD: libsaslc.3,v 1.9 2011/02/16 02:14:22 christos Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -364,7 +364,7 @@
 	return 0;
 }
 .Ed
-.Ss CONFIGURATION
+.Sh CONFIGURATION
 .Nm
 uses three types of dictionaries: context (or global), session, and
 mechanism, and they are searched in that order by
@@ -456,7 +456,7 @@
 Any base supported by
 .Xr strtoll 3
 is allowed.
-.Ss PROPERTIES
+.Sh PROPERTIES
 Most of the control of the
 .Nm
 behavior is done via setting various properties in the context or
@@ -591,7 +591,7 @@
 .It SASLC_PROP_SERVICE Po Qo SERVICE Qc Pc
 The service being used, e.g., smtp, imap, etc.
 Used by the DIGEST-MD5 and GSSAPI mechanisms.
-.It SASLC_PROP_SERVICENAME Po Qo SERVICENAME Qc Pc
+.It SASLC_PROP_SERVNAME Po Qo SERVNAME Qc Pc
 A comma delimited list of possible service names with elements of the
 form
 .Qq Oo Ao hostname Ac : Oc Ns Ao serv-name Ac
@@ -633,7 +633,7 @@
 If set, turn on debugging messages.
 This turns on debugging as early as possible and is a global setting.
 .El
-.Ss GSSAPI and Kerberos
+.Sh GSSAPI AND KERBEROS
 The following is a minimal
 .Pq Heimdal
 Kerberos 5 setup for use with an smtp server that has been configured

Index: src/crypto/external/bsd/libsaslc/dist/src/dict.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.5 src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.6
--- src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.5	Sat Feb 12 18:21:32 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/dict.c	Tue Feb 15 21:14:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
+/* $NetBSD: dict.c,v 1.6 2011/02/16 02:14:22 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $);
+__RCSID($NetBSD: dict.c,v 1.6 2011/02/16 02:14:22 christos Exp $);
 
 #include sys/queue.h
 
@@ -60,14 +60,14 @@
 } saslc__dict_node_t;
 
 /*
- * XXX: If you add property keys, please readjust these values so that
- * saslc__dict_hashval() remains collisionless.
+ * XXX: If you add or 

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

2011-02-15 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Wed Feb 16 03:16:58 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC INSTALL

Log Message:
Build certain file-systems and options(7) as module(7). 32 and 64 bits
support are still builtin, as well as FFS, NFS, TMPFS, and most COMPAT
code. Saves approx. 750kiB.

Reflect this in INSTALL kernel, where we have to support more file systems
statically.

See http://mail-index.netbsd.org/port-amd64/2011/02/13/msg001318.html


To generate a diff of this commit:
cvs rdiff -u -r1.304 -r1.305 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/amd64/conf/INSTALL

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.304 src/sys/arch/amd64/conf/GENERIC:1.305
--- src/sys/arch/amd64/conf/GENERIC:1.304	Mon Feb 14 08:50:39 2011
+++ src/sys/arch/amd64/conf/GENERIC	Wed Feb 16 03:16:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.304 2011/02/14 08:50:39 hannken Exp $
+# $NetBSD: GENERIC,v 1.305 2011/02/16 03:16:57 jym Exp $
 #
 # GENERIC machine description file
 #
@@ -22,10 +22,16 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.304 $
+#ident 		GENERIC-$Revision: 1.305 $
 
 maxusers	64		# estimated number of users
 
+no options 	COREDUMP	# coredump support, built as module(7)
+# Common binary formats are statically compiled in by default.
+options 	EXEC_ELF32	# exec ELF 32-bits binaries
+#no options 	EXEC_ELF64	# exec ELF 64-bits binaries
+#no options 	EXEC_SCRIPT	# exec #! scripts
+
 # delay between rebooting ... message and hardware reset, in milliseconds
 #options 	CPURESET_DELAY=2000
 
@@ -65,6 +71,8 @@
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
 #options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
+no options	AIO		# POSIX asynchronous I/O, built as a module(7)
+no options	MQUEUE		# POSIX messsage queues, built as a module(7)
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
@@ -119,9 +127,8 @@
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
-options 	COMPAT_LINUX
-options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
-options 	EXEC_ELF32
+#options 	COMPAT_LINUX
+#options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Wedge support
@@ -131,29 +138,30 @@
 #options 	DKWEDGE_METHOD_BSDLABEL	# Support disklabel entries as wedges
 #options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
 
-# File systems
 file-system 	FFS		# UFS
-file-system 	EXT2FS		# second extended file system (linux)
-file-system 	LFS		# log-structured file system
-file-system 	MFS		# memory file system
 file-system 	NFS		# Network File System client
-file-system 	NTFS		# Windows/NT file system (experimental)
-file-system 	CD9660		# ISO 9660 + Rock Ridge file system
-file-system 	MSDOSFS		# MS-DOS file system
-file-system 	FDESC		# /dev/fd
-file-system 	KERNFS		# /kern
-file-system 	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system 	PROCFS		# /proc
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-file-system 	SMBFS		# experimental - SMB/CIFS file-system
-file-system 	UMAPFS		# NULLFS + uid and gid remapping
-file-system 	UNION		# union file system
-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
-#file-system 	HFS		# experimental - Apple HFS+ (read-only)
+file-system	TMPFS		# Efficient memory file-system
+# File systems, built as module(7)s by default
+#file-system	EXT2FS		# second extended file system (linux)
+#file-system	LFS		# log-structured file system
+#file-system	MFS		# memory file system
+#file-system	NTFS		# Windows/NT file system (experimental)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+#file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+#file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+#file-system	OVERLAY		# overlay file system
+#file-system	PROCFS		# /proc
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+#file-system	CODA		# Coda File System; also needs vcoda (below)
+#file-system	PTYFS		# /dev/ptm support
+#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
+#file-system	HFS		# experimental - Apple HFS+ (read-only)
+#file-system	NILFS		# experimental - NTT's NiLFS(2)
 
 # File system options
 options 	QUOTA		# UFS quotas
@@ -1137,9 +1145,9 @@
 pseudo-device	agr			# IEEE 

CVS commit: src/distrib/sets/lists

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 03:42:18 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi

Log Message:
bump for bind-9.8.0rc1


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.115 -r1.116 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.108 -r1.109 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.576 -r1.577 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.101 -r1.102 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.161 -r1.162 src/distrib/sets/lists/comp/shl.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/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.42 src/distrib/sets/lists/base/ad.mips64eb:1.43
--- src/distrib/sets/lists/base/ad.mips64eb:1.42	Mon Feb 14 13:20:44 2011
+++ src/distrib/sets/lists/base/ad.mips64eb	Tue Feb 15 22:42:17 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.42 2011/02/14 18:20:44 matt Exp $
+# $NetBSD: ad.mips64eb,v 1.43 2011/02/16 03:42:17 christos Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -58,7 +58,7 @@
 ./usr/lib/64/libbfd.so.11			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbfd.so.11.0			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbind9.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/libbind9.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/libbind9.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libbluetooth.so.4			base-compat-shlib	compat,pic
 ./usr/lib/64/libbluetooth.so.4.2		base-compat-shlib	compat,pic
 ./usr/lib/64/libbsdmalloc.so.0			base-compat-shlib	compat,pic
@@ -82,7 +82,7 @@
 ./usr/lib/64/libdm.so.0base-compat-shlib	compat,pic
 ./usr/lib/64/libdm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libdns.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/libdns.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/libdns.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libdns_sd.so.0			base-compat-shlib	compat,pic,mdns
 ./usr/lib/64/libdns_sd.so.0.0			base-compat-shlib	compat,pic,mdns
 ./usr/lib/64/libdwarf.so.0			base-compat-shlib	compat,pic
@@ -114,11 +114,11 @@
 ./usr/lib/64/libipsec.so.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libipsec.so.3.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libisc.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/libisc.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/libisc.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libisccc.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/libisccc.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/libisccc.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libisccfg.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/libisccfg.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/libisccfg.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/libiscsi.so.2			base-compat-shlib	compat,pic,iscsi
 ./usr/lib/64/libiscsi.so.2.0			base-compat-shlib	compat,pic,iscsi
 ./usr/lib/64/libisns.so.0			base-compat-shlib	compat,pic
@@ -142,7 +142,7 @@
 ./usr/lib/64/liblua.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/liblua.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/liblwres.so.5			base-compat-shlib	compat,pic
-./usr/lib/64/liblwres.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/liblwres.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzf.so.0			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzf.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzma.so.1			base-compat-shlib	compat,pic
@@ -325,7 +325,7 @@
 ./usr/lib/o32/libbfd.so.11			base-compat-shlib	compat,pic,binutils
 ./usr/lib/o32/libbfd.so.11.0			base-compat-shlib	compat,pic,binutils
 ./usr/lib/o32/libbind9.so.5			base-compat-shlib	compat,pic
-./usr/lib/o32/libbind9.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/o32/libbind9.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/o32/libbluetooth.so.4			base-compat-shlib	compat,pic
 ./usr/lib/o32/libbluetooth.so.4.2		base-compat-shlib	compat,pic
 ./usr/lib/o32/libbsdmalloc.so.0			base-compat-shlib	compat,pic
@@ -349,7 +349,7 @@
 ./usr/lib/o32/libdm.so.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdns.so.5			base-compat-shlib	compat,pic
-./usr/lib/o32/libdns.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/o32/libdns.so.5.3			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdns_sd.so.0			

CVS commit: src/doc

2011-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 16 03:45:23 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
mention new bind


To generate a diff of this commit:
cvs rdiff -u -r1.811 -r1.812 src/doc/3RDPARTY
cvs rdiff -u -r1.1505 -r1.1506 src/doc/CHANGES

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.811 src/doc/3RDPARTY:1.812
--- src/doc/3RDPARTY:1.811	Mon Feb 14 13:41:09 2011
+++ src/doc/3RDPARTY	Tue Feb 15 22:45:23 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.811 2011/02/14 18:41:09 jruoho Exp $
+#	$NetBSD: 3RDPARTY,v 1.812 2011/02/16 03:45:23 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -91,8 +91,8 @@
 bc includes dc, both of which are in the NetBSD tree.
 
 Package:	bind [named and utils]
-Version:	9.7.2-P3
-Current Vers:	9.7.2-P3
+Version:	9.8.0rc1
+Current Vers:	9.8.0rc1
 Maintainer:	Paul Vixie vi...@vix.com
 Archive Site:	ftp://ftp.isc.org/isc/bind9/
 Home Page:	http://www.isc.org/sw/bind/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1505 src/doc/CHANGES:1.1506
--- src/doc/CHANGES:1.1505	Tue Feb 15 06:21:32 2011
+++ src/doc/CHANGES	Tue Feb 15 22:45:23 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1505 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1506 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -856,3 +856,5 @@
 		need to use fdisk(8) to change the NetBSD partition ids
 		from 165 (0xA5) to 169 (0xA9). [dholland 20110212]
 	hp700: Add support for HIL devices. From OpenBSD. [tsutsui 20110215]
+	bind: Update to 9.8.0rc1: Response policy zones (RPZ) and DNS64 support.
+		[christos 20110215]



CVS commit: src/distrib/sets

2011-02-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 05:18:35 UTC 2011

Modified Files:
src/distrib/sets: Makefile
Added Files:
src/distrib/sets: metalog.subr

Log Message:
Add a hook to version METALOG using rcs(1).


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/sets/metalog.subr

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/Makefile
diff -u src/distrib/sets/Makefile:1.80 src/distrib/sets/Makefile:1.81
--- src/distrib/sets/Makefile:1.80	Sun Aug 15 07:27:33 2010
+++ src/distrib/sets/Makefile	Wed Feb 16 05:18:35 2011
@@ -1,4 +1,8 @@
-#	$NetBSD: Makefile,v 1.80 2010/08/15 07:27:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.81 2011/02/16 05:18:35 uebayasi Exp $
+
+# Experimental RCS METALOG versioning
+# (Needs host's rcs(1) commands)
+#RCSMETALOG=1
 
 # The `all' target must appear before bsd.own.mk is pulled in.
 all:
@@ -120,13 +124,26 @@
 	${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc ${METALOG} \
 	${METALOG}.new
 	mv ${METALOG}.new ${METALOG}.sanitised
+.if defined(RCSMETALOG)
+	. ./metalog.subr; \
+	xrcs_descr=build distribution METALOG; \
+	xrcs_msg=$$(date); \
+	xrcs_cur=${METALOG}.sanitised; \
+	xrcs update
+.endif
 .if ${MKUPDATE} == no || !exists(${METALOG})
 clean_METALOG: .PHONY
 	rm -f ${METALOG} ${METALOG}.*
 .else	# MKUPDATE
 clean_METALOG: .PHONY ${METALOG}.sanitised
 	mv ${METALOG}.sanitised ${METALOG}
+.if defined(RCSMETALOG)
+	mv ${METALOG}.sanitised,v ${METALOG},v
+.endif
 	rm -f ${METALOG}.*
+.if defined(RCSMETALOG)
+	mv ${METALOG},v ${METALOG}.sanitised,v
+.endif
 .endif	# MKUPDATE
 .endif	# MKUNPRIVED
 

Added files:

Index: src/distrib/sets/metalog.subr
diff -u /dev/null src/distrib/sets/metalog.subr:1.1
--- /dev/null	Wed Feb 16 05:18:35 2011
+++ src/distrib/sets/metalog.subr	Wed Feb 16 05:18:35 2011
@@ -0,0 +1,73 @@
+# $NetBSD: metalog.subr,v 1.1 2011/02/16 05:18:35 uebayasi Exp $
+
+#
+# xrcs add
+# xrcs update
+# xrcs remove
+#
+#	RCS wrapper for non-interactive scripts.
+#	Excerpted from /etc/security.
+#
+
+xrcs_descr=
+xrcs_msg=
+xrcs_cur=
+xrcs_new=
+
+xrcs_unlock()
+{
+	rcs -q -u -U -M ${xrcs_cur}
+}
+
+xrcs_ci()
+{
+	ci -q -f -u -t-$xrcs_descr -m$xrcs_msg ${xrcs_cur}
+	rcs -q -kb -U ${xrcs_cur}
+}
+
+xrcs_co()
+{
+	co -q -f -u ${xrcs_cur}
+}
+
+xrcs_init()
+{
+	if [ -f ${xrcs_cur},v ]; then
+		xrcs_unlock
+	fi
+
+	if [ -f ${xrcs_cur} ]; then
+		if [ ! -f ${xrcs_cur},v ]; then
+			xrcs_ci
+			xrcs_co
+		fi
+	fi
+}
+
+xrcs_add()
+{
+	xrcs_init
+	cp -p $1 ${xrcs_cur}
+	xrcs_ci
+	xrcs_co
+}
+
+xrcs_update()
+{
+	xrcs_init
+	xrcs_ci
+	xrcs_co
+}
+
+xrcs_remove()
+{
+	xrcs_init
+	cp /dev/null ${xrcs_cur}
+	xrcs_ci
+	rm ${xrcs_cur}
+}
+
+xrcs()
+{
+	eval xrcs_$1
+}



CVS commit: src/distrib/sets

2011-02-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 06:02:01 UTC 2011

Modified Files:
src/distrib/sets: Makefile

Log Message:
RCSMETALOG: treat initial clean_METALOG nicely.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/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/Makefile
diff -u src/distrib/sets/Makefile:1.81 src/distrib/sets/Makefile:1.82
--- src/distrib/sets/Makefile:1.81	Wed Feb 16 05:18:35 2011
+++ src/distrib/sets/Makefile	Wed Feb 16 06:02:01 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.81 2011/02/16 05:18:35 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.82 2011/02/16 06:02:01 uebayasi Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -138,11 +138,11 @@
 clean_METALOG: .PHONY ${METALOG}.sanitised
 	mv ${METALOG}.sanitised ${METALOG}
 .if defined(RCSMETALOG)
-	mv ${METALOG}.sanitised,v ${METALOG},v
+	[ -f ${METALOG}.sanitised,v ]  mv ${METALOG}.sanitised,v ${METALOG},v
 .endif
 	rm -f ${METALOG}.*
 .if defined(RCSMETALOG)
-	mv ${METALOG},v ${METALOG}.sanitised,v
+	[ -f ${METALOG},v ]  mv ${METALOG},v ${METALOG}.sanitised,v
 .endif
 .endif	# MKUPDATE
 .endif	# MKUNPRIVED



CVS commit: src/distrib/sets

2011-02-15 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Feb 16 06:14:01 UTC 2011

Modified Files:
src/distrib/sets: Makefile

Log Message:
Comment.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/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/Makefile
diff -u src/distrib/sets/Makefile:1.82 src/distrib/sets/Makefile:1.83
--- src/distrib/sets/Makefile:1.82	Wed Feb 16 06:02:01 2011
+++ src/distrib/sets/Makefile	Wed Feb 16 06:14:01 2011
@@ -1,7 +1,10 @@
-#	$NetBSD: Makefile,v 1.82 2011/02/16 06:02:01 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.83 2011/02/16 06:14:01 uebayasi Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
+#
+# TODO:
+# - In 'build.sh distribution', print diff to previous
 #RCSMETALOG=1
 
 # The `all' target must appear before bsd.own.mk is pulled in.



CVS commit: src

2011-02-15 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Feb 16 07:30:28 UTC 2011

Modified Files:
src/distrib/sets/lists/man: mi
src/doc: CHANGES
src/share/man/man4: Makefile acpiwmi.4
src/sys/arch/i386/conf: ALL GENERIC
src/sys/dev/acpi/wmi: files.wmi
Added Files:
src/sys/dev/acpi/wmi: wmi_eeepc.c
src/sys/modules/wmieeepc: Makefile wmieeepc.ioconf

Log Message:
Add a skeleton driver for Asus EeePC acpiwmi(4) mappings.


To generate a diff of this commit:
cvs rdiff -u -r1.1288 -r1.1289 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1506 -r1.1507 src/doc/CHANGES
cvs rdiff -u -r1.550 -r1.551 src/share/man/man4/Makefile
cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/acpiwmi.4
cvs rdiff -u -r1.287 -r1.288 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1015 -r1.1016 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/wmi/files.wmi
cvs rdiff -u -r0 -r1.1 src/sys/dev/acpi/wmi/wmi_eeepc.c
cvs rdiff -u -r0 -r1.1 src/sys/modules/wmieeepc/Makefile \
src/sys/modules/wmieeepc/wmieeepc.ioconf

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1288 src/distrib/sets/lists/man/mi:1.1289
--- src/distrib/sets/lists/man/mi:1.1288	Mon Feb 14 08:50:38 2011
+++ src/distrib/sets/lists/man/mi	Wed Feb 16 07:30:27 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1288 2011/02/14 08:50:38 hannken Exp $
+# $NetBSD: mi,v 1.1289 2011/02/16 07:30:27 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1762,6 +1762,7 @@
 ./usr/share/man/cat4/wi.0			man-sys-catman		.cat
 ./usr/share/man/cat4/wm.0			man-sys-catman		.cat
 ./usr/share/man/cat4/wmidell.0			man-sys-catman		.cat
+./usr/share/man/cat4/wmieeepc.0			man-sys-catman		.cat
 ./usr/share/man/cat4/wmihp.0			man-sys-catman		.cat
 ./usr/share/man/cat4/wmimsi.0			man-sys-catman		.cat
 ./usr/share/man/cat4/wpi.0			man-sys-catman		.cat
@@ -4443,6 +,7 @@
 ./usr/share/man/html4/wi.html			man-sys-htmlman		html
 ./usr/share/man/html4/wm.html			man-sys-htmlman		html
 ./usr/share/man/html4/wmidell.html		man-sys-htmlman		html
+./usr/share/man/html4/wmieeepc.html		man-sys-htmlman		html
 ./usr/share/man/html4/wmihp.html		man-sys-htmlman		html
 ./usr/share/man/html4/wmimsi.html		man-sys-htmlman		html
 ./usr/share/man/html4/wpi.html			man-sys-htmlman		html
@@ -7059,6 +7061,7 @@
 ./usr/share/man/man4/wi.4			man-sys-man		.man
 ./usr/share/man/man4/wm.4			man-sys-man		.man
 ./usr/share/man/man4/wmidell.4			man-sys-man		.man
+./usr/share/man/man4/wmieeepc.4			man-sys-man		.man
 ./usr/share/man/man4/wmihp.4			man-sys-man		.man
 ./usr/share/man/man4/wmimsi.4			man-sys-man		.man
 ./usr/share/man/man4/wpi.4			man-sys-man		.man

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1506 src/doc/CHANGES:1.1507
--- src/doc/CHANGES:1.1506	Wed Feb 16 03:45:23 2011
+++ src/doc/CHANGES	Wed Feb 16 07:30:27 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1506 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1507 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -614,8 +614,8 @@
 	hpcarm: Add support for Sharp W-ZERO3 series. [nonaka 20100417]
 	acpi(4): The sysctl(8) tree was reorganized into hw.acpi.
 		[jruoho 20100419]
-	acpiwmi(4): Add three mappings, wmidell(4), wmihp(4), and wmimsi(4).
-		[jruoho 20100419]
+	acpiwmi(4): Add four mappings; wmidell(4), wmieeepc(4),
+		wmihp(4), and wmimsi(4). [jruoho 20100419]
 	kernel: Enforce RLIMIT_FSIZE above the file system.  This fixes
 		the feature for some file systems.  [pooka 20100423]
 	libc: Added a space-efficient write-once database (cdbr(3), cdbw(3)).

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.550 src/share/man/man4/Makefile:1.551
--- src/share/man/man4/Makefile:1.550	Mon Feb 14 08:50:39 2011
+++ src/share/man/man4/Makefile	Wed Feb 16 07:30:26 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.550 2011/02/14 08:50:39 hannken Exp $
+#	$NetBSD: Makefile,v 1.551 2011/02/16 07:30:26 jruoho Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -155,6 +155,7 @@
 MLINKS+=acpiec.4 acpiecdt.4
 MLINKS+=acpivga.4 acpiout.4
 MLINKS+=acpiwmi.4 wmidell.4 \
+	acpiwmi.4 wmieeepc.4 \
 	acpiwmi.4 wmihp.4 \
 	acpiwmi.4 wmimsi.4
 MLINKS+=aibs.4 aiboost.4

Index: src/share/man/man4/acpiwmi.4
diff -u src/share/man/man4/acpiwmi.4:1.6 src/share/man/man4/acpiwmi.4:1.7
--- src/share/man/man4/acpiwmi.4:1.6	Mon Oct 25 07:34:30 2010
+++ src/share/man/man4/acpiwmi.4	Wed Feb 16 07:30:26 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: acpiwmi.4,v 1.6 2010/10/25 07:34:30 wiz Exp $
+.\ $NetBSD: acpiwmi.4,v 1.7 2011/02/16 07:30:26 jruoho Exp $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN