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

2011-08-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Aug 22 06:52:36 UTC 2011

Modified Files:
src/external/bsd/tmux/dist: colour.c

Log Message:
Replace needless use of double math just to compare colour distances
with integer arithmetic.  Reported to and discussed with upstream maintainer.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/colour.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/tmux/dist/colour.c
diff -u src/external/bsd/tmux/dist/colour.c:1.1.1.2 src/external/bsd/tmux/dist/colour.c:1.2
--- src/external/bsd/tmux/dist/colour.c:1.1.1.2	Wed Aug 17 18:40:04 2011
+++ src/external/bsd/tmux/dist/colour.c	Mon Aug 22 06:52:35 2011
@@ -1,4 +1,4 @@
-/* $Id: colour.c,v 1.1.1.2 2011/08/17 18:40:04 jmmv Exp $ */
+/* $Id: colour.c,v 1.2 2011/08/22 06:52:35 he Exp $ */
 
 /*
  * Copyright (c) 2008 Nicholas Marriott n...@users.sourceforge.net
@@ -19,7 +19,6 @@
 #include sys/types.h
 
 #include ctype.h
-#include math.h
 #include stdlib.h
 #include string.h
 
@@ -41,7 +40,7 @@
 struct colour_rgb *colour_rgb_256;
 
 void	colour_rgb_generate256(void);
-double	colour_rgb_distance(struct colour_rgb *, struct colour_rgb *);
+u_int	colour_rgb_distance(struct colour_rgb *, struct colour_rgb *);
 int	colour_rgb_find(struct colour_rgb *);
 
 /* Generate 256 colour RGB table. */
@@ -90,8 +89,8 @@
 	}
 }
 
