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

2010-12-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 23 13:34:46 UTC 2010

Modified Files:
src/tests/lib/libc/stdio: t_format.c

Log Message:
Fix the $NetBSD$ tag (missed the trailing $)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/stdio/t_format.c

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

Modified files:

Index: src/tests/lib/libc/stdio/t_format.c
diff -u src/tests/lib/libc/stdio/t_format.c:1.4 src/tests/lib/libc/stdio/t_format.c:1.5
--- src/tests/lib/libc/stdio/t_format.c:1.4	Tue Dec 21 14:23:42 2010
+++ src/tests/lib/libc/stdio/t_format.c	Thu Dec 23 13:34:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD */
+/* $NetBSD: t_format.c,v 1.5 2010/12/23 13:34:46 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.



CVS commit: src/sys/dev/dkwedge

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 14:22:03 UTC 2010

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Make wedges aware of underlying physical block size.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.57 src/sys/dev/dkwedge/dk.c:1.58
--- src/sys/dev/dkwedge/dk.c:1.57	Wed Aug  4 12:34:00 2010
+++ src/sys/dev/dkwedge/dk.c	Thu Dec 23 14:22:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.57 2010/08/04 12:34:00 bouyer Exp $	*/
+/*	$NetBSD: dk.c,v 1.58 2010/12/23 14:22:03 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.57 2010/08/04 12:34:00 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.58 2010/12/23 14:22:03 mlelstv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_dkwedge.h
@@ -235,10 +235,11 @@
 
 	geom = prop_dictionary_create();
 
-	prop_dictionary_set_uint64(geom, sectors-per-unit, dkw-dkw_size);
+	prop_dictionary_set_uint64(geom, sectors-per-unit,
+	dkw-dkw_size  disk-dk_blkshift);
 
 	prop_dictionary_set_uint32(geom, sector-size,
-	DEV_BSIZE /* XXX 512? */);
+	DEV_BSIZE  disk-dk_blkshift);
 
 	prop_dictionary_set_uint32(geom, sectors-per-track, 32);
 
@@ -432,6 +433,7 @@
 	 */
 
 	disk_init(sc-sc_dk, device_xname(sc-sc_dev), NULL);
+	disk_blocksize(sc-sc_dk, DEV_BSIZE  pdk-dk_blkshift);
 	dkgetproperties(sc-sc_dk, dkw);
 	disk_attach(sc-sc_dk);
 



CVS commit: src/sbin/wdogctl

2010-12-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec 23 14:29:52 UTC 2010

Modified Files:
src/sbin/wdogctl: wdogctl.8

Log Message:
First release that shipped wdogctl(8) was 1.6, not 1.5.1.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/wdogctl/wdogctl.8

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

Modified files:

Index: src/sbin/wdogctl/wdogctl.8
diff -u src/sbin/wdogctl/wdogctl.8:1.19 src/sbin/wdogctl/wdogctl.8:1.20
--- src/sbin/wdogctl/wdogctl.8:1.19	Mon May 18 12:29:31 2009
+++ src/sbin/wdogctl/wdogctl.8	Thu Dec 23 14:29:52 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: wdogctl.8,v 1.19 2009/05/18 12:29:31 wiz Exp $
+.\	$NetBSD: wdogctl.8,v 1.20 2010/12/23 14:29:52 hauke Exp $
 .\
 .\ Copyright (c) 2000 Zembu Labs, Inc.
 .\ All rights reserved.
@@ -175,7 +175,7 @@
 The
 .Nm
 command first appeared in
-.Nx 1.5.1 .
+.Nx 1.6 .
 .Sh AUTHORS
 The
 .Nm



CVS commit: src/sys/ufs/ffs

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 14:43:37 UTC 2010

Modified Files:
src/sys/ufs/ffs: ffs_wapbl.c

Log Message:
mount(2) doesn't remove vnodes from the freelist in the error path,
so that they get reused with a invalid pointer to a mount structure.

As a workaround, free the vnodes used to create the in-filesystem journal
immediately.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/ufs/ffs/ffs_wapbl.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/ffs/ffs_wapbl.c
diff -u src/sys/ufs/ffs/ffs_wapbl.c:1.15 src/sys/ufs/ffs/ffs_wapbl.c:1.16
--- src/sys/ufs/ffs/ffs_wapbl.c:1.15	Sat Feb 27 12:04:19 2010
+++ src/sys/ufs/ffs/ffs_wapbl.c	Thu Dec 23 14:43:37 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_wapbl.c,v 1.15 2010/02/27 12:04:19 mlelstv Exp $	*/
+/*	$NetBSD: ffs_wapbl.c,v 1.16 2010/12/23 14:43:37 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_wapbl.c,v 1.15 2010/02/27 12:04:19 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_wapbl.c,v 1.16 2010/12/23 14:43:37 mlelstv Exp $);
 
 #define WAPBL_INTERNAL
 
@@ -609,10 +609,12 @@
 		return error;
 
 	if ((error = UFS_VALLOC(rvp, 0 | S_IFREG, NOCRED, vp)) != 0) {
-		vput(rvp);
+		VOP_UNLOCK(rvp);
+		vgone(rvp);
 		return error;
 	}
-	vput(rvp);
+	VOP_UNLOCK(rvp);
+	vgone(rvp);
 
 	vp-v_type = VREG;
 	ip = VTOI(vp);
@@ -634,7 +636,8 @@
 		 */
 		ip-i_nlink = 0;
 		DIP_ASSIGN(ip, nlink, 0);
-		vput(vp);
+		VOP_UNLOCK(vp);
+		vgone(vp);
 
 		return error;
 	}
@@ -643,7 +646,8 @@
 	 * Now that we have the place-holder inode for the journal,
 	 * we don't need the vnode ever again.
 	 */
-	vput(vp);
+	VOP_UNLOCK(vp);
+	vgone(vp);
 
 	return 0;
 }



CVS commit: src/external/gpl2/lvm2/dist/lib/device

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 14:46:25 UTC 2010

Modified Files:
src/external/gpl2/lvm2/dist/lib/device: dev-io.c

Log Message:
Get sector size from device properties using DIOCGDISKINFO and
use the disklabel (DIOCGDINFO) only as a fallback. This works
with wedges.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/lvm2/dist/lib/device/dev-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/gpl2/lvm2/dist/lib/device/dev-io.c
diff -u src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.6 src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.7
--- src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.6	Wed Dec  2 01:53:25 2009
+++ src/external/gpl2/lvm2/dist/lib/device/dev-io.c	Thu Dec 23 14:46:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dev-io.c,v 1.6 2009/12/02 01:53:25 haad Exp $	*/
+/*	$NetBSD: dev-io.c,v 1.7 2010/12/23 14:46:25 mlelstv Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -41,6 +41,7 @@
 #elif __NetBSD__
 #  include sys/disk.h
 #  include sys/disklabel.h
+#  include prop/proplib.h
 #  include sys/param.h
 #else
 #  include sys/disk.h
@@ -133,14 +134,22 @@
 	const char *name = dev_name(dev);
 #ifdef __NetBSD__
 	struct disklabel	lab;
+	prop_dictionary_t	disk_dict, geom_dict;
+	uint32_t		secsize;
 #endif
 
 	if ((dev-block_size == -1)) {
 #ifdef __NetBSD__
-		if (ioctl(dev_fd(dev), DIOCGDINFO, lab)  0) {
-			dev-block_size = DEV_BSIZE;
-		} else
-			dev-block_size = lab.d_secsize;
+		if (prop_dictionary_recv_ioctl(dev_fd(dev), DIOCGDISKINFO, disk_dict)) {
+			if (ioctl(dev_fd(dev), DIOCGDINFO, lab)  0) {
+dev-block_size = DEV_BSIZE;
+			} else
+dev-block_size = lab.d_secsize;
+		} else {
+			geom_dict = prop_dictionary_get(disk_dict, geometry);
+			prop_dictionary_get_uint32(geom_dict, sector-size, secsize);
+			dev-block_size = secsize;
+		}
 #else
 		if (ioctl(dev_fd(dev), BLKBSZGET, dev-block_size)  0) {
 			log_sys_error(ioctl BLKBSZGET, name);



CVS commit: src/sys/dev/dm

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 14:58:14 UTC 2010

Modified Files:
src/sys/dev/dm: device-mapper.c dm.h dm_pdev.c dm_table.c dm_target.c
dm_target_linear.c dm_target_snapshot.c dm_target_stripe.c

Log Message:
make dm aware of physical sector sizes.

For aggregates of multiple disks we use the largest sector size from
all disks. For standard power-of-2 sizes this is the same as the least
common multiple. We still require proper alignment of the targets in
the mapping table.

ok by haad@


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/dm/dm_pdev.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dm/dm_table.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/dm/dm_target.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dm/dm_target_snapshot.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/dm/dm_target_stripe.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.26 src/sys/dev/dm/device-mapper.c:1.27
--- src/sys/dev/dm/device-mapper.c:1.26	Mon Dec  6 09:12:23 2010
+++ src/sys/dev/dm/device-mapper.c	Thu Dec 23 14:58:13 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.26 2010/12/06 09:12:23 haad Exp $ */
+/*$NetBSD: device-mapper.c,v 1.27 2010/12/23 14:58:13 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -440,6 +440,7 @@
 	case DIOCGWEDGEINFO:
 	{
 		struct dkwedge_info *dkw = (void *) data;
+		unsigned secsize;
 
 		if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL)
 			return ENODEV;
@@ -451,7 +452,7 @@
 		strlcpy(dkw-dkw_parent, dmv-name, 16);
 
 		dkw-dkw_offset = 0;
-		dkw-dkw_size = dm_table_size(dmv-table_head);
+		dm_table_disksize(dmv-table_head, dkw-dkw_size, secsize);
 		strcpy(dkw-dkw_ptype, DKW_PTYPE_FFS);
 
 		dm_dev_unbusy(dmv);
@@ -667,19 +668,19 @@
 dmgetproperties(struct disk *disk, dm_table_head_t *head)
 {
 	prop_dictionary_t disk_info, odisk_info, geom;
-	int dmp_size;
+	uint64_t numsec;
+	unsigned secsize;
 
-	dmp_size = dm_table_size(head);
+	dm_table_disksize(head, numsec, secsize);
 	disk_info = prop_dictionary_create();
 	geom = prop_dictionary_create();
 
 	prop_dictionary_set_cstring_nocopy(disk_info, type, ESDI);
-	prop_dictionary_set_uint64(geom, sectors-per-unit, dmp_size);
-	prop_dictionary_set_uint32(geom, sector-size,
-	DEV_BSIZE /* XXX 512? */);
+	prop_dictionary_set_uint64(geom, sectors-per-unit, numsec);
+	prop_dictionary_set_uint32(geom, sector-size, secsize);
 	prop_dictionary_set_uint32(geom, sectors-per-track, 32);
 	prop_dictionary_set_uint32(geom, tracks-per-cylinder, 64);
