CVS commit: src/external/bsd/ntp/lib/libntp

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 08:15:21 UTC 2012

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
add libotps for autoopts headers to CPPFLAGS


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/lib/libntp/Makefile

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

Modified files:

Index: src/external/bsd/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.4 src/external/bsd/ntp/lib/libntp/Makefile:1.5
--- src/external/bsd/ntp/lib/libntp/Makefile:1.4	Wed Feb  1 07:46:30 2012
+++ src/external/bsd/ntp/lib/libntp/Makefile	Wed Feb  1 08:15:21 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2012/02/01 07:46:30 kardel Exp $
+#	$NetBSD: Makefile,v 1.5 2012/02/01 08:15:21 kardel Exp $
 
 LIBISPRIVATE=yes
 
@@ -25,6 +25,6 @@ SRCS=systime.c a_md5encrypt.c adjtime.c 
  uglydate.c uinttoa.c ymd2yd.c ntp_libopts.c
 
 COPTS.msyslog.c+= -Wno-format-nonliteral
-COPTS.ntp_libopts.c+= -I${IDIST}/sntp/libopts
+CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 .include bsd.lib.mk



CVS commit: src

2012-02-01 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Feb  1 08:45:03 UTC 2012

Modified Files:
src/doc: CHANGES
src/share/man/man4/man4.mac68k: cpi.4

Log Message:
Document added timecounter support to the CSI Hurdler Centronics
Parallel Interface cpi(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1663 -r1.1664 src/doc/CHANGES
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.mac68k/cpi.4

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.1663 src/doc/CHANGES:1.1664
--- src/doc/CHANGES:1.1663	Wed Feb  1 05:49:45 2012
+++ src/doc/CHANGES	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1663 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1664 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1231,3 +1231,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	kernel: Add a new library, libquota, for control of and access to
 		disk quotas, extending the file-system-independent interface
 		added with the bouyer-quota2 branch. [dholland 20120201]
+	mac68k: Add timecounter support to the CSI Hurdler Centronics
+		Parallel Interface cpi(4) driver. [hauke 20120201]

Index: src/share/man/man4/man4.mac68k/cpi.4
diff -u src/share/man/man4/man4.mac68k/cpi.4:1.4 src/share/man/man4/man4.mac68k/cpi.4:1.5
--- src/share/man/man4/man4.mac68k/cpi.4:1.4	Mon Mar 23 16:14:01 2009
+++ src/share/man/man4/man4.mac68k/cpi.4	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpi.4,v 1.4 2009/03/23 16:14:01 joerg Exp $
+.\	$NetBSD: cpi.4,v 1.5 2012/02/01 08:45:03 hauke Exp $
 .\
 .\ Copyright (c) 2008 Hauke Fath.  All rights reserved.
 .\
@@ -30,13 +30,27 @@
 .Nd parallel printer driver for Creative Systems Inc. Hurdler CPI Nubus card
 .\
 .Sh SYNOPSIS
-.Cd cpi* at nubus?
+.Cd cpi* at nubus? flags 0x1
 .\
 .Sh DESCRIPTION
-The
 .Nm
 interface provides access to parallel printer ports.
 .\
+.Sh CONFIGURATION
+The
+.Nm
+driver supports the following
+.Sy flags
+for use in
+.Xr config 1
+files:
+.Pp
+.Bl -tag -compact -width bits 16-23:
+.It bit 0 :
+use the CIO counters 1 and 2 as a 32 bit 
+.Xr timecounter 9 .
+.El
+.\
 .Sh HARDWARE
 The
 .Nm
@@ -72,7 +86,8 @@ The Z8536 INT line (pin 24) is wired to 
 .Xr autoconf 4 ,
 .Xr lpt 4 ,
 .Xr nubus 4 ,
-.Xr printcap 5
+.Xr printcap 5 ,
+.Xr timecounter 9
 .Pp
 .Tn IEEE Standard 1284-1994
 .\ .Sh STANDARDS



CVS commit: src/doc

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 08:59:07 UTC 2012

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
document ntp 4.2.6p5 import


To generate a diff of this commit:
cvs rdiff -u -r1.903 -r1.904 src/doc/3RDPARTY
cvs rdiff -u -r1.1664 -r1.1665 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.903 src/doc/3RDPARTY:1.904
--- src/doc/3RDPARTY:1.903	Tue Jan 31 20:11:41 2012
+++ src/doc/3RDPARTY	Wed Feb  1 08:59:07 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.903 2012/01/31 20:11:41 kardel Exp $
+#	$NetBSD: 3RDPARTY,v 1.904 2012/02/01 08:59:07 kardel Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -713,7 +713,7 @@ and ndbootd-raw.c.  Restore saved config
 HAVE_STRICT_ALIGNMENT.  Fix RCS IDs, import.
 
 Package:	ntp
-Version:	4.2.6
+Version:	4.2.6p5
 Current Vers:	4.2.6p5
 Maintainer:	David L. Mills mi...@udel.edu
 Archive Site:	ftp://ftp.udel.edu/pub/ntp/ntp4/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1664 src/doc/CHANGES:1.1665
--- src/doc/CHANGES:1.1664	Wed Feb  1 08:45:03 2012
+++ src/doc/CHANGES	Wed Feb  1 08:59:07 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1664 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1665 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1233,3 +1233,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 		added with the bouyer-quota2 branch. [dholland 20120201]
 	mac68k: Add timecounter support to the CSI Hurdler Centronics
 		Parallel Interface cpi(4) driver. [hauke 20120201]
+	ntp: import ntp 4.2.6p5.
+		[kardel 20120201]



CVS commit: src/usr.sbin/repquota

2012-02-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb  1 09:30:01 UTC 2012

Modified Files:
src/usr.sbin/repquota: repquota.8

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/repquota/repquota.8

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

Modified files:

Index: src/usr.sbin/repquota/repquota.8
diff -u src/usr.sbin/repquota/repquota.8:1.12 src/usr.sbin/repquota/repquota.8:1.13
--- src/usr.sbin/repquota/repquota.8:1.12	Wed Feb  1 05:12:45 2012
+++ src/usr.sbin/repquota/repquota.8	Wed Feb  1 09:30:01 2012
@@ -29,9 +29,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)repquota.8	8.1 (Berkeley) 6/6/93
-.\	$NetBSD: repquota.8,v 1.12 2012/02/01 05:12:45 dholland Exp $
+.\	$NetBSD: repquota.8,v 1.13 2012/02/01 09:30:01 wiz Exp $
 .\
-.Dd February 10, 2011
+.Dd February 2, 2012
 .Dt REPQUOTA 8
 .Os
 .Sh NAME



CVS commit: src/doc

2012-02-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Feb  1 09:41:07 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
zlib-1.2.6 out.


To generate a diff of this commit:
cvs rdiff -u -r1.904 -r1.905 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.904 src/doc/3RDPARTY:1.905
--- src/doc/3RDPARTY:1.904	Wed Feb  1 08:59:07 2012
+++ src/doc/3RDPARTY	Wed Feb  1 09:41:07 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.904 2012/02/01 08:59:07 kardel Exp $
+#	$NetBSD: 3RDPARTY,v 1.905 2012/02/01 09:41:07 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1147,7 +1147,7 @@ Notes:
 
 Package:	zlib
 Version:	1.2.3
-Current Vers:	1.2.5
+Current Vers:	1.2.6
 Maintainer:	Jean-loup Gailly and Mark Adler z...@gzip.org
 Archive Site:	http://www.zlib.net/
 Home Page:	http://www.zlib.net/



CVS commit: src/sys/arch/powerpc/powerpc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 09:51:01 UTC 2012

Modified Files:
src/sys/arch/powerpc/powerpc: db_interface.c

Log Message:
Need runtime checks for mach mmu command.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/powerpc/db_interface.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/powerpc/db_interface.c
diff -u src/sys/arch/powerpc/powerpc/db_interface.c:1.49 src/sys/arch/powerpc/powerpc/db_interface.c:1.50
--- src/sys/arch/powerpc/powerpc/db_interface.c:1.49	Wed Feb  1 05:25:58 2012
+++ src/sys/arch/powerpc/powerpc/db_interface.c	Wed Feb  1 09:51:00 2012
@@ -1,8 +1,8 @@
-/*	$NetBSD: db_interface.c,v 1.49 2012/02/01 05:25:58 matt Exp $ */
+/*	$NetBSD: db_interface.c,v 1.50 2012/02/01 09:51:00 matt Exp $ */
 /*	$OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $	*/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.49 2012/02/01 05:25:58 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.50 2012/02/01 09:51:00 matt Exp $);
 
 #define USERACC
 