-/* Get colour RGB distance. */
-double
+/* Get a measure of colour RGB distance. */
+u_int
 colour_rgb_distance(struct colour_rgb *rgb1, struct colour_rgb *rgb2)
 {
 	int	r, g, b;
@@ -99,22 +98,22 @@
 	r = rgb1-r - rgb2-r;
 	g = rgb1-g - rgb2-g;
 	b = rgb1-b - rgb2-b;
-	return (sqrt(r * r + g * g + b * b));
+	return (r * r + g * g + b * b);
 }
 
 /* Work out the nearest colour from the 256 colour set. */
 int
 colour_rgb_find(struct colour_rgb *rgb)
 {
-	double	distance, lowest;
+	u_int	distance, lowest;
 	u_int	colour, i;
 
 	if (colour_rgb_256 == NULL)
 		colour_rgb_generate256();
 
 	colour = 16;
-	lowest = INFINITY;
-	for (i = 0; i  240; i++) {
+	lowest = UINT_MAX;
+	for (i = 1; i  240; i++) {
 		distance = colour_rgb_distance(colour_rgb_256[i], rgb);
 		if (distance  lowest) {
 			lowest = distance;



CVS commit: src/doc

2011-08-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug 22 08:33:24 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
file-5.08 out.


To generate a diff of this commit:
cvs rdiff -u -r1.860 -r1.861 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.860 src/doc/3RDPARTY:1.861
--- src/doc/3RDPARTY:1.860	Wed Aug 17 18:54:08 2011
+++ src/doc/3RDPARTY	Mon Aug 22 08:33:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.860 2011/08/17 18:54:08 jmmv Exp $
+#	$NetBSD: 3RDPARTY,v 1.861 2011/08/22 08:33:24 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -309,7 +309,7 @@
 
 Package:	file
 Version:	5.07
-Current Vers:	5.07
+Current Vers:	5.08
 Maintainer:	Christos Zoulas chris...@zoulas.com
 Archive Site:	ftp://ftp.astron.com/pub/file/
 Home Page:



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

2011-08-22 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Aug 22 09:19:51 UTC 2011

Modified Files:
src/external/bsd/tmux/dist: colour.c

Log Message:
Hm, upstream maintainer says loop needs to start from 0, make it so.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/colour.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/tmux/dist/colour.c
diff -u src/external/bsd/tmux/dist/colour.c:1.2 src/external/bsd/tmux/dist/colour.c:1.3
--- src/external/bsd/tmux/dist/colour.c:1.2	Mon Aug 22 06:52:35 2011
+++ src/external/bsd/tmux/dist/colour.c	Mon Aug 22 09:19:51 2011
@@ -1,4 +1,4 @@
-/* $Id: colour.c,v 1.2 2011/08/22 06:52:35 he Exp $ */
+/* $Id: colour.c,v 1.3 2011/08/22 09:19:51 he Exp $ */
 
 /*
  * Copyright (c) 2008 Nicholas Marriott n...@users.sourceforge.net
@@ -113,7 +113,7 @@
 
 	colour = 16;
 	lowest = UINT_MAX;
-	for (i = 1; i  240; i++) {
+	for (i = 0; i  240; i++) {
 		distance = colour_rgb_distance(colour_rgb_256[i], rgb);
 		if (distance  lowest) {
 			lowest = distance;



CVS commit: src/sys/arch/i386/stand/boot

2011-08-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 22 09:43:08 UTC 2011

Modified Files:
src/sys/arch/i386/stand/boot: Makefile.boot

Log Message:
disable mmx/sse here too.  hopefully fixes amd64 /boot issues.
certainly changes the output in ways that gcc 4.1 doesn't.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/stand/boot/Makefile.boot

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

Modified files:

Index: src/sys/arch/i386/stand/boot/Makefile.boot
diff -u src/sys/arch/i386/stand/boot/Makefile.boot:1.54 src/sys/arch/i386/stand/boot/Makefile.boot:1.55
--- src/sys/arch/i386/stand/boot/Makefile.boot:1.54	Fri Jul  1 01:26:16 2011
+++ src/sys/arch/i386/stand/boot/Makefile.boot	Mon Aug 22 09:43:08 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.boot,v 1.54 2011/07/01 01:26:16 mrg Exp $
+# $NetBSD: Makefile.boot,v 1.55 2011/08/22 09:43:08 mrg Exp $
 
 S=	${.CURDIR}/../../../../..
 
@@ -51,6 +51,8 @@
 .endif
 .endif
 
+CFLAGS+=   -mno-sse -mno-sse2 -mno-sse3
+
 COPTS+=-ffreestanding
 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
 CPPFLAGS+= -nostdinc -D_STANDALONE



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

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 15:26:55 UTC 2011

Modified Files:
src/sys/arch/usermode/conf: std.usermode

Log Message:
Bump NKMEMPAGES from 512 to 2048 for NetBSD/usermode. This will be sufficient
for a 128 MB amd64 machine. Might better be parameterized one day.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/conf/std.usermode

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/usermode/conf/std.usermode
diff -u src/sys/arch/usermode/conf/std.usermode:1.4 src/sys/arch/usermode/conf/std.usermode:1.5
--- src/sys/arch/usermode/conf/std.usermode:1.4	Sun Aug 21 15:08:43 2011
+++ src/sys/arch/usermode/conf/std.usermode	Mon Aug 22 15:26:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: std.usermode,v 1.4 2011/08/21 15:08:43 reinoud Exp $
+# $NetBSD: std.usermode,v 1.5 2011/08/22 15:26:55 reinoud Exp $
 
 machine usermode
 include conf/std
@@ -9,7 +9,7 @@
 options 	EXEC_SCRIPT
 
 # Defaults
-options		NKMEMPAGES=256
+options		NKMEMPAGES=2048
 #options		NKMEMPAGES_MAX_DEFAULT=2048
 
 defflag opt_xen.h	DO_NOT_DEFINE



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

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 15:27:33 UTC 2011

Modified Files:
src/sys/arch/usermode/conf: Makefile.usermode

Log Message:
Don't override -O options... we might want to build with another -O setting in
the config file.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/usermode/conf/Makefile.usermode

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/usermode/conf/Makefile.usermode
diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.11 src/sys/arch/usermode/conf/Makefile.usermode:1.12
--- src/sys/arch/usermode/conf/Makefile.usermode:1.11	Sun Aug 21 15:06:27 2011
+++ src/sys/arch/usermode/conf/Makefile.usermode	Mon Aug 22 15:27:32 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.11 2011/08/21 15:06:27 reinoud Exp $
+# $NetBSD: Makefile.usermode,v 1.12 2011/08/22 15:27:32 reinoud Exp $
 
 MACHINE_ARCH=			usermode
 USETOOLS?=			no
@@ -16,7 +16,7 @@
 ##
 USERMODE_LIBS=	-lrt
 
-DEFCOPTS=	-O2 -fno-omit-frame-pointer
+DEFCOPTS=	-fno-omit-frame-pointer
 CPPFLAGS+=	-Dusermode
 CPPFLAGS.init_main.c+=	-Dmain=kernmain
 



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

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 15:28:34 UTC 2011

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

Log Message:
Change standard settings in sys/arch/usermode/conf/GENERIC so to get a better
debugging environment.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/usermode/conf/GENERIC

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

Modified files:

Index: src/sys/arch/usermode/conf/GENERIC
diff -u src/sys/arch/usermode/conf/GENERIC:1.10 src/sys/arch/usermode/conf/GENERIC:1.11
--- src/sys/arch/usermode/conf/GENERIC:1.10	Sun Aug 21 15:08:43 2011
+++ src/sys/arch/usermode/conf/GENERIC	Mon Aug 22 15:28:34 2011
@@ -1,12 +1,12 @@
-# $NetBSD: GENERIC,v 1.10 2011/08/21 15:08:43 reinoud Exp $
+# $NetBSD: GENERIC,v 1.11 2011/08/22 15:28:34 reinoud Exp $
 
 include arch/usermode/conf/std.usermode
 
 options 	INCLUDE_CONFIG_FILE
-#ident 		GENERIC-$Revision: 1.10 $
+#ident 		GENERIC-$Revision: 1.11 $
 maxusers 	32
 
-makeoptions	DEBUG=-g3
+makeoptions	DEBUG=-O1 -g3
 
 #options 	MEMSIZE=65536	# amount of memory to allocate (in KB)
 options 	MEMSIZE=131072	# amount of memory to use for userland (in KB)
@@ -19,8 +19,8 @@
 options 	SYSVSEM
 options 	SYSVSHM
 
-#options 	DEBUG
-#options 	DIAGNOSTIC
+options 	DEBUG
+options 	DIAGNOSTIC
 #options 	LOCKDEBUG
 
 options 	COMPAT_BSDPTY



CVS commit: src/sys/arch/usermode

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 15:30:16 UTC 2011

Modified Files:
src/sys/arch/usermode/include: thunk.h
src/sys/arch/usermode/usermode: thunk.c

Log Message:
Add thunk_munmap() to NetBSD/usermode's thunk


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/include/thunk.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/usermode/thunk.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/usermode/include/thunk.h
diff -u src/sys/arch/usermode/include/thunk.h:1.8 src/sys/arch/usermode/include/thunk.h:1.9
--- src/sys/arch/usermode/include/thunk.h:1.8	Sun Aug 21 17:11:59 2011
+++ src/sys/arch/usermode/include/thunk.h	Mon Aug 22 15:30:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.8 2011/08/21 17:11:59 reinoud Exp $ */
+/* $NetBSD: thunk.h,v 1.9 2011/08/22 15:30:16 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -73,6 +73,7 @@
 
 void *	thunk_sbrk(intptr_t len);
 void *	thunk_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
+int	thunk_munmap(void *Addr, size_t len);
 int	thunk_mprotect(void *addr, size_t len, int prot);
 
 #endif /* !_ARCH_USERMODE_INCLUDE_THUNK_H */

Index: src/sys/arch/usermode/usermode/thunk.c
diff -u src/sys/arch/usermode/usermode/thunk.c:1.8 src/sys/arch/usermode/usermode/thunk.c:1.9
--- src/sys/arch/usermode/usermode/thunk.c:1.8	Sun Aug 21 17:11:59 2011
+++ src/sys/arch/usermode/usermode/thunk.c	Mon Aug 22 15:30:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.8 2011/08/21 17:11:59 reinoud Exp $ */
+/* $NetBSD: thunk.c,v 1.9 2011/08/22 15:30:16 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: thunk.c,v 1.8 2011/08/21 17:11:59 reinoud Exp $);
+__RCSID($NetBSD: thunk.c,v 1.9 2011/08/22 15:30:16 reinoud Exp $);
 
 #include machine/thunk.h
 
@@ -209,6 +209,12 @@
 }
 
 int
+thunk_munmap(void *addr, size_t len)
+{
+	return munmap(addr, len);
+}
+
+int
 thunk_mprotect(void *addr, size_t len, int prot)
 {
 	return mprotect(addr, len, prot);



CVS commit: src/sys/arch/usermode

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 15:36:23 UTC 2011

Modified Files:
src/sys/arch/usermode/include: pmap.h vmparam.h
src/sys/arch/usermode/usermode: pmap.c

Log Message:
Start NetBSD/usermode's pmap. Its using a temp file as a physical memory
backup and that should be documented in the code. A physical address is thus a
file offset(!) and a virtual address is a `normal' accesible address.

Still to do: various misc functions and pmap_extract() in special.

Credits also go to Ben Harris for his work on the Acorn26 pmap that followed
the Daemon Book recommendation for systems without real page tables on wich
this implementation is modelled after.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/include/pmap.h \
src/sys/arch/usermode/include/vmparam.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/usermode/usermode/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/usermode/include/pmap.h
diff -u src/sys/arch/usermode/include/pmap.h:1.3 src/sys/arch/usermode/include/pmap.h:1.4
--- src/sys/arch/usermode/include/pmap.h:1.3	Tue Jan 18 23:02:36 2011
+++ src/sys/arch/usermode/include/pmap.h	Mon Aug 22 15:36:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.3 2011/01/18 23:02:36 haad Exp $ */
+/* $NetBSD: pmap.h,v 1.4 2011/08/22 15:36:23 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -30,10 +30,7 @@
 #define _ARCH_USERMODE_INCLUDE_PMAP_H
 
 #define	PMAP_GROWKERNEL		1
-#define PMAP_MAP_POOLPAGE(x)	(x)
-#define PMAP_UNMAP_POOLPAGE(x)	(x)
-
-struct pmap {
-};
+//#define PMAP_MAP_POOLPAGE(x)	(x)
+//#define PMAP_UNMAP_POOLPAGE(x)	(x)
 
 #endif /* !_ARCH_USERMODE_INCLUDE_PMAP_H */
Index: src/sys/arch/usermode/include/vmparam.h
diff -u src/sys/arch/usermode/include/vmparam.h:1.3 src/sys/arch/usermode/include/vmparam.h:1.4
--- src/sys/arch/usermode/include/vmparam.h:1.3	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/vmparam.h	Mon Aug 22 15:36:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.3 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: vmparam.h,v 1.4 2011/08/22 15:36:23 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -30,21 +30,27 @@
 #define _ARCH_USERMODE_INCLUDE_VMPARAM_H
 
 #include /usr/include/machine/vmparam.h
+#include machine/pmap.h
 #include opt_memsize.h
 
-#undef VM_MIN_ADDRESS
-#define VM_MIN_ADDRESS 0
-
-#undef VM_MAX_ADDRESS
-#define VM_MAX_ADDRESS (MEMSIZE*1024)
+extern paddr_t kmem_k_start, kmem_k_end;
+extern paddr_t kmem_data_start, kmem_data_end;
+extern paddr_t kmem_ext_start, kmem_ext_end;
+extern paddr_t kmem_user_start, kmem_user_end;
 
 #undef VM_MIN_KERNEL_ADDRESS
-#define VM_MIN_KERNEL_ADDRESS	0
+#define VM_MIN_KERNEL_ADDRESS	kmem_k_start
 
 #undef VM_MAX_KERNEL_ADDRESS
-#define VM_MAX_KERNEL_ADDRESS (MEMSIZE*1024)
+#define VM_MAX_KERNEL_ADDRESS 	kmem_ext_end
+
+#undef VM_MIN_ADDRESS
+#define VM_MIN_ADDRESS		kmem_k_start
+
+#undef VM_MAX_ADDRESS
+#define VM_MAX_ADDRESS		kmem_user_end
 
 #undef VM_MAXUSER_ADDRESS
-#define VM_MAXUSER_ADDRESS (MEMSIZE*1024)
+#define VM_MAXUSER_ADDRESS	kmem_user_end
 
 #endif /* !_ARCH_USERMODE_INCLUDE_VMPARAM_H */

Index: src/sys/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.8 src/sys/arch/usermode/usermode/pmap.c:1.9
--- src/sys/arch/usermode/usermode/pmap.c:1.8	Sat Aug 13 10:31:24 2011
+++ src/sys/arch/usermode/usermode/pmap.c	Mon Aug 22 15:36:23 2011
@@ -1,7 +1,7 @@
-/* $NetBSD: pmap.c,v 1.8 2011/08/13 10:31:24 jmcneill Exp $ */
+/* $NetBSD: pmap.c,v 1.9 2011/08/22 15:36:23 reinoud Exp $ */
 
 /*-
- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
+ * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,49 +27,254 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.8 2011/08/13 10:31:24 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.9 2011/08/22 15:36:23 reinoud Exp $);
+
+#include opt_uvmhist.h
+#include opt_memsize.h
+#include opt_kmempages.h
 
 #include sys/types.h
 #include sys/param.h
 #include sys/mutex.h
 #include sys/buf.h
+#include machine/thunk.h
 
+#include uvm/uvm.h
+#include uvm/uvm_stat.h
 #include uvm/uvm_page.h
 #include uvm/uvm_pmap.h
 
-#include opt_memsize.h
 
-extern void * calloc(size_t, size_t);
+struct pv_entry {
+	struct 	pv_entry *pv_next;
+	pmap_t	pv_pmap;
+	int	pv_ppn;		/* physical page number */
+	int	pv_lpn;		/* logical page number  */
+	vm_prot_t	pv_prot;	/* logical protection */
+	int		pv_mmap_ppl;	/* programmed protection */
+	uint8_t		pv_vflags;	/* per mapping flags */
+#define PV_WIRED	0x01		/* wired mapping */
+#define PV_UNMANAGED	0x02		/* entered by pmap_kenter_ */
+	uint8_t		pv_pflags;	/* per phys page flags */
+#define PV_REFERENCED	0x01
+#define PV_MODIFIED	0x02
+};

CVS commit: src/sys/arch/usermode/usermode

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 16:22:17 UTC 2011

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

Log Message:
Implement pmap_extract() and print pmap_zero_page() pa address.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/usermode/usermode/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/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.9 src/sys/arch/usermode/usermode/pmap.c:1.10
--- src/sys/arch/usermode/usermode/pmap.c:1.9	Mon Aug 22 15:36:23 2011
+++ src/sys/arch/usermode/usermode/pmap.c	Mon Aug 22 16:22:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.9 2011/08/22 15:36:23 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.10 2011/08/22 16:22:16 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.9 2011/08/22 15:36:23 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.10 2011/08/22 16:22:16 reinoud Exp $);
 
 #include opt_uvmhist.h
 #include opt_memsize.h
@@ -387,7 +387,8 @@
 pmap_page_activate(struct pv_entry *pv)
 {
 	paddr_t pa = pv-pv_ppn * PAGE_SIZE;
-	vaddr_t va = pv-pv_lpn * PAGE_SIZE + kmem_k_start;
+	vaddr_t va = pv-pv_lpn * PAGE_SIZE + kmem_k_start; /* XXX V-A make new var */
+
 	void *addr;
 
 	addr = thunk_mmap((void *) va, PAGE_SIZE, pv-pv_mmap_ppl,
@@ -448,7 +449,7 @@
 
 	/* to page numbers */
 	ppn = atop(pa);
-	lpn = atop(va - kmem_k_start);	/* XXX make new var */
+	lpn = atop(va - kmem_k_start);	/* XXX V-A make new var */
 #ifdef DIAGNOSTIC
 	if ((va  kmem_k_start) || (va  kmem_user_end))
 		panic(pmap_do_enter: invalid va isued\n);
@@ -536,10 +537,18 @@
 bool
 pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
 {
-	/* XXXJDM */
-	if (pap)
-		*pap = va;
+	struct pv_entry *pv;
+	UVMHIST_FUNC(pmap_extract);
+	UVMHIST_CALLED(pmaphist);
+
+	/* TODO protect against roque values */
 printf(pmap_extract: extracting va %p\n, (void *) va);
+	pv = pmap-pm_entries[atop(va - kmem_k_start)];	/* XXX V-A make new var */
+
+	if (pv == NULL)
+		return false;
+
+	*pap = ptoa(pv-pv_ppn);
 	return true;
 }
 
@@ -584,7 +593,7 @@
 void
 pmap_zero_page(paddr_t pa)
 {
-printf(pmap_zero_page\n);
+printf(pmap_zero_page: pa %p\n, (void *) pa);
 }
 
 void



CVS commit: [cherry-xenmp] src/sys/arch/xen/x86

2011-08-22 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Mon Aug 22 16:48:03 UTC 2011

Modified Files:
src/sys/arch/xen/x86 [cherry-xenmp]: hypervisor_machdep.c

Log Message:
Do not trust the hypervisor to route events to the right cpu. Enforce this in 
stipending()


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.3 -r1.14.2.4 src/sys/arch/xen/x86/hypervisor_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/xen/x86/hypervisor_machdep.c
diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.3 src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.4
--- src/sys/arch/xen/x86/hypervisor_machdep.c:1.14.2.3	Wed Aug 17 09:40:39 2011
+++ src/sys/arch/xen/x86/hypervisor_machdep.c	Mon Aug 22 16:48:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor_machdep.c,v 1.14.2.3 2011/08/17 09:40:39 cherry Exp $	*/
+/*	$NetBSD: hypervisor_machdep.c,v 1.14.2.4 2011/08/22 16:48:03 cherry Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.14.2.3 2011/08/17 09:40:39 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.14.2.4 2011/08/22 16:48:03 cherry Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -140,8 +140,8 @@
 	int *ret = args;
 
 	if (evtsource[port]) {
-		hypervisor_set_ipending(ci, evtsource[port]-ev_imask,
-		l1i, l2i);
+		hypervisor_set_ipending(evtsource[port]-ev_cpu,
+		evtsource[port]-ev_imask, l1i, l2i);
 		evtsource[port]-ev_evcnt.ev_count++;
 		if (*ret == 0  ci-ci_ilevel 
 		evtsource[port]-ev_maxlevel)



CVS commit: [cherry-xenmp] src/sys/arch/xen/x86

2011-08-22 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Mon Aug 22 17:39:19 UTC 2011

Modified Files:
src/sys/arch/xen/x86 [cherry-xenmp]: xen_pmap.c

Log Message:
Remove spurious locks


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/arch/xen/x86/xen_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/xen/x86/xen_pmap.c
diff -u src/sys/arch/xen/x86/xen_pmap.c:1.2.2.3 src/sys/arch/xen/x86/xen_pmap.c:1.2.2.4
--- src/sys/arch/xen/x86/xen_pmap.c:1.2.2.3	Sat Aug 20 19:22:47 2011
+++ src/sys/arch/xen/x86/xen_pmap.c	Mon Aug 22 17:39:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_pmap.c,v 1.2.2.3 2011/08/20 19:22:47 cherry Exp $	*/
+/*	$NetBSD: xen_pmap.c,v 1.2.2.4 2011/08/22 17:39:19 cherry Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.2.2.3 2011/08/20 19:22:47 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.2.2.4 2011/08/22 17:39:19 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -212,7 +212,6 @@
 
 	/* the kernel's pmap is always accessible */
 	if (pmap == pmap_kernel()) {
-		mutex_enter(pmap-pm_lock);
 		*pmap2 = NULL;
 		*ptepp = PTE_BASE;
 		*pdeppp = normal_pdes;
@@ -327,7 +326,6 @@
 {
 
 	if (pmap == pmap_kernel()) {
-		mutex_exit(pmap-pm_lock);
 		return;
 	}
 	KASSERT(kpreempt_disabled());



CVS commit: [netbsd-5] xsrc/xfree/xc/extras/freetype2/src/lzw

2011-08-22 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Aug 22 17:47:07 UTC 2011

Modified Files:
xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-5]: zopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1661):
Additional pullup to fix build on some architectures
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3
Don't assign errno here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.10.1 -r1.1.1.1.10.2 \
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c

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

Modified files:

Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c
diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.2
--- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.1	Fri Aug 19 20:54:36 2011
+++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c	Mon Aug 22 17:47:07 2011
@@ -1,5 +1,5 @@
 /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */
-/*	$NetBSD: zopen.c,v 1.1.1.1.10.1 2011/08/19 20:54:36 riz Exp $	*/
+/*	$NetBSD: zopen.c,v 1.1.1.1.10.2 2011/08/22 17:47:07 riz Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1986, 1992, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = @(#)zopen.c	8.1 (Berkeley) 6/27/93;
 #else
-static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.10.1 2011/08/19 20:54:36 riz Exp $;
+static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.10.2 2011/08/22 17:47:07 riz Exp $;
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -242,7 +242,6 @@
 		if (code = free_ent) {
 			if (code  free_ent || oldcode == -1) {
 /* Bad stream. */
-errno = EINVAL;
 return (-1);
 			}
 			*stackp++ = finchar;



CVS commit: [netbsd-5] src/doc

2011-08-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 22 17:48:28 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Adjust ticket 1661 entry for additional build-fix pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.101 src/doc/CHANGES-5.2:1.1.2.102
--- src/doc/CHANGES-5.2:1.1.2.101	Fri Aug 19 20:56:08 2011
+++ src/doc/CHANGES-5.2	Mon Aug 22 17:48:28 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.101 2011/08/19 20:56:08 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.102 2011/08/22 17:48:28 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5533,7 +5533,7 @@
 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c 	1.2-1.3
 src/usr.bin/compress/zopen.c	1.14-1.15
 src/usr.bin/gzip/zuncompress.c	1.9-1.11
-xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2
+xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2-1.3
 xsrc/xfree/xc/lib/font/fontfile/decompress.c			1.2
 
 	Address CVE-2011-2895, buffer overflow in decompression.



CVS commit: [netbsd-5-0] xsrc/xfree/xc/extras/freetype2/src/lzw

2011-08-22 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Aug 22 17:48:45 UTC 2011

Modified Files:
xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-5-0]: zopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1661):
Additional pullup to fix build on some architectures
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3
Don't assign errno here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.12.1 -r1.1.1.1.12.2 \
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c

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

Modified files:

Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c
diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.12.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.12.2
--- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.12.1	Fri Aug 19 20:56:52 2011
+++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c	Mon Aug 22 17:48:45 2011
@@ -1,5 +1,5 @@
 /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */
-/*	$NetBSD: zopen.c,v 1.1.1.1.12.1 2011/08/19 20:56:52 riz Exp $	*/
+/*	$NetBSD: zopen.c,v 1.1.1.1.12.2 2011/08/22 17:48:45 riz Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1986, 1992, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = @(#)zopen.c	8.1 (Berkeley) 6/27/93;
 #else
-static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.12.1 2011/08/19 20:56:52 riz Exp $;
+static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.12.2 2011/08/22 17:48:45 riz Exp $;
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -242,7 +242,6 @@
 		if (code = free_ent) {
 			if (code  free_ent || oldcode == -1) {
 /* Bad stream. */
-errno = EINVAL;
 return (-1);
 			}
 			*stackp++ = finchar;