-	prop_dictionary_set_uint32(geom, cylinders-per-unit, dmp_size / 2048);
+	prop_dictionary_set_uint32(geom, cylinders-per-unit, numsec / 2048);
 	prop_dictionary_set(disk_info, geometry, geom);
 	prop_object_release(geom);
 
@@ -688,4 +689,6 @@
 
 	if (odisk_info != NULL)
 		prop_object_release(odisk_info);
-}	
+
+	disk_blocksize(disk, secsize);
+}

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.20 src/sys/dev/dm/dm.h:1.21
--- src/sys/dev/dm/dm.h:1.20	Mon Dec  6 08:54:49 2010
+++ src/sys/dev/dm/dm.h	Thu Dec 23 14:58:13 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.20 2010/12/06 08:54:49 haad Exp $  */
+/*$NetBSD: dm.h,v 1.21 2010/12/23 14:58:13 mlelstv Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -46,6 +46,7 @@
 #include sys/queue.h
 
 #include sys/device.h
+#include sys/disk.h
 #include sys/disklabel.h
 
 #include prop/proplib.h
@@ -108,6 +109,8 @@
 	char name[MAX_DEV_NAME];
 
 	struct vnode *pdev_vnode;
+	uint64_t pdev_numsec;
+	unsigned pdev_secsize;
 	int ref_cnt; /* reference counter for users ofthis pdev */
 
 	SLIST_ENTRY(dm_pdev) next_pdev;
@@ -241,6 +244,7 @@
 	int (*strategy)(dm_table_entry_t *, struct buf *);
 	int (*sync)(dm_table_entry_t *);
 	int (*upcall)(dm_table_entry_t *, struct buf *);
+	int (*secsize)(dm_table_entry_t *, unsigned *);
 	
 	uint32_t version[3];
 	int ref_cnt;
@@ -306,6 +310,7 @@
 int dm_target_linear_deps(dm_table_entry_t *, prop_array_t);
 int dm_target_linear_destroy(dm_table_entry_t *);
 int dm_target_linear_upcall(dm_table_entry_t *, struct buf *);
+int dm_target_linear_secsize(dm_table_entry_t *, unsigned *);
 
 /* Generic function used to convert char to string */
 uint64_t atoi(const char *); 
@@ -318,6 +323,7 @@
 int dm_target_stripe_deps(dm_table_entry_t *, prop_array_t);
 int dm_target_stripe_destroy(dm_table_entry_t *);
 int dm_target_stripe_upcall(dm_table_entry_t *, struct buf *);
+int dm_target_stripe_secsize(dm_table_entry_t *, unsigned *);
 
 /* dm_table.c  */
 #define DM_TABLE_ACTIVE 0
@@ -325,6 +331,7 @@
 
 int dm_table_destroy(dm_table_head_t *, uint8_t);
 uint64_t 

CVS commit: src

2010-12-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 23 15:27:45 UTC 2010

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/stdio: Makefile
src/tests/lib/libc/stdlib: Makefile
Added Files:
src/tests/lib/libc/stdio: t_popen.c
src/tests/lib/libc/stdlib: t_div.c

Log Message:
Migrate a couple more tests to aft


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdio/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdio/t_popen.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdlib/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_div.c

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.186 src/distrib/sets/lists/tests/mi:1.187
--- src/distrib/sets/lists/tests/mi:1.186	Wed Dec 22 23:45:44 2010
+++ src/distrib/sets/lists/tests/mi	Thu Dec 23 15:27:44 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.186 2010/12/22 23:45:44 pgoyette Exp $
+# $NetBSD: mi,v 1.187 2010/12/23 15:27:44 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -324,9 +324,11 @@
 ./usr/libdata/debug/usr/tests/lib/libc/hashtests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/hash/t_sha2.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdiotests-lib-debug
-./usr/libdata/debug/usr/tests/lib/libc/stdio/t_fmemopen.debug	tests-lib-debug		debug,atf
-./usr/libdata/debug/usr/tests/lib/libc/stdio/t_format.debug	tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_fmemopen.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_format.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdio/t_popen.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlibtests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_div.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment_pth.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug	tests-lib-debug		debug,atf
@@ -1542,6 +1544,7 @@
 ./usr/tests/lib/libc/hash/t_sha2		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib			tests-lib-tests
 ./usr/tests/lib/libc/stdlib/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/stdlib/t_div		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_environment	tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_environment_pth	tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_mi_vector_hash	tests-lib-tests		atf
@@ -1550,6 +1553,7 @@
 ./usr/tests/lib/libc/stdio/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdio/t_fmemopen		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdio/t_format		tests-lib-tests		atf
+./usr/tests/lib/libc/stdio/t_popen		tests-lib-tests		atf
 ./usr/tests/lib/libc/string			tests-obsolete		obsolete
 ./usr/tests/lib/libc/string/Atffile		tests-obsolete		obsolete
 ./usr/tests/lib/libc/string/t_popcount		tests-obsolete		obsolete

Index: src/tests/lib/libc/stdio/Makefile
diff -u src/tests/lib/libc/stdio/Makefile:1.2 src/tests/lib/libc/stdio/Makefile:1.3
--- src/tests/lib/libc/stdio/Makefile:1.2	Fri Nov 19 18:18:53 2010
+++ src/tests/lib/libc/stdio/Makefile	Thu Dec 23 15:27:44 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/11/19 18:18:53 njoly Exp $
+# $NetBSD: Makefile,v 1.3 2010/12/23 15:27:44 pgoyette Exp $
 
 .include bsd.own.mk
 
@@ -6,5 +6,6 @@
 
 TESTS_C+=	t_fmemopen
 TESTS_C+=	t_format
+TESTS_C+=	t_popen
 
 .include bsd.test.mk

Index: src/tests/lib/libc/stdlib/Makefile
diff -u src/tests/lib/libc/stdlib/Makefile:1.5 src/tests/lib/libc/stdlib/Makefile:1.6
--- src/tests/lib/libc/stdlib/Makefile:1.5	Fri Dec  3 13:11:50 2010
+++ src/tests/lib/libc/stdlib/Makefile	Thu Dec 23 15:27:44 2010
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2010/12/03 13:11:50 njoly Exp $
+# $NetBSD: Makefile,v 1.6 2010/12/23 15:27:44 pgoyette Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/lib/libc/stdlib
 
-TESTS_C+=	t_mi_vector_hash t_environment t_environment_pth
+TESTS_C+=	t_div t_mi_vector_hash t_environment t_environment_pth
 TESTS_C+=	t_strtox
 
 LDADD.t_environment_pth=	-pthread

Added files:

Index: src/tests/lib/libc/stdio/t_popen.c
diff -u /dev/null src/tests/lib/libc/stdio/t_popen.c:1.1
--- /dev/null	Thu Dec 23 15:27:45 2010
+++ src/tests/lib/libc/stdio/t_popen.c	Thu Dec 23 15:27:44 2010
@@ -0,0 +1,130 @@
+/*	$NetBSD: t_popen.c,v 1.1 2010/12/23 15:27:44 pgoyette Exp $ */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matthias Scheler.
+ *
+ * Redistribution 

CVS commit: src/regress/lib/libc

2010-12-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 23 15:32:04 UTC 2010

Modified Files:
src/regress/lib/libc: Makefile
Removed Files:
src/regress/lib/libc/div: Makefile div.c
src/regress/lib/libc/popen: Makefile popen.c

Log Message:
Remove a couple tests - they've moved to atf


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/regress/lib/libc/Makefile
cvs rdiff -u -r1.3 -r0 src/regress/lib/libc/div/Makefile \
src/regress/lib/libc/div/div.c
cvs rdiff -u -r1.3 -r0 src/regress/lib/libc/popen/Makefile
cvs rdiff -u -r1.4 -r0 src/regress/lib/libc/popen/popen.c

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

Modified files:

Index: src/regress/lib/libc/Makefile
diff -u src/regress/lib/libc/Makefile:1.60 src/regress/lib/libc/Makefile:1.61
--- src/regress/lib/libc/Makefile:1.60	Wed Dec 22 23:48:19 2010
+++ src/regress/lib/libc/Makefile	Thu Dec 23 15:32:03 2010
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.60 2010/12/22 23:48:19 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.61 2010/12/23 15:32:03 pgoyette Exp $
 
 SUBDIR+= _setjmp atexit citrus clone context convfp db \
-	div divrem gen gdtoa getaddrinfo hsearch inet int_fmtio locale md5sha \
-	nsdispatch popen pty randomid regex rpc servent setjmp sigsetjmp \
+	divrem gen gdtoa getaddrinfo hsearch inet int_fmtio locale md5sha \
+	nsdispatch pty randomid regex rpc servent setjmp sigsetjmp \
 	stdlib string strptime sys time
 
 .include bsd.own.mk



CVS commit: src/external/gpl2/lvm2/dist/libdm/ioctl

2010-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 23 17:44:33 UTC 2010

Modified Files:
src/external/gpl2/lvm2/dist/libdm/ioctl: libdm_netbsd.c

Log Message:
false needs stdbool.h


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c

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

Modified files:

Index: src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c
diff -u src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c:1.5 src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c:1.6
--- src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c:1.5	Sat Dec  5 06:42:24 2009
+++ src/external/gpl2/lvm2/dist/libdm/ioctl/libdm_netbsd.c	Thu Dec 23 12:44:33 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: libdm_netbsd.c,v 1.5 2009/12/05 11:42:24 haad Exp $*/
+/*  $NetBSD: libdm_netbsd.c,v 1.6 2010/12/23 17:44:33 christos Exp $*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -40,6 +40,7 @@
 #include stdio.h
 #include stdlib.h
 #include unistd.h
+#include stdbool.h
 
 #include dev/dm/netbsd-dm.h
 



CVS commit: src/external/gpl2/lvm2

2010-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 23 17:46:55 UTC 2010

Modified Files:
src/external/gpl2/lvm2: lvm2tools.mk
src/external/gpl2/lvm2/dist/daemons/cmirrord: functions.c
src/external/gpl2/lvm2/dist/libdm/ioctl: libdm-iface.c
libdm-nbsd-iface.c
src/external/gpl2/lvm2/lib/libdevmapper: Makefile
src/external/gpl2/lvm2/sbin/dmsetup: Makefile

Log Message:
PR/44267: Michael van Elst: LVM devices have wrong permissions
- Centralize CPPFLAGS for DM_DEVICE_{UID,GID,MODE}
- Make DM_DEVICE_GID operator DM_DEVICE_MODE 0640 to be more NetBSD like
- make all the code use DM_DEVICE_MODE instead of hard-coding.
- make sure that all mknod calls are followed by a chown call.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/lvm2/lvm2tools.mk
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c
cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/lvm2/lib/libdevmapper/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/lvm2/sbin/dmsetup/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/gpl2/lvm2/lvm2tools.mk
diff -u src/external/gpl2/lvm2/lvm2tools.mk:1.1 src/external/gpl2/lvm2/lvm2tools.mk:1.2
--- src/external/gpl2/lvm2/lvm2tools.mk:1.1	Sun Dec 21 19:57:58 2008
+++ src/external/gpl2/lvm2/lvm2tools.mk	Thu Dec 23 12:46:54 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: lvm2tools.mk,v 1.1 2008/12/22 00:57:58 haad Exp $
+#	$NetBSD: lvm2tools.mk,v 1.2 2010/12/23 17:46:54 christos Exp $
 
 .include bsd.own.mk
 
@@ -9,6 +9,9 @@
 LIBDM_DISTDIR=		${NETBSDSRCDIR}/external/gpl2/lvm2/dist/libdm
 LIBDM_INCLUDE=		${NETBSDSRCDIR}/external/gpl2/lvm2/dist/include
 
+# root:operator [cb]rw-r-
+CPPFLAGS+=-DDM_DEVICE_UID=0 -DDM_DEVICE_GID=5 -DDM_DEVICE_MODE=0640
+
 #
 #LIBDM_OBJDIR.libdevmapper=${LIBDM_SRCDIR}/lib/libdevmapper/
 #

Index: src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c
diff -u src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c:1.1.1.1 src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c:1.2
--- src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c:1.1.1.1	Tue Dec  1 19:27:10 2009
+++ src/external/gpl2/lvm2/dist/daemons/cmirrord/functions.c	Thu Dec 23 12:46:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: functions.c,v 1.1.1.1 2009/12/02 00:27:10 haad Exp $	*/
+/*	$NetBSD: functions.c,v 1.2 2010/12/23 17:46:54 christos Exp $	*/
 
 /*
  * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
@@ -350,7 +350,10 @@
 	LOG_DBG(Path not found for %d/%d, major, minor);
 	LOG_DBG(Creating /dev/mapper/%d-%d, major, minor);
 	sprintf(path_rtn, /dev/mapper/%d-%d, major, minor);
-	r = mknod(path_rtn, S_IFBLK | S_IRUSR | S_IWUSR, MKDEV(major, minor));
+	r = mknod(path_rtn, S_IFBLK | DM_DEVICE_MODE, MKDEV(major, minor));
+
+	if (r != -1)
+		r = chown(path_rtn, DM_DEVICE_UID, DM_DEVICE_GID);
 
 	/*
 	 * If we have to make the path, we unlink it after we open it

Index: src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c
diff -u src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c:1.1.1.3 src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c:1.2
--- src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c:1.1.1.3	Tue Dec  1 19:26:11 2009
+++ src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-iface.c	Thu Dec 23 12:46:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: libdm-iface.c,v 1.1.1.3 2009/12/02 00:26:11 haad Exp $	*/
+/*	$NetBSD: libdm-iface.c,v 1.2 2010/12/23 17:46:54 christos Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -245,11 +245,15 @@
 
 	log_verbose(Creating device %s (%u, %u), control, major, minor);
 
-	if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
+	if (mknod(control, S_IFCHR | DM_DEVICE_MODE,
 		  MKDEV(major, minor))  0)  {
 		log_sys_error(mknod, control);
 		return 0;
 	}
+	if (chown(control, DM_DEVICE_UID, DM_DEVICE_GID) == -1) {
+		log_sys_error(cbown, control);
+		return 0;
+	}
 
 #ifdef HAVE_SELINUX
 	if (!dm_set_selinux_context(control, S_IFCHR)) {

Index: src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c
diff -u src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c:1.7 src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c:1.8
--- src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c:1.7	Fri Mar 12 11:24:40 2010
+++ src/external/gpl2/lvm2/dist/libdm/ioctl/libdm-nbsd-iface.c	Thu Dec 23 12:46:54 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: libdm-nbsd-iface.c,v 1.7 2010/03/12 16:24:40 haad Exp $*/
+/*  $NetBSD: libdm-nbsd-iface.c,v 1.8 2010/12/23 17:46:54 christos Exp $*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -162,11 +162,15 @@
 
 	log_verbose(Creating device %s (%u, %u), control, major, 

CVS commit: src/libexec/lfs_cleanerd

2010-12-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Dec 23 18:08:41 UTC 2010

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

Log Message:
Deduce raw device correctly by prepending r to basename.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 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.26 src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.27
--- src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.26	Mon Aug 16 22:11:55 2010
+++ src/libexec/lfs_cleanerd/lfs_cleanerd.c	Thu Dec 23 18:08:41 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.26 2010/08/16 22:11:55 pooka Exp $	 */
+/* $NetBSD: lfs_cleanerd.c,v 1.27 2010/12/23 18:08:41 mlelstv Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -205,6 +205,7 @@
 	int rootfd;
 	int i;
 	void *sbuf;
+	char *bn;
 
 	/*
 	 * Get the raw device from the block device.
@@ -218,7 +219,11 @@
 		syslog(LOG_ERR, couldn't malloc device name string: %m);
 		return -1;
 	}
-	sprintf(fs-clfs_dev, /dev/r%s, sf.f_mntfromname + 5);
+	bn = strrchr(sf.f_mntfromname, '/');
+	bn = bn ? bn+1 : sf.f_mntfromname;
+	strlcpy(fs-clfs_dev, sf.f_mntfromname, bn - sf.f_mntfromname + 1);
+	strcat(fs-clfs_dev, r);
+	strcat(fs-clfs_dev, bn);
 	if ((fs-clfs_devfd = kops.ko_open(fs-clfs_dev, O_RDONLY, 0))  0) {
 		syslog(LOG_ERR, couldn't open device %s for reading,
 			fs-clfs_dev);



CVS commit: src/share/man/man4

2010-12-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Dec 23 19:15:56 UTC 2010

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

Log Message:
Remove double-quotes from .Sx macros.


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

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

Modified files:

Index: src/share/man/man4/multicast.4
diff -u src/share/man/man4/multicast.4:1.4 src/share/man/man4/multicast.4:1.5
--- src/share/man/man4/multicast.4:1.4	Mon Mar 22 18:58:31 2010
+++ src/share/man/man4/multicast.4	Thu Dec 23 19:15:55 2010
@@ -24,7 +24,7 @@
 .\ DEALINGS IN THE SOFTWARE.
 .\
 .\ $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $
-.\ $NetBSD: multicast.4,v 1.4 2010/03/22 18:58:31 joerg Exp $
+.\ $NetBSD: multicast.4,v 1.5 2010/12/23 19:15:55 njoly Exp $
 .\
 .Dd September 4, 2003
 .Dt MULTICAST 4
@@ -78,7 +78,7 @@
 and must run a multicast routing capable user-level process.
 From developer's point of view,
 the programming guide described in the
-.Sx Programming Guide
+.Sx Programming Guide
 section should be used to control the multicast forwarding in the kernel.
 .\
 .Ss Programming Guide
@@ -86,7 +86,7 @@
 The so-called
 .Dq advanced multicast API
 is described in the
-.Sx Advanced Multicast API Programming Guide
+.Sx Advanced Multicast API Programming Guide
 section.
 .Pp
 First, a multicast routing socket must be open.
@@ -417,7 +417,7 @@
 To support backward compatibility, if the user-level process does not
 ask for any new features, the kernel defaults to the basic
 multicast API (see the
-.Sx Programming Guide
+.Sx Programming Guide
 section).
 .\ XXX: edit as appropriate after the advanced multicast API is
 .\ supported under IPv6



CVS commit: src/sys/dev/dm

2010-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 23 20:07:13 UTC 2010

Modified Files:
src/sys/dev/dm: device-mapper.c dm.h

Log Message:
Now that we have allowed operator to access the control node, make sure
that he cannot cause damage, by only allowing the superuser to do ioctls
that can cause damage.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dm/dm.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.27 src/sys/dev/dm/device-mapper.c:1.28
--- src/sys/dev/dm/device-mapper.c:1.27	Thu Dec 23 09:58:13 2010
+++ src/sys/dev/dm/device-mapper.c	Thu Dec 23 15:07:13 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.27 2010/12/23 14:58:13 mlelstv Exp $ */
+/*$NetBSD: device-mapper.c,v 1.28 2010/12/23 20:07:13 christos Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -45,6 +45,7 @@
 #include sys/ioctl.h
 #include sys/ioccom.h
 #include sys/kmem.h
+#include sys/kauth.h
 
 #include netbsd-dm.h
 #include dm.h
@@ -121,23 +122,23 @@
  * ioctl to kernel but will do another things in userspace.
  *
  */