@@ -343,6 +343,9 @@ db_show_bat(db_expr_t addr, bool have_ad
 	u_int i;
 	u_int maxbat = (oeacpufeat  OEACPU_HIGHBAT) ? 8 : 4;
 
+	if (oeacpufeat  OEACPU_NOBAT)
+		return;
+
 	cpuvers = mfpvr()  16;
 
 	ibat[0].batu = mfspr(SPR_IBAT0U);
@@ -406,26 +409,27 @@ static void
 db_show_mmu(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
 {
 	paddr_t sdr1;
-#if !defined(PPC_OEA64)  !defined(PPC_OEA64_BRIDGE)
-	register_t sr;
-	vaddr_t saddr;
-	int i;
-#endif
 
 	__asm volatile (mfsdr1 %0 : =r(sdr1));
 	db_printf(sdr1\t\t0x%08lx\n, sdr1);
 
 #if defined(PPC_OEA64) || defined(PPC_OEA64_BRIDGE)
-	__asm volatile (mfasr %0 : =r(sdr1));
-	db_printf(asr\t\t0x%08lx\n, sdr1);
-#else
-	saddr = 0;
-	for (i = 0; i= 0xf; i++) {
-		if ((i  3) == 0)
-			db_printf(sr%d-%d\t\t, i, i+3);
-		__asm volatile (mfsrin %0,%1 : =r(sr) : r(saddr));
-		db_printf(0x%08lx   %c, sr, (i3) == 3 ? '\n' : ' ');
-		saddr += 1  ADDR_SR_SHFT;
+	if (oeacpufeat  (OEACPU_64|OEACPU_64_BRIDGE)) {
+		__asm volatile (mfasr %0 : =r(sdr1));
+		db_printf(asr\t\t0x%08lx\n, sdr1);
+	}
+#endif
+#if defined(PPC_OEA) || defined(PPC_OEA64_BRIDGE)
+	if ((oeacpufeat  OEACPU_64) == 0) {
+		vaddr_t saddr = 0;
+		for (u_int i = 0; i = 0xf; i++) {
+			register_t sr;
+			if ((i  3) == 0)
+db_printf(sr%d-%d\t\t, i, i+3);
+			__asm volatile (mfsrin %0,%1 : =r(sr) : r(saddr));
+			db_printf(0x%08lx   %c, sr, (i3) == 3 ? '\n' : ' ');
+			saddr += 1  ADDR_SR_SHFT;
+		}
 	}
 #endif
 }



CVS commit: src/sys/arch/powerpc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 09:54:03 UTC 2012

Modified Files:
src/sys/arch/powerpc/ibm4xx: pic_uic.c
src/sys/arch/powerpc/isa: isadma_machdep.c isapnp_machdep.c
src/sys/arch/powerpc/marvell: pic_discovery.c
src/sys/arch/powerpc/oea: cpu_subr.c oea_machdep.c ofw_rascons.c pmap.c
prep_machdep.c
src/sys/arch/powerpc/pci: pci_machdep_common.c pci_machdep_ofw.c
src/sys/arch/powerpc/pic: i8259_common.c intr.c ipi_openpic.c
openpic_common.c pic_distopenpic.c pic_i8259.c pic_mpcsoc.c
pic_openpic.c pic_prepivr.c
src/sys/arch/powerpc/powerpc: bus_dma.c bus_space.c ofw_machdep.c
pmap_subr.c

Log Message:
Use kmem instead of malloc.  Remove unneeded sys/malloc.h includes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/ibm4xx/pic_uic.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/isa/isadma_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/isa/isapnp_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/marvell/pic_discovery.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/powerpc/oea/oea_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/oea/ofw_rascons.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/oea/prep_machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/pci/pci_machdep_common.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/pci/pci_machdep_ofw.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/pic/i8259_common.c \
src/sys/arch/powerpc/pic/ipi_openpic.c \
src/sys/arch/powerpc/pic/pic_prepivr.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/pic/openpic_common.c \
src/sys/arch/powerpc/pic/pic_i8259.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/pic/pic_distopenpic.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/pic/pic_mpcsoc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/pic/pic_openpic.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/powerpc/bus_space.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/powerpc/ofw_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/powerpc/pmap_subr.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/pic_uic.c
diff -u src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.2 src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.3
--- src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.2	Tue Dec 13 10:55:45 2011
+++ src/sys/arch/powerpc/ibm4xx/pic_uic.c	Wed Feb  1 09:54:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_uic.c,v 1.2 2011/12/13 10:55:45 kiyohara Exp $	*/
+/*	$NetBSD: pic_uic.c,v 1.3 2012/02/01 09:54:02 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,10 +36,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic_uic.c,v 1.2 2011/12/13 10:55:45 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic_uic.c,v 1.3 2012/02/01 09:54:02 matt Exp $);
 
 #include sys/param.h
-#include sys/malloc.h
 #include sys/kernel.h
 #include sys/evcnt.h
 #include sys/cpu.h

Index: src/sys/arch/powerpc/isa/isadma_machdep.c
diff -u src/sys/arch/powerpc/isa/isadma_machdep.c:1.7 src/sys/arch/powerpc/isa/isadma_machdep.c:1.8
--- src/sys/arch/powerpc/isa/isadma_machdep.c:1.7	Fri Jul  1 18:59:19 2011
+++ src/sys/arch/powerpc/isa/isadma_machdep.c	Wed Feb  1 09:54:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: isadma_machdep.c,v 1.7 2011/07/01 18:59:19 dyoung Exp $	*/
+/*	$NetBSD: isadma_machdep.c,v 1.8 2012/02/01 09:54:02 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: isadma_machdep.c,v 1.7 2011/07/01 18:59:19 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: isadma_machdep.c,v 1.8 2012/02/01 09:54:02 matt Exp $);
 
 #define ISA_DMA_STATS
 
@@ -39,7 +39,7 @@ __KERNEL_RCSID(0, $NetBSD: isadma_machd
 #include sys/systm.h
 #include sys/syslog.h
 #include sys/device.h
-#include sys/malloc.h
+#include sys/kmem.h
 #include sys/proc.h
 #include sys/mbuf.h
 
@@ -182,7 +182,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, 
 	map = *dmamp;
 	map-_dm_cookie = NULL;
 
-	cookiesize = sizeof(struct powerpc_isa_dma_cookie);
+	cookiesize = sizeof(*cookie);
 
 	/*
 	 * ISA only has 24-bits of address space.  This means
@@ -221,8 +221,8 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, 
 	/*
 	 * Allocate our cookie.
 	 */
-	if ((cookiestore = malloc(cookiesize, M_DMAMAP,
-	(flags  BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) {
+	if ((cookiestore = kmem_intr_alloc(cookiesize,
+	(flags  BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP)) == NULL) {
 		error = ENOMEM;
 		goto out;
 	}
@@ -265,7 +265,11 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t,
 	if (cookie-id_flags  ID_HAS_BOUNCE)
 		

CVS commit: src/sys/dist/ipf/netinet

2012-02-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Feb  1 10:03:24 UTC 2012

Modified Files:
src/sys/dist/ipf/netinet: fil.c

Log Message:
Don't forward-declare ipf_dolog unless IPFILTER_LOG is defined,
since its implementation is under that ifdef.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dist/ipf/netinet/fil.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/dist/ipf/netinet/fil.c
diff -u src/sys/dist/ipf/netinet/fil.c:1.48 src/sys/dist/ipf/netinet/fil.c:1.49
--- src/sys/dist/ipf/netinet/fil.c:1.48	Tue Jan 31 09:41:37 2012
+++ src/sys/dist/ipf/netinet/fil.c	Wed Feb  1 10:03:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.48 2012/01/31 09:41:37 darrenr Exp $	*/
+/*	$NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.48 2012/01/31 09:41:37 darrenr Exp $);
+__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $);
 #else
 static const char sccsid[] = @(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp;
@@ -159,7 +159,9 @@ static	INLINE int	ipf_check_ipf(fr_info_
 static	u_32_t		ipf_checkcipso(fr_info_t *, u_char *, int);
 static	u_32_t		ipf_checkripso(u_char *);
 static	u_32_t		ipf_decaps(fr_info_t *, u_32_t, int);
+#ifdef	IPFILTER_LOG
 static	frentry_t	*ipf_dolog(fr_info_t *, u_32_t *);
+#endif
 static	int		ipf_flushlist(ipf_main_softc_t *, int, minor_t,
   int *, frentry_t **);
 static	int		ipf_flush_groups(ipf_main_softc_t *, int, int, int);



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

2012-02-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Feb  1 10:04:55 UTC 2012

Modified Files:
src/sys/arch/evbppc/conf: WALNUT

Log Message:
Bump SYMTAB_SPACE.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/evbppc/conf/WALNUT

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/evbppc/conf/WALNUT
diff -u src/sys/arch/evbppc/conf/WALNUT:1.56 src/sys/arch/evbppc/conf/WALNUT:1.57
--- src/sys/arch/evbppc/conf/WALNUT:1.56	Sun Dec 18 05:49:27 2011
+++ src/sys/arch/evbppc/conf/WALNUT	Wed Feb  1 10:04:55 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: WALNUT,v 1.56 2011/12/18 05:49:27 dholland Exp $
+#	$NetBSD: WALNUT,v 1.57 2012/02/01 10:04:55 he Exp $
 #
 #	GENERIC -- everything that's currently supported
 #
@@ -39,7 +39,7 @@ options 	USERCONF	# userconf(4) support
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 options 	TRAP_PANICWAIT
-options 	SYMTAB_SPACE=46	# size for embedded symbol table
+options 	SYMTAB_SPACE=47	# size for embedded symbol table
 
 makeoptions	DEBUG=-g	# compile full symbol table
 



CVS commit: src/sys/dist/ipf/netinet

2012-02-01 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Feb  1 10:18:04 UTC 2012

Modified Files:
src/sys/dist/ipf/netinet: fil.c

Log Message:
Don't refer to ipf_log_soft_destroy(), ipf_log_soft_create(),
ipf_log_soft_init(), and ipf_log_soft_fini() unless IPFILTER_LOG is
defined, since ipf_log.c won't be built unless that flag is defined,
ref. sys/netinet/files.ipfilter.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dist/ipf/netinet/fil.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/dist/ipf/netinet/fil.c
diff -u src/sys/dist/ipf/netinet/fil.c:1.49 src/sys/dist/ipf/netinet/fil.c:1.50
--- src/sys/dist/ipf/netinet/fil.c:1.49	Wed Feb  1 10:03:24 2012
+++ src/sys/dist/ipf/netinet/fil.c	Wed Feb  1 10:18:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $	*/
+/*	$NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $);
 #else
 static const char sccsid[] = @(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp;
@@ -9318,11 +9318,13 @@ ipf_create_all(arg)
 	if (softc == NULL)
 		return NULL;
 
+#ifdef IPFILTER_LOG
 	softc-ipf_log_soft = ipf_log_soft_create(softc);
 	if (softc-ipf_log_soft == NULL) {
 		ipf_destroy_all(softc);
 		return NULL;
 	}
+#endif
 
 	softc-ipf_lookup_soft = ipf_lookup_soft_create(softc);
 	if (softc-ipf_lookup_soft == NULL) {
@@ -9421,10 +9423,12 @@ ipf_destroy_all(softc)
 		softc-ipf_lookup_soft = NULL;
 	}
 
+#ifdef IPFILTER_LOG
 	if (softc-ipf_log_soft != NULL) {
 		ipf_log_soft_destroy(softc, softc-ipf_log_soft);
 		softc-ipf_log_soft = NULL;
 	}
+#endif
 
 	ipf_main_soft_destroy(softc, NULL);
 }
@@ -9446,8 +9450,10 @@ ipf_init_all(softc)
 	if (ipf_main_soft_init(softc) == -1)
 		return -1;
 
+#ifdef IPFILTER_LOG
 	if (ipf_log_soft_init(softc, softc-ipf_log_soft) == -1)
 		return -1;
+#endif
 
 	if (ipf_lookup_soft_init(softc, softc-ipf_lookup_soft) == -1)
 		return -1;
@@ -9508,8 +9514,10 @@ ipf_fini_all(softc)
 	if (ipf_lookup_soft_fini(softc, softc-ipf_lookup_soft) == -1)
 		return -1;
 
+#ifdef IPFILTER_LOG
 	if (ipf_log_soft_fini(softc, softc-ipf_log_soft) == -1)
 		return -1;
+#endif
 
 	if (ipf_main_soft_fini(softc) == -1)
 		return -1;



CVS commit: src/lib/libc/sys

2012-02-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Feb  1 13:29:15 UTC 2012

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

Log Message:
Document when recv(2) returns 0


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/sys/recv.2

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

Modified files:

Index: src/lib/libc/sys/recv.2
diff -u src/lib/libc/sys/recv.2:1.29 src/lib/libc/sys/recv.2:1.30
--- src/lib/libc/sys/recv.2:1.29	Mon Jun 27 08:21:08 2011
+++ src/lib/libc/sys/recv.2	Wed Feb  1 13:29:15 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: recv.2,v 1.29 2011/06/27 08:21:08 wiz Exp $
+.\	$NetBSD: recv.2,v 1.30 2012/02/01 13:29:15 manu Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -95,6 +95,8 @@ in which case the value
 .Va errno
 set to
 .Er EAGAIN .
+If no data is available and the remote peer was shut down, 
+0 is returned.
 The receive calls normally return any data available,
 up to the requested amount,
 rather than waiting for receipt of the full amount requested;
@@ -230,7 +232,9 @@ for ancillary data.
 is returned to indicate that expedited or out-of-band data were received.
 .Sh RETURN VALUES
 These calls return the number of bytes received, or \-1
-if an error occurred.
+if an error occurred. 
+For connected sockets whose remote peer was shut down,
+0 is returned when no more data is available.
 .Sh ERRORS
 The calls fail if:
 .Bl -tag -width Er



CVS commit: src/doc

2012-02-01 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Wed Feb  1 14:35:03 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Postfix 2.8.8 and 2.9.0 has released.


To generate a diff of this commit:
cvs rdiff -u -r1.905 -r1.906 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.905 src/doc/3RDPARTY:1.906
--- src/doc/3RDPARTY:1.905	Wed Feb  1 09:41:07 2012
+++ src/doc/3RDPARTY	Wed Feb  1 14:35:03 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.905 2012/02/01 09:41:07 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.906 2012/02/01 14:35:03 taca Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -906,7 +906,7 @@ and more.
 
 Package:	postfix
 Version:	2.8.7
-Current Vers:	2.8.7
+Current Vers:	2.8.8/2.9.0
 Maintainer:	Wietse Venema wie...@porcupine.org
 Archive Site:	ftp://postfix.cloud9.net/official/
 Home Page:	http://www.postfix.org/



CVS commit: src/sys/netmpls

2012-02-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  1 16:49:37 UTC 2012

Modified Files:
src/sys/netmpls: mpls_proto.c

Log Message:
old style def


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/netmpls/mpls_proto.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/netmpls/mpls_proto.c
diff -u src/sys/netmpls/mpls_proto.c:1.2 src/sys/netmpls/mpls_proto.c:1.3
--- src/sys/netmpls/mpls_proto.c:1.2	Thu Mar 31 15:40:53 2011
+++ src/sys/netmpls/mpls_proto.c	Wed Feb  1 11:49:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpls_proto.c,v 1.2 2011/03/31 19:40:53 dyoung Exp $ */
+/*	$NetBSD: mpls_proto.c,v 1.3 2012/02/01 16:49:36 christos Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpls_proto.c,v 1.2 2011/03/31 19:40:53 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpls_proto.c,v 1.3 2012/02/01 16:49:36 christos Exp $);
 
 #include opt_inet.h
 #include opt_mbuftrace.h
@@ -65,7 +65,7 @@ int mpls_accept = 0;
 int mpls_mapprec_inet = 1;
 int mpls_mapclass_inet6 = 1;
 
-void mpls_init()
+void mpls_init(void)
 {
 #ifdef MBUFTRACE
 	MOWNER_ATTACH(mpls_owner);



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

2012-02-01 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Feb  1 16:56:34 UTC 2012

Modified Files:
src/sys/dev/pci/hdaudio: hdaudio_pci.c

Log Message:
Set HDAUDIO_PCI_TCSEL to TC0 like Linux does.
Fixes stalled audio on Lenovo X60 with coreboot firmware.

Additionally, move snooping adjustment to be executed on resume too,
as Linux does.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/hdaudio/hdaudio_pci.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/hdaudio/hdaudio_pci.c
diff -u src/sys/dev/pci/hdaudio/hdaudio_pci.c:1.10 src/sys/dev/pci/hdaudio/hdaudio_pci.c:1.11
--- src/sys/dev/pci/hdaudio/hdaudio_pci.c:1.10	Thu Nov 24 03:35:59 2011
+++ src/sys/dev/pci/hdaudio/hdaudio_pci.c	Wed Feb  1 16:56:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_pci.c,v 1.10 2011/11/24 03:35:59 mrg Exp $ */
+/* $NetBSD: hdaudio_pci.c,v 1.11 2012/02/01 16:56:34 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdaudio_pci.c,v 1.10 2011/11/24 03:35:59 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdaudio_pci.c,v 1.11 2012/02/01 16:56:34 jakllsch Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -56,6 +56,7 @@ struct hdaudio_pci_softc {
 	pcitag_t		sc_tag;
 	pci_chipset_tag_t	sc_pc;
 	void			*sc_ih;
+	pcireg_t		sc_id;
 };
 
 static int		hdaudio_pci_match(device_t, cfdata_t, void *);
@@ -65,6 +66,7 @@ static int		hdaudio_pci_rescan(device_t,
 static void		hdaudio_pci_childdet(device_t, device_t);
 
 static int		hdaudio_pci_intr(void *);
+static void		hdaudio_pci_reinit(struct hdaudio_pci_softc *);
 
 /* power management */
 static bool		hdaudio_pci_resume(device_t, const pmf_qual_t *);
@@ -112,6 +114,7 @@ hdaudio_pci_attach(device_t parent, devi
 
 	sc-sc_pc = pa-pa_pc;
 	sc-sc_tag = pa-pa_tag;
+	sc-sc_id = pa-pa_id;
 
 	sc-sc_hdaudio.sc_subsystem = pci_conf_read(sc-sc_pc, sc-sc_tag,
 	PCI_SUBSYS_ID_REG);
@@ -155,17 +158,7 @@ hdaudio_pci_attach(device_t parent, devi
 	if (!pmf_device_register(self, NULL, hdaudio_pci_resume))
 		aprint_error_dev(self, couldn't establish power handler\n);
 
-	switch (PCI_VENDOR(pa-pa_id)) {
-	case PCI_VENDOR_NVIDIA:
-		/* enable snooping */
-		csr = pci_conf_read(sc-sc_pc, sc-sc_tag,
-		HDAUDIO_NV_REG_SNOOP);
-		csr = ~HDAUDIO_NV_SNOOP_MASK;
-		csr |= HDAUDIO_NV_SNOOP_ENABLE;
-		pci_conf_write(sc-sc_pc, sc-sc_tag,
-		HDAUDIO_NV_REG_SNOOP, csr);
-		break;
-	}
+	hdaudio_pci_reinit(sc);
 
 	/* Attach bus-independent HD audio layer */
 	hdaudio_attach(self, sc-sc_hdaudio);
@@ -224,10 +217,36 @@ hdaudio_pci_intr(void *opaque)
 	return hdaudio_intr(sc-sc_hdaudio);
 }
 
+
+static void
+hdaudio_pci_reinit(struct hdaudio_pci_softc *sc)
+{
+	pcireg_t val;
+
+	/* stops playback static */
+	val = pci_conf_read(sc-sc_pc, sc-sc_tag, HDAUDIO_PCI_TCSEL);
+	val = ~7;
+	val |= 0;
+	pci_conf_write(sc-sc_pc, sc-sc_tag, HDAUDIO_PCI_TCSEL, val);
+
+	switch (PCI_VENDOR(sc-sc_id)) {
+	case PCI_VENDOR_NVIDIA:
+		/* enable snooping */
+		val = pci_conf_read(sc-sc_pc, sc-sc_tag,
+		HDAUDIO_NV_REG_SNOOP);
+		val = ~HDAUDIO_NV_SNOOP_MASK;
+		val |= HDAUDIO_NV_SNOOP_ENABLE;
+		pci_conf_write(sc-sc_pc, sc-sc_tag,
+		HDAUDIO_NV_REG_SNOOP, val);
+		break;
+	}
+}
+
 static bool
 hdaudio_pci_resume(device_t self, const pmf_qual_t *qual)
 {
 	struct hdaudio_pci_softc *sc = device_private(self);
 
+	hdaudio_pci_reinit(sc);
 	return hdaudio_resume(sc-sc_hdaudio);
 }



CVS commit: src/sys/dist/ipf/netinet

2012-02-01 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Wed Feb  1 17:11:46 UTC 2012

Modified Files:
src/sys/dist/ipf/netinet: fil.c

Log Message:
PR kern/45907
#ifdef USE_INET6 guards are missing around IPv6 code


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dist/ipf/netinet/fil.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/dist/ipf/netinet/fil.c
diff -u src/sys/dist/ipf/netinet/fil.c:1.51 src/sys/dist/ipf/netinet/fil.c:1.52
--- src/sys/dist/ipf/netinet/fil.c:1.51	Wed Feb  1 16:46:28 2012
+++ src/sys/dist/ipf/netinet/fil.c	Wed Feb  1 17:11:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.51 2012/02/01 16:46:28 christos Exp $	*/
+/*	$NetBSD: fil.c,v 1.52 2012/02/01 17:11:46 darrenr Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.51 2012/02/01 16:46:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.52 2012/02/01 17:11:46 darrenr Exp $);
 #else
 static const char sccsid[] = @(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp;
@@ -9369,6 +9369,7 @@ ipf_ht_node_make_key(host_track_t *htp, 
 			mask = htonl(0x  (32 - bits));
 		}
 		key-hn_addr.adf_addr.in4.s_addr = addr-in4.s_addr  mask;
+#ifdef USE_INET6
 	} else {
 		int bits = htp-ht_netmask;
 
@@ -9398,6 +9399,7 @@ ipf_ht_node_make_key(host_track_t *htp, 
 			key-hn_addr.adf_addr.i6[0] = addr-i6[0] 
 	 htonl(0x  (32 - bits));
 		}
+#endif
 	}
 }
 



CVS commit: src

2012-02-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 17:48:11 UTC 2012

Modified Files:
src/usr.bin/quota: quota.c
src/usr.sbin/repquota: repquota.c

Log Message:
Simplify elaborate calls to quota_check_limit().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/quota/quota.c
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/repquota/repquota.c

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

Modified files:

Index: src/usr.bin/quota/quota.c
diff -u src/usr.bin/quota/quota.c:1.46 src/usr.bin/quota/quota.c:1.47
--- src/usr.bin/quota/quota.c:1.46	Mon Jan 30 16:46:30 2012
+++ src/usr.bin/quota/quota.c	Wed Feb  1 17:48:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota.c,v 1.46 2012/01/30 16:46:30 dholland Exp $	*/
+/*	$NetBSD: quota.c,v 1.47 2012/02/01 17:48:10 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)quota.c	8.4 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: quota.c,v 1.46 2012/01/30 16:46:30 dholland Exp $);
+__RCSID($NetBSD: quota.c,v 1.47 2012/02/01 17:48:10 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -610,46 +610,31 @@ anyover(struct quotaval *qvs, unsigned n
 static int
 isover(struct quotaval *qv, time_t now)
 {
-	int ql_stat;
-
-	ql_stat = quota_check_limit(qv-qv_usage, 1,
-qv-qv_softlimit,
-qv-qv_hardlimit,
-qv-qv_expiretime, now);
-	switch(QL_STATUS(ql_stat)) {
-	case QL_S_DENY_HARD:
-	case QL_S_DENY_GRACE:
-	case QL_S_ALLOW_SOFT:
-		return 1;
-	default:
-		break;
-	}
-	return 0;
+	return (qv-qv_usage = qv-qv_hardlimit ||
+		qv-qv_usage = qv-qv_softlimit);
 }
 
 static const char *
 getovermsg(struct quotaval *qv, const char *what, time_t now)
 {
 	static char buf[64];
-	int ql_stat;
 
-	ql_stat = quota_check_limit(qv-qv_usage, 1,
-qv-qv_softlimit,
-qv-qv_hardlimit,
-qv-qv_expiretime, now);
-	switch(QL_STATUS(ql_stat)) {
-	case QL_S_DENY_HARD:
+	if (qv-qv_usage = qv-qv_hardlimit) {
 		snprintf(buf, sizeof(buf), %c%s limit reached on,
 			 toupper((unsigned char)what[0]), what+1);
-		break;
-	case QL_S_DENY_GRACE:
-		snprintf(buf, sizeof(buf), Over %s quota on, what);
-		break;
-	case QL_S_ALLOW_SOFT:
-		snprintf(buf, sizeof(buf), In %s grace period on, what);
-		break;
-	default:
+		return buf;
+	}
+
+	if (qv-qv_usage  qv-qv_softlimit) {
+		/* Ok */
 		return NULL;
 	}
+
+	if (now  qv-qv_expiretime) {
+		snprintf(buf, sizeof(buf), Over %s quota on, what);
+		return buf;
+	}
+
+	snprintf(buf, sizeof(buf), In %s grace period on, what);
 	return buf;
 }

Index: src/usr.sbin/repquota/repquota.c
diff -u src/usr.sbin/repquota/repquota.c:1.40 src/usr.sbin/repquota/repquota.c:1.41
--- src/usr.sbin/repquota/repquota.c:1.40	Wed Feb  1 05:12:45 2012
+++ src/usr.sbin/repquota/repquota.c	Wed Feb  1 17:48:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: repquota.c,v 1.40 2012/02/01 05:12:45 dholland Exp $	*/
+/*	$NetBSD: repquota.c,v 1.41 2012/02/01 17:48:10 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)repquota.c	8.2 (Berkeley) 11/22/94;
 #else
-__RCSID($NetBSD: repquota.c,v 1.40 2012/02/01 05:12:45 dholland Exp $);
+__RCSID($NetBSD: repquota.c,v 1.41 2012/02/01 17:48:10 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -118,6 +118,7 @@ static void	usage(void) __attribute__((_
 static void	printquotas(int, struct quotahandle *);
 static void	exportquotas(void);
 static int	oneof(const char *, char *[], int cnt);
+static int isover(struct quotaval *qv, time_t now);
 
 int
 main(int argc, char **argv)
@@ -330,17 +331,11 @@ printquotas(int idtype, struct quotahand
 		if (fup == 0)
 			continue;
 		for (i = 0; i  REPQUOTA_NUMOBJTYPES; i++) {
-			switch (QL_STATUS(quota_check_limit(q[i].qv_usage, 1,
-			q[i].qv_softlimit, q[i].qv_hardlimit,
-			q[i].qv_expiretime, now))) {
-			case QL_S_DENY_HARD:
-			case QL_S_DENY_GRACE:
-			case QL_S_ALLOW_SOFT:
+			if (isover(q[i], now)) {
 timemsg[i] = timeprt(b0[i], 8, now,
 q[i].qv_expiretime);
 overchar[i] = '+';
-break;
-			default:
+			} else {
 if (vflag  q[i].qv_grace != QUOTA_NOTIME) {
 	timemsg[i] = timeprt(b0[i], 8, 0,
 			 q[i].qv_grace);
@@ -348,7 +343,6 @@ printquotas(int idtype, struct quotahand
 	timemsg[i] = ;
 }
 overchar[i] = '-';
-break;
 			}
 		}
 
@@ -571,3 +565,10 @@ oneof(const char *target, char *list[], 
 			return i;
 	return -1;
 }
+
+static int
+isover(struct quotaval *qv, time_t now)
+{ 
+	return (qv-qv_usage = qv-qv_hardlimit ||
+		qv-qv_usage = qv-qv_softlimit);
+} 



CVS commit: src

2012-02-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 17:52:07 UTC 2012

Modified Files:
src/common/include/quota: quota.h
src/lib/libquota: Makefile
Removed Files:
src/lib/libquota: getfsquota.c getnfsquota.c getufsquota.c

Log Message:
Remove old (5.99.48 - 5.99.62) libquota interface.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/include/quota/quota.h
cvs rdiff -u -r1.7 -r1.8 src/lib/libquota/Makefile
cvs rdiff -u -r1.4 -r0 src/lib/libquota/getfsquota.c
cvs rdiff -u -r1.5 -r0 src/lib/libquota/getnfsquota.c
cvs rdiff -u -r1.7 -r0 src/lib/libquota/getufsquota.c

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

Modified files:

Index: src/common/include/quota/quota.h
diff -u src/common/include/quota/quota.h:1.4 src/common/include/quota/quota.h:1.5
--- src/common/include/quota/quota.h:1.4	Fri Nov 25 16:55:05 2011
+++ src/common/include/quota/quota.h	Wed Feb  1 17:52:07 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: quota.h,v 1.4 2011/11/25 16:55:05 dholland Exp $ */
+/* $NetBSD: quota.h,v 1.5 2012/02/01 17:52:07 dholland Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -48,17 +48,4 @@
 /* check a quota usage against limits (assumes UFS semantic) */
 int quota_check_limit(uint64_t, uint64_t,  uint64_t, uint64_t, time_t, time_t);
 
-/*
- * retrieve quotas with ufs semantics from vfs, for the given id and class.
- * second argument points to a struct quotaval array of QUOTA_NLIMITS
- * elements.
- */
-int getufsquota(const char *, struct quotaval *, uid_t, const char *);
-
-/* same as above, but for NFS */
-int getnfsquota(const char *, struct quotaval *, uid_t, const char *);
-
-/* call one of the above, if appropriate, after a statvfs(2) */
-int getfsquota(const char *, struct quotaval *, uid_t, const char *);
-
 #endif /* _QUOTA_QUOTA_H_ */

Index: src/lib/libquota/Makefile
diff -u src/lib/libquota/Makefile:1.7 src/lib/libquota/Makefile:1.8
--- src/lib/libquota/Makefile:1.7	Wed Feb  1 05:34:40 2012
+++ src/lib/libquota/Makefile	Wed Feb  1 17:52:07 2012
@@ -1,18 +1,13 @@
-#	$NetBSD: Makefile,v 1.7 2012/02/01 05:34:40 dholland Exp $
+#	$NetBSD: Makefile,v 1.8 2012/02/01 17:52:07 dholland Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
 
 .include bsd.own.mk
 
-.include ${NETBSDSRCDIR}/common/lib/libquota/Makefile.inc
-
 WARNS=	4
 LIB=	quota
 
-LIBDPLIBS+= prop  ${.CURDIR}/../libprop
 LIBDPLIBS+= rpcsvc  ${.CURDIR}/../librpcsvc
 
-SRCS+=	getfsquota.c getnfsquota.c getufsquota.c
-
 SRCS+=	quota_open.c
 SRCS+=	quota_schema.c
 SRCS+=	quota_get.c quota_put.c quota_delete.c



CVS commit: src

2012-02-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 17:53:02 UTC 2012

Modified Files:
src/libexec/rpc.rquotad: Makefile
src/usr.bin/quota: Makefile
src/usr.sbin/edquota: Makefile
src/usr.sbin/quotactl: Makefile
src/usr.sbin/quotaon: Makefile
src/usr.sbin/repquota: Makefile

Log Message:
libquota no longer requires libprop. Also remove some other no-longer-used
.PATH'd-in bits from repquota.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/libexec/rpc.rquotad/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/quota/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/edquota/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/quotactl/Makefile
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/quotaon/Makefile
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/repquota/Makefile

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

Modified files:

Index: src/libexec/rpc.rquotad/Makefile
diff -u src/libexec/rpc.rquotad/Makefile:1.8 src/libexec/rpc.rquotad/Makefile:1.9
--- src/libexec/rpc.rquotad/Makefile:1.8	Thu Mar 24 17:05:43 2011
+++ src/libexec/rpc.rquotad/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2011/03/24 17:05:43 bouyer Exp $
+#	$NetBSD: Makefile,v 1.9 2012/02/01 17:53:01 dholland Exp $
 
 .include bsd.own.mk
 PROG =	rpc.rquotad
@@ -6,7 +6,7 @@ SRCS =	rquotad.c
 MAN  =	rpc.rquotad.8
 MLINKS = rpc.rquotad.8 rquotad.8
 
-DPADD=	${LIBQUOTA} ${LIBRPCSVC} ${LIBPROP}
-LDADD=	-lquota -lrpcsvc -lprop
+DPADD=	${LIBQUOTA} ${LIBRPCSVC}
+LDADD=	-lquota -lrpcsvc
 
 .include bsd.prog.mk

Index: src/usr.bin/quota/Makefile
diff -u src/usr.bin/quota/Makefile:1.11 src/usr.bin/quota/Makefile:1.12
--- src/usr.bin/quota/Makefile:1.11	Mon Jan  9 15:35:44 2012
+++ src/usr.bin/quota/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2012/01/09 15:35:44 dholland Exp $	
+#	$NetBSD: Makefile,v 1.12 2012/02/01 17:53:01 dholland Exp $	
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
 
 WARNS ?= 4
@@ -7,7 +7,7 @@ PROG=	quota
 SRCS=	quota.c printquota.c
 
 CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/quota
-DPADD=	${LIBQUOTA} ${LIBRPCSVC} ${LIBPROP}
-LDADD=	-lquota -lrpcsvc -lprop
+DPADD=	${LIBQUOTA} ${LIBRPCSVC}
+LDADD=	-lquota -lrpcsvc
 
 .include bsd.prog.mk

Index: src/usr.sbin/edquota/Makefile
diff -u src/usr.sbin/edquota/Makefile:1.10 src/usr.sbin/edquota/Makefile:1.11
--- src/usr.sbin/edquota/Makefile:1.10	Mon Jan 30 19:19:20 2012
+++ src/usr.sbin/edquota/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.10 2012/01/30 19:19:20 dholland Exp $
+#	$NetBSD: Makefile,v 1.11 2012/02/01 17:53:01 dholland Exp $
 
 .include bsd.own.mk
 
@@ -9,8 +9,8 @@ SRCS=	edquota.c
 MAN=	edquota.8
 
 CPPFLAGS+=-I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota
-DPADD=	${LIBQUOTA} ${LIBPROP} ${LIBRPCSVC}
-LDADD=	-lquota -lprop -lrpcsvc
+DPADD=	${LIBQUOTA} ${LIBRPCSVC}
+LDADD=	-lquota -lrpcsvc
 
 .PATH:	${NETBSDSRCDIR}/usr.bin/quota
 SRCS+=	printquota.c

Index: src/usr.sbin/quotactl/Makefile
diff -u src/usr.sbin/quotactl/Makefile:1.5 src/usr.sbin/quotactl/Makefile:1.6
--- src/usr.sbin/quotactl/Makefile:1.5	Mon Jan 30 19:31:31 2012
+++ src/usr.sbin/quotactl/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,12 +1,12 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.5 2012/01/30 19:31:31 dholland Exp $
+#	$NetBSD: Makefile,v 1.6 2012/02/01 17:53:01 dholland Exp $
 
 .include bsd.own.mk
 PROG=	quotactl
 SRCS=	quotactl.c proplib-interpreter.c quotaprop.c
 MAN=	quotactl.8
 
-DPADD=	${LIBQUOTA} ${LIBRPCSVC} ${LIBPROP}
-LDADD=	-lquota -lrpcsvc -lprop
+DPADD=	${LIBPROP} ${LIBQUOTA} ${LIBRPCSVC}
+LDADD=	-lprop -lquota -lrpcsvc
 
 .include bsd.prog.mk

Index: src/usr.sbin/quotaon/Makefile
diff -u src/usr.sbin/quotaon/Makefile:1.9 src/usr.sbin/quotaon/Makefile:1.10
--- src/usr.sbin/quotaon/Makefile:1.9	Mon Jan 30 16:45:13 2012
+++ src/usr.sbin/quotaon/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.9 2012/01/30 16:45:13 dholland Exp $
+#	$NetBSD: Makefile,v 1.10 2012/02/01 17:53:01 dholland Exp $
 
 .include bsd.own.mk
 WARNS	?= 4
@@ -10,7 +10,7 @@ MAN=	quotaon.8
 MLINKS=	quotaon.8 quotaoff.8
 LINKS=	${BINDIR}/quotaon ${BINDIR}/quotaoff
 
-DPADD=	${LIBQUOTA} ${LIBPROP} ${LIBRPCSVC}
-LDADD=	-lquota -lprop -lrpcsvc
+DPADD=	${LIBQUOTA} ${LIBRPCSVC}
+LDADD=	-lquota -lrpcsvc
 
 .include bsd.prog.mk

Index: src/usr.sbin/repquota/Makefile
diff -u src/usr.sbin/repquota/Makefile:1.8 src/usr.sbin/repquota/Makefile:1.9
--- src/usr.sbin/repquota/Makefile:1.8	Thu Mar 24 17:05:47 2011
+++ src/usr.sbin/repquota/Makefile	Wed Feb  1 17:53:01 2012
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.8 2011/03/24 17:05:47 bouyer Exp $
+#	$NetBSD: Makefile,v 1.9 2012/02/01 17:53:01 dholland Exp $
 
 WARNS ?= 4
 .include bsd.own.mk
@@ -8,12 

CVS commit: src/lib/libquota

2012-02-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 17:53:23 UTC 2012

Modified Files:
src/lib/libquota: shlib_version

Log Message:
Bump libquota.so major version (to 1)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libquota/shlib_version

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

Modified files:

Index: src/lib/libquota/shlib_version
diff -u src/lib/libquota/shlib_version:1.3 src/lib/libquota/shlib_version:1.4
--- src/lib/libquota/shlib_version:1.3	Mon Jan 30 16:52:15 2012
+++ src/lib/libquota/shlib_version	Wed Feb  1 17:53:23 2012
@@ -1,5 +1,5 @@
-#	$NetBSD: shlib_version,v 1.3 2012/01/30 16:52:15 dholland Exp $
+#	$NetBSD: shlib_version,v 1.4 2012/02/01 17:53:23 dholland Exp $
 #	Remember to update distrib/sets/lists/{base,comp} when changing
 #
-major=0
-minor=2
+major=1
+minor=0



CVS commit: src/distrib/sets/lists

2012-02-01 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 17:53:55 UTC 2012

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:
Set list updates for libquota bump.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.79 -r1.80 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.154 -r1.155 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.145 -r1.146 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.614 -r1.615 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.153 -r1.154 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.136 -r1.137 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.207 -r1.208 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.80 src/distrib/sets/lists/base/ad.mips64eb:1.81
--- src/distrib/sets/lists/base/ad.mips64eb:1.80	Mon Jan 30 16:54:46 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Wed Feb  1 17:53:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.80 2012/01/30 16:54:46 dholland Exp $
+# $NetBSD: ad.mips64eb,v 1.81 2012/02/01 17:53:54 dholland 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
@@ -199,8 +199,8 @@
 ./usr/lib/64/libpthread_dbg.so.2.0		base-compat-shlib	compat,pic
 ./usr/lib/64/libpuffs.so.2			base-compat-shlib	compat,pic
 ./usr/lib/64/libpuffs.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/64/libquota.so.0			base-compat-shlib	compat,pic
-./usr/lib/64/libquota.so.0.2			base-compat-shlib	compat,pic
+./usr/lib/64/libquota.so.1			base-compat-shlib	compat,pic
+./usr/lib/64/libquota.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libradius.so.4			base-compat-shlib	compat,pic
 ./usr/lib/64/libradius.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/64/librefuse.so.2			base-compat-shlib	compat,pic
@@ -495,8 +495,8 @@
 ./usr/lib/o32/libpthread_dbg.so.2.0		base-compat-shlib	compat,pic
 ./usr/lib/o32/libpuffs.so.2			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpuffs.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libquota.so.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libquota.so.0.2			base-compat-shlib	compat,pic
+./usr/lib/o32/libquota.so.1			base-compat-shlib	compat,pic
+./usr/lib/o32/libquota.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libradius.so.4			base-compat-shlib	compat,pic
 ./usr/lib/o32/libradius.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/librefuse.so.2			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.79 src/distrib/sets/lists/base/ad.mips64el:1.80
--- src/distrib/sets/lists/base/ad.mips64el:1.79	Mon Jan 30 16:54:46 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Wed Feb  1 17:53:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.79 2012/01/30 16:54:46 dholland Exp $
+# $NetBSD: ad.mips64el,v 1.80 2012/02/01 17:53:54 dholland 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
@@ -199,8 +199,8 @@
 ./usr/lib/64/libpthread_dbg.so.2.0		base-compat-shlib	compat,pic
 ./usr/lib/64/libpuffs.so.2			base-compat-shlib	compat,pic
 ./usr/lib/64/libpuffs.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/64/libquota.so.0			base-compat-shlib	compat,pic
-./usr/lib/64/libquota.so.0.2			base-compat-shlib	compat,pic
+./usr/lib/64/libquota.so.1			base-compat-shlib	compat,pic
+./usr/lib/64/libquota.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libradius.so.4			base-compat-shlib	compat,pic
 ./usr/lib/64/libradius.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/64/librefuse.so.2			base-compat-shlib	compat,pic
@@ -495,8 +495,8 @@
 ./usr/lib/o32/libpthread_dbg.so.2.0		base-compat-shlib	compat,pic
 ./usr/lib/o32/libpuffs.so.2			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpuffs.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libquota.so.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libquota.so.0.2			base-compat-shlib	compat,pic
+./usr/lib/o32/libquota.so.1			base-compat-shlib	compat,pic
+./usr/lib/o32/libquota.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libradius.so.4			base-compat-shlib	compat,pic
 ./usr/lib/o32/libradius.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/librefuse.so.2			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.154 

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

2012-02-01 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Feb  1 18:55:33 UTC 2012

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

Log Message:
amd64/Xen doesn't require special treatment for pmap_is_curpmap(),
since cpu_load_pmap() ensures that the linear map is in place for the
kernel. This emulates normal shared kernel mappings, except for the
recursive mapping of the PDP_BASE, which will point to the per-cpu
pdir, which will be a copy of the pmap_kernel()-pm_pdir; instead of
the user pmap-pm_pdir.


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

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.162 src/sys/arch/x86/x86/pmap.c:1.163
--- src/sys/arch/x86/x86/pmap.c:1.162	Mon Jan 30 17:56:27 2012
+++ src/sys/arch/x86/x86/pmap.c	Wed Feb  1 18:55:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.162 2012/01/30 17:56:27 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.163 2012/02/01 18:55:32 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.162 2012/01/30 17:56:27 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.163 2012/02/01 18:55:32 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -675,17 +675,8 @@ pv_pte_next(struct pmap_page *pp, struct
 bool
 pmap_is_curpmap(struct pmap *pmap)
 {
-#if defined(XEN)  defined(__x86_64__)
-	/*
-	 * Only kernel pmap is physically loaded.
-	 * User PGD may be active, but TLB will be flushed
-	 * with HYPERVISOR_iret anyway, so let's say no
-	 */
-	return(pmap == pmap_kernel());
-#else /* XEN  __x86_64__*/
 	return((pmap == pmap_kernel()) ||
 	   (pmap == curcpu()-ci_pmap));
-#endif
 }
 
 /*



CVS commit: src/external/bsd/ntp

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 20:48:02 UTC 2012

Modified Files:
src/external/bsd/ntp: Makefile.inc
src/external/bsd/ntp/dist/ntpd: ntp_control.c ntp_io.c ntp_refclock.c
ntp_restrict.c refclock_jjy.c
src/external/bsd/ntp/dist/ntpq: ntpq.c
src/external/bsd/ntp/dist/sntp: crypto.c log.c main.c networking.c
networking.h
src/external/bsd/ntp/dist/sntp/libopts: numeric.c
src/external/bsd/ntp/dist/sntp/libopts/autoopts: options.h
src/external/bsd/ntp/dist/util: ntp-keygen-opts.c

Log Message:
back to WARNS=4 (constify and signedness corrections)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/ntp/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/ntpd/ntp_control.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/ntpd/ntp_io.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/ntpd/ntp_refclock.c \
src/external/bsd/ntp/dist/ntpd/refclock_jjy.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_restrict.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/ntpq/ntpq.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/sntp/crypto.c \
src/external/bsd/ntp/dist/sntp/main.c \
src/external/bsd/ntp/dist/sntp/networking.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/sntp/log.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/networking.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/ntp/dist/sntp/libopts/numeric.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/util/ntp-keygen-opts.c

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

Modified files:

Index: src/external/bsd/ntp/Makefile.inc
diff -u src/external/bsd/ntp/Makefile.inc:1.10 src/external/bsd/ntp/Makefile.inc:1.11
--- src/external/bsd/ntp/Makefile.inc:1.10	Wed Feb  1 07:46:20 2012
+++ src/external/bsd/ntp/Makefile.inc	Wed Feb  1 20:48:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2012/02/01 07:46:20 kardel Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2012/02/01 20:48:01 kardel Exp $
 
 .if !defined(NTP_MAKEFILE_INC)
 NTP_MAKEFILE_INC=yes
@@ -10,8 +10,8 @@ CWARNFLAGS.clang+=	-Wno-unneeded-interna
 			-Wno-format-security \
 			-Wno-parentheses -Wno-constant-logical-operand
 
-#WARNS?=	4
-WARNS?=	0
+WARNS?=	4
+
 
 .include bsd.own.mk
 

Index: src/external/bsd/ntp/dist/ntpd/ntp_control.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.5 src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.6
--- src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.5	Wed Feb  1 07:46:22 2012
+++ src/external/bsd/ntp/dist/ntpd/ntp_control.c	Wed Feb  1 20:48:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_control.c,v 1.5 2012/02/01 07:46:22 kardel Exp $	*/
+/*	$NetBSD: ntp_control.c,v 1.6 2012/02/01 20:48:01 kardel Exp $	*/
 
 /*
  * ntp_control.c - respond to control messages and send async traps
@@ -700,11 +700,11 @@ process_control(
 	 * If the length is less than required for the header, or
 	 * it is a response or a fragment, ignore this.
 	 */
-	if (rbufp-recv_length  CTL_HEADER_LEN
+	if (rbufp-recv_length  (int)CTL_HEADER_LEN
 	|| pkt-r_m_e_op  (CTL_RESPONSE|CTL_MORE|CTL_ERROR)
 	|| pkt-offset != 0) {
 		DPRINTF(1, (invalid format in control packet\n));
-		if (rbufp-recv_length  CTL_HEADER_LEN)
+		if (rbufp-recv_length  (int)CTL_HEADER_LEN)
 			numctltooshort++;
 		if (pkt-r_m_e_op  CTL_RESPONSE)
 			numctlinputresp++;
@@ -1082,7 +1082,7 @@ ctl_putdbl(
 	while (*cq != '\0')
 		*cp++ = *cq++;
 	*cp++ = '=';
-	NTP_INSIST((cp - buffer)  sizeof(buffer));
+	NTP_INSIST((cp - buffer)  (int)sizeof(buffer));
 	snprintf(cp, sizeof(buffer) - (cp - buffer), %.3f, ts);
 	cp += strlen(cp);
 	ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
@@ -1107,7 +1107,7 @@ ctl_putuint(
 		*cp++ = *cq++;
 
 	*cp++ = '=';
-	NTP_INSIST((cp - buffer)  sizeof(buffer));
+	NTP_INSIST((cp - buffer)  (int)sizeof(buffer));
 	snprintf(cp, sizeof(buffer) - (cp - buffer), %lu, uval);
 	cp += strlen(cp);
 	ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1138,7 +1138,7 @@ ctl_putfs(
 	tm = gmtime(fstamp);
 	if (NULL ==  tm)
 		return;
-	NTP_INSIST((cp - buffer)  sizeof(buffer));
+	NTP_INSIST((cp - buffer)  (int)sizeof(buffer));
 	snprintf(cp, sizeof(buffer) - (cp - buffer),
 		 %04d%02d%02d%02d%02d, tm-tm_year + 1900,
 		 tm-tm_mon + 1, tm-tm_mday, tm-tm_hour, tm-tm_min);
@@ -1167,7 +1167,7 @@ ctl_puthex(
 		*cp++ = *cq++;
 
 	*cp++ = '=';
-	NTP_INSIST((cp - buffer)  sizeof(buffer));
+	NTP_INSIST((cp - buffer)  (int)sizeof(buffer));
 	snprintf(cp, sizeof(buffer) - (cp - buffer), 0x%lx, uval);
 	cp += strlen(cp);
 	ctl_putdata(buffer,(unsigned)( cp - buffer ), 0);
@@ -1193,7 +1193,7 @@ ctl_putint(
 		*cp++ = *cq++;
 
 	*cp++ = '=';
-	NTP_INSIST((cp - buffer)  sizeof(buffer));
+	NTP_INSIST((cp - buffer)  (int)sizeof(buffer));
 	snprintf(cp, sizeof(buffer) - 

CVS commit: src/external/bsd/ntp/lib/libopts

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 20:49:09 UTC 2012

Modified Files:
src/external/bsd/ntp/lib/libopts: Makefile

Log Message:
build libopts with WARNS=0 for now


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/lib/libopts/Makefile

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

Modified files:

Index: src/external/bsd/ntp/lib/libopts/Makefile
diff -u src/external/bsd/ntp/lib/libopts/Makefile:1.3 src/external/bsd/ntp/lib/libopts/Makefile:1.4
--- src/external/bsd/ntp/lib/libopts/Makefile:1.3	Wed Feb  1 07:46:30 2012
+++ src/external/bsd/ntp/lib/libopts/Makefile	Wed Feb  1 20:49:09 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2012/02/01 07:46:30 kardel Exp $
+#	$NetBSD: Makefile,v 1.4 2012/02/01 20:49:09 kardel Exp $
 
 LIBISPRIVATE=yes
 
@@ -8,6 +8,9 @@ LIB=opts
 
 .include ${.CURDIR}/../Makefile.inc
 
+# libopts is not really great code
+WARNS=0
+
 DIST=	${IDIST}/sntp/libopts
 
 CPPFLAGS+=-I${DIST}



CVS commit: src/external/bsd/ntp/dist/ntpd

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 21:21:26 UTC 2012

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c

Log Message:
initialize min_dist


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/ntpd/ntp_io.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.8 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.9
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.8	Wed Feb  1 20:48:01 2012
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c	Wed Feb  1 21:21:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.8 2012/02/01 20:48:01 kardel Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.9 2012/02/01 21:21:25 kardel Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -3801,7 +3801,9 @@ findclosestinterface(
 	sockaddr_u	addr_dist;
 	sockaddr_u	min_dist;
 
+	
 	winner = NULL;
+	min_dist = *addr;
 	
 	for (ep = ep_list; ep != NULL; ep = ep-elink) {
 		if (ep-ignore_packets ||



CVS commit: src/external/bsd/ntp/bin/sntp

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 21:22:19 UTC 2012

Modified Files:
src/external/bsd/ntp/bin/sntp: Makefile

Log Message:
use WARNS=0 until const issue is resolved


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/bin/sntp/Makefile

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

Modified files:

Index: src/external/bsd/ntp/bin/sntp/Makefile
diff -u src/external/bsd/ntp/bin/sntp/Makefile:1.3 src/external/bsd/ntp/bin/sntp/Makefile:1.4
--- src/external/bsd/ntp/bin/sntp/Makefile:1.3	Wed Feb  1 07:46:21 2012
+++ src/external/bsd/ntp/bin/sntp/Makefile	Wed Feb  1 21:22:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2012/02/01 07:46:21 kardel Exp $
+# $NetBSD: Makefile,v 1.4 2012/02/01 21:22:19 kardel Exp $
 
 USE_FORT?= yes	# network client/server
 
@@ -9,6 +9,8 @@ BINDIR=	/usr/sbin
 
 .include ${.CURDIR}/../Makefile.inc
 
+WARNS=0
+
 DIST=${IDIST}/sntp
 
 CPPFLAGS+=-I${IDIST}/sntp -I${IDIST}/sntp/libopts



CVS commit: src/sys/arch

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:46:02 UTC 2012

Modified Files:
src/sys/arch/evbppc/conf: Makefile.walnut.inc
src/sys/arch/powerpc/conf: Makefile.powerpc

Log Message:
Make sure the walnut system_tail_extra is very last thing.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/conf/Makefile.walnut.inc
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/conf/Makefile.powerpc

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/evbppc/conf/Makefile.walnut.inc
diff -u src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.5 src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.6
--- src/sys/arch/evbppc/conf/Makefile.walnut.inc:1.5	Sat Oct 30 03:46:03 2010
+++ src/sys/arch/evbppc/conf/Makefile.walnut.inc	Wed Feb  1 21:46:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.walnut.inc,v 1.5 2010/10/30 03:46:03 uebayasi Exp $
+#	$NetBSD: Makefile.walnut.inc,v 1.6 2012/02/01 21:46:02 matt Exp $
 
 MKIMG?=	${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh
 CFLAGS+=-mcpu=403
@@ -8,7 +8,7 @@ TEXTADDR?=	25000
 SYSTEM_FIRST_OBJ=	walnut_start.o
 SYSTEM_FIRST_SFILE=	${THISPPC}/walnut/walnut_start.S
 
-SYSTEM_LD_TAIL_EXTRA+=; \
+SYSTEM_LD_TAIL_EXTRA_EXTRA+=; \
 	echo ${MKIMG} $@ $@.img ; \
 	OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; export OBJDUMP OBJCOPY; \
 		${MKIMG} $@ $@.img

Index: src/sys/arch/powerpc/conf/Makefile.powerpc
diff -u src/sys/arch/powerpc/conf/Makefile.powerpc:1.48 src/sys/arch/powerpc/conf/Makefile.powerpc:1.49
--- src/sys/arch/powerpc/conf/Makefile.powerpc:1.48	Thu Jun 30 18:17:11 2011
+++ src/sys/arch/powerpc/conf/Makefile.powerpc	Wed Feb  1 21:46:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.powerpc,v 1.48 2011/06/30 18:17:11 matt Exp $
+#	$NetBSD: Makefile.powerpc,v 1.49 2012/02/01 21:46:02 matt Exp $
 #
 # Makefile for NetBSD
 #
@@ -117,6 +117,10 @@ EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.K
 .endif
 .endif
 
+.if !empty(SYSTEM_LD_TAIL_EXTRA_EXTRA)
+SYSTEM_LD_TAIL_EXTRA+= ${SYSTEM_LD_TAIL_EXTRA_EXTRA}
+.endif
+
 ##
 ## (6) port specific target dependencies
 ##



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

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:47:17 UTC 2012

Modified Files:
src/sys/arch/evbppc/conf: WALNUT

Log Message:
Add tmpfs


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/evbppc/conf/WALNUT

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/evbppc/conf/WALNUT
diff -u src/sys/arch/evbppc/conf/WALNUT:1.57 src/sys/arch/evbppc/conf/WALNUT:1.58
--- src/sys/arch/evbppc/conf/WALNUT:1.57	Wed Feb  1 10:04:55 2012
+++ src/sys/arch/evbppc/conf/WALNUT	Wed Feb  1 21:47:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: WALNUT,v 1.57 2012/02/01 10:04:55 he Exp $
+#	$NetBSD: WALNUT,v 1.58 2012/02/01 21:47:17 matt Exp $
 #
 #	GENERIC -- everything that's currently supported
 #
@@ -75,6 +75,7 @@ file-system 	NULLFS		# loopback file sys
 file-system 	OVERLAY		# overlay file system
 file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
 file-system 	PROCFS		# /proc
+file-system 	TMPFS		# efficient memory file system
 file-system 	UMAPFS		# NULLFS + uid and gid remapping
 file-system 	UNION		# union file system
 file-system	PTYFS		# /dev/pts/N support



CVS commit: src/sys/arch/macppc/stand/ofwboot

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:48:22 UTC 2012

Modified Files:
src/sys/arch/macppc/stand/ofwboot: ofdev.c

Log Message:
Allow ofwboot to read files from FAT(dosfs).


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/macppc/stand/ofwboot/ofdev.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/macppc/stand/ofwboot/ofdev.c
diff -u src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.24 src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.25
--- src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.24	Thu Jul  7 01:26:55 2011
+++ src/sys/arch/macppc/stand/ofwboot/ofdev.c	Wed Feb  1 21:48:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.24 2011/07/07 01:26:55 mrg Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.25 2012/02/01 21:48:22 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -48,6 +48,7 @@
 #include lib/libsa/stand.h
 #include lib/libsa/byteorder.h
 #include lib/libsa/cd9660.h
+#include lib/libsa/dosfs.h
 #include lib/libsa/nfs.h
 #include lib/libsa/ufs.h
 #include lib/libsa/lfs.h
@@ -122,8 +123,9 @@ static struct fs_ops file_system_hfs = F
 static struct fs_ops file_system_ustarfs = FS_OPS(ustarfs);
 static struct fs_ops file_system_cd9660 = FS_OPS(cd9660);
 static struct fs_ops file_system_nfs = FS_OPS(nfs);
+static struct fs_ops file_system_dosfs = FS_OPS(dosfs);
 
-struct fs_ops file_system[8];
+struct fs_ops file_system[9];
 int nfsys;
 
 static struct of_dev ofdev = {
@@ -473,7 +475,8 @@ devopen(struct open_file *of, const char
 		file_system[4] = file_system_ustarfs;
 		file_system[5] = file_system_cd9660;
 		file_system[6] = file_system_hfs;
-		nfsys = 7;
+		file_system[7] = file_system_dosfs;
+		nfsys = 8;
 		return 0;
 	}
 	if (!strcmp(buf, network)) {



CVS commit: src/sys/kern

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:49:52 UTC 2012

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

Log Message:
Use kmem instead of malloc.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 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.33 src/sys/kern/exec_elf.c:1.34
--- src/sys/kern/exec_elf.c:1.33	Sat Nov 19 22:51:25 2011
+++ src/sys/kern/exec_elf.c	Wed Feb  1 21:49:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.33 2011/11/19 22:51:25 tls Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.34 2012/02/01 21:49:52 matt 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.33 2011/11/19 22:51:25 tls Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.34 2012/02/01 21:49:52 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -65,7 +65,6 @@ __KERNEL_RCSID(1, $NetBSD: exec_elf.c,v
 
 #include sys/param.h
 #include sys/proc.h
-#include sys/malloc.h
 #include sys/kmem.h
 #include sys/namei.h
 #include sys/vnode.h
@@ -242,7 +241,7 @@ elf_copyargs(struct lwp *l, struct exec_
 			a++;
 		}
 
-		free(ap, M_TEMP);
+		kmem_free(ap, sizeof(*ap));
 		pack-ep_emul_arg = NULL;
 	}
 
@@ -782,7 +781,7 @@ exec_elf_makecmds(struct lwp *l, struct 
 		}
 	}
 	if (interp || (epp-ep_flags  EXEC_FORCEAUX) != 0) {
-		ap = malloc(sizeof(struct elf_args), M_TEMP, M_WAITOK);
+		ap = kmem_alloc(sizeof(*ap), KM_SLEEP);
 		ap-arg_interp = (vaddr_t)NULL;
 	}
 
@@ -829,7 +828,7 @@ bad:
 	if (interp)
 		PNBUF_PUT(interp);
 	if (ap)
-		free(ap, M_TEMP);
+		kmem_free(ap, sizeof(*ap));
 	kmem_free(ph, phsize);
 	kill_vmcmds(epp-ep_vmcmds);
 	return error;



CVS commit: src/etc/etc.evbppc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:56:40 UTC 2012

Modified Files:
src/etc/etc.evbppc: Makefile.inc

Log Message:
Build the INSTALL kernels for the P2020DS and P2020RDB


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/etc/etc.evbppc/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/etc/etc.evbppc/Makefile.inc
diff -u src/etc/etc.evbppc/Makefile.inc:1.8 src/etc/etc.evbppc/Makefile.inc:1.9
--- src/etc/etc.evbppc/Makefile.inc:1.8	Tue Jun  7 17:30:18 2011
+++ src/etc/etc.evbppc/Makefile.inc	Wed Feb  1 21:56:40 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.8 2011/06/07 17:30:18 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.9 2012/02/01 21:56:40 matt Exp $
 #
 #	etc.evbppc/Makefile.inc -- evbppc-specific etc Makefile targets
 #
@@ -12,3 +12,4 @@ KERNEL_SETS+=		MPC8536DS MPC8548CDS P202
 KERNEL_SUFFIXES=	img
 
 BUILD_KERNELS=		INSTALL_WALNUT INSTALL_OPENBLOCKS266 INSTALL_PMPPC
+BUILD_KERNELS+=		INSTALL_P202DS INSTALL_P202RDB



CVS commit: src/distrib/evbppc/ramdisk

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 21:57:14 UTC 2012

Modified Files:
src/distrib/evbppc/ramdisk: Makefile

Log Message:
Put ld0/ld1 on the ramdisk (for sdmmc).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/evbppc/ramdisk/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/evbppc/ramdisk/Makefile
diff -u src/distrib/evbppc/ramdisk/Makefile:1.10 src/distrib/evbppc/ramdisk/Makefile:1.11
--- src/distrib/evbppc/ramdisk/Makefile:1.10	Mon Jun 20 21:39:18 2011
+++ src/distrib/evbppc/ramdisk/Makefile	Wed Feb  1 21:57:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2011/06/20 21:39:18 matt Exp $
+#	$NetBSD: Makefile,v 1.11 2012/02/01 21:57:13 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -21,6 +21,7 @@ IMAGEDEPENDS=	${CRUNCHBIN} \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services
 MAKEDEVTARGETS=	std md0 wd0 wd1 wd2 wd3 cd0 cd1 sd0 sd1 sd2 sd3 st0 pty0 ttyv0
+MAKEDEVTARGETS+= ld0 ld1
 
 # Use stubs to eliminate some large stuff from libc
 HACKSRC=	${DISTRIBDIR}/utils/libhack



CVS commit: src/distrib/evbppc/ramdisk

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 22:25:47 UTC 2012

Modified Files:
src/distrib/evbppc/ramdisk: list

Log Message:
Add ext2/msdos support, allow mount from udf, add flashctl.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/evbppc/ramdisk/list

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

Modified files:

Index: src/distrib/evbppc/ramdisk/list
diff -u src/distrib/evbppc/ramdisk/list:1.17 src/distrib/evbppc/ramdisk/list:1.18
--- src/distrib/evbppc/ramdisk/list:1.17	Thu Aug 11 08:39:42 2011
+++ src/distrib/evbppc/ramdisk/list	Wed Feb  1 22:25:46 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.17 2011/08/11 08:39:42 matt Exp $
+#	$NetBSD: list,v 1.18 2012/02/01 22:25:46 matt Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin
 
@@ -30,15 +30,22 @@ PROG	sbin/dmesg
 PROG	sbin/fdisk
 PROG	sbin/fsck
 PROG	sbin/fsck_ffs
+PROG	sbin/fsck_ext2fs
+PROG	sbin/fsck_msdos
 PROG	sbin/ifconfig
 PROG	sbin/init
 PROG	sbin/mknod
 PROG	sbin/mount
 PROG	sbin/mount_cd9660
+PROG	sbin/mount_ext2fs
 PROG	sbin/mount_ffs
-PROG	sbin/mount_tmpfs
+PROG	sbin/mount_msdos
 PROG	sbin/mount_nfs
+PROG	sbin/mount_tmpfs
+PROG	sbin/mount_udf
 PROG	sbin/newfs	sbin/mount_mfs
+PROG	sbin/newfs_ext2fs
+PROG	sbin/newfs_msdos
 PROG	sbin/ping
 PROG	sbin/reboot	sbin/halt
 PROG	sbin/restore	sbin/rrestore
@@ -56,6 +63,7 @@ PROG	usr/bin/vmstat
 PROG	usr/bin/netstat
 
 PROG	usr/sbin/chroot
+PROG	usr/sbin/flashctl
 
 # init invokes the shell as -sh
 ARGVLN	sh	-sh



CVS commit: src/sys/dev/sdmmc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 22:34:43 UTC 2012

Modified Files:
src/sys/dev/sdmmc: files.sdmmc ld_sdmmc.c sdmmc.c sdmmc_cis.c
sdmmc_io.c sdmmc_mem.c sdmmcvar.h

Log Message:
Use opt_sdmmc.h for SDMMC_DEBUG, etc.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/sdmmc/files.sdmmc
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sdmmc/ld_sdmmc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/sdmmc/sdmmc.c \
src/sys/dev/sdmmc/sdmmcvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/sdmmc/sdmmc_cis.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/files.sdmmc
diff -u src/sys/dev/sdmmc/files.sdmmc:1.2 src/sys/dev/sdmmc/files.sdmmc:1.3
--- src/sys/dev/sdmmc/files.sdmmc:1.2	Sun Jun 28 11:17:39 2009
+++ src/sys/dev/sdmmc/files.sdmmc	Wed Feb  1 22:34:42 2012
@@ -1,9 +1,11 @@
-#  $NetBSD: files.sdmmc,v 1.2 2009/06/28 11:17:39 hubertf Exp $
+#  $NetBSD: files.sdmmc,v 1.3 2012/02/01 22:34:42 matt Exp $
 #  $OpenBSD: files.sdmmc,v 1.2 2006/06/01 21:53:41 uwe Exp $
 #
 # Config file and device description for machine-independent SD/MMC code.
 # Included by ports that need it.
 
+defflag	opt_sdmmc.h			SDMMC_DEBUG SDHC_DEBUG SDMMCCISDEBUG
+
 device sdmmc {}
 attach sdmmc at sdmmcbus
 file	dev/sdmmc/sdmmc.c		sdmmc

Index: src/sys/dev/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.8 src/sys/dev/sdmmc/ld_sdmmc.c:1.9
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.8	Fri Jan 27 14:28:33 2012
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Wed Feb  1 22:34:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.8 2012/01/27 14:28:33 tsutsui Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.9 2012/02/01 22:34:42 matt Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,9 +28,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.8 2012/01/27 14:28:33 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.9 2012/02/01 22:34:42 matt Exp $);
 
 #include rnd.h
+#ifdef _KERNEL_OPT
+#include opt_sdmmc.h
+#endif
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/dev/sdmmc/sdmmc.c
diff -u src/sys/dev/sdmmc/sdmmc.c:1.11 src/sys/dev/sdmmc/sdmmc.c:1.12
--- src/sys/dev/sdmmc/sdmmc.c:1.11	Thu Jan 26 02:20:12 2012
+++ src/sys/dev/sdmmc/sdmmc.c	Wed Feb  1 22:34:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc.c,v 1.11 2012/01/26 02:20:12 matt Exp $	*/
+/*	$NetBSD: sdmmc.c,v 1.12 2012/02/01 22:34:42 matt Exp $	*/
 /*	$OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $	*/
 
 /*
@@ -49,7 +49,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.11 2012/01/26 02:20:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc.c,v 1.12 2012/02/01 22:34:42 matt Exp $);
+
+#ifdef _KERNEL_OPT
+#include opt_sdmmc.h
+#endif
 
 #include sys/param.h
 #include sys/device.h
Index: src/sys/dev/sdmmc/sdmmcvar.h
diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.11 src/sys/dev/sdmmc/sdmmcvar.h:1.12
--- src/sys/dev/sdmmc/sdmmcvar.h:1.11	Wed May 18 01:07:17 2011
+++ src/sys/dev/sdmmc/sdmmcvar.h	Wed Feb  1 22:34:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmcvar.h,v 1.11 2011/05/18 01:07:17 dyoung Exp $	*/
+/*	$NetBSD: sdmmcvar.h,v 1.12 2012/02/01 22:34:43 matt Exp $	*/
 /*	$OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -20,6 +20,10 @@
 #ifndef	_SDMMCVAR_H_
 #define	_SDMMCVAR_H_
 
+#ifdef _KERNEL_OPT
+#include opt_sdmmc.h
+#endif
+
 #include sys/queue.h
 #include sys/mutex.h
 #include sys/callout.h

Index: src/sys/dev/sdmmc/sdmmc_cis.c
diff -u src/sys/dev/sdmmc/sdmmc_cis.c:1.3 src/sys/dev/sdmmc/sdmmc_cis.c:1.4
--- src/sys/dev/sdmmc/sdmmc_cis.c:1.3	Thu Oct  7 16:26:37 2010
+++ src/sys/dev/sdmmc/sdmmc_cis.c	Wed Feb  1 22:34:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_cis.c,v 1.3 2010/10/07 16:26:37 kiyohara Exp $	*/
+/*	$NetBSD: sdmmc_cis.c,v 1.4 2012/02/01 22:34:43 matt Exp $	*/
 /*	$OpenBSD: sdmmc_cis.c,v 1.1 2006/06/01 21:53:41 uwe Exp $	*/
 
 /*
@@ -20,7 +20,11 @@
 /* Routines to decode the Card Information Structure of SD I/O cards */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc_cis.c,v 1.3 2010/10/07 16:26:37 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc_cis.c,v 1.4 2012/02/01 22:34:43 matt Exp $);
+
+#ifdef _KERNEL_OPT
+#include opt_sdmmc.h
+#endif
 
 #include sys/param.h
 #include sys/systm.h

Index: src/sys/dev/sdmmc/sdmmc_io.c
diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.6 src/sys/dev/sdmmc/sdmmc_io.c:1.7
--- src/sys/dev/sdmmc/sdmmc_io.c:1.6	Sun Feb 13 06:43:52 2011
+++ src/sys/dev/sdmmc/sdmmc_io.c	Wed Feb  1 22:34:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_io.c,v 1.6 2011/02/13 06:43:52 nonaka Exp $	*/
+/*	$NetBSD: sdmmc_io.c,v 1.7 2012/02/01 22:34:43 matt Exp $	*/
 /*	$OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $	*/
 
 /*
@@ -20,7 +20,11 @@
 /* Routines for SD I/O cards. */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: 

CVS commit: src/sys/dev/sdmmc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 22:35:30 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdhcreg.h

Log Message:
Add some more FreeScale ESDHC defintions.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/sdmmc/sdhcreg.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/sdmmc/sdhcreg.h
diff -u src/sys/dev/sdmmc/sdhcreg.h:1.3 src/sys/dev/sdmmc/sdhcreg.h:1.4
--- src/sys/dev/sdmmc/sdhcreg.h:1.3	Wed Jun 29 06:21:16 2011
+++ src/sys/dev/sdmmc/sdhcreg.h	Wed Feb  1 22:35:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcreg.h,v 1.3 2011/06/29 06:21:16 matt Exp $	*/
+/*	$NetBSD: sdhcreg.h,v 1.4 2012/02/01 22:35:30 matt Exp $	*/
 /*	$OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $	*/
 
 /*
@@ -73,6 +73,7 @@
 #define  SDHC_CMD_INHIBIT_MASK		0x0003
 #define SDHC_HOST_CTL			0x28
 #define  SDHC_HIGH_SPEED		(12)
+#define  SDHC_8BIT_MODE			(12)	/* ESDHC */
 #define  SDHC_4BIT_MODE			(11)
 #define  SDHC_LED_ON			(10)
 #define SDHC_POWER_CTL			0x29
@@ -95,6 +96,7 @@
 #define SDHC_TIMEOUT_CTL		0x2e
 #define  SDHC_TIMEOUT_MAX		0x0e
 #define SDHC_SOFTWARE_RESET		0x2f
+#define  SDHC_INIT_ACTIVE		(13)
 #define  SDHC_RESET_MASK		0x5
 #define  SDHC_RESET_DAT			(12)
 #define  SDHC_RESET_CMD			(11)
@@ -159,6 +161,8 @@
 #define  SDHC_SPEC_VERS_MASK		0xff
 #define  SDHC_VENDOR_VERS_SHIFT		8
 #define  SDHC_VENDOR_VERS_MASK		0xff
+#define	SDHC_DMA_CTL			0x40c	/* eSDHC */
+#define	 SDHC_DMA_SNOOP			0x40
 
 /* SDHC_CAPABILITIES decoding */
 #define SDHC_BASE_FREQ_KHZ(cap)		\



CVS commit: src/external/bsd/ntp/dist

2012-02-01 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 22:48:16 UTC 2012

Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_request.c
src/external/bsd/ntp/dist/ntpdc: ntpdc.c
src/external/bsd/ntp/dist/ntpq: ntpq.c

Log Message:
cleanup printf fmt differences between i386/amd64


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/ntpd/ntp_request.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/ntpdc/ntpdc.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/ntpq/ntpq.c

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

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_request.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.6 src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.7
--- src/external/bsd/ntp/dist/ntpd/ntp_request.c:1.6	Wed Feb  1 07:46:22 2012
+++ src/external/bsd/ntp/dist/ntpd/ntp_request.c	Wed Feb  1 22:48:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_request.c,v 1.6 2012/02/01 07:46:22 kardel Exp $	*/
+/*	$NetBSD: ntp_request.c,v 1.7 2012/02/01 22:48:15 kardel Exp $	*/
 
 /*
  * ntp_request.c - respond to information requests
@@ -584,13 +584,13 @@ process_private(
 		 */
 		if (!INFO_IS_AUTH(inpkt-auth_seq) || !info_auth_keyid
 		|| ntohl(tailinpkt-keyid) != info_auth_keyid) {
-			DPRINTF(5, (failed auth %d info_auth_keyid %u pkt keyid %u maclen %zu\n,
+			DPRINTF(5, (failed auth %d info_auth_keyid %u pkt keyid %u maclen %lu\n,
 INFO_IS_AUTH(inpkt-auth_seq),
 info_auth_keyid,
 ntohl(tailinpkt-keyid), (u_long)mac_len));
 #ifdef DEBUG
 			msyslog(LOG_DEBUG,
-process_private: failed auth %d info_auth_keyid %u pkt keyid %u maclen %zu\n,
+process_private: failed auth %d info_auth_keyid %u pkt keyid %u maclen %lu\n,
 INFO_IS_AUTH(inpkt-auth_seq),
 info_auth_keyid,
 ntohl(tailinpkt-keyid), (u_long)mac_len);

Index: src/external/bsd/ntp/dist/ntpdc/ntpdc.c
diff -u src/external/bsd/ntp/dist/ntpdc/ntpdc.c:1.4 src/external/bsd/ntp/dist/ntpdc/ntpdc.c:1.5
--- src/external/bsd/ntp/dist/ntpdc/ntpdc.c:1.4	Wed Feb  1 07:46:23 2012
+++ src/external/bsd/ntp/dist/ntpdc/ntpdc.c	Wed Feb  1 22:48:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpdc.c,v 1.4 2012/02/01 07:46:23 kardel Exp $	*/
+/*	$NetBSD: ntpdc.c,v 1.5 2012/02/01 22:48:15 kardel Exp $	*/
 
 /*
  * ntpdc - control and monitor your ntpd daemon
@@ -1782,7 +1782,7 @@ keytype(
 	int		key_type;
 
 	if (!pcmd-nargs) {
-		fprintf(fp, keytype is %s with %zu octet digests\n,
+		fprintf(fp, keytype is %s with %lu octet digests\n,
 			keytype_name(info_auth_keytype),
 			(u_long)info_auth_hashlen);
 		return;

Index: src/external/bsd/ntp/dist/ntpq/ntpq.c
diff -u src/external/bsd/ntp/dist/ntpq/ntpq.c:1.5 src/external/bsd/ntp/dist/ntpq/ntpq.c:1.6
--- src/external/bsd/ntp/dist/ntpq/ntpq.c:1.5	Wed Feb  1 20:48:01 2012
+++ src/external/bsd/ntp/dist/ntpq/ntpq.c	Wed Feb  1 22:48:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpq.c,v 1.5 2012/02/01 20:48:01 kardel Exp $	*/
+/*	$NetBSD: ntpq.c,v 1.6 2012/02/01 22:48:15 kardel Exp $	*/
 
 /*
  * ntpq - query an NTP server using mode 6 commands
@@ -1031,9 +1031,9 @@ getresponse(
 
 		if (n  shouldbesize) {
 			printf(Response packet claims %u octets 
-payload, above %ld received\n,
+payload, above %u received\n,
 count,
-n - CTL_HEADER_LEN
+(u_int)(n - CTL_HEADER_LEN)
 );
 			return ERR_INCOMPLETE;
 		}
@@ -1083,8 +1083,8 @@ getresponse(
 		if ((int)count  (n - CTL_HEADER_LEN)) {
 			if (debug)
 printf(Received count of %d octets, 
-	data in packet is %lu\n,
-	count, n-CTL_HEADER_LEN);
+	data in packet is %u\n,
+	count, (u_int)(n-CTL_HEADER_LEN));
 			continue;
 		}
 		if (count == 0  CTL_ISMORE(rpkt.r_m_e_op)) {
@@ -2448,7 +2448,7 @@ keytype(
 	int		key_type;
 
 	if (!pcmd-nargs) {
-		fprintf(fp, keytype is %s with %zu octet digests\n,
+		fprintf(fp, keytype is %s with %lu octet digests\n,
 			keytype_name(info_auth_keytype),
 			(u_long)info_auth_hashlen);
 		return;



CVS commit: src/sys/dev/sdmmc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 22:53:20 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdhcreg.h

Log Message:
Add XLP specific CGM mode for SDHC_CLOCK_CTL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdhcreg.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/sdmmc/sdhcreg.h
diff -u src/sys/dev/sdmmc/sdhcreg.h:1.4 src/sys/dev/sdmmc/sdhcreg.h:1.5
--- src/sys/dev/sdmmc/sdhcreg.h:1.4	Wed Feb  1 22:35:30 2012
+++ src/sys/dev/sdmmc/sdhcreg.h	Wed Feb  1 22:53:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcreg.h,v 1.4 2012/02/01 22:35:30 matt Exp $	*/
+/*	$NetBSD: sdhcreg.h,v 1.5 2012/02/01 22:53:19 matt Exp $	*/
 /*	$OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $	*/
 
 /*
@@ -88,6 +88,9 @@
 #define SDHC_CLOCK_CTL			0x2c
 #define  SDHC_SDCLK_DIV_SHIFT		8
 #define  SDHC_SDCLK_DIV_MASK		0xff
+#define  SDHC_SDCLK_XDIV_SHIFT		6
+#define  SDHC_SDCLK_XDIV_MASK		0x3
+#define  SDHC_SDCLK_CGM			(15)
 #define  SDHC_SDCLK_DVS_SHIFT		4
 #define  SDHC_SDCLK_DVS_MASK		0xf
 #define  SDHC_SDCLK_ENABLE		(12)



CVS commit: src/sys/dev/sdmmc

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 23:03:30 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdhcvar.h

Log Message:
Add more FLAGS


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/sdhcvar.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/sdmmc/sdhcvar.h
diff -u src/sys/dev/sdmmc/sdhcvar.h:1.5 src/sys/dev/sdmmc/sdhcvar.h:1.6
--- src/sys/dev/sdmmc/sdhcvar.h:1.5	Wed Jun 29 06:21:16 2011
+++ src/sys/dev/sdmmc/sdhcvar.h	Wed Feb  1 23:03:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcvar.h,v 1.5 2011/06/29 06:21:16 matt Exp $	*/
+/*	$NetBSD: sdhcvar.h,v 1.6 2012/02/01 23:03:30 matt Exp $	*/
 /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
 
 /*
@@ -37,9 +37,12 @@ struct sdhc_softc {
 	uint32_t		sc_flags;
 #define	SDHC_FLAG_USE_DMA	0x0001
 #define	SDHC_FLAG_FORCE_DMA	0x0002
-#define	SDHC_FLAG_NO_PWR0	0x0004
-#define	SDHC_FLAG_HAVE_DVS	0x0008
-#define	SDHC_FLAG_32BIT_ACCESS	0x0010
+#define	SDHC_FLAG_NO_PWR0	0x0004	/* Freescale ESDHC */
+#define	SDHC_FLAG_HAVE_DVS	0x0008	/* Freescale ESDHC */
+#define	SDHC_FLAG_32BIT_ACCESS	0x0010	/* Freescale ESDHC */
+#define	SDHC_FLAG_ENHANCED	0x0020	/* Freescale ESDHC */
+#define	SDHC_FLAG_8BIT_MODE	0x0040	/* MMC 8bit mode is supported */
+#define	SDHC_FLAG_HAVE_CGM	0x0080	/* Netlogic XLP */
 	uint32_t		sc_clkbase;
 };
 



CVS commit: src/sys

2012-02-01 Thread Lars Heidieker
Module Name:src
Committed By:   para
Date:   Wed Feb  1 23:43:49 UTC 2012

Modified Files:
src/sys/kern: subr_vmem.c vfs_bio.c
src/sys/uvm: uvm_glue.c uvm_km.c uvm_pdaemon.c

Log Message:
allocate uareas and buffers from kernel_map again
add code to drain pools if kmem_arena runs out of space


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/subr_vmem.c
cvs rdiff -u -r1.235 -r1.236 src/sys/kern/vfs_bio.c
cvs rdiff -u -r1.153 -r1.154 src/sys/uvm/uvm_glue.c
cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_km.c
cvs rdiff -u -r1.104 -r1.105 src/sys/uvm/uvm_pdaemon.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/subr_vmem.c
diff -u src/sys/kern/subr_vmem.c:1.70 src/sys/kern/subr_vmem.c:1.71
--- src/sys/kern/subr_vmem.c:1.70	Mon Jan 30 17:35:18 2012
+++ src/sys/kern/subr_vmem.c	Wed Feb  1 23:43:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_vmem.c,v 1.70 2012/01/30 17:35:18 para Exp $	*/
+/*	$NetBSD: subr_vmem.c,v 1.71 2012/02/01 23:43:49 para Exp $	*/
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.70 2012/01/30 17:35:18 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.71 2012/02/01 23:43:49 para Exp $);
 
 #if defined(_KERNEL)
 #include opt_ddb.h
@@ -1245,6 +1245,11 @@ retry:
 	/* XXX */
 
 	if ((flags  VM_SLEEP) != 0) {
+#if defined(_KERNEL)  !defined(_RUMPKERNEL)
+		mutex_spin_enter(uvm_fpageqlock);
+		uvm_kick_pdaemon();
+		mutex_spin_exit(uvm_fpageqlock);
+#endif
 		VMEM_LOCK(vm);
 		VMEM_CONDVAR_WAIT(vm);
 		VMEM_UNLOCK(vm);

Index: src/sys/kern/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.235 src/sys/kern/vfs_bio.c:1.236
--- src/sys/kern/vfs_bio.c:1.235	Sat Jan 28 00:00:06 2012
+++ src/sys/kern/vfs_bio.c	Wed Feb  1 23:43:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_bio.c,v 1.235 2012/01/28 00:00:06 rmind Exp $	*/
+/*	$NetBSD: vfs_bio.c,v 1.236 2012/02/01 23:43:49 para Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.235 2012/01/28 00:00:06 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.236 2012/02/01 23:43:49 para Exp $);
 
 #include opt_bufcache.h
 
@@ -231,21 +231,18 @@ static struct vm_map *buf_map;
 static void *
 bufpool_page_alloc(struct pool *pp, int flags)
 {
-	const vm_flag_t vflags = (flags  PR_WAITOK) ? VM_SLEEP: VM_NOSLEEP;
-	vmem_addr_t va;
-	int ret;
 
-	ret = uvm_km_kmem_alloc(kmem_va_arena, MAXBSIZE,
-	vflags | VM_INSTANTFIT, va);
-
-	return ret ? NULL : (void *)va;
+	return (void *)uvm_km_alloc(buf_map,
+	MAXBSIZE, MAXBSIZE,
+	((flags  PR_WAITOK) ? 0 : UVM_KMF_NOWAIT|UVM_KMF_TRYLOCK)
+	| UVM_KMF_WIRED);
 }
 
 static void
 bufpool_page_free(struct pool *pp, void *v)
 {
 
-	uvm_km_kmem_free(kmem_va_arena, (vaddr_t)v, MAXBSIZE);
+	uvm_km_free(buf_map, (vaddr_t)v, MAXBSIZE, UVM_KMF_WIRED);
 }
 
 static struct pool_allocator bufmempool_allocator = {
@@ -491,7 +488,7 @@ bufinit(void)
 		pa = (size = PAGE_SIZE  use_std)
 			? pool_allocator_nointr
 			: bufmempool_allocator;
-		pool_init(pp, size, 0, 0, PR_NOALIGN, name, pa, IPL_NONE);
+		pool_init(pp, size, 0, 0, 0, name, pa, IPL_NONE);
 		pool_setlowat(pp, 1);
 		pool_sethiwat(pp, 1);
 	}

Index: src/sys/uvm/uvm_glue.c
diff -u src/sys/uvm/uvm_glue.c:1.153 src/sys/uvm/uvm_glue.c:1.154
--- src/sys/uvm/uvm_glue.c:1.153	Fri Jan 27 19:48:41 2012
+++ src/sys/uvm/uvm_glue.c	Wed Feb  1 23:43:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_glue.c,v 1.153 2012/01/27 19:48:41 para Exp $	*/
+/*	$NetBSD: uvm_glue.c,v 1.154 2012/02/01 23:43:49 para Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.153 2012/01/27 19:48:41 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.154 2012/02/01 23:43:49 para Exp $);
 
 #include opt_kgdb.h
 #include opt_kstack.h
@@ -240,15 +240,26 @@ static pool_cache_t uvm_uarea_system_cac
 static void *
 uarea_poolpage_alloc(struct pool *pp, int flags)
 {
-	if (USPACE_ALIGN == 0) {
-		int rc;
-		vmem_addr_t va;
-
-		rc = uvm_km_kmem_alloc(kmem_va_arena, USPACE,
-		((flags  PR_WAITOK) ? VM_SLEEP: VM_NOSLEEP) |
-		VM_INSTANTFIT, va);
-		return (rc != 0) ? NULL : (void *)va;
+#if defined(PMAP_MAP_POOLPAGE)
+	if (USPACE == PAGE_SIZE  USPACE_ALIGN == 0) {
+		struct vm_page *pg;
+		vaddr_t va;
+
+#if defined(PMAP_ALLOC_POOLPAGE)
+		pg = PMAP_ALLOC_POOLPAGE(
+		   ((flags  PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+#else
+		pg = uvm_pagealloc(NULL, 0, NULL,
+		   ((flags  PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+#endif
+		if (pg == NULL)
+			return NULL;
+		va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg));
+		if (va == 0)
+			uvm_pagefree(pg);
+		return (void *)va;
 	}
+#endif
 #if defined(__HAVE_CPU_UAREA_ROUTINES)
 	

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb  2 00:21:00 UTC 2012

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_machdep.c

Log Message:
Fix XLP case where we weren't copying mem_clusters to avail_clusters.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_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/mips/rmi/rmixl_machdep.c
diff -u src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.2 src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.2	Fri Jan 27 21:23:31 2012
+++ src/sys/arch/mips/rmi/rmixl_machdep.c	Thu Feb  2 00:21:00 2012
@@ -1122,6 +1122,8 @@ rmixlp_physaddr_dram_init(struct extent 
 	}
 
 	mem_cluster_cnt = mp - mem_clusters;
+	avail_cluster_cnt = mem_cluster_cnt;
+	memcpy(avail_clusters, mem_clusters, sizeof(avail_clusters));
 	return memsize;
 }
 #endif /* MIPS64_XLP */



CVS commit: src/sys/kern

2012-02-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb  2 02:44:07 UTC 2012

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

Log Message:
Disable PTRACE_FORK for vforked() children, because the parent is waiting
and will not receive the SIGTRAP in time.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/kern/kern_fork.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_fork.c
diff -u src/sys/kern/kern_fork.c:1.186 src/sys/kern/kern_fork.c:1.187
--- src/sys/kern/kern_fork.c:1.186	Fri Sep  2 16:06:29 2011
+++ src/sys/kern/kern_fork.c	Wed Feb  1 21:44:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_fork.c,v 1.186 2011/09/02 20:06:29 christos Exp $	*/
+/*	$NetBSD: kern_fork.c,v 1.187 2012/02/02 02:44:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.186 2011/09/02 20:06:29 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.187 2012/02/02 02:44:06 christos Exp $);
 
 #include opt_ktrace.h
 
@@ -460,8 +460,12 @@ fork1(struct lwp *l1, int flags, int exi
 	LIST_INSERT_HEAD(parent-p_children, p2, p_sibling);
 	p2-p_exitsig = exitsig;		/* signal for parent on exit */
 
+	/*
+	 * We don't want to tracefork vfork()ed processes because they
+	 * will not receive the SIGTRAP until it is too late.
+	 */
 	tracefork = (p1-p_slflag  (PSL_TRACEFORK|PSL_TRACED)) ==
-	(PSL_TRACEFORK|PSL_TRACED);
+	(PSL_TRACEFORK|PSL_TRACED)  (flags  FORK_PPWAIT) == 0;
 	if (tracefork) {
 		p2-p_slflag |= PSL_TRACED;
 		p2-p_opptr = p2-p_pptr;



CVS commit: src/sys/dev/i2c

2012-02-01 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Feb  2 02:47:59 UTC 2012

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

Log Message:
Clean up display of initial hardware provided limits.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/i2c/sdtemp.c

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

Modified files:

Index: src/sys/dev/i2c/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.20 src/sys/dev/i2c/sdtemp.c:1.21
--- src/sys/dev/i2c/sdtemp.c:1.20	Sun Oct  2 19:03:56 2011
+++ src/sys/dev/i2c/sdtemp.c	Thu Feb  2 02:47:59 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: sdtemp.c,v 1.20 2011/10/02 19:03:56 jmcneill Exp $*/
+/*  $NetBSD: sdtemp.c,v 1.21 2012/02/02 02:47:59 pgoyette Exp $*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdtemp.c,v 1.20 2011/10/02 19:03:56 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdtemp.c,v 1.21 2012/02/02 02:47:59 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -283,27 +283,24 @@ sdtemp_attach(device_t parent, device_t 
 	/* Retrieve and display hardware monitor limits */
 	sdtemp_get_limits(sc-sc_sme, sc-sc_sensor, sc-sc_deflims,
 	sc-sc_defprops);
-	aprint_normal(%s: , device_xname(self));
+	aprint_normal_dev(self, Hardware limits: );
 	i = 0;
 	if (sc-sc_defprops  PROP_WARNMIN) {
-		aprint_normal(low limit %dC,
+		aprint_normal(low %dC,
 		  __UK2C(sc-sc_deflims.sel_warnmin));
 		i++;
 	}
 	if (sc-sc_defprops  PROP_WARNMAX) {
-		aprint_normal(%shigh limit %dC , (i)?, :,
+		aprint_normal(%shigh %dC , (i)?, :,
 			  __UK2C(sc-sc_deflims.sel_warnmax));
 		i++;
 	}
 	if (sc-sc_defprops  PROP_CRITMAX) {
-		aprint_normal(%scritical limit %dC , (i)?, :,
+		aprint_normal(%scritical %dC , (i)?, :,
 			  __UK2C(sc-sc_deflims.sel_critmax));
 		i++;
 	}
-	if (i == 0)
-		aprint_normal(no hardware limits set\n);
-	else
-		aprint_normal(\n);
+	aprint_normal(%s\n, (i)?:none set);
 
 	return;
 



CVS commit: src/sys/ufs/ufs

2012-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb  2 03:00:49 UTC 2012

Modified Files:
src/sys/ufs/ufs: ufs_quota1.c

Log Message:
Make this compile on vax (uninitialized use warning).


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

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

Modified files:

Index: src/sys/ufs/ufs/ufs_quota1.c
diff -u src/sys/ufs/ufs/ufs_quota1.c:1.17 src/sys/ufs/ufs/ufs_quota1.c:1.18
--- src/sys/ufs/ufs/ufs_quota1.c:1.17	Wed Feb  1 05:43:54 2012
+++ src/sys/ufs/ufs/ufs_quota1.c	Thu Feb  2 03:00:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota1.c,v 1.17 2012/02/01 05:43:54 dholland Exp $	*/
+/*	$NetBSD: ufs_quota1.c,v 1.18 2012/02/02 03:00:48 matt Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_quota1.c,v 1.17 2012/02/01 05:43:54 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_quota1.c,v 1.18 2012/02/02 03:00:48 matt Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -611,19 +611,17 @@ quota1_handle_cmd_put(struct ufsmount *u
 	dqb.dqb_curinodes = dq-dq_curinodes;
 	dqb.dqb_btime = dq-dq_btime;
 	dqb.dqb_itime = dq-dq_itime;
-	switch (key-qk_objtype) {
-	case QUOTA_OBJTYPE_BLOCKS:
+	if (key-qk_objtype == QUOTA_OBJTYPE_BLOCKS) {
 		dqb.dqb_bsoftlimit = quota1_encode_limit(val-qv_softlimit);
 		dqb.dqb_bhardlimit = quota1_encode_limit(val-qv_hardlimit);
 		dqb.dqb_isoftlimit = dq-dq_isoftlimit;
 		dqb.dqb_ihardlimit = dq-dq_ihardlimit;
-		break;
-	case QUOTA_OBJTYPE_FILES:
+	} else {
+		KASSERT(key-qk_objtype == QUOTA_OBJTYPE_FILES);
 		dqb.dqb_bsoftlimit = dq-dq_bsoftlimit;
 		dqb.dqb_bhardlimit = dq-dq_bhardlimit;
 		dqb.dqb_isoftlimit = quota1_encode_limit(val-qv_softlimit);
 		dqb.dqb_ihardlimit = quota1_encode_limit(val-qv_hardlimit);
-		break;
 	}
 	if (dq-dq_id == 0  val-qv_grace != QUOTA_NOTIME) {
 		/* also update grace time if available */



CVS commit: src/libexec/lfs_cleanerd

2012-02-01 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Thu Feb  2 03:47:11 UTC 2012

Modified Files:
src/libexec/lfs_cleanerd: lfs_cleanerd.c

Log Message:
Shut down the cleaner earlier if the filesystem is unmounted.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/libexec/lfs_cleanerd/lfs_cleanerd.c

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

Modified files:

Index: src/libexec/lfs_cleanerd/lfs_cleanerd.c
diff -u src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.28 src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.29
--- src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.28	Mon Jan  2 21:35:18 2012
+++ src/libexec/lfs_cleanerd/lfs_cleanerd.c	Thu Feb  2 03:47:11 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.28 2012/01/02 21:35:18 perseant Exp $	 */
+/* $NetBSD: lfs_cleanerd.c,v 1.29 2012/02/02 03:47:11 perseant Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -1158,6 +1158,12 @@ clean_fs(struct clfs *fs, CLEANERINFO *c
 fd_release_all(fs-clfs_devvp);
 return r;
 			}
+			if (oerrno == ESHUTDOWN) {
+syslog(LOG_NOTICE, %s: filesystem unmounted,
+   fs-lfs_fsmnt);
+fd_release_all(fs-clfs_devvp);
+return r;
+			}
 		}
 	}
 



CVS commit: src/sbin/newfs_lfs

2012-02-01 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Thu Feb  2 03:49:22 UTC 2012

Modified Files:
src/sbin/newfs_lfs: newfs.c

Log Message:
If invoked with -D and creating an image file, ensure that the image
file is filled to the given size.  This prevents false failures
with lfs: ifile read: 22 in ATF tests.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/newfs_lfs/newfs.c

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

Modified files:

Index: src/sbin/newfs_lfs/newfs.c
diff -u src/sbin/newfs_lfs/newfs.c:1.25 src/sbin/newfs_lfs/newfs.c:1.26
--- src/sbin/newfs_lfs/newfs.c:1.25	Tue Feb 16 23:20:30 2010
+++ src/sbin/newfs_lfs/newfs.c	Thu Feb  2 03:49:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs.c,v 1.25 2010/02/16 23:20:30 mlelstv Exp $	*/
+/*	$NetBSD: newfs.c,v 1.26 2012/02/02 03:49:22 perseant Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1992, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)newfs.c	8.5 (Berkeley) 5/24/95;
 #else
-__RCSID($NetBSD: newfs.c,v 1.25 2010/02/16 23:20:30 mlelstv Exp $);
+__RCSID($NetBSD: newfs.c,v 1.26 2012/02/02 03:49:22 perseant Exp $);
 #endif
 #endif /* not lint */
 
@@ -275,8 +275,18 @@ main(int argc, char **argv)
 		special = device;
 	}
 	if (!Nflag) {
-		fso = open(special,
-		(debug ? O_CREAT : 0) | O_RDWR, DEFFILEMODE);
+		fso = open(special, O_RDWR, DEFFILEMODE);
+		if (debug  fso  0) {
+			/* Create a file of the requested size. */
+			fso = open(special, O_CREAT | O_RDWR, DEFFILEMODE);
+			if (fso = 0) {
+char buf[512];
+int i;
+for (i = 0; i  fssize; i++)
+	write(fso, buf, sizeof(buf));
+lseek(fso, 0, SEEK_SET);
+			}
+		}
 		if (fso  0)
 			fatal(%s: %s, special, strerror(errno));
 	} else



CVS commit: src/sbin/newfs_lfs

2012-02-01 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Thu Feb  2 03:50:32 UTC 2012

Modified Files:
src/sbin/newfs_lfs: config.h make_lfs.c

Log Message:
When creating a very small filesystem, use well-known small segment,
block and fragment sizes by default instead of the ordinary 1M/8k/1k
default for larger filesystems.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/newfs_lfs/config.h
cvs rdiff -u -r1.17 -r1.18 src/sbin/newfs_lfs/make_lfs.c

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

Modified files:

Index: src/sbin/newfs_lfs/config.h
diff -u src/sbin/newfs_lfs/config.h:1.8 src/sbin/newfs_lfs/config.h:1.9
--- src/sbin/newfs_lfs/config.h:1.8	Wed Dec 17 05:08:43 2003
+++ src/sbin/newfs_lfs/config.h	Thu Feb  2 03:50:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.8 2003/12/17 05:08:43 yamt Exp $	*/
+/*	$NetBSD: config.h,v 1.9 2012/02/02 03:50:32 perseant Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -40,7 +40,7 @@
  * 1/DFL_MIN_FREE_SEGS gives the fraction of segments to be reserved for
  * the cleaner.
  */
-#define DFL_MIN_FREE_SEGS 20
+#define DFL_MIN_FREE_SEGS 10
 
 /*
  * MINFREE gives the minimum acceptable percentage of file system
@@ -69,3 +69,8 @@
 #define DFL_LFS_FFSHIFT		10
 #define DFL_LFS_FBMASK		0x7
 #define DFL_LFS_FBSHIFT		3
+
+#define SMALL_FSSIZE		65536 /* sectors */
+#define SMALL_LFSSEG		32768
+#define SMALL_LFSBLOCK		1024
+#define SMALL_LFSFRAG		512

Index: src/sbin/newfs_lfs/make_lfs.c
diff -u src/sbin/newfs_lfs/make_lfs.c:1.17 src/sbin/newfs_lfs/make_lfs.c:1.18
--- src/sbin/newfs_lfs/make_lfs.c:1.17	Tue Jan 17 16:27:19 2012
+++ src/sbin/newfs_lfs/make_lfs.c	Thu Feb  2 03:50:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: make_lfs.c,v 1.17 2012/01/17 16:27:19 perseant Exp $	*/
+/*	$NetBSD: make_lfs.c,v 1.18 2012/02/02 03:50:32 perseant Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 #if 0
 static char sccsid[] = @(#)lfs.c	8.5 (Berkeley) 5/24/95;
 #else
-__RCSID($NetBSD: make_lfs.c,v 1.17 2012/01/17 16:27:19 perseant Exp $);
+__RCSID($NetBSD: make_lfs.c,v 1.18 2012/02/02 03:50:32 perseant Exp $);
 #endif
 #endif /* not lint */
 
@@ -355,12 +355,20 @@ make_lfs(int devfd, uint secsize, struct
 		expected \%s\, dkw-dkw_ptype, DKW_PTYPE_LFS);
 	}
 
-	if (!(bsize = block_size))
+	if (!(bsize = block_size)) {
 		bsize = DFL_LFSBLOCK;
-	if (!(fsize = frag_size))
+		if (dkw-dkw_size = SMALL_FSSIZE)
+			bsize = SMALL_LFSBLOCK;
+	}
+	if (!(fsize = frag_size)) {
 		fsize = DFL_LFSFRAG;
+		if (dkw-dkw_size = SMALL_FSSIZE)
+			fsize = SMALL_LFSFRAG;
+	}
 	if (!(ssize = seg_size)) {
 		ssize = DFL_LFSSEG;
+		if (dkw-dkw_size = SMALL_FSSIZE)
+			ssize = SMALL_LFSSEG;
 	}
 	if (version  1) {
 		if (ibsize == 0)
@@ -511,7 +519,7 @@ make_lfs(int devfd, uint secsize, struct
 			segment size.\n, ssize, fs-lfs_bsize);
 	}
 	if(warned_segtoobig)
-		fprintf(stderr,Using segment size %d.\n, ssize);
+		fprintf(stderr,Using segment size %d, block size %d, frag size %d.\n, ssize, bsize, fsize);
 
 	/*
 	 * Now that we've determined what we're going to do, announce it



CVS commit: src/sys/dev/pci

2012-02-01 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb  2 07:09:53 UTC 2012

Modified Files:
src/sys/dev/pci: pm2reg.h

Log Message:
add a bunch of register definitions
not used yet but I better commit them now than have he tell me that I forgot
them when pm2fb.c starts using them


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/pm2reg.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/pm2reg.h
diff -u src/sys/dev/pci/pm2reg.h:1.5 src/sys/dev/pci/pm2reg.h:1.6
--- src/sys/dev/pci/pm2reg.h:1.5	Thu Nov 24 03:23:08 2011
+++ src/sys/dev/pci/pm2reg.h	Thu Feb  2 07:09:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm2reg.h,v 1.5 2011/11/24 03:23:08 macallan Exp $	*/
+/*	$NetBSD: pm2reg.h,v 1.6 2012/02/02 07:09:53 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -39,6 +39,13 @@
 #define PM2_INPUT_FIFO_SPACE	0x0018
 #define PM2_OUTPUT_FIFO_WORDS	0x0020
 
+#define PM2_VCLKCTL		0x0040
+#define		VCC_CLOCK_A		0x
+#define		VCC_CLOCK_B		0x0001
+#define		VCC_CLOCK_C		0x0002
+/* PCI clocks to wait between RAMDAC accesses */ 
+#define		VCC_RAMDAC_WAIT_MASK	0x03fc
+
 #define PM2_APERTURE1_CONTROL	0x0050
 #define PM2_APERTURE2_CONTROL	0x0058
 #define		PM2_AP_BYTESWAP		0x0001
@@ -60,6 +67,38 @@
 
 #define PM2_SCREEN_BASE		0x3000 /* in 64bit units */
 #define PM2_SCREEN_STRIDE	0x3008 /* in 64bit units */
+#define PM2_HTOTAL		0x3010
+#define PM2_HGATE_END		0x3018
+#define PM2_HBLANK_END		0x3020
+#define PM2_HSYNC_START		0x3028
+#define PM2_HSYNC_END		0x3030
+#define PM2_VTOTAL		0x3038
+#define PM2_VBLANK_END		0x3040
+#define PM2_VSYNC_START		0x3048
+#define PM2_VSYNC_END		0x3050
+#define PM2_VIDEO_CONTROL	0x3058
+#define 	PM2_VC_VIDEO_ENABLE	0x0001
+#define 	PM2_VC_BLANK_ACR_LOW	0x0002
+#define 	PM2_VC_LINE_DOUBLE	0x0004
+#define 	PM2_VC_HSYNC_FORCE_H	0x
+#define 	PM2_VC_HSYNC_ACT_HIGH	0x0008
+#define 	PM2_VC_HSYNC_FORCE_L	0x0010
+#define 	PM2_VC_HSYNC_ACT_LOW	0x0018
+#define 	PM2_VC_VSYNC_FORCE_H	0x
+#define 	PM2_VC_VSYNC_ACT_HIGH	0x0020
+#define 	PM2_VC_VSYNC_FORCE_L	0x0040
+#define 	PM2_VC_VSYNC_ACT_LOW	0x0060
+#define 	PM2_VC_BP_BASE_PENDING	0x0080
+#define 	PM2_VC_RE_BASE_PENDING	0x0100
+#define 	PM2_VC_SWAP_SYNC_BLANK	0x
+#define 	PM2_VC_SWAP_FREERUNNING	0x0200
+#define 	PM2_VC_SWAP_LIMIT_FR	0x0400
+#define 	PM2_VC_STEREO_ENABLE	0x0800
+#define 	PM2_VC_RIGHT_EYE_ACT_L	0x1000
+#define 	PM2_VC_DISP_RIGHT_FRAME	0x2000	/* RO, left otherwise */
+#define 	PM2_VC_BP_RIGHT_PENDING	0x4000
+#define 	PM2_VC_RE_RIGHT_PENDING	0x8000
+#define 	PM2_VC_RAMDAC_64BIT	0x0001	/* 32bit otherwise */
 
 #define PM2_DISPLAY_DATA	0x3068
 #define		PM2_DD_SDA_IN		0x0001
@@ -79,9 +118,16 @@
 #define PM2_DAC_PAL_WRITE_IDX	0x4000
 #define PM2_DAC_DATA		0x4008
 #define PM2_DAC_MASK		0x4010
-#define PM2_DAC_PAL_READ	0x4018
+#define PM2_DAC_PAL_READ_IDX	0x4018
+/* these are different on PM2V: */
 #define PM2_DAC_CURSOR_PAL	0x4020
 #define PM2_DAC_CURSOR_DATA	0x4028
+/* here we go: */
+#define PM2V_DAC_INDEX_LOW	0x4020
+#define PM2V_DAC_INDEX_HIGH	0x4028
+#define PM2V_DAC_INDEX_DATA	0x4030
+#define PM2V_DAC_INDEX_CONTROL	0x4038
+
 #define PM2_DAC_INDEX_DATA	0x4050
 #define PM2_DAC_CURSOR_RAM	0x4058
 #define PM2_DAC_CURSOR_X_LOW	0x4060
@@ -89,6 +135,78 @@
 #define PM2_DAC_CURSOR_Y_LOW	0x4070
 #define PM2_DAC_CURSOR_Y_HIGH	0x4078
 
+/* RAMDAC registers ( through INDEX_DATA */
+#define	PM2_DAC_COLOR_MODE	0x18
+#define		CM_PALETTE	0x00
+#define		CM_RGB332	0x01
+#define		CM_RGB232OFFSET	0x02
+#define		CM_RGBA2321	0x03
+#define		CM_RGBA5551	0x04
+#define		CM_RGBA	0x05
+#define		CM_RGB565	0x06
+#define		CM_RGBA	0x08
+#define		CM_RGB888	0x09
+#define		CM_GUI_DISABLE	0x10
+#define		CM_RGB		0x20	/* BGR otherwise */
+#define		CM_TRUECOLOR	0x80	/* use palette for gamma correction */
+
+#define PM2_DAC_MISC_CONTROL	0x1e
+#define		MC_POWERDOWN	0x01
+#define		MC_PALETTE_8BIT	0x02	/* 6bit otherwise */
+#define		MC_HSYNC_INV	0x04
+#define		MC_VSYNC_INV	0x08
+#define		MC_SYNCONGREEN	0x10
+#define PM2_DAC_PIXELCLKA_M	0x20
+#define PM2_DAC_PIXELCLKA_N	0x21
+#define PM2_DAC_PIXELCLKA_P	0x22
+#define 	PCLK_ENABLE	0x08
+#define PM2_DAC_PIXELCLKB_M	0x23
+#define PM2_DAC_PIXELCLKB_N	0x24
+#define PM2_DAC_PIXELCLKB_P	0x25
+#define PM2_DAC_PIXELCLKC_M	0x26
+#define PM2_DAC_PIXELCLKC_N	0x27
+#define PM2_DAC_PIXELCLKC_P	0x28
+#define PM2_DAC_PIXELCLK_STATUS	0x29
+#define		PCLK_LOCKED	0x10
+#define PM2_DAC_MEMCLK_M	0x30
+#define PM2_DAC_MEMCLK_N	0x31
+#define PM2_DAC_MEMCLK_P	0x32
+#define PM2_DAC_MEMCLK_STATUS	0x33
+
+/* PM2V RAMDAC */
+#define PM2V_DAC_MISC_CONTROL		0x000
+#define		PM2V_DAC_8BIT		0x01	/* 6bit otherwise */
+#define		PM2V_DAC_BYPASS_CLUT	0x08