CVS commit: [netbsd-5-1] xsrc/xfree/xc/extras/freetype2/src/lzw

2011-08-22 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Aug 22 17:48:56 UTC 2011

Modified Files:
xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-5-1]: zopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1661):
Additional pullup to fix build on some architectures
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3
Don't assign errno here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.14.1 -r1.1.1.1.14.2 \
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c

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

Modified files:

Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c
diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.14.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.14.2
--- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.14.1	Fri Aug 19 20:58:12 2011
+++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c	Mon Aug 22 17:48:55 2011
@@ -1,5 +1,5 @@
 /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */
-/*	$NetBSD: zopen.c,v 1.1.1.1.14.1 2011/08/19 20:58:12 riz Exp $	*/
+/*	$NetBSD: zopen.c,v 1.1.1.1.14.2 2011/08/22 17:48:55 riz Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1986, 1992, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = @(#)zopen.c	8.1 (Berkeley) 6/27/93;
 #else
-static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.14.1 2011/08/19 20:58:12 riz Exp $;
+static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.14.2 2011/08/22 17:48:55 riz Exp $;
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -242,7 +242,6 @@
 		if (code = free_ent) {
 			if (code  free_ent || oldcode == -1) {
 /* Bad stream. */
-errno = EINVAL;
 return (-1);
 			}
 			*stackp++ = finchar;



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