-struct cmd_function cmd_fn[] = {
-		{ .cmd = version, .fn = dm_get_version_ioctl},
-		{ .cmd = targets, .fn = dm_list_versions_ioctl},
-		{ .cmd = create,  .fn = dm_dev_create_ioctl},
-		{ .cmd = info,.fn = dm_dev_status_ioctl},
-		{ .cmd = mknodes, .fn = dm_dev_status_ioctl},		
-		{ .cmd = names,   .fn = dm_dev_list_ioctl},
-		{ .cmd = suspend, .fn = dm_dev_suspend_ioctl},
-		{ .cmd = remove,  .fn = dm_dev_remove_ioctl}, 
-		{ .cmd = rename,  .fn = dm_dev_rename_ioctl},
-		{ .cmd = resume,  .fn = dm_dev_resume_ioctl},
-		{ .cmd = clear,   .fn = dm_table_clear_ioctl},
-		{ .cmd = deps,.fn = dm_table_deps_ioctl},
-		{ .cmd = reload,  .fn = dm_table_load_ioctl},
-		{ .cmd = status,  .fn = dm_table_status_ioctl},
-		{ .cmd = table,   .fn = dm_table_status_ioctl},
-		{NULL, NULL}	
+static const struct cmd_function cmd_fn[] = {
+	{ .cmd = version, .fn = dm_get_version_ioctl,	  .allowed = 1 },
+	{ .cmd = targets, .fn = dm_list_versions_ioctl, .allowed = 1 },
+	{ .cmd = create,  .fn = dm_dev_create_ioctl,.allowed = 0 },
+	{ .cmd = info,.fn = dm_dev_status_ioctl,.allowed = 1 },
+	{ .cmd = mknodes, .fn = dm_dev_status_ioctl,.allowed = 1 },
+	{ .cmd = names,   .fn = dm_dev_list_ioctl,  .allowed = 1 },
+	{ .cmd = suspend, .fn = dm_dev_suspend_ioctl,   .allowed = 0 },
+	{ .cmd = remove,  .fn = dm_dev_remove_ioctl,.allowed = 0 }, 
+	{ .cmd = rename,  .fn = dm_dev_rename_ioctl,.allowed = 0 },
+	{ .cmd = resume,  .fn = dm_dev_resume_ioctl,.allowed = 0 },
+	{ .cmd = clear,   .fn = dm_table_clear_ioctl,   .allowed = 0 },
+	{ .cmd = deps,.fn = dm_table_deps_ioctl,.allowed = 1 },
+	{ .cmd = reload,  .fn = dm_table_load_ioctl,.allowed = 0 },
+	{ .cmd = status,  .fn = dm_table_status_ioctl,  .allowed = 1 },
+	{ .cmd = table,   .fn = dm_table_status_ioctl,  .allowed = 1 },
+	{ .cmd = NULL, 	.fn = NULL,			  .allowed = 0 }	
 };
 
 #ifdef _MODULE
@@ -382,7 +383,7 @@
  * Translate command sent from libdevmapper to func.
  */
 static int
-dm_cmd_to_fun(prop_dictionary_t dm_dict){
+dm_cmd_to_fun(prop_dictionary_t dm_dict) {
 	int i, r;
 	prop_string_t command;
 	
@@ -395,6 +396,11 @@
 		if (prop_string_equals_cstring(command, cmd_fn[i].cmd))
 			break;
 
+	if (!cmd_fn[i].allowed  
+	(r = kauth_authorize_generic(kauth_cred_get(),
+	KAUTH_GENERIC_ISSUSER, NULL)) != 0)
+		return r;
+
 	if (cmd_fn[i].cmd == NULL)
 		return EINVAL;
 

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.21 src/sys/dev/dm/dm.h:1.22
--- src/sys/dev/dm/dm.h:1.21	Thu Dec 23 09:58:13 2010
+++ src/sys/dev/dm/dm.h	Thu Dec 23 15:07:13 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.21 2010/12/23 14:58:13 mlelstv Exp $  */
+/*$NetBSD: dm.h,v 1.22 2010/12/23 20:07:13 christos Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -258,11 +258,13 @@
  * This structure is used to translate command sent to kernel driver in
  * keycommand/key
  * value/value
- * to function which I can call.
+ * to function which I can call, and if the command is allowed for
+ * non-superusers.
  */
 struct cmd_function {
 	const char *cmd;
 	int  (*fn)(prop_dictionary_t);
+	int  allowed;
 };
 
 /* device-mapper */



CVS commit: src/usr.bin/mail

2010-12-23 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Dec 23 20:11:00 UTC 2010

Modified Files:
src/usr.bin/mail: mail.1

Log Message:
Fix sub-section reference.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/usr.bin/mail/mail.1

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/mail/mail.1
diff -u src/usr.bin/mail/mail.1:1.58 src/usr.bin/mail/mail.1:1.59
--- src/usr.bin/mail/mail.1:1.58	Fri May 14 16:23:42 2010
+++ src/usr.bin/mail/mail.1	Thu Dec 23 20:11:00 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mail.1,v 1.58 2010/05/14 16:23:42 joerg Exp $
+.\	$NetBSD: mail.1,v 1.59 2010/12/23 20:11:00 njoly Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -2060,7 +2060,7 @@
 searching sender names, subjects, or header fields (if
 .Ar searchheaders
 is defined); see the
-.Sx Specifying message
+.Sx Specifying messages
 section.
 The value of the variable is a space or comma delimited list of
 options.



CVS commit: src/sys/dev/pci

2010-12-23 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 23 21:34:02 UTC 2010

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

Log Message:
read 32bits instead of 64bits and truncate the upper 32bits


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/voyagerfb.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/voyagerfb.c
diff -u src/sys/dev/pci/voyagerfb.c:1.5 src/sys/dev/pci/voyagerfb.c:1.6
--- src/sys/dev/pci/voyagerfb.c:1.5	Thu Dec 16 06:45:51 2010
+++ src/sys/dev/pci/voyagerfb.c	Thu Dec 23 21:34:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyagerfb.c,v 1.5 2010/12/16 06:45:51 cegger Exp $	*/
+/*	$NetBSD: voyagerfb.c,v 1.6 2010/12/23 21:34:02 cegger Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.5 2010/12/16 06:45:51 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.6 2010/12/23 21:34:02 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -207,7 +207,7 @@
 	sc-sc_dataport = bus_space_vaddr(sc-sc_memt, sc-sc_regh);
 	sc-sc_dataport += SM502_DATAPORT;
 
-	reg = bus_space_read_8(sc-sc_memt, sc-sc_regh, SM502_PANEL_DISP_CRTL);
+	reg = bus_space_read_4(sc-sc_memt, sc-sc_regh, SM502_PANEL_DISP_CRTL);
 	switch (reg  SM502_PDC_DEPTH_MASK) {
 		case SM502_PDC_8BIT:
 			sc-sc_depth = 8;



CVS commit: src/external/gpl2/lvm2/dist/lib/device

2010-12-23 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Thu Dec 23 21:39:09 UTC 2010

Modified Files:
src/external/gpl2/lvm2/dist/lib/device: dev-io.c

Log Message:
Change way how we get device size from device. Do not use LSEEK but
DIOCGWEDGEINFO and DIOCGDINFO. This should fix problem with raidframe + lvm
reported by

Toby Karyadi on current-us...@.

Thanks for reporting this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/lvm2/dist/lib/device/dev-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/gpl2/lvm2/dist/lib/device/dev-io.c
diff -u src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.7 src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.8
--- src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.7	Thu Dec 23 14:46:25 2010
+++ src/external/gpl2/lvm2/dist/lib/device/dev-io.c	Thu Dec 23 21:39:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dev-io.c,v 1.7 2010/12/23 14:46:25 mlelstv Exp $	*/
+/*	$NetBSD: dev-io.c,v 1.8 2010/12/23 21:39:08 haad Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -275,26 +275,20 @@
 		log_sys_error(open, name);
 #endif		
 		return 0;
-		}
-
-#ifdef __NetBSD__
-	if ((*size = lseek (fd, 0, SEEK_END))  0) {
-		log_sys_error(lseek SEEK_END, name);
-		close(fd);
-		return 0;
 	}
 
-	if (ioctl(fd, DIOCGDINFO, lab)  0) {
-		if (ioctl(fd, DIOCGWEDGEINFO, dkw)  0) {
-			log_debug(ioctl DIOCGWEDGEINFO, name);
+#ifdef __NetBSD__
+/* Get info about partition/wedge */
+	if (ioctl(fd, DIOCGWEDGEINFO, dkw) == -1) {
+		if (ioctl(fd, DIOCGDINFO, lab) == -1) {
+			log_debug(Please implement DIOCGWEDGEINFO or 
+			DIOCGDINFO for disk device %s, name);
 			close(fd);
 			return 0;
 		} else
-			if (dkw.dkw_size)
-*size = dkw.dkw_size;
-	} else 
-		if (lab.d_secsize)
 			*size /= lab.d_secsize;
+	} else
+		*size = dkw.dkw_size;
 #else
 	if (ioctl(fd, BLKGETSIZE64, size)  0) {
 		log_sys_error(ioctl BLKGETSIZE64, name);



CVS commit: src/bin/dd

2010-12-23 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Dec 23 21:55:40 UTC 2010

Modified Files:
src/bin/dd: dd.c

Log Message:
Fix speling (deferred, not defered) as reported in #netbsd-code on
freenode IRC.  While I'm here, clean up the wording later in the comment.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/bin/dd/dd.c

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

Modified files:

Index: src/bin/dd/dd.c
diff -u src/bin/dd/dd.c:1.45 src/bin/dd/dd.c:1.46
--- src/bin/dd/dd.c:1.45	Tue Dec 14 19:04:05 2010
+++ src/bin/dd/dd.c	Thu Dec 23 21:55:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dd.c,v 1.45 2010/12/14 19:04:05 pooka Exp $	*/
+/*	$NetBSD: dd.c,v 1.46 2010/12/23 21:55:40 riz Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = @(#)dd.c	8.5 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: dd.c,v 1.45 2010/12/14 19:04:05 pooka Exp $);
+__RCSID($NetBSD: dd.c,v 1.46 2010/12/23 21:55:40 riz Exp $);
 #endif
 #endif /* not lint */
 
@@ -445,10 +445,10 @@
 		dd_out(1);
 
 	/*
-	 * Reporting nfs write error may be defered until next
+	 * Reporting nfs write error may be deferred until next
 	 * write(2) or close(2) system call.  So, we need to do an
 	 * extra check.  If an output is stdout, the file structure
-	 * may be shared among with other processes and close(2) just
+	 * may be shared with other processes and close(2) just
 	 * decreases the reference count.
 	 */
 	if (out.fd == STDOUT_FILENO  ddop_fsync(out, out.fd) == -1



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

2010-12-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 23 23:36:33 UTC 2010

Update of /cvsroot/src/external/bsd/byacc/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv26219

Log Message:
import latest byacc

Status:

Vendor Tag: DICKEY
Release Tags:   byacc-20101127

U src/external/bsd/byacc/dist/ACKNOWLEDGEMENTS
N src/external/bsd/byacc/dist/AUTHORS
U src/external/bsd/byacc/dist/CHANGES
U src/external/bsd/byacc/dist/NEW_FEATURES
U src/external/bsd/byacc/dist/NOTES
U src/external/bsd/byacc/dist/NO_WARRANTY
U src/external/bsd/byacc/dist/README
U src/external/bsd/byacc/dist/VERSION
U src/external/bsd/byacc/dist/aclocal.m4
C src/external/bsd/byacc/dist/closure.c
U src/external/bsd/byacc/dist/config.guess
U src/external/bsd/byacc/dist/config.sub
U src/external/bsd/byacc/dist/config_h.in
U src/external/bsd/byacc/dist/configure
U src/external/bsd/byacc/dist/configure.in
C src/external/bsd/byacc/dist/defs.h
U src/external/bsd/byacc/dist/descrip.mms
C src/external/bsd/byacc/dist/error.c
U src/external/bsd/byacc/dist/graph.c
U src/external/bsd/byacc/dist/install-sh
U src/external/bsd/byacc/dist/lalr.c
C src/external/bsd/byacc/dist/lr0.c
C src/external/bsd/byacc/dist/main.c
U src/external/bsd/byacc/dist/makefile.in
C src/external/bsd/byacc/dist/mkpar.c
C src/external/bsd/byacc/dist/output.c
C src/external/bsd/byacc/dist/skeleton.c
C src/external/bsd/byacc/dist/reader.c
C src/external/bsd/byacc/dist/symtab.c
C src/external/bsd/byacc/dist/verbose.c
U src/external/bsd/byacc/dist/vmsbuild.com
C src/external/bsd/byacc/dist/warshall.c
C src/external/bsd/byacc/dist/yacc.1
N src/external/bsd/byacc/dist/package/byacc.spec
N src/external/bsd/byacc/dist/package/debian/copyright
N src/external/bsd/byacc/dist/package/debian/compat
N src/external/bsd/byacc/dist/package/debian/watch
N src/external/bsd/byacc/dist/package/debian/control
N src/external/bsd/byacc/dist/package/debian/docs
N src/external/bsd/byacc/dist/package/debian/rules
N src/external/bsd/byacc/dist/package/debian/prerm
N src/external/bsd/byacc/dist/package/debian/postinst
N src/external/bsd/byacc/dist/package/debian/changelog
N src/external/bsd/byacc/dist/package/debian/source/format
N src/external/bsd/byacc/dist/package/pkgsrc/DESCR
N src/external/bsd/byacc/dist/package/pkgsrc/Makefile
N src/external/bsd/byacc/dist/package/pkgsrc/PLIST
N src/external/bsd/byacc/dist/package/pkgsrc/distinfo
N src/external/bsd/byacc/dist/test/code_error.code.c
U src/external/bsd/byacc/dist/test/grammar.output
U src/external/bsd/byacc/dist/test/error.output
U src/external/bsd/byacc/dist/test/error.tab.h
U src/external/bsd/byacc/dist/test/ftp.tab.h
U src/external/bsd/byacc/dist/test/README
U src/external/bsd/byacc/dist/test/calc.tab.h
U src/external/bsd/byacc/dist/test/calc.output
N src/external/bsd/byacc/dist/test/code_error.output
U src/external/bsd/byacc/dist/test/grammar.tab.h
N src/external/bsd/byacc/dist/test/code_error.y
N src/external/bsd/byacc/dist/test/code_calc.y
U src/external/bsd/byacc/dist/test/run_test.sh
N src/external/bsd/byacc/dist/test/calc2.output
N src/external/bsd/byacc/dist/test/code_calc.code.c
N src/external/bsd/byacc/dist/test/pure_error.y
U src/external/bsd/byacc/dist/test/error.y
N src/external/bsd/byacc/dist/test/pure_calc.y
N src/external/bsd/byacc/dist/test/code_calc.tab.c
N src/external/bsd/byacc/dist/test/pure_error.tab.c
N src/external/bsd/byacc/dist/test/code_calc.tab.h
N src/external/bsd/byacc/dist/test/code_error.tab.c
N src/external/bsd/byacc/dist/test/code_calc.output
N src/external/bsd/byacc/dist/test/pure_error.output
N src/external/bsd/byacc/dist/test/code_error.tab.h
N src/external/bsd/byacc/dist/test/pure_calc.tab.c
N src/external/bsd/byacc/dist/test/pure_calc.tab.h
N src/external/bsd/byacc/dist/test/pure_calc.output
C src/external/bsd/byacc/dist/test/error.tab.c
N src/external/bsd/byacc/dist/test/run_lint.sh
N src/external/bsd/byacc/dist/test/run_make.sh
N src/external/bsd/byacc/dist/test/pure_error.tab.h
U src/external/bsd/byacc/dist/test/grammar.y
C src/external/bsd/byacc/dist/test/ftp.y
N src/external/bsd/byacc/dist/test/calc2.tab.h
U src/external/bsd/byacc/dist/test/calc.y
C src/external/bsd/byacc/dist/test/ftp.tab.c
N src/external/bsd/byacc/dist/test/calc1.y
N src/external/bsd/byacc/dist/test/calc3.tab.h
U src/external/bsd/byacc/dist/test/calc.tab.c
N src/external/bsd/byacc/dist/test/calc3.output
N src/external/bsd/byacc/dist/test/calc2.y
N src/external/bsd/byacc/dist/test/calc3.y
N src/external/bsd/byacc/dist/test/calc3.tab.c
U src/external/bsd/byacc/dist/test/ftp.output
N src/external/bsd/byacc/dist/test/calc1.tab.h
N src/external/bsd/byacc/dist/test/calc1.output
N src/external/bsd/byacc/dist/test/calc2.tab.c
N src/external/bsd/byacc/dist/test/calc1.tab.c
U src/external/bsd/byacc/dist/test/grammar.tab.c

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

cvs checkout -jDICKEY:yesterday -jDICKEY src/external/bsd/byacc/dist



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:09:54 UTC 2010

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

Log Message:
Deal with MIPS_NUM_TLB_PIDS not being constant.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/arch/mips/mips/pmap_tlb.c

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

Modified files:

Index: src/sys/arch/mips/mips/pmap_tlb.c
diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.13 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.14
--- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.13	Wed Dec 22 06:05:42 2010
+++ src/sys/arch/mips/mips/pmap_tlb.c	Fri Dec 24 07:09:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.1.2.13 2010/12/22 06:05:42 matt Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.1.2.14 2010/12/24 07:09:53 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.1.2.13 2010/12/22 06:05:42 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.1.2.14 2010/12/24 07:09:53 matt Exp $);
 
 /*
  * Manages address spaces in a TLB.
@@ -146,9 +146,9 @@
 struct pmap_tlb_info pmap_tlb0_info = {
 	.ti_name = tlb0,
 	.ti_asid_hint = 1,
-	.ti_asid_mask = MIPS_TLB_NUM_PIDS - 1,
-	.ti_asid_max = MIPS_TLB_NUM_PIDS - 1,
-	.ti_asids_free = MIPS_TLB_NUM_PIDS - 1,
+	.ti_asid_mask = __builtin_constant_p(MIPS_TLB_NUM_PIDS) ? MIPS_TLB_NUM_PIDS - 1 : 0,
+	.ti_asid_max = __builtin_constant_p(MIPS_TLB_NUM_PIDS) ? MIPS_TLB_NUM_PIDS - 1 : 0,
+	.ti_asids_free = __builtin_constant_p(MIPS_TLB_NUM_PIDS) ? MIPS_TLB_NUM_PIDS - 1 : 0,
 	.ti_asid_bitmap[0] = 1,
 	.ti_wired = MIPS3_TLB_WIRED_UPAGES,
 	.ti_lock = pmap_tlb0_mutex,
@@ -247,7 +247,7 @@
 #endif /* MULTIPROCESSOR */
 		KASSERT(ti == pmap_tlb0_info);
 		mutex_init(ti-ti_lock, MUTEX_DEFAULT, IPL_SCHED);
-		if (!CPUISMIPSNN) {
+		if (!CPUISMIPSNN || !__builtin_constant_p(MIPS_TLB_NUM_PIDS)) {
 			ti-ti_asid_max = mips_options.mips_num_tlb_entries - 1;
 			ti-ti_asids_free = ti-ti_asid_max;
 			ti-ti_asid_mask = ti-ti_asid_max;



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:10:32 UTC 2010

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

Log Message:
need to include mips/locore.h explicitly now.
Ansify cpu_exec.c


To generate a diff of this commit:
cvs rdiff -u -r1.16.20.4 -r1.16.20.5 \
src/sys/arch/mips/mips/compat_13_machdep.c
cvs rdiff -u -r1.50.54.1.4.13 -r1.50.54.1.4.14 \
src/sys/arch/mips/mips/cpu_exec.c

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

Modified files:

Index: src/sys/arch/mips/mips/compat_13_machdep.c
diff -u src/sys/arch/mips/mips/compat_13_machdep.c:1.16.20.4 src/sys/arch/mips/mips/compat_13_machdep.c:1.16.20.5
--- src/sys/arch/mips/mips/compat_13_machdep.c:1.16.20.4	Mon Feb  1 04:16:19 2010
+++ src/sys/arch/mips/mips/compat_13_machdep.c	Fri Dec 24 07:10:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_13_machdep.c,v 1.16.20.4 2010/02/01 04:16:19 matt Exp $	*/
+/*	$NetBSD: compat_13_machdep.c,v 1.16.20.5 2010/12/24 07:10:32 matt Exp $	*/
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -15,7 +15,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: compat_13_machdep.c,v 1.16.20.4 2010/02/01 04:16:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_13_machdep.c,v 1.16.20.5 2010/12/24 07:10:32 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -30,6 +30,7 @@
 #include compat/sys/signalvar.h
 
 #include mips/regnum.h
+#include mips/locore.h
 
 #ifdef DEBUG
 extern int sigdebug;

Index: src/sys/arch/mips/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.13 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.14
--- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.13	Mon Feb  1 04:16:19 2010
+++ src/sys/arch/mips/mips/cpu_exec.c	Fri Dec 24 07:10:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.13 2010/02/01 04:16:19 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.14 2010/12/24 07:10:32 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.13 2010/02/01 04:16:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.50.54.1.4.14 2010/12/24 07:10:32 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_ultrix.h
@@ -61,6 +61,7 @@
 #endif
 #include machine/reg.h
 #include mips/regnum.h			/* symbolic register indices */
+#include mips/locore.h
 
 #include compat/common/compat_util.h
 
@@ -76,9 +77,7 @@
  *
  */
 int
-cpu_exec_aout_makecmds(l, epp)
-	struct lwp *l;
-	struct exec_package *epp;
+cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp)
 {
 	int error;
 
@@ -127,10 +126,7 @@
 
 #ifdef EXEC_ECOFF
 void
-cpu_exec_ecoff_setregs(l, epp, stack)
-	struct lwp *l;
-	struct exec_package *epp;
-	vaddr_t stack;
+cpu_exec_ecoff_setregs(struct lwp *l, struct exec_package *epp, vaddr_t stack)
 {
 	struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp-ep_hdr;
 	struct trapframe *tf = l-l_md.md_utf;
@@ -145,9 +141,7 @@
  * Do any machine-dependent diddling of the exec package when doing ECOFF.
  */
 int
-cpu_exec_ecoff_probe(l, epp)
-	struct lwp *l;
-	struct exec_package *epp;
+cpu_exec_ecoff_probe(struct lwp *l, struct exec_package *epp)
 {
 
 	/* NetBSD/mips does not have native ECOFF binaries. */
@@ -163,9 +157,7 @@
  */
 
 int
-mips_elf_makecmds (l, epp)
-struct lwp *l;
-struct exec_package *epp;
+mips_elf_makecmds(struct lwp *l, struct exec_package *epp)
 {
 	Elf32_Ehdr *ex = (Elf32_Ehdr *)epp-ep_hdr;
 	Elf32_Phdr ph;



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:11:25 UTC 2010

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

Log Message:
Just use the generic tlb_read_indexed instead of the mips1 specific version.


To generate a diff of this commit:
cvs rdiff -u -r1.64.16.16 -r1.64.16.17 src/sys/arch/mips/mips/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/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.64.16.16 src/sys/arch/mips/mips/db_interface.c:1.64.16.17
--- src/sys/arch/mips/mips/db_interface.c:1.64.16.16	Mon Feb  1 04:16:19 2010
+++ src/sys/arch/mips/mips/db_interface.c	Fri Dec 24 07:11:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.64.16.16 2010/02/01 04:16:19 matt Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.64.16.17 2010/12/24 07:11:25 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.64.16.16 2010/02/01 04:16:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.64.16.17 2010/12/24 07:11:25 matt Exp $);
 
 #include opt_cputype.h	/* which mips CPUs do we support? */
 #include opt_ddb.h
@@ -252,7 +252,7 @@
 		int i;
 
 		for (i = 0; i  mips_options.mips_num_tlb_entries; i++) {
-			mips1_tlb_read_indexed(i, tlb);
+			tlb_read_indexed(i, tlb);
 			db_printf(TLB%c%2d Hi 0x%08x Lo 0x%08x,
 (tlb.tlb_lo1  MIPS1_PG_V) ? ' ' : '*',
 i, tlb.tlb_hi,



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:12:10 UTC 2010

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

Log Message:
If compiling for MIPS1, deal with the presence of load delay slots.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/mips/mips_fixup.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/mips/mips_fixup.c
diff -u src/sys/arch/mips/mips/mips_fixup.c:1.1.2.6 src/sys/arch/mips/mips/mips_fixup.c:1.1.2.7
--- src/sys/arch/mips/mips/mips_fixup.c:1.1.2.6	Wed Dec 22 06:13:36 2010
+++ src/sys/arch/mips/mips/mips_fixup.c	Fri Dec 24 07:12:10 2010
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.1.2.6 2010/12/22 06:13:36 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: mips_fixup.c,v 1.1.2.7 2010/12/24 07:12:10 matt Exp $);
 
 #include sys/param.h
 
@@ -237,13 +237,20 @@
 		 * Stubs typically look like:
 		 *	lui	v0, %hi(sym)
 		 *	lX	t9, %lo(sym)(v0)
+		 *	[nop]
 		 *	jr	t9
 		 *	nop
 		 */
 		const uint32_t lui_insn = stubp[0];
 		const uint32_t load_insn = stubp[1];
-		KASSERT(stubp[2] == 0x0328);	/* jr t9 */
-		KASSERT(stubp[3] == 0);			/* nop */
+#ifdef DIAGNOSTIC
+		if (stubp[2] == 0) {
+			KASSERT(stubp[3] == 0x0328);	/* jr t9 */
+			KASSERT(stubp[4] == 0);			/* nop */
+		} else {
+			KASSERT(stubp[2] == 0x0328);	/* jr t9 */
+			KASSERT(stubp[3] == 0);			/* nop */
+		}
 
 		KASSERT(INSN_LUI_P(lui_insn));
 #ifdef _LP64
@@ -251,7 +258,6 @@
 #else
 		KASSERT(INSN_LW_P(load_insn));
 #endif
-#ifdef DIAGNOSTIC
 		const u_int lui_reg = (lui_insn  16)  31;
 		const u_int load_reg = (load_insn  16)  31;
 #endif
@@ -312,7 +318,7 @@
 int	tlb_update(vaddr_t, uint32_t)			__stub;
 void	tlb_enter(size_t, vaddr_t, uint32_t)		__stub;
 void	tlb_read_indexed(size_t, struct tlbmask *)	__stub;
-void	wbflush(void)	__stub;
+void	wbflush(void)	/*__stub*/;
 
 void
 mips_cpu_switch_resume(struct lwp *l)



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:13:19 UTC 2010

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: lock_stubs.S spl.S

Log Message:
MIPS1 needs load delay nops.  Fix a problem in the RAS mips_spin_enter
where we weren't actually decrementing ci_mtx_count.


To generate a diff of this commit:
cvs rdiff -u -r1.9.18.10 -r1.9.18.11 src/sys/arch/mips/mips/lock_stubs.S
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/mips/spl.S

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

Modified files:

Index: src/sys/arch/mips/mips/lock_stubs.S
diff -u src/sys/arch/mips/mips/lock_stubs.S:1.9.18.10 src/sys/arch/mips/mips/lock_stubs.S:1.9.18.11
--- src/sys/arch/mips/mips/lock_stubs.S:1.9.18.10	Sun Feb 28 03:28:54 2010
+++ src/sys/arch/mips/mips/lock_stubs.S	Fri Dec 24 07:13:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs.S,v 1.9.18.10 2010/02/28 03:28:54 matt Exp $	*/
+/*	$NetBSD: lock_stubs.S,v 1.9.18.11 2010/12/24 07:13:19 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -236,8 +236,8 @@
 NESTED(mutex_spin_enter, CALLFRAME_SIZ, ra)
 	move	t0, a0
 	PTR_L	t2, L_CPU(MIPS_CURLWP)
-	INT_L	ta1, CPU_INFO_CPL(t2)
 	INT_L	ta0, MTX_IPL(t0)
+	INT_L	ta1, CPU_INFO_CPL(t2)
 
 	/*
 	 * If the current IPL is less than the mutex's IPL, we need to raise
@@ -268,6 +268,7 @@
 	 */
 1:
 	INT_L	ta2, CPU_INFO_MTX_COUNT(t2)
+	nop
 	INT_ADDU ta3, ta2, -1
 	INT_S	ta3, CPU_INFO_MTX_COUNT(t2)
 	bltz	ta2, 2f
@@ -277,6 +278,7 @@
 #ifdef PARANOIA
 	INT_L	ta1, CPU_INFO_MTX_OLDSPL(t2)
 	INT_L	ta2, CPU_INFO_CPL(t2)	# get updated CPL
+	nop
 	sltu	v0, ta2, ta0		# v0 = cpl  mtx_ipl
 	sltu	v1, ta2, ta1		# v1 = cpl  oldspl
 	sll	v0, 1
@@ -322,7 +324,7 @@
  *
  * o All of the critical sections are 20 bytes in size, and the entry
  *   to each critical section is aligned on a 16 byte boundary (see
- *   top of _lock_ras() for why).  The entry is defined here as the
+ *   top of _restart_lock_ras() for why).  The entry is defined here as the
  *   point after where a restart occurs if we trap within the section.
  *
  * o The entire code block is aligned on a 128 byte boundary, and is
@@ -330,7 +332,7 @@
  *   after taking a trap with:
  *
  *	if ((addr  ~127) == _lock_ras_start)
- *		addr = _lock_ras(addr);
+ *		addr = _restart_lock_ras(addr);
  *
  *   See definition of MIPS_LOCK_RAS_SIZE in asm.h.
  *
@@ -347,12 +349,15 @@
  * unsigned long old, unsigned long new);
  */
 	.text
-	.p2align 7
+#if MIPS_LOCK_RAS_SIZE != 256
+#error RAS alignment needs to be fixed
+#endif
+	.p2align 8
 
 EXPORT(_lock_ras_start)
-
-	.space	12
-
+	nop
+	nop
+	nop
 LEAF_NOPROFILE(_atomic_cas_ulong)
 	PTR_L	t0, (a0)	/* - critical section start */
 _atomic_cas_start:
@@ -404,16 +409,16 @@
 
 #ifndef LOCKDEBUG
 	.p2align 5
-/*
- * int mutex_enter(kmutex_t *mtx);
- */
 	nop
 	nop
 	nop
+/*
+ * int mutex_enter(kmutex_t *mtx);
+ */
 LEAF_NOPROFILE(mutex_enter)
 	PTR_L	t0, (a0)	/* - critical section start */
 _mutex_enter_start:
-	nop
+	 nop
 	bnez	t0, 1f
 	 nop			
 	PTR_S	MIPS_CURLWP, (a0)/* - critical section end */
@@ -443,7 +448,10 @@
 END(mutex_exit)
 	 nop
 
-	.p2align 7			/* Get out of the RAS block */
+#if MIPS_LOCK_RAS_SIZE != 256
+#error RAS alignment needs to be fixed
+#endif
+	.p2align 8		/* Get out of the RAS block */
 
 /*
  * void	mutex_spin_enter(kmutex_t *mtx);
@@ -453,6 +461,7 @@
 	PTR_L	t2, L_CPU(MIPS_CURLWP)
 	INT_L	a0, MTX_IPL(t0)
 	INT_L	ta1, CPU_INFO_CPL(t2)		# get current cpl
+	nop
 
 	/*
 	 * If the current IPL is less than the mutex's IPL, we need to raise
@@ -477,8 +486,9 @@
 	 */
 1:
 	INT_L	ta2, CPU_INFO_MTX_COUNT(t2)
+	nop
 	INT_ADDU ta3, ta2, -1
-	INT_S	ta2, CPU_INFO_MTX_COUNT(t2)
+	INT_S	ta3, CPU_INFO_MTX_COUNT(t2)
 
 	bnez	ta2, 2f
 	 nop
@@ -525,7 +535,7 @@
  *	t2	clobbered
  */
 
-LEAF_NOPROFILE(_lock_ras)
+LEAF_NOPROFILE(_restart_lock_ras)
 	li	t1, -16
 	and	t2, k1, t1
 	la	t0, _atomic_cas_start
@@ -547,7 +557,7 @@
 1:
 	j	ra
 	 addiu	k1, t0, -4
-END(_lock_ras)
+END(_restart_lock_ras)
 
 /*
  * int ucas_32(volatile uint32_t *ptr, uint32_t old, uint32_t new, uint32_t *ret)
@@ -587,6 +597,7 @@
 	PTR_L	t2, L_CPU(MIPS_CURLWP)
 #if defined(DIAGNOSTIC)
 	INT_L	t0, MTX_LOCK(a0)
+	nop
 	SYNC
 	beqz	t0, 2f
 	 nop
@@ -603,6 +614,7 @@
 	 */
 #ifdef PARANOIA
 	INT_L	a2, MTX_IPL(a0)
+	nop
 #endif
 	INT_L	a0, CPU_INFO_MTX_OLDSPL(t2)
 
@@ -610,6 +622,7 @@
 	 * Increment the mutex count
 	 */
 	INT_L	t0, CPU_INFO_MTX_COUNT(t2)
+	nop
 	INT_ADDU t0, t0, 1
 	INT_S	t0, CPU_INFO_MTX_COUNT(t2)
 

Index: src/sys/arch/mips/mips/spl.S
diff -u src/sys/arch/mips/mips/spl.S:1.1.2.8 src/sys/arch/mips/mips/spl.S:1.1.2.9
--- src/sys/arch/mips/mips/spl.S:1.1.2.8	Wed Dec 22 06:08:10 2010
+++ src/sys/arch/mips/mips/spl.S	Fri Dec 24 07:13:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: spl.S,v 1.1.2.8 2010/12/22 06:08:10 matt Exp $	*/
+/*	$NetBSD: spl.S,v 1.1.2.9 2010/12/24 07:13:19 matt Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD 

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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:16:50 UTC 2010

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: asm.h

Log Message:
MIPS_LOCK_RAS_SIZE needs to be 256 since each RAS need 64 bytes and we can
have 4 of them.


To generate a diff of this commit:
cvs rdiff -u -r1.40.38.12 -r1.40.38.13 src/sys/arch/mips/include/asm.h

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

Modified files:

Index: src/sys/arch/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.40.38.12 src/sys/arch/mips/include/asm.h:1.40.38.13
--- src/sys/arch/mips/include/asm.h:1.40.38.12	Mon Feb 15 03:12:17 2010
+++ src/sys/arch/mips/include/asm.h	Fri Dec 24 07:16:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.40.38.12 2010/02/15 03:12:17 matt Exp $	*/
+/*	$NetBSD: asm.h,v 1.40.38.13 2010/12/24 07:16:50 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -617,7 +617,7 @@
 #endif
 
 /* See lock_stubs.S. */
-#define	MIPS_LOCK_RAS_SIZE	128
+#define	MIPS_LOCK_RAS_SIZE	(4*64)
 
 #define	CPUVAR(off) _C_LABEL(cpu_info_store)+__CONCAT(CPU_INFO_,off)
 



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:32:26 UTC 2010

Modified Files:
src/sys/arch/algor/algor [matt-nb5-mips64]: algor_p4032_intr.c
algor_p5064_intr.c algor_p6032_intr.c

Log Message:
Adopt the new spl/interrupt framework.


To generate a diff of this commit:
cvs rdiff -u -r1.20.16.2 -r1.20.16.3 \
src/sys/arch/algor/algor/algor_p4032_intr.c
cvs rdiff -u -r1.23.16.2 -r1.23.16.3 \
src/sys/arch/algor/algor/algor_p5064_intr.c
cvs rdiff -u -r1.16.16.2 -r1.16.16.3 \
src/sys/arch/algor/algor/algor_p6032_intr.c

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

Modified files:

Index: src/sys/arch/algor/algor/algor_p4032_intr.c
diff -u src/sys/arch/algor/algor/algor_p4032_intr.c:1.20.16.2 src/sys/arch/algor/algor/algor_p4032_intr.c:1.20.16.3
--- src/sys/arch/algor/algor/algor_p4032_intr.c:1.20.16.2	Sun Feb 28 03:32:23 2010
+++ src/sys/arch/algor/algor/algor_p4032_intr.c	Fri Dec 24 07:32:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p4032_intr.c,v 1.20.16.2 2010/02/28 03:32:23 matt Exp $	*/
+/*	$NetBSD: algor_p4032_intr.c,v 1.20.16.3 2010/12/24 07:32:26 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: algor_p4032_intr.c,v 1.20.16.2 2010/02/28 03:32:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: algor_p4032_intr.c,v 1.20.16.3 2010/12/24 07:32:26 matt Exp $);
 
 #include opt_ddb.h
 #define	__INTR_PRIVATE
@@ -243,7 +243,6 @@
 		evcnt_attach_dynamic(p4032_cpuintrs[i].cintr_count,
 		EVCNT_TYPE_INTR, NULL, mips, p4032_cpuintrnames[i]);
 	}
-	evcnt_attach_static(mips_int5_evcnt);
 
 	for (i = 0; i  NIRQMAPS; i++) {
 		irqmap = p4032_irqmap[i];

Index: src/sys/arch/algor/algor/algor_p5064_intr.c
diff -u src/sys/arch/algor/algor/algor_p5064_intr.c:1.23.16.2 src/sys/arch/algor/algor/algor_p5064_intr.c:1.23.16.3
--- src/sys/arch/algor/algor/algor_p5064_intr.c:1.23.16.2	Sun Feb 28 03:32:23 2010
+++ src/sys/arch/algor/algor/algor_p5064_intr.c	Fri Dec 24 07:32:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p5064_intr.c,v 1.23.16.2 2010/02/28 03:32:23 matt Exp $	*/
+/*	$NetBSD: algor_p5064_intr.c,v 1.23.16.3 2010/12/24 07:32:26 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: algor_p5064_intr.c,v 1.23.16.2 2010/02/28 03:32:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: algor_p5064_intr.c,v 1.23.16.3 2010/12/24 07:32:26 matt Exp $);
 
 #include opt_ddb.h
 #define	__INTR_PRIVATE
@@ -112,7 +112,7 @@
 #define	IRQMAP_ISABASE		(IRQMAP_LOCBASE + NLOCIRQS)
 #define	NIRQMAPS		(IRQMAP_ISABASE + NISAIRQS)
 
-const char *p5064_intrnames[NIRQMAPS] = {
+const char * const p5064_intrnames[NIRQMAPS] = {
 	/*
 	 * PCI INTERRUPTS
 	 */
@@ -275,13 +275,13 @@
 };
 
 struct p5064_cpuintr p5064_cpuintrs[NINTRS];
-const char *p5064_cpuintrnames[NINTRS] = {
+const char * const p5064_cpuintrnames[NINTRS] = {
 	int 0 (isa),
 	int 1 (pci),
 	int 2 (local),
 };
 
-const char *p5064_intrgroups[NINTRS] = {
+const char * const p5064_intrgroups[NINTRS] = {
 	isa,
 	pci,
 	local,
@@ -322,7 +322,6 @@
 		evcnt_attach_dynamic(p5064_cpuintrs[i].cintr_count,
 		EVCNT_TYPE_INTR, NULL, mips, p5064_cpuintrnames[i]);
 	}
-	evcnt_attach_static(mips_int5_evcnt);
 
 	for (i = 0; i  NIRQMAPS; i++) {
 		irqmap = p5064_irqmap[i];

Index: src/sys/arch/algor/algor/algor_p6032_intr.c
diff -u src/sys/arch/algor/algor/algor_p6032_intr.c:1.16.16.2 src/sys/arch/algor/algor/algor_p6032_intr.c:1.16.16.3
--- src/sys/arch/algor/algor/algor_p6032_intr.c:1.16.16.2	Sun Feb 28 03:32:23 2010
+++ src/sys/arch/algor/algor/algor_p6032_intr.c	Fri Dec 24 07:32:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p6032_intr.c,v 1.16.16.2 2010/02/28 03:32:23 matt Exp $	*/
+/*	$NetBSD: algor_p6032_intr.c,v 1.16.16.3 2010/12/24 07:32:26 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: algor_p6032_intr.c,v 1.16.16.2 2010/02/28 03:32:23 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: algor_p6032_intr.c,v 1.16.16.3 2010/12/24 07:32:26 matt Exp $);
 
 #include opt_ddb.h
 #define	__INTR_PRIVATE
@@ -197,7 +197,6 @@
 		evcnt_attach_dynamic(p6032_cpuintrs[i].cintr_count,
 		EVCNT_TYPE_INTR, NULL, mips, p6032_cpuintrnames[i]);
 	}
-	evcnt_attach_static(mips_int5_evcnt);
 
 	for (i = 0; i = NIRQMAPS; i++) {
 		irqmap = p6032_irqmap[i];



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:50:58 UTC 2010

Modified Files:
src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: bus.c
src/sys/arch/cobalt/include [matt-nb5-mips64]: bus.h

Log Message:
Define bus_space_mmap


To generate a diff of this commit:
cvs rdiff -u -r1.35.16.3 -r1.35.16.4 src/sys/arch/cobalt/cobalt/bus.c
cvs rdiff -u -r1.22 -r1.22.18.1 src/sys/arch/cobalt/include/bus.h

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

Modified files:

Index: src/sys/arch/cobalt/cobalt/bus.c
diff -u src/sys/arch/cobalt/cobalt/bus.c:1.35.16.3 src/sys/arch/cobalt/cobalt/bus.c:1.35.16.4
--- src/sys/arch/cobalt/cobalt/bus.c:1.35.16.3	Wed Jan 20 09:04:32 2010
+++ src/sys/arch/cobalt/cobalt/bus.c	Fri Dec 24 07:50:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.35.16.3 2010/01/20 09:04:32 matt Exp $	*/
+/*	$NetBSD: bus.c,v 1.35.16.4 2010/12/24 07:50:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus.c,v 1.35.16.3 2010/01/20 09:04:32 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus.c,v 1.35.16.4 2010/12/24 07:50:58 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -117,6 +117,15 @@
 	return 0;
 }
 
+paddr_t
+bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot,
+int flags)
+{
+
+	/* XXX not implemented */
+	return -1;
+}
+
 /*
  * Common function for DMA map creation.  May be called by bus-specific
  * DMA map creation functions.

Index: src/sys/arch/cobalt/include/bus.h
diff -u src/sys/arch/cobalt/include/bus.h:1.22 src/sys/arch/cobalt/include/bus.h:1.22.18.1
--- src/sys/arch/cobalt/include/bus.h:1.22	Mon Apr 28 20:23:16 2008
+++ src/sys/arch/cobalt/include/bus.h	Fri Dec 24 07:50:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.22 2008/04/28 20:23:16 martin Exp $	*/
+/*	$NetBSD: bus.h,v 1.22.18.1 2010/12/24 07:50:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -88,6 +88,16 @@
 	bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp);
 
 /*
+ *	paddr_t bus_space_mmap(bus_space_tag_t t,
+ *  bus_addr_t addr, off_t offset, int prot, int flags);
+ *
+ * Mmap bus space for a user application.
+ */
+
+paddr_t	bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot,
+int flags);
+
+/*
  *	int bus_space_alloc(bus_space_tag_t t, bus_addr_t, rstart,
  *	bus_addr_t rend, bus_size_t size, bus_size_t align,
  *	bus_size_t boundary, int flags, bus_addr_t *addrp,



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

2010-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Dec 24 07:52:01 UTC 2010

Modified Files:
src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: machdep.c

Log Message:
mips_vector_init needs to be called sooner so that the spl routine are
instantiated.


To generate a diff of this commit:
cvs rdiff -u -r1.98.10.4 -r1.98.10.5 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.4 src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.5
--- src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.4	Sun Mar 21 17:38:33 2010
+++ src/sys/arch/cobalt/cobalt/machdep.c	Fri Dec 24 07:52:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.98.10.4 2010/03/21 17:38:33 cliff Exp $	*/
+/*	$NetBSD: machdep.c,v 1.98.10.5 2010/12/24 07:52:01 matt Exp $	*/
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.98.10.4 2010/03/21 17:38:33 cliff Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.98.10.5 2010/12/24 07:52:01 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -189,6 +189,13 @@
 
 	}
 
+	/*
+	 * Copy exception-dispatch code down to exception vector.
+	 * Initialize locore-function vector.
+	 * Clear out the I and D caches.
+	 */
+	mips_vector_init(NULL);
+
 	/* Check for valid bootinfo passed from bootstrap */
 	if (bim == BOOTINFO_MAGIC) {
 		struct btinfo_magic *bi_magic;
@@ -257,13 +264,6 @@
 	uvm_setpagesize();
 
 	/*
-	 * Copy exception-dispatch code down to exception vector.
-	 * Initialize locore-function vector.
-	 * Clear out the I and D caches.
-	 */
-	mips_vector_init(NULL);
-
-	/*
 	 * The boot command is passed in the top 512 bytes,
 	 * so don't clobber that.
 	 */