2011-08-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 22 17:50:07 UTC 2011

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
Adjust ticket 1661 entry for additional build-fix pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.46 src/doc/CHANGES-5.0.3:1.1.2.47
--- src/doc/CHANGES-5.0.3:1.1.2.46	Fri Aug 19 20:57:23 2011
+++ src/doc/CHANGES-5.0.3	Mon Aug 22 17:50:07 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.46 2011/08/19 20:57:23 riz Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.47 2011/08/22 17:50:07 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2808,7 +2808,7 @@
 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c 	1.2-1.3
 src/usr.bin/compress/zopen.c	1.14-1.15
 src/usr.bin/gzip/zuncompress.c	1.9-1.11
-xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2
+xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2-1.3
 xsrc/xfree/xc/lib/font/fontfile/decompress.c			1.2
 
 	Address CVE-2011-2895, buffer overflow in decompression.



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

2011-08-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 22 17:50:28 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
Adjust ticket 1661 entry for additional build-fix pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.1.1

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-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.32 src/doc/CHANGES-5.1.1:1.1.2.33
--- src/doc/CHANGES-5.1.1:1.1.2.32	Fri Aug 19 20:59:07 2011
+++ src/doc/CHANGES-5.1.1	Mon Aug 22 17:50:28 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.32 2011/08/19 20:59:07 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.33 2011/08/22 17:50:28 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2504,7 +2504,7 @@
 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c 	1.2-1.3
 src/usr.bin/compress/zopen.c	1.14-1.15
 src/usr.bin/gzip/zuncompress.c	1.9-1.11
-xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2
+xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2-1.3
 xsrc/xfree/xc/lib/font/fontfile/decompress.c			1.2
 
 	Address CVE-2011-2895, buffer overflow in decompression.



CVS commit: [netbsd-4-0] xsrc/xfree/xc/extras/freetype2/src/lzw

2011-08-22 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Aug 22 17:54:23 UTC 2011

Modified Files:
xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-4-0]: zopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1433):
Additional pullup to fix build on some architectures
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3
Don't assign errno here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c

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

Modified files:

Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c
diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.8.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.8.2
--- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.8.1	Fri Aug 19 22:30:27 2011
+++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c	Mon Aug 22 17:54:23 2011
@@ -1,5 +1,5 @@
 /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */
-/*	$NetBSD: zopen.c,v 1.1.1.1.8.1 2011/08/19 22:30:27 riz Exp $	*/
+/*	$NetBSD: zopen.c,v 1.1.1.1.8.2 2011/08/22 17:54:23 riz Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1986, 1992, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = @(#)zopen.c	8.1 (Berkeley) 6/27/93;
 #else
-static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.8.1 2011/08/19 22:30:27 riz Exp $;
+static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.8.2 2011/08/22 17:54:23 riz Exp $;
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -242,7 +242,6 @@
 		if (code = free_ent) {
 			if (code  free_ent || oldcode == -1) {
 /* Bad stream. */
-errno = EINVAL;
 return (-1);
 			}
 			*stackp++ = finchar;



CVS commit: [netbsd-4] xsrc/xfree/xc/extras/freetype2/src/lzw

2011-08-22 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Aug 22 17:54:40 UTC 2011

Modified Files:
xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-4]: zopen.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1433):
Additional pullup to fix build on some architectures
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3
Don't assign errno here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.6.1 -r1.1.1.1.6.2 \
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c

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

Modified files:

Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c
diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.6.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.6.2
--- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.6.1	Fri Aug 19 22:28:19 2011
+++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c	Mon Aug 22 17:54:40 2011
@@ -1,5 +1,5 @@
 /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */
-/*	$NetBSD: zopen.c,v 1.1.1.1.6.1 2011/08/19 22:28:19 riz Exp $	*/
+/*	$NetBSD: zopen.c,v 1.1.1.1.6.2 2011/08/22 17:54:40 riz Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1986, 1992, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = @(#)zopen.c	8.1 (Berkeley) 6/27/93;
 #else
-static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.6.1 2011/08/19 22:28:19 riz Exp $;
+static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.6.2 2011/08/22 17:54:40 riz Exp $;
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -242,7 +242,6 @@
 		if (code = free_ent) {
 			if (code  free_ent || oldcode == -1) {
 /* Bad stream. */
-errno = EINVAL;
 return (-1);
 			}
 			*stackp++ = finchar;



CVS commit: [netbsd-4] src/doc

2011-08-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 22 17:55:20 UTC 2011

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Adjust ticket 1433 entry for additional build-fix pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.227 -r1.1.2.228 src/doc/CHANGES-4.1

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-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.227 src/doc/CHANGES-4.1:1.1.2.228
--- src/doc/CHANGES-4.1:1.1.2.227	Fri Aug 19 22:28:57 2011
+++ src/doc/CHANGES-4.1	Mon Aug 22 17:55:20 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.227 2011/08/19 22:28:57 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.228 2011/08/22 17:55:20 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4491,7 +4491,7 @@
 
 src/usr.bin/compress/zopen.c	1.14-1.15
 src/usr.bin/gzip/zuncompress.c	1.9-1.11
-xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2
+xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2-1.3
 xsrc/xfree/xc/lib/font/fontfile/decompress.c			1.2
 
 	Address CVE-2011-2895, buffer overflow in decompression.



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

2011-08-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 22 17:55:44 UTC 2011

Modified Files:
src/doc [netbsd-4-0]: CHANGES-4.0.2

Log Message:
Adjust ticket 1433 entry for additional build-fix pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-4.0.2

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

Modified files:

Index: src/doc/CHANGES-4.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.88 src/doc/CHANGES-4.0.2:1.1.2.89
--- src/doc/CHANGES-4.0.2:1.1.2.88	Fri Aug 19 22:31:03 2011
+++ src/doc/CHANGES-4.0.2	Mon Aug 22 17:55:44 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.88 2011/08/19 22:31:03 riz Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.89 2011/08/22 17:55:44 riz Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -1242,7 +1242,7 @@
 
 src/usr.bin/compress/zopen.c	1.14-1.15
 src/usr.bin/gzip/zuncompress.c	1.9-1.11
-xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2
+xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c			1.2-1.3
 xsrc/xfree/xc/lib/font/fontfile/decompress.c			1.2
 
 	Address CVE-2011-2895, buffer overflow in decompression.



CVS commit: src/etc

2011-08-22 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Mon Aug 22 18:54:06 UTC 2011

Modified Files:
src/etc: Makefile
src/etc/defaults: Makefile rc.conf
Added Files:
src/etc/etc.amd64: rc.conf
src/etc/etc.i386: rc.conf

Log Message:
Modify etc/defaults/Makefile so that architectures can specify an additional
rc.conf file. This one should reside under etc/etc.${MACHINE}/, and will
get automatically appended to etc/defaults/rc.conf at build time if present.

This is used by i386 and amd64 to append a small MD rc.conf(5) configuration
at the end of the defaults/rc.conf file, so that powerd(8) can be started
by default when we are running in a Xen environment. This is needed to support
save/restore functions for domains.

From all the alternatives proposed to fix that issue (from /etc/rc.conf
parsing in postinstall to etc/defaults/rc.conf arch-hooks) I believe
this one will appease everyone because it:
- does not touch etc/defaults/rc.conf template file,
- patches it at build time for MD hooks only when required,
- does not need to parse/modify a user-specified file like /etc/rc.conf (which
is a complex, error-prone operation),
- only enables powerd(8) by default when conditions are met (Xen environment)
while still allowing root to shoot himself in the foot if he wants to
override this manually in /etc/rc.conf.

See also http://mail-index.netbsd.org/tech-userlevel/2011/07/25/msg005246.html


To generate a diff of this commit:
cvs rdiff -u -r1.391 -r1.392 src/etc/Makefile
cvs rdiff -u -r1.3 -r1.4 src/etc/defaults/Makefile
cvs rdiff -u -r1.113 -r1.114 src/etc/defaults/rc.conf
cvs rdiff -u -r0 -r1.1 src/etc/etc.amd64/rc.conf
cvs rdiff -u -r0 -r1.1 src/etc/etc.i386/rc.conf

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.391 src/etc/Makefile:1.392
--- src/etc/Makefile:1.391	Thu Jun 30 18:15:13 2011
+++ src/etc/Makefile	Mon Aug 22 18:54:05 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.391 2011/06/30 18:15:13 matt Exp $
+#	$NetBSD: Makefile,v 1.392 2011/08/22 18:54:05 jym Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -630,7 +630,7 @@
 clean:
 	-rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
 
-SUBDIR=	rc.d mtree
+SUBDIR=	defaults rc.d mtree
 
 .include bsd.prog.mk
 .include bsd.subdir.mk

Index: src/etc/defaults/Makefile
diff -u src/etc/defaults/Makefile:1.3 src/etc/defaults/Makefile:1.4
--- src/etc/defaults/Makefile:1.3	Sun May 16 09:53:09 2004
+++ src/etc/defaults/Makefile	Mon Aug 22 18:54:06 2011
@@ -1,7 +1,23 @@
-#	$NetBSD: Makefile,v 1.3 2004/05/16 09:53:09 lukem Exp $
+#	$NetBSD: Makefile,v 1.4 2011/08/22 18:54:06 jym Exp $
 
-CONFIGFILES=	daily.conf monthly.conf rc.conf security.conf weekly.conf
+.include bsd.own.mk
+
+CONFIGFILES=	daily.conf monthly.conf security.conf weekly.conf
 FILESDIR=	/etc/defaults
 FILESMODE=	${NONBINMODE}
 
+# Manage arch-specific rc.conf(5) file
+CONFIGFILES+=	rc_conf
+FILESNAME_rc_conf=	rc.conf
+FILESBUILD_rc_conf=	yes
+
+RCCONF_SRCS=	${.CURDIR}/rc.conf
+.if exists(../etc.${MACHINE}/rc.conf)
+RCCONF_SRCS+=	${.CURDIR}/../etc.${MACHINE}/rc.conf
+.endif
+
+rc_conf: ${RCCONF_SRCS}
+	${_MKTARGET_CREATE}
+	${TOOL_CAT} ${RCCONF_SRCS}  ${.TARGET}
+
 .include bsd.prog.mk

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.113 src/etc/defaults/rc.conf:1.114
--- src/etc/defaults/rc.conf:1.113	Fri May 27 09:28:42 2011
+++ src/etc/defaults/rc.conf	Mon Aug 22 18:54:06 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.113 2011/05/27 09:28:42 plunky Exp $
+#	$NetBSD: rc.conf,v 1.114 2011/08/22 18:54:06 jym Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -360,3 +360,4 @@
 veriexec_strict=0
 veriexec_verbose=0
 veriexec_flags=-k
+

Added files:

Index: src/etc/etc.amd64/rc.conf
diff -u /dev/null src/etc/etc.amd64/rc.conf:1.1
--- /dev/null	Mon Aug 22 18:54:07 2011
+++ src/etc/etc.amd64/rc.conf	Mon Aug 22 18:54:06 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: rc.conf,v 1.1 2011/08/22 18:54:06 jym Exp $
+#
+# Arch-specific rc.conf(5) configuration.
+
+# powerd(8) is required under Xen to manage save/restore events.
+#
+if /sbin/sysctl -q machdep.xen; then
+	powerd=YES
+fi

Index: src/etc/etc.i386/rc.conf
diff -u /dev/null src/etc/etc.i386/rc.conf:1.1
--- /dev/null	Mon Aug 22 18:54:07 2011
+++ src/etc/etc.i386/rc.conf	Mon Aug 22 18:54:06 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: rc.conf,v 1.1 2011/08/22 18:54:06 jym Exp $
+#
+# Arch-specific rc.conf(5) configuration.
+
+# powerd(8) is required under Xen to manage save/restore events.
+#
+if /sbin/sysctl -q machdep.xen; then
+	powerd=YES
+fi



CVS commit: src/etc

2011-08-22 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Mon Aug 22 20:48:39 UTC 2011

Modified Files:
src/etc/defaults: Makefile
Added Files:
src/etc/etc.amd64: rc.conf.append
src/etc/etc.i386: rc.conf.append
Removed Files:
src/etc/etc.amd64: rc.conf
src/etc/etc.i386: rc.conf

Log Message:
Arch-specific rc.conf files are not really autonomous rc.conf
files, they are appended to the end of etc/defaults/rc.conf.

So rename them to rc.conf.append for clarity, as suggested by mrg@. Adapt
Makefile accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/etc/defaults/Makefile
cvs rdiff -u -r1.1 -r0 src/etc/etc.amd64/rc.conf
cvs rdiff -u -r0 -r1.1 src/etc/etc.amd64/rc.conf.append
cvs rdiff -u -r1.1 -r0 src/etc/etc.i386/rc.conf
cvs rdiff -u -r0 -r1.1 src/etc/etc.i386/rc.conf.append

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

Modified files:

Index: src/etc/defaults/Makefile
diff -u src/etc/defaults/Makefile:1.4 src/etc/defaults/Makefile:1.5
--- src/etc/defaults/Makefile:1.4	Mon Aug 22 18:54:06 2011
+++ src/etc/defaults/Makefile	Mon Aug 22 20:48:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/08/22 18:54:06 jym Exp $
+#	$NetBSD: Makefile,v 1.5 2011/08/22 20:48:38 jym Exp $
 
 .include bsd.own.mk
 
@@ -11,9 +11,10 @@
 FILESNAME_rc_conf=	rc.conf
 FILESBUILD_rc_conf=	yes
 
+# If present, rc.conf.append is added to the end of the default rc.conf file
 RCCONF_SRCS=	${.CURDIR}/rc.conf
-.if exists(../etc.${MACHINE}/rc.conf)
-RCCONF_SRCS+=	${.CURDIR}/../etc.${MACHINE}/rc.conf
+.if exists(../etc.${MACHINE}/rc.conf.append)
+RCCONF_SRCS+=	${.CURDIR}/../etc.${MACHINE}/rc.conf.append
 .endif
 
 rc_conf: ${RCCONF_SRCS}

Added files:

Index: src/etc/etc.amd64/rc.conf.append
diff -u /dev/null src/etc/etc.amd64/rc.conf.append:1.1
--- /dev/null	Mon Aug 22 20:48:39 2011
+++ src/etc/etc.amd64/rc.conf.append	Mon Aug 22 20:48:39 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: rc.conf.append,v 1.1 2011/08/22 20:48:39 jym Exp $
+#
+# Arch-specific rc.conf(5) configuration.
+
+# powerd(8) is required under Xen to manage save/restore events.
+#
+if /sbin/sysctl -q machdep.xen; then
+	powerd=YES
+fi

Index: src/etc/etc.i386/rc.conf.append
diff -u /dev/null src/etc/etc.i386/rc.conf.append:1.1
--- /dev/null	Mon Aug 22 20:48:39 2011
+++ src/etc/etc.i386/rc.conf.append	Mon Aug 22 20:48:39 2011
@@ -0,0 +1,9 @@
+#	$NetBSD: rc.conf.append,v 1.1 2011/08/22 20:48:39 jym Exp $
+#
+# Arch-specific rc.conf(5) configuration.
+
+# powerd(8) is required under Xen to manage save/restore events.
+#
+if /sbin/sysctl -q machdep.xen; then
+	powerd=YES
+fi



CVS commit: src/sys/arch/usermode

2011-08-22 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 22 21:45:38 UTC 2011

Modified Files:
src/sys/arch/usermode/conf: Makefile.usermode
src/sys/arch/usermode/include: ansi.h vmparam.h
src/sys/arch/usermode/usermode: pmap.c thunk.c

Log Message:
build fixes for netbsd-5 and i386


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/usermode/conf/Makefile.usermode
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/include/ansi.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/include/vmparam.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/usermode/usermode/pmap.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/usermode/usermode/thunk.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/usermode/conf/Makefile.usermode
diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.12 src/sys/arch/usermode/conf/Makefile.usermode:1.13
--- src/sys/arch/usermode/conf/Makefile.usermode:1.12	Mon Aug 22 15:27:32 2011
+++ src/sys/arch/usermode/conf/Makefile.usermode	Mon Aug 22 21:45:38 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.12 2011/08/22 15:27:32 reinoud Exp $
+# $NetBSD: Makefile.usermode,v 1.13 2011/08/22 21:45:38 jmcneill Exp $
 
 MACHINE_ARCH=			usermode
 USETOOLS?=			no
@@ -20,7 +20,7 @@
 CPPFLAGS+=	-Dusermode
 CPPFLAGS.init_main.c+=	-Dmain=kernmain
 
-CPPFLAGS.thunk.c+=	-U_KERNEL -I/usr/include
+CPPFLAGS.thunk.c+=	-U_KERNEL -I/usr/include 
 
 ##
 ## (3) libkern and compat
@@ -55,7 +55,7 @@
 .endif
 
 thunk.o: ${USERMODE}/usermode/thunk.c
-	${CC} ${COPTS} -I${.CURDIR} -c -o $@ ${USERMODE}/usermode/thunk.c
+	${CC} ${CPPFLAGS.thunk.c} -c -o $@ ${USERMODE}/usermode/thunk.c
 
 ##
 ## (7) misc settings

Index: src/sys/arch/usermode/include/ansi.h
diff -u src/sys/arch/usermode/include/ansi.h:1.2 src/sys/arch/usermode/include/ansi.h:1.3
--- src/sys/arch/usermode/include/ansi.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/ansi.h	Mon Aug 22 21:45:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ansi.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: ansi.h,v 1.3 2011/08/22 21:45:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -29,6 +29,29 @@
 #ifndef _ARCH_USERMODE_INCLUDE_ANSI_H
 #define _ARCH_USERMODE_INCLUDE_ANSI_H
 
-#include /usr/include/machine/ansi.h
+#include sys/cdefs.h
+#include machine/int_types.h
+
+#define _BSD_TIME_T_		__int64_t
+#define _BSD_CLOCKID_T_		int
+#define _BSD_TIMER_T_		int
+#define _BSD_SUSECONDS_T_	int
+#define _BSD_USECONDS_T_	unsigned int
+#define _BSD_WCHAR_T_		int
+#define _BSD_WINT_T_		int
+
+#if defined(__i386__)
+#define _BSD_CLOCK_T_		unsigned long
+#define _BSD_PTRDIFF_T_		int
+#define _BSD_SIZE_T_		unsigned int
+#define _BSD_SSIZE_T_		int
+#elif defined(__x86_64__)
+#define _BSD_CLOCK_T_		unsigned int
+#define _BSD_PTRDIFF_T_		long
+#define _BSD_SIZE_T_		unsigned long
+#define _BSD_SSIZE_T_		long
+#else
+#error platform not supported
+#endif
 
 #endif /* !_ARCH_USERMODE_INCLUDE_ANSI_H */

Index: src/sys/arch/usermode/include/vmparam.h
diff -u src/sys/arch/usermode/include/vmparam.h:1.4 src/sys/arch/usermode/include/vmparam.h:1.5
--- src/sys/arch/usermode/include/vmparam.h:1.4	Mon Aug 22 15:36:23 2011
+++ src/sys/arch/usermode/include/vmparam.h	Mon Aug 22 21:45:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.4 2011/08/22 15:36:23 reinoud Exp $ */
+/* $NetBSD: vmparam.h,v 1.5 2011/08/22 21:45:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,6 @@
 #ifndef _ARCH_USERMODE_INCLUDE_VMPARAM_H
 #define _ARCH_USERMODE_INCLUDE_VMPARAM_H
 
-#include /usr/include/machine/vmparam.h
 #include machine/pmap.h
 #include opt_memsize.h
 
@@ -38,19 +37,39 @@
 extern paddr_t kmem_ext_start, kmem_ext_end;
 extern paddr_t kmem_user_start, kmem_user_end;
 
-#undef VM_MIN_KERNEL_ADDRESS
 #define VM_MIN_KERNEL_ADDRESS	kmem_k_start
-
-#undef VM_MAX_KERNEL_ADDRESS
 #define VM_MAX_KERNEL_ADDRESS 	kmem_ext_end
-
-#undef VM_MIN_ADDRESS
 #define VM_MIN_ADDRESS		kmem_k_start
-
-#undef VM_MAX_ADDRESS
 #define VM_MAX_ADDRESS		kmem_user_end
-
-#undef VM_MAXUSER_ADDRESS
 #define VM_MAXUSER_ADDRESS	kmem_user_end
 
+#define VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
+#define VM_PHYSSEG_MAX		1
+#define	VM_NFREELIST		1
+#define	VM_FREELIST_DEFAULT	0
+
+#define	USRSTACK		VM_MAXUSER_ADDRESS
+
+#if defined(__i386__) 
+#define	PAGE_SHIFT		12
+#define	PAGE_SIZE		(1  PAGE_SHIFT)
+#define	PAGE_MASK		(PAGE_SIZE - 1)
+#define	MAXSSIZ			(64 * 1024 * 1024)
+#define	MAXTSIZ			(64 * 1024 * 1024)
+#define	MAXDSIZ			(3U * 1024 * 1024 * 1024)
+#define DFLSSIZ			(2 * 1024 * 1024)
+#define	DFLDSIZ			(256 * 1024 * 1024)
+#elif defined(__x86_64__)
+#define	PAGE_SHIFT		12
+#define	PAGE_SIZE		(1  PAGE_SHIFT)
+#define	PAGE_MASK		(PAGE_SIZE - 1)
+#define	MAXSSIZ			(128 * 1024 * 1024)
+#define	MAXTSIZ			(64 * 1024 * 1024)
+#define	MAXDSIZ			(8L * 1024 * 1024 * 1024)
+#define DFLSSIZ			(4 * 1024 * 

CVS commit: src/sys/arch/usermode/usermode

2011-08-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Aug 22 21:59:09 UTC 2011

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

Log Message:
Dirty patch fixing the assert triggered on i386. On this arch the sbrk(0) HAS
been moved upward and will trigger the assert. When this situation is
encountered the kmem_data_end will be moved upward equaly.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/usermode/usermode/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/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.11 src/sys/arch/usermode/usermode/pmap.c:1.12
--- src/sys/arch/usermode/usermode/pmap.c:1.11	Mon Aug 22 21:45:38 2011
+++ src/sys/arch/usermode/usermode/pmap.c	Mon Aug 22 21:59:09 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.11 2011/08/22 21:45:38 jmcneill Exp $ */
+/* $NetBSD: pmap.c,v 1.12 2011/08/22 21:59:09 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.11 2011/08/22 21:45:38 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.12 2011/08/22 21:59:09 reinoud Exp $);
 
 #include opt_uvmhist.h
 #include opt_memsize.h
@@ -121,15 +121,18 @@
 	aprint_debug(  end of init. data at %p\n, edata);
 	aprint_debug(1st end of data at %p\n, end);
 	aprint_debug(CUR end dataat %p\n, thunk_sbrk(0));
-	assert(end == thunk_sbrk(0));
 
 	/* calculate sections of the kernel (R+X) */
-	kmem_k_start = (paddr_t) PAGE_SIZE * (atop(_init)   );
-	kmem_k_end   = (paddr_t) PAGE_SIZE * (atop(etext) + 1);
+	kmem_k_start = (vaddr_t) PAGE_SIZE * (atop(_init)   );
+	kmem_k_end   = (vaddr_t) PAGE_SIZE * (atop(etext) + 1);
 
 	/* read only section (for userland R, kernel RW) */
-	kmem_data_start = (paddr_t) PAGE_SIZE * (atop(etext));
-	kmem_data_end   = (paddr_t) PAGE_SIZE * (atop(end) + 1);
+	kmem_data_start = (vaddr_t) PAGE_SIZE * (atop(etext));
+	kmem_data_end   = (vaddr_t) PAGE_SIZE * (atop(end) + 1);
+	if (kmem_data_end  (vaddr_t) thunk_sbrk(0)) {
+		aprint_debug(sbrk() has advanced, catching up\n);
+		kmem_data_end = (vaddr_t) PAGE_SIZE * (atop(thunk_sbrk(0))+1);
+	}
 
 #ifdef DIAGNOSTIC
 	if (kmem_k_end = kmem_data_start) {
@@ -272,9 +275,9 @@
 
 	aprint_debug(leaving pmap_bootstrap:\n);
 	aprint_debug(\t%PRIu64 MB of physical pages left\n,
-		(uint64_t)(free_end - (free_start + fpos))/1024/1024);
+		(uint64_t) (free_end - (free_start + fpos))/1024/1024);
 	aprint_debug(\t%PRIu64 MB of kmem left\n,
-		(uint64_t)(kmem_ext_end - kmem_ext_cur_end)/1024/1024);
+		(uint64_t) (kmem_ext_end - kmem_ext_cur_end)/1024/1024);
 }
 
 void
@@ -354,13 +357,17 @@
 
 	/* If the head entry's free use that. */
 	pv = pv_table[ppn];
+printf(pmap %p, ppn %d, lpn %d, pv %p\n, pmap, ppn, lpn, pv);
 	if (pv-pv_pmap == NULL) {
 		UVMHIST_LOG(pmaphist, -- head (pv=%p), pv, 0, 0, 0);
 		pmap-pm_stats.resident_count++;
 		return pv;
 	}
+printf(pmap = %p, pv-pv_pmap = %p\n, pmap, pv-pv_pmap);
 	/* If this mapping exists already, use that. */
+printf(pv_get: mapping exists\n);
 	for (pv = pv; pv != NULL; pv = pv-pv_next) {
+printf(pv = %p\n, pv);
 		if (pv-pv_pmap == pmap  pv-pv_lpn == lpn) {
 			UVMHIST_LOG(pmaphist, -- existing (pv=%p),
 			pv, 0, 0, 0);
@@ -479,6 +486,7 @@
 	pv-pv_lpn= lpn;
 	pv-pv_prot   = prot;
 	pv-pv_vflags = 0;
+	pv-pv_next   = NULL;
 	if (flags  PMAP_WIRED)
 		pv-pv_vflags |= PV_WIRED;
 



CVS commit: src/sys/kern

2011-08-22 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Aug 22 22:09:07 UTC 2011

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

Log Message:
When both nanoseconds fields of futimens/utimensat call are set
to UTIMES_NOW, act as if NULL is passed to second argument, i.e.,
do same permission check and set exactly same value to both access
and modification time.


To generate a diff of this commit:
cvs rdiff -u -r1.437 -r1.438 src/sys/kern/vfs_syscalls.c

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

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.437 src/sys/kern/vfs_syscalls.c:1.438
--- src/sys/kern/vfs_syscalls.c:1.437	Thu Aug 18 19:34:47 2011
+++ src/sys/kern/vfs_syscalls.c	Mon Aug 22 22:09:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.437 2011/08/18 19:34:47 manu Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.438 2011/08/22 22:09:07 enami Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.437 2011/08/18 19:34:47 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.438 2011/08/22 22:09:07 enami Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -3137,10 +3137,13 @@
 		}
 	}
 
-	if (ts[0].tv_nsec == UTIME_NOW)
+	if (ts[0].tv_nsec == UTIME_NOW) {
 		nanotime(ts[0]);
-
-	if (ts[1].tv_nsec == UTIME_NOW)
+		if (ts[1].tv_nsec == UTIME_NOW) {
+			vanull = true;
+			ts[1] = ts[0];
+		}
+	} else if (ts[1].tv_nsec == UTIME_NOW)
 		nanotime(ts[1]);
 
 	if (vp == NULL) {



CVS commit: src/sys/kern

2011-08-22 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Aug 22 22:12:34 UTC 2011

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

Log Message:
Remove return statement which can't be reached.


To generate a diff of this commit:
cvs rdiff -u -r1.438 -r1.439 src/sys/kern/vfs_syscalls.c

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

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.438 src/sys/kern/vfs_syscalls.c:1.439
--- src/sys/kern/vfs_syscalls.c:1.438	Mon Aug 22 22:09:07 2011
+++ src/sys/kern/vfs_syscalls.c	Mon Aug 22 22:12:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.438 2011/08/22 22:09:07 enami Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.439 2011/08/22 22:12:34 enami Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.438 2011/08/22 22:09:07 enami Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.439 2011/08/22 22:12:34 enami Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -3092,8 +3092,6 @@
 
 	return do_sys_utimens(l, NULL, SCARG(uap, path), follow,
 	tptr, UIO_USERSPACE);
-
-	return ENOSYS;
 }
 
 /*



CVS commit: src/lib/libc/sys

2011-08-22 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Aug 22 22:14:46 UTC 2011

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

Log Message:
Fix the name of syscall which takes timespec as argument.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/utimes.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/utimes.2
diff -u src/lib/libc/sys/utimes.2:1.28 src/lib/libc/sys/utimes.2:1.29
--- src/lib/libc/sys/utimes.2:1.28	Wed Aug 17 08:29:20 2011
+++ src/lib/libc/sys/utimes.2	Mon Aug 22 22:14:46 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: utimes.2,v 1.28 2011/08/17 08:29:20 wiz Exp $
+.\	$NetBSD: utimes.2,v 1.29 2011/08/22 22:14:46 enami Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -117,7 +117,7 @@
 the symbolic link's dates are changed.
 .Pp
 The nanosecond fields for
-.Fn futimes
+.Fn futimens
 and
 .Fn utimensat
 can be set to the special value



CVS commit: src/sys/arch/usermode/usermode

2011-08-22 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Aug 23 00:52:33 UTC 2011

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

Log Message:
pmap_enter: fix pmap_do_enter parameters


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/usermode/usermode/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/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.12 src/sys/arch/usermode/usermode/pmap.c:1.13
--- src/sys/arch/usermode/usermode/pmap.c:1.12	Mon Aug 22 21:59:09 2011
+++ src/sys/arch/usermode/usermode/pmap.c	Tue Aug 23 00:52:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.12 2011/08/22 21:59:09 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.13 2011/08/23 00:52:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.12 2011/08/22 21:59:09 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.13 2011/08/23 00:52:33 jmcneill Exp $);
 
 #include opt_uvmhist.h
 #include opt_memsize.h
@@ -519,7 +519,7 @@
 pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags)
 {
 printf(pmap_enter %p : v %p, p %p, prot %d, flags %d\n, (void *) pmap, (void *) va, (void *) pa, (int) prot, (int) flags);
-	return pmap_do_enter(pmap_kernel(),  va, pa, prot, prot, 1);
+	return pmap_do_enter(pmap, va, pa, prot, flags, 0);
 }
 
 void



CVS commit: src/sys/uvm

2011-08-22 Thread Masaru OKI
Module Name:src
Committed By:   oki
Date:   Tue Aug 23 03:00:35 UTC 2011

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

Log Message:
make compile without VMSWAP.  no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/uvm/uvm_pager.c

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

Modified files:

Index: src/sys/uvm/uvm_pager.c
diff -u src/sys/uvm/uvm_pager.c:1.102 src/sys/uvm/uvm_pager.c:1.103
--- src/sys/uvm/uvm_pager.c:1.102	Thu Aug 18 14:17:08 2011
+++ src/sys/uvm/uvm_pager.c	Tue Aug 23 03:00:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pager.c,v 1.102 2011/08/18 14:17:08 yamt Exp $	*/
+/*	$NetBSD: uvm_pager.c,v 1.103 2011/08/23 03:00:35 oki Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pager.c,v 1.102 2011/08/18 14:17:08 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pager.c,v 1.103 2011/08/23 03:00:35 oki Exp $);
 
 #include opt_uvmhist.h
 #include opt_readahead.h
@@ -300,7 +300,9 @@
 #endif /* defined(VMSWAP) */
 	}
 	for (i = 0; i  npages; i++) {
+#if defined(VMSWAP)
 		bool anon_disposed = false; /* XXX gcc */
+#endif /* defined(VMSWAP) */
 
 		pg = pgs[i];
 		KASSERT(swap || pg-uobject == uobj);



CVS commit: src/share/mk

2011-08-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 23 05:22:25 UTC 2011

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

Log Message:
add -Wformat=2


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.207 src/share/mk/bsd.sys.mk:1.208
--- src/share/mk/bsd.sys.mk:1.207	Fri Jul  8 16:59:53 2011
+++ src/share/mk/bsd.sys.mk	Tue Aug 23 01:22:25 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.207 2011/07/08 20:59:53 uwe Exp $
+#	$NetBSD: bsd.sys.mk,v 1.208 2011/08/23 05:22:25 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -60,7 +60,7 @@
 CXXFLAGS+=	${${ACTIVE_CXX} == gcc:? -Wno-non-template-friend -Wno-pmf-conversions :}
 .endif
 .if ${WARNS}  3  defined(HAVE_GCC)
-CFLAGS+=	-Wsign-compare
+CFLAGS+=	-Wsign-compare -Wformat=2
 CFLAGS+=	${${ACTIVE_CC} == clang:? -Wpointer-sign :}
 .endif
 .if (defined(HAVE_GCC)  ${HAVE_GCC} == 45 \