CVS commit: src/doc

2012-07-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Jul 27 07:21:02 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2012d. [apb 20120722]


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1724 src/doc/CHANGES:1.1725
--- src/doc/CHANGES:1.1724	Fri Jul 27 05:38:21 2012
+++ src/doc/CHANGES	Fri Jul 27 07:21:01 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1724 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1725 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -88,6 +88,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	kernel: Change mii_statchg to take struct ifnet * instead of
 		device_t.  [matt 20120722]
 	powerpc: Add support for FPU emulation on BookE. [matt 20120722]
+	zoneinfo: Import tzdata2012d. [apb 20120722]
 	evbarm: Add initial support for the RaspberryPi. [skrll 20120726]
 	OpenSSH: Imported 1.0.1c [christos 20120726]
 	kernel: safepri is dead; replaced by macro IPL_SAFEPRI. [matt 20120727]



CVS commit: src/sys/fs/puffs

2012-07-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jul 27 07:25:56 UTC 2012

Modified Files:
src/sys/fs/puffs: puffs_vfsops.c


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/fs/puffs/puffs_vfsops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.103 src/sys/fs/puffs/puffs_vfsops.c:1.104
--- src/sys/fs/puffs/puffs_vfsops.c:1.103	Sun Jul 22 17:40:46 2012
+++ src/sys/fs/puffs/puffs_vfsops.c	Fri Jul 27 07:25:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vfsops.c,v 1.103 2012/07/22 17:40:46 manu Exp $	*/
+/*	$NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vfsops.c,v 1.103 2012/07/22 17:40:46 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -61,6 +61,7 @@ __KERNEL_RCSID(0, $NetBSD: puffs_vfsops
 MODULE(MODULE_CLASS_VFS, puffs, putter);
 
 VFS_PROTOS(puffs_vfsop);
+extern struct vfsops puffs_vfsops;
 
 #ifndef PUFFS_PNODEBUCKETS
 #define PUFFS_PNODEBUCKETS 256
@@ -320,6 +321,14 @@ puffs_vfsop_mount(struct mount *mp, cons
 
 	vfs_getnewfsid(mp);
 
+	/*
+	 * Hold a reference on vfs so that the puffs module cannot be 
+	 * unloaded while the pools items have not been freed by unmount.
+	 */
+	mutex_enter(vfs_list_lock);
+	puffs_vfsops.vfs_refcount++;
+	mutex_exit(vfs_list_lock);
+
  out:
 	if (error  pmp  pmp-pmp_pi)
 		putter_detach(pmp-pmp_pi);
@@ -448,6 +457,11 @@ puffs_vfsop_unmount(struct mount *mp, in
 		kmem_free(pmp-pmp_pnodehash, BUCKETALLOC(pmp-pmp_npnodehash));
 		kmem_free(pmp, sizeof(struct puffs_mount));
 		error = 0;
+
+		/*
+		 * One less user for puffs pools
+		 */
+		vfs_delref(puffs_vfsops);
 	} else {
 		mutex_exit(pmp-pmp_lock);
 	}



CVS commit: src/sys/fs/puffs

2012-07-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jul 27 07:38:45 UTC 2012

Modified Files:
src/sys/fs/puffs: puffs_msgif.c puffs_sys.h puffs_vfsops.c
puffs_vnops.c

Log Message:
Rename slow sopreq queue into node sopreq queue, to refet the fact that
is only intended for postponed node reclaims.
When purging the node sopreq queue, do not call puffs_msg_sendresp(), as
it makes no sense.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.80 -r1.81 src/sys/fs/puffs/puffs_sys.h
cvs rdiff -u -r1.104 -r1.105 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.170 -r1.171 src/sys/fs/puffs/puffs_vnops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_msgif.c
diff -u src/sys/fs/puffs/puffs_msgif.c:1.91 src/sys/fs/puffs/puffs_msgif.c:1.92
--- src/sys/fs/puffs/puffs_msgif.c:1.91	Sun Jul 22 17:40:46 2012
+++ src/sys/fs/puffs/puffs_msgif.c	Fri Jul 27 07:38:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.c,v 1.91 2012/07/22 17:40:46 manu Exp $	*/
+/*	$NetBSD: puffs_msgif.c,v 1.92 2012/07/27 07:38:44 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.91 2012/07/22 17:40:46 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.92 2012/07/27 07:38:44 manu Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -846,7 +846,7 @@ puffsop_msg(void *this, struct puffs_req
  * Node expiry. We come here after an inactive on an unexpired node.
  * The expiry has been queued and is done in sop thread.
  */
-static bool
+static void
 puffsop_expire(struct puffs_mount *pmp, puffs_cookie_t cookie)
 {
 	struct vnode *vp;
@@ -863,7 +863,7 @@ puffsop_expire(struct puffs_mount *pmp, 
 		vrele(vp); 
 	}
 
-	return false;
+	return;
 }
 
 static void
@@ -1058,11 +1058,9 @@ puffs_sop_thread(void *arg)
 	mutex_enter(pmp-pmp_sopmtx);
 	for (keeprunning = true; keeprunning; ) {
 		/*
-		 * We have a higher priority queue for flush and umount
-		 * and a lower priority queue for reclaims. Request on
-		 * slower queue are not honoured before clock reaches 
-		 * psopr_at. This code assumes that requests are ordered 
-		 * by psopr_at in queues.
+		 * We have a fast queue for flush and umount, and a node 
+		 * queue for delayes node reclaims. Requests on node queue 			 * are not honoured before clock reaches psopr_at. This 
+		 * code assumes that requests are ordered by psopr_at.
 		 */
 		do {
 			psopr = TAILQ_FIRST(pmp-pmp_sopfastreqs);
@@ -1072,9 +1070,9 @@ puffs_sop_thread(void *arg)
 break;
 			}
 
-			psopr = TAILQ_FIRST(pmp-pmp_sopslowreqs);
+			psopr = TAILQ_FIRST(pmp-pmp_sopnodereqs);
 			if ((psopr != NULL)  TIMED_OUT(psopr-psopr_at)) {
-TAILQ_REMOVE(pmp-pmp_sopslowreqs,
+TAILQ_REMOVE(pmp-pmp_sopnodereqs,
 	 psopr, psopr_entries);
 break;
 			}
@@ -1123,10 +1121,10 @@ puffs_sop_thread(void *arg)
 		mutex_enter(pmp-pmp_sopmtx);
 	}
 
-	while ((psopr = TAILQ_FIRST(pmp-pmp_sopslowreqs)) != NULL) {
-		TAILQ_REMOVE(pmp-pmp_sopslowreqs, psopr, psopr_entries);
+	while ((psopr = TAILQ_FIRST(pmp-pmp_sopnodereqs)) != NULL) {
+		TAILQ_REMOVE(pmp-pmp_sopnodereqs, psopr, psopr_entries);
 		mutex_exit(pmp-pmp_sopmtx);
-		puffs_msg_sendresp(pmp, psopr-psopr_preq, ENXIO);
+		KASSERT(psopr-psopr_sopreq == PUFFS_SOPREQ_EXPIRE);
 		kmem_free(psopr, sizeof(*psopr));
 		mutex_enter(pmp-pmp_sopmtx);
 	}

Index: src/sys/fs/puffs/puffs_sys.h
diff -u src/sys/fs/puffs/puffs_sys.h:1.80 src/sys/fs/puffs/puffs_sys.h:1.81
--- src/sys/fs/puffs/puffs_sys.h:1.80	Sat Jul 21 05:17:10 2012
+++ src/sys/fs/puffs/puffs_sys.h	Fri Jul 27 07:38:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_sys.h,v 1.80 2012/07/21 05:17:10 manu Exp $	*/
+/*	$NetBSD: puffs_sys.h,v 1.81 2012/07/27 07:38:44 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -176,7 +176,7 @@ struct puffs_mount {
 	kcondvar_t			pmp_sopcv;
 	intpmp_sopthrcount;
 	TAILQ_HEAD(, puffs_sopreq)	pmp_sopfastreqs;
-	TAILQ_HEAD(, puffs_sopreq)	pmp_sopslowreqs;
+	TAILQ_HEAD(, puffs_sopreq)	pmp_sopnodereqs;
 	boolpmp_docompat;
 };
 

Index: src/sys/fs/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.104 src/sys/fs/puffs/puffs_vfsops.c:1.105
--- src/sys/fs/puffs/puffs_vfsops.c:1.104	Fri Jul 27 07:25:56 2012
+++ src/sys/fs/puffs/puffs_vfsops.c	Fri Jul 27 07:38:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $	*/
+/*	$NetBSD: puffs_vfsops.c,v 1.105 2012/07/27 07:38:44 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vfsops.c,v 1.105 2012/07/27 07:38:44 manu Exp $);
 
 

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

2012-07-27 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Fri Jul 27 07:42:27 UTC 2012

Modified Files:
src/sys/arch/dreamcast/dev: gdrom.c

Log Message:
- Adjust the TOC parsing to reject an TOC with invalid (zero) track ids.
  Avoids dereferencing off the start of the TOC track array.
- Add #ifdef GDROMDEBUGTOC for dumping out the gdrom TOC values


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/dreamcast/dev/gdrom.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/dreamcast/dev/gdrom.c
diff -u src/sys/arch/dreamcast/dev/gdrom.c:1.34 src/sys/arch/dreamcast/dev/gdrom.c:1.35
--- src/sys/arch/dreamcast/dev/gdrom.c:1.34	Wed Sep  1 16:48:00 2010
+++ src/sys/arch/dreamcast/dev/gdrom.c	Fri Jul 27 07:42:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: gdrom.c,v 1.34 2010/09/01 16:48:00 tsutsui Exp $	*/
+/*	$NetBSD: gdrom.c,v 1.35 2012/07/27 07:42:26 abs Exp $	*/
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.34 2010/09/01 16:48:00 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: gdrom.c,v 1.35 2012/07/27 07:42:26 abs Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -586,15 +586,35 @@ gdromioctl(dev_t dev, u_long cmd, void *
 
 		if (error != 0)
 			return error;
-
+#ifdef GDROMDEBUGTOC 
+		{ /* Dump the GDROM TOC */
+		unsigned char *ptr = (unsigned char *)toc;
+		int i;
+
+		printf(gdrom: TOC\n);
+		for(i = 0; i  sizeof(toc); ++i) {
+			printf(%02x, *ptr++);
+			if( i%32 == 31)
+printf(\n);
+			else if( i%4 == 3)
+printf(,);
+		}
+		printf(\n);
+		}
+#endif
 		for (track = TOC_TRACK(toc.last);
 		track = TOC_TRACK(toc.first);
-		--track)
+		--track) {
+			if (track  1 || track  100)
+return ENXIO;
 			if (TOC_CTRL(toc.entry[track - 1]))
 break;
+		}
 
-		if (track  TOC_TRACK(toc.first) || track  100)
-			return ENXIO;
+#ifdef GDROMDEBUGTOC 
+		printf(gdrom: Using track %d, LBA %u\n, track,
+		TOC_LBA(toc.entry[track - 1]));
+#endif
 
 		*(int *)addr = htonl(TOC_LBA(toc.entry[track - 1])) -
 		sc-openpart_start;



CVS commit: src/sys/rump/librump/rumpkern

2012-07-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 27 09:06:01 UTC 2012

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
Use mmap hypercall for memory allocation only when absolutely necessary
(map == module_map).  Otherwise, use the malloc hypercall.  This avoids
relying on the platform's mmap() to be able to return arbitrarily
alignment memory.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/rump/librump/rumpkern/vm.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.129 src/sys/rump/librump/rumpkern/vm.c:1.130
--- src/sys/rump/librump/rumpkern/vm.c:1.129	Fri Jul 20 09:20:05 2012
+++ src/sys/rump/librump/rumpkern/vm.c	Fri Jul 27 09:06:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.129 2012/07/20 09:20:05 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.130 2012/07/27 09:06:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.129 2012/07/20 09:20:05 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.130 2012/07/27 09:06:01 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -83,6 +83,9 @@ struct vm_map rump_vmmap;
 static struct vm_map kernel_map_store;
 struct vm_map *kernel_map = kernel_map_store;
 
+static struct vm_map module_map_store;
+extern struct vm_map *module_map;
+
 vmem_t *kmem_arena;
 vmem_t *kmem_va_arena;
 
@@ -328,6 +331,8 @@ uvm_init(void)
 	cv_init(pdaemoncv, pdaemon);
 	cv_init(oomwait, oomwait);
 
+	module_map = module_map_store;
+
 	kernel_map-pmap = pmap_kernel();
 
 	pool_subsystem_init();
@@ -702,19 +707,22 @@ uvm_km_alloc(struct vm_map *map, vsize_t
 	 * just use a simple if instead of coming up with a fancy
 	 * generic solution.
 	 */
-	extern struct vm_map *module_map;
 	if (map == module_map) {
 		desired = (void *)(0x8000 - size);
 	}
 #endif
 
-	alignbit = 0;
-	if (align) {
-		alignbit = ffs(align)-1;
+	if (__predict_false(map == module_map)) {
+		alignbit = 0;
+		if (align) {
+			alignbit = ffs(align)-1;
+		}
+		rv = rumpuser_anonmmap(desired, size, alignbit,
+		flags  UVM_KMF_EXEC, error);
+	} else {
+		rv = rumpuser_malloc(size, align);
 	}
 
-	rv = rumpuser_anonmmap(desired, size, alignbit, flags  UVM_KMF_EXEC,
-	error);
 	if (rv == NULL) {
 		if (flags  (UVM_KMF_CANFAIL | UVM_KMF_NOWAIT))
 			return 0;
@@ -732,7 +740,10 @@ void
 uvm_km_free(struct vm_map *map, vaddr_t vaddr, vsize_t size, uvm_flag_t flags)
 {
 
-	rumpuser_unmap((void *)vaddr, size);
+	if (__predict_false(map == module_map))
+		rumpuser_unmap((void *)vaddr, size);
+	else
+		rumpuser_free((void *)vaddr);
 }
 
 struct vm_map *



CVS commit: src/lib/librumpuser

2012-07-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jul 27 09:09:05 UTC 2012

Modified Files:
src/lib/librumpuser: rumpuser.c rumpuser_daemonize.c rumpuser_dl.c
rumpuser_net.c rumpuser_pth.c rumpuser_sp.c sp_common.c
Added Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
Once again, make the rump kernel hypercall layer work on Linux.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/rumpuser.c
cvs rdiff -u -r1.2 -r1.3 src/lib/librumpuser/rumpuser_daemonize.c \
src/lib/librumpuser/rumpuser_net.c
cvs rdiff -u -r1.7 -r1.8 src/lib/librumpuser/rumpuser_dl.c \
src/lib/librumpuser/rumpuser_pth.c
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_port.h
cvs rdiff -u -r1.46 -r1.47 src/lib/librumpuser/rumpuser_sp.c
cvs rdiff -u -r1.31 -r1.32 src/lib/librumpuser/sp_common.c

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

Modified files:

Index: src/lib/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.17 src/lib/librumpuser/rumpuser.c:1.18
--- src/lib/librumpuser/rumpuser.c:1.17	Mon Jun 25 22:32:47 2012
+++ src/lib/librumpuser/rumpuser.c	Fri Jul 27 09:09:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.17 2012/06/25 22:32:47 abs Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.18 2012/07/27 09:09:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -25,30 +25,24 @@
  * SUCH DAMAGE.
  */
 
-#include sys/cdefs.h
+#include rumpuser_port.h
+
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser.c,v 1.17 2012/06/25 22:32:47 abs Exp $);
+__RCSID($NetBSD: rumpuser.c,v 1.18 2012/07/27 09:09:05 pooka Exp $);
 #endif /* !lint */
 
-/* thank the maker for this */
-#ifdef __linux__
-#define _XOPEN_SOURCE 500
-#define _BSD_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include features.h
-#endif
-
-#include sys/param.h
-#include sys/event.h
 #include sys/ioctl.h
 #include sys/mman.h
 #include sys/uio.h
+#include sys/stat.h
+#include sys/time.h
 
 #ifdef __NetBSD__
 #include sys/disk.h
 #include sys/disklabel.h
 #include sys/dkio.h
 #include sys/sysctl.h
+#include sys/event.h
 #endif
 
 #include assert.h
@@ -256,10 +250,16 @@ rumpuser_anonmmap(void *prefaddr, size_t
 	void *rv;
 	int prot;
 
+#ifndef MAP_ALIGNED
+#define MAP_ALIGNED(a) 0
+	if (alignbit)
+		fprintf(stderr, rumpuser_anonmmap: warning, requested 
+		alignment not supported by hypervisor\n);
+#endif
+
 	prot = PROT_READ|PROT_WRITE;
 	if (exec)
 		prot |= PROT_EXEC;
-	/* XXX: MAP_ALIGNED() is not portable */
 	rv = mmap(prefaddr, size, prot,
 	MAP_ANON | MAP_ALIGNED(alignbit), -1, 0);
 	if (rv == MAP_FAILED) {
@@ -500,7 +500,24 @@ int
 rumpuser_getenv(const char *name, char *buf, size_t blen, int *error)
 {
 
+#ifdef __linux__
+	char *tmp;
+
+	*error = 0;
+	if ((tmp = getenv(name)) != NULL) {
+		if (strlen(tmp) = blen) {
+			*error = ERANGE;
+			return -1;
+		}
+		strcpy(buf, tmp);
+		return 0;
+	} else {
+		*error = ENOENT;
+		return -1;
+	}
+#else
 	DOCALL(int, getenv_r(name, buf, blen));
+#endif
 }
 
 int
@@ -550,6 +567,7 @@ rumpuser_seterrno(int error)
 	errno = error;
 }
 
+#ifdef __NetBSD__
 int
 rumpuser_writewatchfile_setup(int kq, int fd, intptr_t opaque, int *error)
 {
@@ -592,6 +610,7 @@ rumpuser_writewatchfile_wait(int kq, int
 		*opaque = kev.udata;
 	return rv;
 }
+#endif
 
 /*
  * This is meant for safe debugging prints from the kernel.
@@ -629,20 +648,39 @@ rumpuser_kill(int64_t pid, int sig, int 
 int
 rumpuser_getnhostcpu(void)
 {
-	int ncpu;
-	size_t sz = sizeof(ncpu);
+	int ncpu = 1;
 
 #ifdef __NetBSD__
-	if (sysctlbyname(hw.ncpu, ncpu, sz, NULL, 0) == -1)
-		return 1;
-	return ncpu;
-#else
-	return 1;
+	size_t sz = sizeof(ncpu);
+
+	sysctlbyname(hw.ncpu, ncpu, sz, NULL, 0);
+#elif __linux__
+	FILE *fp;
+	char *line = NULL;
+	size_t n = 0;
+
+	/* If anyone knows a better way, I'm all ears */
+	if ((fp = fopen(/proc/cpuinfo, r)) != NULL) {
+		ncpu = 0;
+		while (getline(line, n, fp) != -1) {
+			if (strncmp(line,
+			processor, sizeof(processor)-1) == 0)
+				ncpu++;
+		}
+		if (ncpu == 0)
+			ncpu = 1;
+		free(line);
+		fclose(fp);
+	}
 #endif
+	
+	return ncpu;
 }
 
+/* XXX: this hypercall needs a better name */
 uint32_t
 rumpuser_arc4random(void)
 {
+
 	return arc4random();
 }

Index: src/lib/librumpuser/rumpuser_daemonize.c
diff -u src/lib/librumpuser/rumpuser_daemonize.c:1.2 src/lib/librumpuser/rumpuser_daemonize.c:1.3
--- src/lib/librumpuser/rumpuser_daemonize.c:1.2	Sat Jan 22 14:18:55 2011
+++ src/lib/librumpuser/rumpuser_daemonize.c	Fri Jul 27 09:09:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_daemonize.c,v 1.2 2011/01/22 14:18:55 pooka Exp $	*/
+/*	$NetBSD: rumpuser_daemonize.c,v 1.3 2012/07/27 09:09:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -25,9 +25,10 @@
  * SUCH DAMAGE.
  */
 
-#include sys/cdefs.h
+#include rumpuser_port.h
+
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser_daemonize.c,v 1.2 

CVS commit: src/sys/dev/pci

2012-07-27 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Jul 27 14:02:17 UTC 2012

Modified Files:
src/sys/dev/pci: twa.c twavar.h

Log Message:
Convert twa(4) to device_t (CFATTACH_DECL_NEW).


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/twa.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/twavar.h

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

Modified files:

Index: src/sys/dev/pci/twa.c
diff -u src/sys/dev/pci/twa.c:1.40 src/sys/dev/pci/twa.c:1.41
--- src/sys/dev/pci/twa.c:1.40	Mon Jan 30 19:41:23 2012
+++ src/sys/dev/pci/twa.c	Fri Jul 27 14:02:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.40 2012/01/30 19:41:23 drochner Exp $ */
+/*	$NetBSD: twa.c,v 1.41 2012/07/27 14:02:17 jakllsch Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,7 +67,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.40 2012/01/30 19:41:23 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.41 2012/07/27 14:02:17 jakllsch Exp $);
+
+#define TWA_DEBUG
 
 #include sys/param.h
 #include sys/systm.h
@@ -140,7 +142,7 @@ extern struct	cfdriver twa_cd;
 extern uint32_t twa_fw_img_size;
 extern uint8_t	twa_fw_img[];
 
-CFATTACH_DECL(twa, sizeof(struct twa_softc),
+CFATTACH_DECL_NEW(twa, sizeof(struct twa_softc),
 twa_match, twa_attach, NULL, NULL);
 
 /* FreeBSD driver revision for sysctl expected by the 3ware cli */
@@ -728,7 +730,7 @@ static int
 twa_print_inquiry_data(struct twa_softc *sc, struct scsipi_inquiry_data *scsipi)
 {
 
-printf(%s: %s\n, device_xname(sc-twa_dv), scsipi-vendor);
+printf(%s: %s\n, device_xname(sc-twa_dv), scsipi-vendor);
 
 return (1);
 }
@@ -839,7 +841,7 @@ twa_alloc_req_pkts(struct twa_softc *sc,
 	if ((rv = bus_dmamem_alloc(sc-twa_dma_tag,
 		size, PAGE_SIZE, 0, seg,
 		1, rseg, BUS_DMA_NOWAIT)) != 0){
-			aprint_error_dev(sc-twa_dv, unable to allocate 
+			aprint_error_dev(sc-twa_dv, unable to allocate 
 command packets, rv = %d\n, rv);
 			return (ENOMEM);
 	}
@@ -847,14 +849,14 @@ twa_alloc_req_pkts(struct twa_softc *sc,
 	if ((rv = bus_dmamem_map(sc-twa_dma_tag,
 		seg, rseg, size, (void **)sc-twa_cmds,
 		BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) {
-			aprint_error_dev(sc-twa_dv, unable to map commands, rv = %d\n, rv);
+			aprint_error_dev(sc-twa_dv, unable to map commands, rv = %d\n, rv);
 			return (1);
 	}
 
 	if ((rv = bus_dmamap_create(sc-twa_dma_tag,
 		size, num_reqs, size,
 		0, BUS_DMA_NOWAIT, sc-twa_cmd_map)) != 0) {
-			aprint_error_dev(sc-twa_dv, unable to create command DMA map, 
+			aprint_error_dev(sc-twa_dv, unable to create command DMA map, 
 rv = %d\n, rv);
 			return (ENOMEM);
 	}
@@ -862,13 +864,13 @@ twa_alloc_req_pkts(struct twa_softc *sc,
 	if ((rv = bus_dmamap_load(sc-twa_dma_tag, sc-twa_cmd_map,
 		sc-twa_cmds, size, NULL,
 		BUS_DMA_NOWAIT)) != 0) {
-			aprint_error_dev(sc-twa_dv, unable to load command DMA map, 
+			aprint_error_dev(sc-twa_dv, unable to load command DMA map, 
 rv = %d\n, rv);
 			return (1);
 	}
 
 	if ((uintptr_t)sc-twa_cmds % TWA_ALIGNMENT) {
-		aprint_error_dev(sc-twa_dv, DMA map memory not aligned on %d boundary\n, TWA_ALIGNMENT);
+		aprint_error_dev(sc-twa_dv, DMA map memory not aligned on %d boundary\n, TWA_ALIGNMENT);
 
 		return (1);
 	}
@@ -901,7 +903,7 @@ twa_alloc_req_pkts(struct twa_softc *sc,
 		if ((rv = bus_dmamap_create(sc-twa_dma_tag,
 			max_xfer, max_segs, 1, 0, BUS_DMA_NOWAIT,
 			tr-tr_dma_map)) != 0) {
-aprint_error_dev(sc-twa_dv, unable to create command 
+aprint_error_dev(sc-twa_dv, unable to create command 
 	DMA map, rv = %d\n, rv);
 return (ENOMEM);
 		}
@@ -947,7 +949,7 @@ twa_recompute_openings(struct twa_softc 
 
 #ifdef TWA_DEBUG
 		printf(%s: unit %d openings %d\n,
-device_xname(sc-twa_dv), unit, openings);
+device_xname(sc-twa_dv), unit, openings);
 #endif
 		if (td-td_dev != NULL)
 			(*td-td_callbacks-tcb_openings)(td-td_dev, td-td_openings);
@@ -997,7 +999,7 @@ twa_request_bus_scan(struct twa_softc *s
 locs[TWACF_UNIT] = unit;
 
 sc-sc_units[unit].td_dev =
-config_found_sm_loc(sc-twa_dv, twa,
+config_found_sm_loc(sc-twa_dv, twa,
 locs, twaa, twa_print, config_stdsubmatch);
 			}
 		} else {
@@ -1465,7 +1467,7 @@ twa_setup(struct twa_softc *sc)
 		/* Soft reset the controller, and try one more time. */
 
 		printf(%s: controller initialization failed. 
-		Retrying initialization\n, device_xname(sc-twa_dv));
+		Retrying initialization\n, device_xname(sc-twa_dv));
 
 		if ((error = twa_soft_reset(sc)) == 0)
 			error = twa_init_ctlr(sc);
@@ -1500,6 +1502,8 @@ twa_attach(device_t parent, device_t sel
 
 	sc = device_private(self);
 
+	sc-twa_dv = self;
+
 	pa = aux;
 	pc = pa-pa_pc;
 	sc-pc = pa-pa_pc;
@@ -1514,7 +1518,7 @@ twa_attach(device_t parent, device_t sel
 		use_64bit = false;
 		if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0,
 		

CVS commit: src/sys/sys

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 14:05:09 UTC 2012

Modified Files:
src/sys/sys: intr.h

Log Message:
Remove safepri.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/intr.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/sys/intr.h
diff -u src/sys/sys/intr.h:1.11 src/sys/sys/intr.h:1.12
--- src/sys/sys/intr.h:1.11	Thu Nov 24 03:35:59 2011
+++ src/sys/sys/intr.h	Fri Jul 27 14:05:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.11 2011/11/24 03:35:59 mrg Exp $	*/
+/*	$NetBSD: intr.h,v 1.12 2012/07/27 14:05:08 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,6 @@ void	softint_dispatch(lwp_t *, int);
 #define	SOFTINT_IMPMASK	0xf000
 
 extern u_int	softint_timing;
-extern int	safepri;
 
 /*
  * Historical aliases.



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 16:04:30 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64:
x86_64cpuid.S

Log Message:
make OPENSSL_cpuid_setup global again


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S:1.2	Thu Jul 26 15:58:42 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64cpuid.S	Fri Jul 27 12:04:30 2012
@@ -1,7 +1,7 @@
 
-.hidden	OPENSSL_cpuid_setup
+.globl	OPENSSL_cpuid_setup
 .section	.init
-	call	OPENSSL_cpuid_setup
+	call	OPENSSL_cpuid_setup@GOTPCREL(%rip)
 
 .hidden	OPENSSL_ia32cap_P
 .comm	OPENSSL_ia32cap_P,8,4



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 16:05:27 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: engine.inc

Log Message:
only x86 has AESNI


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.5	Thu Jul 26 16:21:20 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc	Fri Jul 27 12:05:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: engine.inc,v 1.5 2012/07/26 20:21:20 christos Exp $
+#	$NetBSD: engine.inc,v 1.6 2012/07/27 16:05:27 christos Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -12,7 +12,6 @@
 ENGINE_SRCS = eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \
 	eng_table.c eng_pkey.c eng_fat.c eng_all.c tb_asnmth.c \
 	tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \
-	eng_aesni.c \
 	eng_openssl.c eng_dyn.c eng_cnf.c eng_rdrand.c eng_rsax.c \
 	eng_cryptodev.c tb_store.c tb_ecdsa.c tb_ecdh.c tb_pkmeth.c \
 	e_4758cca.c e_4758cca_err.c \
@@ -26,11 +25,11 @@ ENGINE_SRCS = eng_err.c eng_lib.c eng_li
 	e_ubsec.c e_ubsec_err.c   \
 	e_padlock.c e_seed.c
 
-#.if defined(AESNI)
-#ENGINE_SRCS+=  eng_aesni.c
-#.else
-#AESCPPFLAGS=-DOPENSSL_NO_HW_AESNI
-#.endif
+.if defined(AESNI)
+ENGINE_SRCS+=  eng_aesni.c
+.else
+AESCPPFLAGS=-DOPENSSL_NO_HW_AESNI
+.endif
 
 ENGINE_SRCS += gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c gost_ameth.c \
 	gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c gosthash.c \



CVS commit: src/sys/dev/pci

2012-07-27 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Jul 27 16:25:11 UTC 2012

Modified Files:
src/sys/dev/pci: amr.c amrvar.h

Log Message:
Convert amr(4) to device_t (CFATTACH_DECL_NEW).


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/amr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/amrvar.h

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

Modified files:

Index: src/sys/dev/pci/amr.c
diff -u src/sys/dev/pci/amr.c:1.54 src/sys/dev/pci/amr.c:1.55
--- src/sys/dev/pci/amr.c:1.54	Sat Nov 13 13:52:05 2010
+++ src/sys/dev/pci/amr.c	Fri Jul 27 16:25:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: amr.c,v 1.54 2010/11/13 13:52:05 uebayasi Exp $	*/
+/*	$NetBSD: amr.c,v 1.55 2012/07/27 16:25:11 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amr.c,v 1.54 2010/11/13 13:52:05 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: amr.c,v 1.55 2012/07/27 16:25:11 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -112,7 +112,7 @@ static dev_type_open(amropen);
 static dev_type_close(amrclose);
 static dev_type_ioctl(amrioctl);
 
-CFATTACH_DECL(amr, sizeof(struct amr_softc),
+CFATTACH_DECL_NEW(amr, sizeof(struct amr_softc),
 amr_match, amr_attach, NULL, NULL);
 
 const struct cdevsw amr_cdevsw = {
@@ -270,6 +270,7 @@ amr_attach(device_t parent, device_t sel
 	aprint_naive(: RAID controller\n);
 
 	amr = device_private(self);
+	amr-amr_dv = self;
 	pa = (struct pci_attach_args *)aux;
 	pc = pa-pa_pc;
 
@@ -348,7 +349,7 @@ amr_attach(device_t parent, device_t sel
 
 	if ((rv = bus_dmamem_alloc(amr-amr_dmat, size, PAGE_SIZE, 0,
 	amr-amr_dmaseg, 1, rseg, BUS_DMA_NOWAIT)) != 0) {
-		aprint_error_dev(amr-amr_dv, unable to allocate buffer, rv = %d\n,
+		aprint_error_dev(amr-amr_dv, unable to allocate buffer, rv = %d\n,
 		rv);
 		amr_teardown(amr);
 		return;
@@ -358,7 +359,7 @@ amr_attach(device_t parent, device_t sel
 	if ((rv = bus_dmamem_map(amr-amr_dmat, amr-amr_dmaseg, rseg, size,
 	(void **)amr-amr_mbox,
 	BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) {
-		aprint_error_dev(amr-amr_dv, unable to map buffer, rv = %d\n,
+		aprint_error_dev(amr-amr_dv, unable to map buffer, rv = %d\n,
 		rv);
 		amr_teardown(amr);
 		return;
@@ -367,7 +368,7 @@ amr_attach(device_t parent, device_t sel
 
 	if ((rv = bus_dmamap_create(amr-amr_dmat, size, 1, size, 0,
 	BUS_DMA_NOWAIT, amr-amr_dmamap)) != 0) {
-		aprint_error_dev(amr-amr_dv, unable to create buffer DMA map, rv = %d\n,
+		aprint_error_dev(amr-amr_dv, unable to create buffer DMA map, rv = %d\n,
 		rv);
 		amr_teardown(amr);
 		return;
@@ -376,7 +377,7 @@ amr_attach(device_t parent, device_t sel
 
 	if ((rv = bus_dmamap_load(amr-amr_dmat, amr-amr_dmamap,
 	amr-amr_mbox, size, NULL, BUS_DMA_NOWAIT)) != 0) {
-		aprint_error_dev(amr-amr_dv, unable to load buffer DMA map, rv = %d\n,
+		aprint_error_dev(amr-amr_dv, unable to load buffer DMA map, rv = %d\n,
 		rv);
 		amr_teardown(amr);
 		return;
@@ -415,7 +416,7 @@ amr_attach(device_t parent, device_t sel
 		amr_ccb_free(amr, ac);
 	}
 	if (i != AMR_MAX_CMDS) {
-		aprint_error_dev(amr-amr_dv, memory exhausted\n);
+		aprint_error_dev(amr-amr_dv, memory exhausted\n);
 		amr_teardown(amr);
 		return;
 	}
@@ -473,7 +474,7 @@ amr_attach(device_t parent, device_t sel
 
 		locs[AMRCF_UNIT] = j;
 
-		amr-amr_drive[j].al_dv = config_found_sm_loc(amr-amr_dv,
+		amr-amr_drive[j].al_dv = config_found_sm_loc(amr-amr_dv,
 			amr, locs, amra, amr_print, config_stdsubmatch);
 	}
 
@@ -482,9 +483,9 @@ amr_attach(device_t parent, device_t sel
 	/* XXX This doesn't work for newer boards yet. */
 	if ((apt-apt_flags  AT_QUARTZ) == 0) {
 		rv = kthread_create(PRI_NONE, 0, NULL, amr_thread, amr,
-		amr-amr_thread, %s, device_xname(amr-amr_dv));
+		amr-amr_thread, %s, device_xname(amr-amr_dv));
  		if (rv != 0)
-			aprint_error_dev(amr-amr_dv, unable to create thread (%d),
+			aprint_error_dev(amr-amr_dv, unable to create thread (%d),
  			rv);
  		else
  			amr-amr_flags |= AMRF_THREAD;
@@ -571,9 +572,9 @@ amr_init(struct amr_softc *amr, const ch
 	if (ap != NULL) {
 		aprint_normal(%.80s\n, ap-ap_product);
 		if (intrstr != NULL)
-			aprint_normal_dev(amr-amr_dv, interrupting at %s\n,
+			aprint_normal_dev(amr-amr_dv, interrupting at %s\n,
 			intrstr);
-		aprint_normal_dev(amr-amr_dv, firmware %.16s, BIOS %.16s, %dMB RAM\n,
+		aprint_normal_dev(amr-amr_dv, firmware %.16s, BIOS %.16s, %dMB RAM\n,
 		ap-ap_firmware, ap-ap_bios,
 		le16toh(ap-ap_memsize));
 
@@ -585,19 +586,19 @@ amr_init(struct amr_softc *amr, const ch
 		aex = amr_enquire(amr, AMR_CMD_CONFIG, AMR_CONFIG_ENQ3,
 		AMR_CONFIG_ENQ3_SOLICITED_FULL, amr-amr_enqbuf);
 		if (aex == NULL) {
-			aprint_error_dev(amr-amr_dv, ENQUIRY3 failed\n);
+			aprint_error_dev(amr-amr_dv, ENQUIRY3 failed\n);
 			return (-1);
 		}
 

CVS commit: src/doc

2012-07-27 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Fri Jul 27 16:49:07 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note addition of POSIX pr(1) -f and -p options.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1725 src/doc/CHANGES:1.1726
--- src/doc/CHANGES:1.1725	Fri Jul 27 07:21:01 2012
+++ src/doc/CHANGES	Fri Jul 27 16:49:07 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1725 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1726 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -87,6 +87,7 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		[rkujawa 20120720]
 	kernel: Change mii_statchg to take struct ifnet * instead of
 		device_t.  [matt 20120722]
+	pr(1): Add support for POSIX -f and -p options. [ginsbach 20120724]
 	powerpc: Add support for FPU emulation on BookE. [matt 20120722]
 	zoneinfo: Import tzdata2012d. [apb 20120722]
 	evbarm: Add initial support for the RaspberryPi. [skrll 20120726]



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/engine

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 17:27:43 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_all.c

Log Message:
don't do cpuid anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.5 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.6
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.5	Thu Jul 26 16:21:20 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c	Fri Jul 27 13:27:43 2012
@@ -61,9 +61,9 @@
 
 void ENGINE_load_builtin_engines(void)
 	{
-	/* Some ENGINEs need this */
-	OPENSSL_cpuid_setup();
 #if 0
+	/* Done in .init section where needed */
+	OPENSSL_cpuid_setup();
 	/* There's no longer any need for an openssl ENGINE unless, one day,
 	 * it is the *only* way for standard builtin implementations to be be
 	 * accessed (ie. it would be possible to statically link binaries with



CVS commit: src/doc

2012-07-27 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Fri Jul 27 17:39:37 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
OpenSSH 1.0.1c - OpenSSL 1.0.1c


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1726 src/doc/CHANGES:1.1727
--- src/doc/CHANGES:1.1726	Fri Jul 27 16:49:07 2012
+++ src/doc/CHANGES	Fri Jul 27 17:39:36 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1726 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1727 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -91,5 +91,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	powerpc: Add support for FPU emulation on BookE. [matt 20120722]
 	zoneinfo: Import tzdata2012d. [apb 20120722]
 	evbarm: Add initial support for the RaspberryPi. [skrll 20120726]
-	OpenSSH: Imported 1.0.1c [christos 20120726]
+	OpenSSL: Imported 1.0.1c [christos 20120726]
 	kernel: safepri is dead; replaced by macro IPL_SAFEPRI. [matt 20120727]



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/engine

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 17:46:00 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_all.c

Log Message:
undo previous: some ports don't have it in the constructor!


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.6 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c:1.6	Fri Jul 27 13:27:43 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_all.c	Fri Jul 27 13:45:59 2012
@@ -61,9 +61,9 @@
 
 void ENGINE_load_builtin_engines(void)
 	{
-#if 0
-	/* Done in .init section where needed */
+	/* Some ENGINEs need this */
 	OPENSSL_cpuid_setup();
+#if 0
 	/* There's no longer any need for an openssl ENGINE unless, one day,
 	 * it is the *only* way for standard builtin implementations to be be
 	 * accessed (ie. it would be possible to statically link binaries with



CVS commit: src/crypto/external/bsd/openssl

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 18:10:40 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: cryptlib.c
src/crypto/external/bsd/openssl/lib/libcrypto: engine.inc
Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc

Log Message:
provide OPENSSL_cpuid_setup to the haves and the havenots
[still there are other platforms ia64, s370, powerpc64] where we can do better.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c:1.1.1.5 src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c:1.1.1.5	Thu Jul 26 10:59:06 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/cryptlib.c	Fri Jul 27 14:10:40 2012
@@ -718,7 +718,7 @@ void OPENSSL_cpuid_setup(void)
 unsigned long *OPENSSL_ia32cap_loc(void) { return NULL; }
 #endif
 int OPENSSL_NONPIC_relocated = 0;
-#if !defined(OPENSSL_CPUID_SETUP)  !defined(OPENSSL_CPUID_OBJ)
+#if (!defined(OPENSSL_CPUID_SETUP)  !defined(OPENSSL_CPUID_OBJ)) || defined(NEED_CPUID_SETUP)
 void OPENSSL_cpuid_setup(void) {}
 #endif
 

Index: src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc:1.6	Fri Jul 27 12:05:27 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/engine.inc	Fri Jul 27 14:10:40 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: engine.inc,v 1.6 2012/07/27 16:05:27 christos Exp $
+#	$NetBSD: engine.inc,v 1.7 2012/07/27 18:10:40 christos Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -28,7 +28,7 @@ ENGINE_SRCS = eng_err.c eng_lib.c eng_li
 .if defined(AESNI)
 ENGINE_SRCS+=  eng_aesni.c
 .else
-AESCPPFLAGS=-DOPENSSL_NO_HW_AESNI
+CRYPTOCPPFLAGS+=-DOPENSSL_NO_HW_AESNI
 .endif
 
 ENGINE_SRCS += gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c gost_ameth.c \
@@ -38,6 +38,10 @@ ENGINE_SRCS += gost2001.c gost2001_keyx.
 
 SRCS += ${ENGINE_SRCS}
 
+.if !defined(CPUID)
+CRYPTOCPPFLAGS+=-DNEED_CPUID_SETUP
+.endif
+
 .for cryptosrc in ${ENGINE_SRCS}
-CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/engine ${AESCPPFLAGS} -DHAVE_CRYPTODEV
+CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/engine ${CRYPTOCPPFLAGS} -DHAVE_CRYPTODEV
 .endfor

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.1
--- /dev/null	Fri Jul 27 14:10:41 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc	Fri Jul 27 14:10:40 2012
@@ -0,0 +1,3 @@
+CPUID_SRCS = armcap.c
+CPUID = yes
+.include ../../crypto.inc

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc:1.1
--- /dev/null	Fri Jul 27 14:10:41 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc	Fri Jul 27 14:10:40 2012
@@ -0,0 +1,3 @@
+CPUID_SRCS = ppccap.c
+CPUID = yes
+.include ../../crypto.inc

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc:1.1
--- /dev/null	Fri Jul 27 14:10:41 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc	Fri Jul 27 14:10:40 2012
@@ -0,0 +1,3 @@
+CPUID_SRCS = sparcv9cap.c
+CPUID = yes
+.include ../../crypto.inc



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 18:16:53 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: Makefile

Log Message:
more assembly munging


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile:1.4	Thu Jul 26 17:22:47 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile	Fri Jul 27 14:16:53 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2012/07/26 21:22:47 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2012/07/27 18:16:53 christos Exp $
 
 .include bsd.own.mk
 
@@ -8,6 +8,9 @@ CRYPTODIST=${NETBSDSRCDIR}/crypto
 regen:
 	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
 		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
-perl $$i elf | sed -e 's/\(OPENSSL[A-Za-z0-9_+]*\)(%rip)/\1@GOTPCREL(%rip)/' \
+perl $$i elf | sed \
+		-e 's/\(OPENSSL[A-Za-z0-9_+]*\)(%rip)/\1@GOTPCREL(%rip)/' \
+		-e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
+		-e 's/call	OPENSSL_cpuid_setup/call	OPENSSL_cpuid_setup@GOTPCREL(%rip)/' \
 		 $$(basename $$i .pl).S; \
 	done



CVS commit: src/doc

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 18:21:59 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
mention assembly file regeneration too


To generate a diff of this commit:
cvs rdiff -u -r1.952 -r1.953 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.952 src/doc/3RDPARTY:1.953
--- src/doc/3RDPARTY:1.952	Thu Jul 26 16:26:01 2012
+++ src/doc/3RDPARTY	Fri Jul 27 14:21:59 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.952 2012/07/26 20:26:01 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.953 2012/07/27 18:21:59 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -885,6 +885,8 @@ Notes:
 - Run openssl2netbsd to get rid of the RCSID identifiers
 - run make in /usr/src/crypto/external/bsd/openssl/lib/libcrypto/man
   to regen man pages.
+- run make in  /usr/src/crypto/external/bsd/openssl/lib/libcrypto/arch/*
+  to regen assembly files
 
 Package:	pcc
 Version:	1.1.0.DEVEL 20120325



CVS commit: src/lib/libutil

2012-07-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 27 18:22:04 UTC 2012

Modified Files:
src/lib/libutil: openpty.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libutil/openpty.3

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

Modified files:

Index: src/lib/libutil/openpty.3
diff -u src/lib/libutil/openpty.3:1.15 src/lib/libutil/openpty.3:1.16
--- src/lib/libutil/openpty.3:1.15	Mon Jul 23 02:21:14 2012
+++ src/lib/libutil/openpty.3	Fri Jul 27 18:22:04 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: openpty.3,v 1.15 2012/07/23 02:21:14 christos Exp $
+.\	$NetBSD: openpty.3,v 1.16 2012/07/27 18:22:04 wiz Exp $
 .\
 .\ Copyright (c) 1995
 .\	The Regents of the University of California.  All rights reserved.
@@ -68,7 +68,7 @@ If
 .Fa name
 is non-null, the filename of the slave is returned in
 .Fa name .
-The length of 
+The length of
 .Fa name
 is limited to
 .Dv 16
@@ -76,7 +76,7 @@ characters in the current
 .Xr ptm 4
 device driver (including the terminating
 .Dv NUL )
-which limits the maximum to 
+which limits the maximum to
 .Dv 100,000
 ptys.
 If



CVS commit: src/usr.bin/pr

2012-07-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 27 18:28:53 UTC 2012

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

Log Message:
New sentence, new line.
Use Aq or Ao/Ac instead of \*[Lt] \*[Gt].
Remove duplicate RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/pr/pr.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/pr/pr.1
diff -u src/usr.bin/pr/pr.1:1.19 src/usr.bin/pr/pr.1:1.20
--- src/usr.bin/pr/pr.1:1.19	Tue Jul 24 02:13:04 2012
+++ src/usr.bin/pr/pr.1	Fri Jul 27 18:28:53 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: pr.1,v 1.19 2012/07/24 02:13:04 ginsbach Exp $
+.\	$NetBSD: pr.1,v 1.20 2012/07/27 18:28:53 wiz Exp $
 .\
 .\ Copyright (c) 1991 Keith Muller.
 .\ Copyright (c) 1993
@@ -34,7 +34,6 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)pr.1	8.1 (Berkeley) 6/6/93
-.\	$NetBSD: pr.1,v 1.19 2012/07/24 02:13:04 ginsbach Exp $
 .\
 .Dd May 4, 2012
 .Dt PR 1
@@ -96,7 +95,7 @@ utility has completed processing.
 When multiple column output is specified,
 text columns are of equal width.
 By default text columns are separated by at least one
-.Em \*[Lt]blank\*[Gt] .
+.Aq Em blank .
 Input lines that do not fit into a text column are truncated.
 Lines are not truncated under single column output.
 .Sh OPTIONS
@@ -134,11 +133,16 @@ This option requires the use of the
 .Fl column
 option.
 .It Fl d
-Produce output that is double spaced. An extra
-.Em \*[Lt]newline\*[Gt]
-character is output following every \*[Lt]newline\*[Gt] found in the input.
+Produce output that is double spaced.
+An extra
+.Aq Em newline
+character is output following every
+.Aq newline
+found in the input.
 .It Fl e Ar \[char\]\[gap\]
-Expand each input \*[Lt]tab\*[Gt] to the next greater column
+Expand each input
+.Aq tab
+to the next greater column
 position specified by the formula
 .Ar n*gap+1 ,
 where
@@ -148,20 +152,20 @@ If
 .Ar gap
 is zero or is omitted the default is 8.
 All
-.Em \*[Lt]tab\*[Gt]
+.Aq Em tab
 characters in the input are expanded into the appropriate
 number of
-.Em \*[Lt]space\*[Gt]s .
+.Ao Em space Ac Ns s .
 If any nondigit character,
 .Ar char ,
 is specified, it is used as the input tab character.
 .It Fl F
 Use a
-.Em \*[Lt]form-feed\*[Gt]
+.Aq Em form-feed
 character for new pages,
 instead of the default behavior that uses a
 sequence of
-.Em \*[Lt]newline\*[Gt]
+.Aq Em newline
 characters.
 .It Fl f
 Same as
@@ -175,21 +179,27 @@ to replace the
 .Ar file name
 in the header line.
 .It Fl i Ar \[char\]\[gap\]
-In output, replace multiple \*[Lt]space\*[Gt]s with \*[Lt]tab\*[Gt]s whenever two or more
-adjacent \*[Lt]space\*[Gt]s reach column positions
+In output, replace multiple
+.Ao space Ac Ns s
+with
+.Ao tab Ac Ns s
+whenever two or more
+adjacent
+.Ao space Ac Ns s
+reach column positions
 .Ar gap+1 ,
 .Ar 2*gap+1 ,
 etc.
 If
 .Ar gap
 is zero or omitted, default
-.Em \*[Lt]tab\*[Gt]
+.Aq Em tab
 settings at every eighth column position
 is used.
 If any nondigit character,
 .Ar char ,
 is specified, it is used as the output
-.Em \*[Lt]tab\*[Gt]
+.Aq Em tab
 character.
 If the first character of
 .Ar char
@@ -237,17 +247,18 @@ output.
 If
 .Ar char
 (any nondigit character) is given, it is appended to the line number to
-separate it from whatever follows. The default for
+separate it from whatever follows.
+The default for
 .Ar char
 is a
-.Em \*[Lt]tab\*[Gt] .
+.Aq Em tab .
 Line numbers longer than
 .Ar width
 columns are truncated.
 .It Fl o Ar offset
 Each line of output is preceded by
 .Ar offset
-.Em \*[Lt]spaces\*[Gt]s .
+.Ao Em space Ac Ns s .
 If the
 .Fl o
 option is not specified, the default is zero.
@@ -257,9 +268,9 @@ Pause before beginning each page if the
 standard output is associated with a terminal.
 .Nm
 will write an
-.Em \*[Lt]alert\*[Gt]
+.Aq Em alert
 to standard error and wait for a
-.Em \*[Lt]carriage-return\*[Gt]
+.Aq Em carriage-return
 to be read on
 .Pa /dev/tty .
 .It Fl r
@@ -268,11 +279,11 @@ Write no diagnostic reports on failure t
 Separate text columns by the single character
 .Ar char
 instead of by the appropriate number of
-.Em \*[Lt]space\*[Gt]s
+.Ao Em space Ac Ns s
 (default for
 .Ar char
 is the
-.Em \*[Lt]tab\*[Gt]
+.Aq Em tab
 character).
 .It Fl T
 Specify an



CVS commit: src/usr.bin/touch

2012-07-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 27 18:34:35 UTC 2012

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

Log Message:
Mention option arguments in DESCRIPTION.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/touch/touch.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/touch/touch.1
diff -u src/usr.bin/touch/touch.1:1.20 src/usr.bin/touch/touch.1:1.21
--- src/usr.bin/touch/touch.1:1.20	Wed Jul 25 01:23:46 2012
+++ src/usr.bin/touch/touch.1	Fri Jul 27 18:34:35 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: touch.1,v 1.20 2012/07/25 01:23:46 christos Exp $
+.\	$NetBSD: touch.1,v 1.21 2012/07/27 18:34:35 wiz Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -41,9 +41,9 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl acfhm
-.Op Fl r Ar file
-.Op Fl t Ar [[CC]YY]MMDDhhmm[.SS]
 .Op Fl d Ar human-datetime
+.Op Fl r Ar file
+.Op Fl t Ar datetime
 .Ar file ...
 .Sh DESCRIPTION
 The
@@ -53,7 +53,7 @@ current time of day.
 If the file doesn't exist, it is created with default permissions.
 .Pp
 The following options are available:
-.Bl -tag -width Ds
+.Bl -tag -width -d human-datetime
 .It Fl a
 Change the access time of the file.
 The modification time of the file is not changed unless the
@@ -65,8 +65,10 @@ The
 .Nm
 utility does not treat this as an error.
 No error messages are displayed and the exit value is not affected.
-.It Fl d
-The parse the argument using the human datetime parser
+.It Fl d Ar human-datetime
+Parse
+.Ar human-datetime
+using the human datetime parser
 .Xr parsedate 3 .
 .It Fl f
 This flag has no effect; it is accepted for compatibility reasons.
@@ -81,12 +83,15 @@ Change the modification time of the file
 The access time of the file is not changed unless the
 .Fl a
 flag is also specified.
-.It Fl r
-Use the access and modifications times from the specified file
+.It Fl r Ar file
+Use the access and modifications times from
+.Ar file
 instead of the current time of day.
-.It Fl t
+.It Fl t Ar datetime
 Change the access and modification times to the specified time.
-The argument should be in the form
+The argument
+.Ar datetime
+should be in the form
 .Dq [[CC]YY]MMDDhhmm[.SS]
 where each pair of letters represents the following:
 .Pp



CVS commit: src/crypto/external/bsd/openssl/dist/engines

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 18:35:57 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/engines: e_padlock.c

Log Message:
avoid an alloca for SSP


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/crypto/external/bsd/openssl/dist/engines/e_padlock.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/engines/e_padlock.c
diff -u src/crypto/external/bsd/openssl/dist/engines/e_padlock.c:1.1.1.3 src/crypto/external/bsd/openssl/dist/engines/e_padlock.c:1.2
--- src/crypto/external/bsd/openssl/dist/engines/e_padlock.c:1.1.1.3	Thu Jul 26 11:04:50 2012
+++ src/crypto/external/bsd/openssl/dist/engines/e_padlock.c	Fri Jul 27 14:35:57 2012
@@ -915,7 +915,7 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, 
 {
 	struct padlock_cipher_data *cdata;
 	const  void *inp;
-	unsigned char  *out;
+	unsigned char  *out, *tofree;
 	void  *iv;
 	intinp_misaligned, out_misaligned, realign_in_loop;
 	size_t chunk, allocated=0;
@@ -999,11 +999,15 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, 
 	if (out_misaligned) {
 		/* optmize for small input */
 		allocated = (chunknbytes?PADLOCK_CHUNK:nbytes);
-		out = alloca(0x10 + allocated);
-		out = NEAREST_ALIGNED(out);
+		tofree = malloc(0x10 + allocated);
+		if (tofree == NULL)
+			return 0;
+		out = NEAREST_ALIGNED(tofree);
 	}
-	else
+	else {
 		out = out_arg;
+		tofree = NULL;
+	}
 
 	cdata = ALIGNED_CIPHER_DATA(ctx);
 	padlock_verify_context(cdata);
@@ -1152,6 +1156,7 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, 
 		break;
 
 	default:
+		free(tofree);
 		return 0;
 	}
 
@@ -1163,6 +1168,7 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, 
 	}
 
 	memset(cdata-iv, 0, AES_BLOCK_SIZE);
+	free(tofree);
 
 	return 1;
 }



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 19:34:16 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: Makefile
aes-586.S aesni-x86.S bf-586.S bf-686.S bn-586.S cast-586.S
cmll-x86.S co-586.S crypt586.S des-586.S ghash-x86.S md5-586.S
rc4-586.S rc5-586.S rmd-586.S sha1-586.S sha256-586.S sha512-586.S
uplink-x86.S vpaes-x86.S x86.S x86cpuid.S

Log Message:
Instead of leaving the file directive which is inconsistent and may contains
paths, instead include our assembly macros


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/co-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/md5-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/rmd-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/x86.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/x86cpuid.S
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bf-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bf-686.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/crypt586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/ghash-x86.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/rc5-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/sha512-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/uplink-x86.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/vpaes-x86.S
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/cast-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/cmll-x86.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/des-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/rc4-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/sha1-586.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/sha256-586.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile:1.3	Tue Jul  5 12:53:58 2011
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/Makefile	Fri Jul 27 15:34:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/07/05 16:53:58 spz Exp $
+#	$NetBSD: Makefile,v 1.4 2012/07/27 19:34:13 christos Exp $
 
 .include bsd.own.mk
 
@@ -10,5 +10,6 @@ regen:
 		  ${OPENSSLSRC}/crypto/x86cpuid.pl; do \
 		perl -I${OPENSSLSRC}/crypto/perlasm \
 		-I${OPENSSLSRC}/crypto/bn/asm $$i elf -fPIC \
+		| sed -e 's,^\.file.*$$,#include machine/asm.h,' \
 		 $$(basename $$i .pl).S; \
 	done
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S:1.3	Thu Jul 26 15:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes-586.S	Fri Jul 27 15:34:13 2012
@@ -1,4 +1,4 @@
-.file	aes-586.s
+#include machine/asm.h
 .text
 .type	_x86_AES_encrypt_compact,@function
 .align	16

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S:1.4	Thu Jul 26 15:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aesni-x86.S	Fri Jul 27 15:34:13 2012
@@ -1,4 +1,4 @@
-.file	/net/quasar/src-5/NetBSD/src/crypto/external/bsd/openssl/dist/crypto/aes/asm/aesni-x86.s
+#include machine/asm.h
 .text
 .globl	aesni_encrypt
 .type	aesni_encrypt,@function
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S:1.4	Thu Jul 26 15:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/bn-586.S	Fri Jul 27 15:34:14 2012
@@ -1,4 +1,4 @@
-.file	

CVS commit: src/usr.bin/pr

2012-07-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jul 27 20:49:48 UTC 2012

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

Log Message:
Fix error in SYNOPSIS, sort.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/pr/pr.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/pr/pr.1
diff -u src/usr.bin/pr/pr.1:1.20 src/usr.bin/pr/pr.1:1.21
--- src/usr.bin/pr/pr.1:1.20	Fri Jul 27 18:28:53 2012
+++ src/usr.bin/pr/pr.1	Fri Jul 27 20:49:48 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: pr.1,v 1.20 2012/07/27 18:28:53 wiz Exp $
+.\	$NetBSD: pr.1,v 1.21 2012/07/27 20:49:48 wiz Exp $
 .\
 .\ Copyright (c) 1991 Keith Muller.
 .\ Copyright (c) 1993
@@ -47,28 +47,24 @@
 .Op Fl Ar column
 .Op Fl adFfmprt
 .Oo
-.Op Fl e
-.Op Ar char
-.Op Ar gap
+.Fl e
+.Oo Ar char Oc Ns Op Ar gap
 .Oc
 .Op Fl h Ar header
 .Oo
-.Op Fl i
-.Op Ar char
-.Op Ar gap
+.Fl i
+.Oo Ar char Oc Ns Op Ar gap
 .Oc
 .Op Fl l Ar lines
-.Op Fl o Ar offset
 .Oo
-.Op Fl s
-.Op Ar char
+.Fl n
+.Oo Ar char Oc Ns Op Ar width
 .Oc
-.Op Fl T Ar timefmt
+.Op Fl o Ar offset
 .Oo
-.Op Fl n
-.Op Ar char
-.Op Ar width
+.Fl s Ns Op Ar char
 .Oc
+.Op Fl T Ar timefmt
 .Op Fl w Ar width
 .Op -
 .Op Ar file ...
@@ -275,7 +271,7 @@ to be read on
 .Pa /dev/tty .
 .It Fl r
 Write no diagnostic reports on failure to open a file.
-.It Fl s Ar char
+.It Fl s Op Ar char
 Separate text columns by the single character
 .Ar char
 instead of by the appropriate number of



CVS commit: src/sys/kern

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 20:52:49 UTC 2012

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

Log Message:
revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.239 -r1.240 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.190 -r1.191 src/sys/kern/kern_fork.c

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

Modified files:

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.353 src/sys/kern/kern_exec.c:1.354
--- src/sys/kern/kern_exec.c:1.353	Sun Jul 22 18:40:19 2012
+++ src/sys/kern/kern_exec.c	Fri Jul 27 16:52:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.353 2012/07/22 22:40:19 rmind Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.354 2012/07/27 20:52:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.353 2012/07/22 22:40:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.354 2012/07/27 20:52:49 christos Exp $);
 
 #include opt_exec.h
 #include opt_ktrace.h
@@ -1180,6 +1180,7 @@ execve_runproc(struct lwp *l, struct exe
 	 * exited and exec()/exit() are the only places it will be cleared.
 	 */
 	if ((p-p_lflag  PL_PPWAIT) != 0) {
+#if 0
 		lwp_t *lp;
 
 		mutex_enter(proc_lock);
@@ -1192,6 +1193,13 @@ execve_runproc(struct lwp *l, struct exe
 		lp-l_pflag = ~LP_VFORKWAIT; /* XXX */
 		cv_broadcast(lp-l_waitcv);
 		mutex_exit(proc_lock);
+#else
+		mutex_enter(proc_lock);
+		l-l_lwpctl = NULL; /* was on loan from blocked parent */
+		p-p_lflag = ~PL_PPWAIT;
+		cv_broadcast(p-p_pptr-p_waitcv);
+		mutex_exit(proc_lock);
+#endif
 	}
 
 	/*

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.239 src/sys/kern/kern_exit.c:1.240
--- src/sys/kern/kern_exit.c:1.239	Sun Jul 22 18:40:19 2012
+++ src/sys/kern/kern_exit.c	Fri Jul 27 16:52:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.239 2012/07/22 22:40:19 rmind Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.240 2012/07/27 20:52:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.239 2012/07/22 22:40:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.240 2012/07/27 20:52:49 christos Exp $);
 
 #include opt_ktrace.h
 #include opt_perfctrs.h
@@ -330,6 +330,7 @@ exit1(struct lwp *l, int rv)
 	 */
 	mutex_enter(proc_lock);
 	if (p-p_lflag  PL_PPWAIT) {
+#if 0
 		lwp_t *lp;
 
 		l-l_lwpctl = NULL; /* was on loan from blocked parent */
@@ -339,6 +340,11 @@ exit1(struct lwp *l, int rv)
 		p-p_vforklwp = NULL;
 		lp-l_pflag = ~LP_VFORKWAIT; /* XXX */
 		cv_broadcast(lp-l_waitcv);
+#else
+		l-l_lwpctl = NULL; /* was on loan from blocked parent */
+		p-p_lflag = ~PL_PPWAIT;
+		cv_broadcast(p-p_pptr-p_waitcv);
+#endif
 	}
 
 	if (SESS_LEADER(p)) {

Index: src/sys/kern/kern_fork.c
diff -u src/sys/kern/kern_fork.c:1.190 src/sys/kern/kern_fork.c:1.191
--- src/sys/kern/kern_fork.c:1.190	Sun Jul 22 18:40:19 2012
+++ src/sys/kern/kern_fork.c	Fri Jul 27 16:52:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_fork.c,v 1.190 2012/07/22 22:40:19 rmind Exp $	*/
+/*	$NetBSD: kern_fork.c,v 1.191 2012/07/27 20:52:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.190 2012/07/22 22:40:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.191 2012/07/27 20:52:49 christos Exp $);
 
 #include opt_ktrace.h
 
@@ -587,9 +587,14 @@ fork1(struct lwp *l1, int flags, int exi
 	 * Preserve synchronization semantics of vfork.  If waiting for
 	 * child to exec or exit, sleep until it clears LP_VFORKWAIT.
 	 */
+#if 0
 	while (l1-l_pflag  LP_VFORKWAIT) {
 		cv_wait(l1-l_waitcv, proc_lock);
 	}
+#else
+	while (p2-p_lflag  PL_PPWAIT)
+		cv_wait(p1-p_waitcv, proc_lock);
+#endif
 
 	/*
 	 * Let the parent know that we are tracing its child.



CVS commit: src/crypto/external/bsd/openssl/dist/ssl

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 21:22:55 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/ssl: t1_lib.c

Log Message:
remove extra parens that make clang bitchy.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c
diff -u src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.6 src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.7
--- src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.6	Thu Jul 26 15:58:40 2012
+++ src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c	Fri Jul 27 17:22:55 2012
@@ -1527,7 +1527,7 @@ int ssl_parse_serverhello_tlsext(SSL *s,
 			unsigned char selected_len;
 
 			/* We must have requested it. */
-			if ((s-ctx-next_proto_select_cb == NULL))
+			if (s-ctx-next_proto_select_cb == NULL)
 {
 *al = TLS1_AD_UNSUPPORTED_EXTENSION;
 return 0;



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 21:28:24 UTC 2012

Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc

Log Message:
This cannot be used because we are compiling with __ARM_ARCH_3__ and it needs
a minimum of 4


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc

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




CVS commit: src/lib/libutil

2012-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 27 21:33:46 UTC 2012

Modified Files:
src/lib/libutil: openpty.3

Log Message:
mention PATH_MAX instead of 16.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libutil/openpty.3

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

Modified files:

Index: src/lib/libutil/openpty.3
diff -u src/lib/libutil/openpty.3:1.16 src/lib/libutil/openpty.3:1.17
--- src/lib/libutil/openpty.3:1.16	Fri Jul 27 14:22:04 2012
+++ src/lib/libutil/openpty.3	Fri Jul 27 17:33:46 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: openpty.3,v 1.16 2012/07/27 18:22:04 wiz Exp $
+.\	$NetBSD: openpty.3,v 1.17 2012/07/27 21:33:46 christos Exp $
 .\
 .\ Copyright (c) 1995
 .\	The Regents of the University of California.  All rights reserved.
@@ -31,7 +31,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd July 22, 2012
+.Dd July 27, 2012
 .Dt OPENPTY 3
 .Os
 .Sh NAME
@@ -71,14 +71,16 @@ is non-null, the filename of the slave i
 The length of
 .Fa name
 is limited to
-.Dv 16
-characters in the current
-.Xr ptm 4
-device driver (including the terminating
-.Dv NUL )
-which limits the maximum to
-.Dv 100,000
-ptys.
+.Dv PATH_MAX
+as any other regular path name, so a buffer of this size should be used.
+.\ .Dv 16
+.\ characters in the current
+.\ .Xr ptm 4
+.\ device driver (including the terminating
+.\ .Dv NUL )
+.\ which limits the maximum to
+.\ .Dv 100,000
+.\ ptys.
 If
 .Fa termp
 is non-null, the terminal parameters of the slave will be set to the



CVS commit: src/sys/dev/pci

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 21:50:32 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add EG20T PCH.  Closes PR/45567.


To generate a diff of this commit:
cvs rdiff -u -r1.1126 -r1.1127 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1126 src/sys/dev/pci/pcidevs:1.1127
--- src/sys/dev/pci/pcidevs:1.1126	Thu Jul 26 03:11:41 2012
+++ src/sys/dev/pci/pcidevs	Fri Jul 27 21:50:32 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1126 2012/07/26 03:11:41 uwe Exp $
+$NetBSD: pcidevs,v 1.1127 2012/07/27 21:50:32 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3270,6 +3270,33 @@ product INTEL PCI450_PB		0x84c4	82454KX/
 product INTEL PCI450_MC		0x84c5	82451KX/GX Memory Controller (MC)
 product INTEL 82451NX_MIOC	0x84ca	82451NX Memory  I/O Controller (MIOC)
 product INTEL 82451NX_PXB	0x84cb	82451NX PCI Expander Bridge (PXB)
+
+product INTEL EG20T_PCIB	0x8800	EG20T PCH PCIExpress Bridge
+product INTEL EG20T_PCTHUB	0x8801	EG20T PCH Packet Hub
+product INTEL EG20T_GBE		0x8802	EG20T PCH Gigabit Ether
+product INTEL EG20T_GPIO	0x8803	EG20T PCH GPIO
+product INTEL EG20T_OHCI1_0	0x8804	EG20T PCH USB OHCI Host Controller #1
+product INTEL EG20T_OHCI1_1	0x8805	EG20T PCH USB OHCI Host Controller #1
+product INTEL EG20T_OHCI1_2	0x8806	EG20T PCH USB OHCI Host Controller #1
+product INTEL EG20T_EHCI1	0x8807	EG20T PCH USB EHCI Host Controller #1
+product INTEL EG20T_USB_DEV	0x8808	EG20T PCH USB Device
+product INTEL EG20T_SDIO_0	0x8809	EG20T PCH SDIO Controller #0
+product INTEL EG20T_SDIO_1	0x880a	EG20T PCH SDIO Controller #1
+product INTEL EG20T_AHCI	0x880b	EG20T PCH AHCI SATA Controller
+product INTEL EG20T_OHCI0_0	0x880c	EG20T PCH USB OHCI Host Controller #0
+product INTEL EG20T_OHCI0_1	0x880d	EG20T PCH USB OHCI Host Controller #0
+product INTEL EG20T_OHCI0_2	0x880e	EG20T PCH USB OHCI Host Controller #0
+product INTEL EG20T_EHCI0	0x880f	EG20T PCH USB EHCI Host Controller #0
+product INTEL EG20T_DMA_0	0x8810	EG20T PCH DMAC #0
+product INTEL EG20T_UART_0	0x8811	EG20T PCH UART #0
+product INTEL EG20T_UART_1	0x8812	EG20T PCH UART #1
+product INTEL EG20T_UART_2	0x8813	EG20T PCH UART #2
+product INTEL EG20T_UART_3	0x8814	EG20T PCH UART #3
+product INTEL EG20T_DMA_1	0x8815	EG20T PCH DMAC #1
+product INTEL EG20T_SPI		0x8816	EG20T PCH SPI
+product INTEL EG20T_I2C		0x8817	EG20T PCH I2C Interface
+product INTEL EG20T_CAN		0x8818	EG20T PCH CAN Controller
+product INTEL EG20T_IEEE1588	0x8819	EG20T PCH IEEE1588
 product INTEL PINEVIEW_HB	0xa000	Pineview Host Bridge
 product INTEL PINEVIEW_IGD	0xa001	Pineview Integrated Graphics Device
 product INTEL PINEVIEW_M_HB	0xa010	Pineview Host Bridge



CVS commit: src/sys/arch

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 22:13:58 UTC 2012

Modified Files:
src/sys/arch/evbppc/explora: machdep.c
src/sys/arch/evbppc/virtex: machdep.c
src/sys/arch/evbppc/walnut: machdep.c
src/sys/arch/powerpc/include/ibm4xx: cpu.h

Log Message:
Fix some -fno-common fallout


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbppc/explora/machdep.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbppc/virtex/machdep.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/evbppc/walnut/machdep.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/ibm4xx/cpu.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/evbppc/explora/machdep.c
diff -u src/sys/arch/evbppc/explora/machdep.c:1.36 src/sys/arch/evbppc/explora/machdep.c:1.37
--- src/sys/arch/evbppc/explora/machdep.c:1.36	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/explora/machdep.c	Fri Jul 27 22:13:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.36 2011/06/20 17:44:33 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.37 2012/07/27 22:13:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.36 2011/06/20 17:44:33 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.37 2012/07/27 22:13:58 matt Exp $);
 
 #include opt_explora.h
 #include opt_modular.h
@@ -74,7 +74,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #define MEMREGIONS	2
 #define TLB_PG_SIZE	(16*1024*1024)
 
-char cpu_model[80];
 char machine[] = MACHINE;		/* from machine/param.h */
 char machine_arch[] = MACHINE_ARCH;	/* from machine/param.h */
 
@@ -82,8 +81,6 @@ static const unsigned int cpuspeed = 660
 
 prop_dictionary_t board_properties;
 struct vm_map *phys_map = NULL;
-char msgbuf[MSGBUFSIZE];
-paddr_t msgbuf_paddr;
 
 static struct mem_region phys_mem[MEMREGIONS];
 static struct mem_region avail_mem[MEMREGIONS];

Index: src/sys/arch/evbppc/virtex/machdep.c
diff -u src/sys/arch/evbppc/virtex/machdep.c:1.20 src/sys/arch/evbppc/virtex/machdep.c:1.21
--- src/sys/arch/evbppc/virtex/machdep.c:1.20	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/virtex/machdep.c	Fri Jul 27 22:13:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.20 2011/06/20 17:44:33 matt Exp $ */
+/*	$NetBSD: machdep.c,v 1.21 2012/07/27 22:13:58 matt Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.20 2011/06/20 17:44:33 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.21 2012/07/27 22:13:58 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_ddb.h
@@ -97,12 +97,10 @@ struct vm_map *phys_map = NULL;
 /*
  * This should probably be in autoconf!XXX
  */
-char cpu_model[80];
 char machine[] = MACHINE;		/* from machine/param.h */
 char machine_arch[] = MACHINE_ARCH;	/* from machine/param.h */
 
 char bootpath[256];
-paddr_t msgbuf_paddr;
 vaddr_t msgbuf_vaddr;
 
 void initppc(vaddr_t, vaddr_t);
@@ -178,8 +176,6 @@ initppc(vaddr_t startkernel, vaddr_t end
  * Machine dependent startup code.
  */
 
-char msgbuf[MSGBUFSIZE];
-
 void
 cpu_startup(void)
 {

Index: src/sys/arch/evbppc/walnut/machdep.c
diff -u src/sys/arch/evbppc/walnut/machdep.c:1.54 src/sys/arch/evbppc/walnut/machdep.c:1.55
--- src/sys/arch/evbppc/walnut/machdep.c:1.54	Wed Jun 22 18:06:32 2011
+++ src/sys/arch/evbppc/walnut/machdep.c	Fri Jul 27 22:13:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.54 2011/06/22 18:06:32 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.55 2012/07/27 22:13:58 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.54 2011/06/22 18:06:32 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.55 2012/07/27 22:13:58 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_ddb.h
@@ -134,13 +134,10 @@ struct vm_map *phys_map = NULL;
 /*
  * This should probably be in autoconf!XXX
  */
-char cpu_model[80];
 char machine[] = MACHINE;		/* from machine/param.h */
 char machine_arch[] = MACHINE_ARCH;	/* from machine/param.h */
 
 char bootpath[256];
-paddr_t msgbuf_paddr;
-vaddr_t msgbuf_vaddr;
 
 void initppc(vaddr_t, vaddr_t, char *, void *);
 
@@ -226,8 +223,6 @@ initppc(vaddr_t startkernel, vaddr_t end
  * Machine dependent startup code.
  */
 
-char msgbuf[MSGBUFSIZE];
-
 void
 cpu_startup(void)
 {

Index: src/sys/arch/powerpc/include/ibm4xx/cpu.h
diff -u src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.20 src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.21
--- src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.20	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/powerpc/include/ibm4xx/cpu.h	Fri Jul 27 22:13:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.20 2011/06/20 17:44:33 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.21 2012/07/27 22:13:58 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi 

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

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 22:24:13 UTC 2012

Modified Files:
src/sys/arch/powerpc/include/booke: cpuvar.h e500var.h

Log Message:
Fix -fno-common fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/booke/cpuvar.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/booke/e500var.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/powerpc/include/booke/cpuvar.h
diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.12 src/sys/arch/powerpc/include/booke/cpuvar.h:1.13
--- src/sys/arch/powerpc/include/booke/cpuvar.h:1.12	Thu Jun 30 00:52:59 2011
+++ src/sys/arch/powerpc/include/booke/cpuvar.h	Fri Jul 27 22:24:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.12 2011/06/30 00:52:59 matt Exp $	*/
+/*	$NetBSD: cpuvar.h,v 1.13 2012/07/27 22:24:13 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -157,7 +157,7 @@ struct trapframe;
 void	booke_sstep(struct trapframe *);
 
 void	booke_cpu_startup(const char *);	/* model name */
-struct powerpc_bus_dma_tag booke_bus_dma_tag;
+extern struct powerpc_bus_dma_tag booke_bus_dma_tag;
 
 extern struct cpu_info cpu_info[];
 #ifdef MULTIPROCESSOR

Index: src/sys/arch/powerpc/include/booke/e500var.h
diff -u src/sys/arch/powerpc/include/booke/e500var.h:1.5 src/sys/arch/powerpc/include/booke/e500var.h:1.6
--- src/sys/arch/powerpc/include/booke/e500var.h:1.5	Thu Mar 29 15:45:06 2012
+++ src/sys/arch/powerpc/include/booke/e500var.h	Fri Jul 27 22:24:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500var.h,v 1.5 2012/03/29 15:45:06 matt Exp $	*/
+/*	$NetBSD: e500var.h,v 1.6 2012/07/27 22:24:13 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,8 +49,8 @@
 #define	E500_CLOCK_TIMER	0	/* could be 0..3 */
 
 extern const struct intrsw e500_intrsw;
-struct extent *pcimem_ex;
-struct extent *pciio_ex;
+extern struct extent *pcimem_ex;
+extern struct extent *pciio_ex;
 void	e500_device_register(device_t, void *);
 int	e500_clock_intr(void *);
 void	e500_cpu_start(void);



CVS commit: src/distrib/evbppc/ramdisk

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 22:40:48 UTC 2012

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

Log Message:
Increase ramdisk size.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/evbppc/ramdisk/Makefile

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

Modified files:

Index: src/distrib/evbppc/ramdisk/Makefile
diff -u src/distrib/evbppc/ramdisk/Makefile:1.14 src/distrib/evbppc/ramdisk/Makefile:1.15
--- src/distrib/evbppc/ramdisk/Makefile:1.14	Tue Jul 24 20:50:14 2012
+++ src/distrib/evbppc/ramdisk/Makefile	Fri Jul 27 22:40:48 2012
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.14 2012/07/24 20:50:14 matt Exp $
+#	$NetBSD: Makefile,v 1.15 2012/07/27 22:40:48 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2304k
+IMAGESIZE=	2880k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1



CVS commit: src/sys

2012-07-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Jul 27 22:55:30 UTC 2012

Modified Files:
src/sys/arch/i386/i386: machdep.c
src/sys/fs/udf: udf.h

Log Message:
gcc -fno-common fallout


To generate a diff of this commit:
cvs rdiff -u -r1.729 -r1.730 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.44 -r1.45 src/sys/fs/udf/udf.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.729 src/sys/arch/i386/i386/machdep.c:1.730
--- src/sys/arch/i386/i386/machdep.c:1.729	Wed Jun 27 00:37:08 2012
+++ src/sys/arch/i386/i386/machdep.c	Fri Jul 27 22:55:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.729 2012/06/27 00:37:08 jym Exp $	*/
+/*	$NetBSD: machdep.c,v 1.730 2012/07/27 22:55:29 drochner Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.729 2012/06/27 00:37:08 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.730 2012/07/27 22:55:29 drochner Exp $);
 
 #include opt_beep.h
 #include opt_compat_ibcs2.h
@@ -233,8 +233,6 @@ int cpureset_delay = 2000; /* defaul
 struct mtrr_funcs *mtrr_funcs;
 #endif
 
-int	physmem;
-
 int	cpu_class;
 int	use_pae;
 int	i386_fpu_present;

Index: src/sys/fs/udf/udf.h
diff -u src/sys/fs/udf/udf.h:1.44 src/sys/fs/udf/udf.h:1.45
--- src/sys/fs/udf/udf.h:1.44	Tue Sep 27 01:13:16 2011
+++ src/sys/fs/udf/udf.h	Fri Jul 27 22:55:30 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.44 2011/09/27 01:13:16 christos Exp $ */
+/* $NetBSD: udf.h,v 1.45 2012/07/27 22:55:30 drochner Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -210,7 +210,7 @@ MALLOC_DECLARE(M_UDFMNT);
 MALLOC_DECLARE(M_UDFVOLD);
 MALLOC_DECLARE(M_UDFTEMP);
 
-struct pool udf_node_pool;
+extern struct pool udf_node_pool;
 struct udf_node;
 struct udf_strategy;
 



CVS commit: src/crypto/external/bsd/openssl

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 27 23:01:23 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c ppccpuid.pl
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: crypto.inc
ppccpuid.S

Log Message:
Get new openssl to work on powerpc.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.1.1.1	Thu Jul 26 14:59:15 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Fri Jul 27 23:01:23 2012
@@ -74,7 +74,7 @@ void OPENSSL_cpuid_setup(void)
 	sigdelset(all_masked,SIGBUS);
 	sigdelset(all_masked,SIGSEGV);
 
-	if ((e=getenv(OPENSSL_ppccap)))
+	if ((e=getenv(OPENSSL_ppccap)) != NULL)
 		{
 		OPENSSL_ppccap_P=strtoul(e,NULL,0);
 		return;
@@ -106,6 +106,7 @@ void OPENSSL_cpuid_setup(void)
 
 	if (sigsetjmp(ill_jmp,1) == 0)
 		{
+		void OPENSSL_altivec_probe();
 		OPENSSL_altivec_probe();
 		OPENSSL_ppccap_P |= PPC_ALTIVEC;
 		}

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.1.1.3 src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl:1.1.1.3	Thu Jul 26 14:59:15 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl	Fri Jul 27 23:01:23 2012
@@ -88,8 +88,12 @@ Ladd:	lwarx	r5,0,r3
 .globl	.OPENSSL_rdtsc
 .align	4
 .OPENSSL_rdtsc:
-	mftb	r3
+Lrdtsc:
+	mftb	r5
 	mftbu	r4
+	mftb	r3
+	cmplw	r3,r5
+	bne	Lrdtsc
 	blr
 	.long	0
 	.byte	0,12,0x14,0,0,0,0,0

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc:1.1	Fri Jul 27 18:10:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc	Fri Jul 27 23:01:23 2012
@@ -1,3 +1,3 @@
-CPUID_SRCS = ppccap.c
+CPUID_SRCS = ppccap.c ppccpuid.S
 CPUID = yes
 .include ../../crypto.inc

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.3	Thu Jul 26 19:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S	Fri Jul 27 23:01:23 2012
@@ -71,8 +71,12 @@ OPENSSL_atomic_add:
 .type	OPENSSL_rdtsc,@function
 .align	4
 OPENSSL_rdtsc:
-	mftb	3
+.Lrdtsc:
 	mftbu	4
+	mftb	3
+	mftbu	5
+	cmplw	4,5
+	bne-	.Lrdtsc
 	blr	
 .long	0
 .byte	0,12,0x14,0,0,0,0,0
@@ -85,12 +89,13 @@ OPENSSL_cleanse:
 	li	0,0
 	bge	.Lot
 	cmplwi	4,0
-	bclr	14,2
-.Little:	mtctr	4
+	beqlr-
+.Little:
+	mtctr	4
 	stb	0,0(3)
 	addi	3,3,1
-	bc	16,0,$-8
-	blr	
+	bdnz	$-8
+	blr
 .Lot:	andi.	5,3,3
 	beq	.Laligned
 	stb	0,0(3)
@@ -100,9 +105,10 @@ OPENSSL_cleanse:
 .Laligned:
 	srwi	5,4,2
 	mtctr	5
+.Lstore4:
 	stw	0,0(3)
 	addi	3,3,4
-	bc	16,0,$-8
+	bdnz	.Lstore4
 	andi.	4,4,3
 	bne	.Little
 	blr	



CVS commit: src/sys/coda

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jul 28 00:10:22 UTC 2012

Modified Files:
src/sys/coda: coda_vnops.c coda_vnops.h

Log Message:
-fno-common fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/coda/coda_vnops.c
cvs rdiff -u -r1.14 -r1.15 src/sys/coda/coda_vnops.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/coda/coda_vnops.c
diff -u src/sys/coda/coda_vnops.c:1.88 src/sys/coda/coda_vnops.c:1.89
--- src/sys/coda/coda_vnops.c:1.88	Fri May  4 17:57:22 2012
+++ src/sys/coda/coda_vnops.c	Sat Jul 28 00:10:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_vnops.c,v 1.88 2012/05/04 17:57:22 christos Exp $	*/
+/*	$NetBSD: coda_vnops.c,v 1.89 2012/07/28 00:10:22 matt Exp $	*/
 
 /*
  *
@@ -46,7 +46,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: coda_vnops.c,v 1.88 2012/05/04 17:57:22 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: coda_vnops.c,v 1.89 2012/07/28 00:10:22 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -140,6 +140,7 @@ const struct vnodeopv_entry_desc coda_vn
 { NULL, NULL }
 };
 
+int (**coda_vnodeop_p)(void *);
 const struct vnodeopv_desc coda_vnodeop_opv_desc =
 { coda_vnodeop_p, coda_vnodeop_entries };
 

Index: src/sys/coda/coda_vnops.h
diff -u src/sys/coda/coda_vnops.h:1.14 src/sys/coda/coda_vnops.h:1.15
--- src/sys/coda/coda_vnops.h:1.14	Sat Apr 28 20:01:09 2012
+++ src/sys/coda/coda_vnops.h	Sat Jul 28 00:10:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_vnops.h,v 1.14 2012/04/28 20:01:09 christos Exp $	*/
+/*	$NetBSD: coda_vnops.h,v 1.15 2012/07/28 00:10:22 matt Exp $	*/
 
 /*
  *
@@ -79,7 +79,7 @@ int coda_vop_nop(void *);
 int coda_getpages(void *);
 int coda_putpages(void *);
 
-int (**coda_vnodeop_p)(void *);
+extern int (**coda_vnodeop_p)(void *);
 int coda_rdwr(vnode_t *, struct uio *, enum uio_rw, int, kauth_cred_t,
 struct lwp *);
 int coda_grab_vnode(vnode_t *, dev_t, ino_t, vnode_t **);



CVS commit: src/sys/dev/pci

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jul 28 00:42:48 UTC 2012

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

Log Message:
Make this compile with i386/conf/ALL


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/twa.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/twa.c
diff -u src/sys/dev/pci/twa.c:1.41 src/sys/dev/pci/twa.c:1.42
--- src/sys/dev/pci/twa.c:1.41	Fri Jul 27 14:02:17 2012
+++ src/sys/dev/pci/twa.c	Sat Jul 28 00:42:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.41 2012/07/27 14:02:17 jakllsch Exp $ */
+/*	$NetBSD: twa.c,v 1.42 2012/07/28 00:42:47 matt Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,9 +67,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.41 2012/07/27 14:02:17 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.42 2012/07/28 00:42:47 matt Exp $);
 
-#define TWA_DEBUG
+//#define TWA_DEBUG
 
 #include sys/param.h
 #include sys/systm.h



CVS commit: src/sys

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jul 28 00:43:25 UTC 2012

Modified Files:
src/sys/compat/ndis: ntoskrnl_var.h subr_hal.c
src/sys/dev/dm: dm.h
src/sys/dev/ic: ncr5380sbc.c ncr5380var.h
src/sys/dev/if_ndis: if_ndis.c if_ndisvar.h
src/sys/fs/hfs: libhfs.c libhfs.h
src/sys/fs/nilfs: nilfs.h
src/sys/kern: kgdb_stub.c
src/sys/net: if_etherip.c if_etherip.h
src/sys/net/npf: npf_impl.h
src/sys/netiso: eonvar.h if_eon.c

Log Message:
Fix -fno-common found by building i386/conf/ALL


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/ndis/ntoskrnl_var.h \
src/sys/compat/ndis/subr_hal.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/ncr5380sbc.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ic/ncr5380var.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/if_ndis/if_ndis.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/if_ndis/if_ndisvar.h
cvs rdiff -u -r1.11 -r1.12 src/sys/fs/hfs/libhfs.c
cvs rdiff -u -r1.5 -r1.6 src/sys/fs/hfs/libhfs.h
cvs rdiff -u -r1.2 -r1.3 src/sys/fs/nilfs/nilfs.h
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/kgdb_stub.c
cvs rdiff -u -r1.32 -r1.33 src/sys/net/if_etherip.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/if_etherip.h
cvs rdiff -u -r1.19 -r1.20 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.18 -r1.19 src/sys/netiso/eonvar.h
cvs rdiff -u -r1.71 -r1.72 src/sys/netiso/if_eon.c

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

Modified files:

Index: src/sys/compat/ndis/ntoskrnl_var.h
diff -u src/sys/compat/ndis/ntoskrnl_var.h:1.7 src/sys/compat/ndis/ntoskrnl_var.h:1.8
--- src/sys/compat/ndis/ntoskrnl_var.h:1.7	Wed Mar 18 17:06:48 2009
+++ src/sys/compat/ndis/ntoskrnl_var.h	Sat Jul 28 00:43:22 2012
@@ -302,7 +302,7 @@ typedef struct nt_dispatch_header nt_dis
 
 /* TODO: What is the best way to do this? */
 
-int win_irql;
+extern int win_irql;
 #define AT_DISPATCH_LEVEL(useless) \
 	(win_irql == DISPATCH_LEVEL)
 
Index: src/sys/compat/ndis/subr_hal.c
diff -u src/sys/compat/ndis/subr_hal.c:1.7 src/sys/compat/ndis/subr_hal.c:1.8
--- src/sys/compat/ndis/subr_hal.c:1.7	Wed Mar 18 10:22:39 2009
+++ src/sys/compat/ndis/subr_hal.c	Sat Jul 28 00:43:22 2012
@@ -35,7 +35,7 @@
 __FBSDID($FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.13.2.3 2005/03/31 04:24:35 wpaul Exp $);
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, $NetBSD: subr_hal.c,v 1.7 2009/03/18 10:22:39 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_hal.c,v 1.8 2012/07/28 00:43:22 matt Exp $);
 #endif
 
 #include sys/param.h
@@ -95,6 +95,10 @@ __stdcall static void dummy (void);
 
 extern struct mtx_pool *ndis_mtxpool;
 
+#ifdef __NetBSD__
+int win_irql;
+#endif
+
 int
 hal_libinit(void)
 {

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.23 src/sys/dev/dm/dm.h:1.24
--- src/sys/dev/dm/dm.h:1.23	Sat Aug 27 17:07:49 2011
+++ src/sys/dev/dm/dm.h	Sat Jul 28 00:43:22 2012
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.23 2011/08/27 17:07:49 ahoka Exp $  */
+/*$NetBSD: dm.h,v 1.24 2012/07/28 00:43:22 matt Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -120,7 +120,8 @@ typedef struct dm_pdev {
  * This structure is called for every device-mapper device.
  * It points to SLIST of device tables and mirrored, snapshoted etc. devices.
  */
-TAILQ_HEAD(dm_dev_head, dm_dev) dm_devs;
+TAILQ_HEAD(dm_dev_head, dm_dev);
+//extern struct dm_dev_head dm_devs;
 
 typedef struct dm_dev {
 	char name[DM_NAME_LEN];

Index: src/sys/dev/ic/ncr5380sbc.c
diff -u src/sys/dev/ic/ncr5380sbc.c:1.65 src/sys/dev/ic/ncr5380sbc.c:1.66
--- src/sys/dev/ic/ncr5380sbc.c:1.65	Tue Jul 27 19:44:16 2010
+++ src/sys/dev/ic/ncr5380sbc.c	Sat Jul 28 00:43:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr5380sbc.c,v 1.65 2010/07/27 19:44:16 jakllsch Exp $	*/
+/*	$NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1995 David Jones, Gordon W. Ross
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ncr5380sbc.c,v 1.65 2010/07/27 19:44:16 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ncr5380sbc.c,v 1.66 2012/07/28 00:43:23 matt Exp $);
 
 #include opt_ddb.h
 
@@ -135,6 +135,7 @@ void	ncr5380_cmd_timeout(void *);
 #endif
 
 #ifdef	NCR5380_DEBUG
+struct ncr5380_softc *ncr5380_debug_sc;
 
 #define	NCR_DBG_BREAK	1
 #define	NCR_DBG_CMDS	2

Index: src/sys/dev/ic/ncr5380var.h
diff -u src/sys/dev/ic/ncr5380var.h:1.32 src/sys/dev/ic/ncr5380var.h:1.33
--- src/sys/dev/ic/ncr5380var.h:1.32	Fri Apr  4 16:00:58 2008
+++ src/sys/dev/ic/ncr5380var.h	Sat Jul 28 00:43:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr5380var.h,v 1.32 2008/04/04 16:00:58 tsutsui Exp $	*/
+/*	$NetBSD: ncr5380var.h,v 1.33 2012/07/28 00:43:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1995 David Jones, Gordon W. Ross
@@ -236,7 +236,7 @@ int 	ncr5380_pio_out(struct ncr5380_soft
 void	ncr5380_init(struct ncr5380_softc *);
 
 #ifdef	NCR5380_DEBUG
-struct 

CVS commit: src/sys/arch/alpha/alpha

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jul 28 00:57:05 UTC 2012

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
physmem is defined in uvm_page.c


To generate a diff of this commit:
cvs rdiff -u -r1.340 -r1.341 src/sys/arch/alpha/alpha/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/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.340 src/sys/arch/alpha/alpha/machdep.c:1.341
--- src/sys/arch/alpha/alpha/machdep.c:1.340	Wed Jun 13 17:13:41 2012
+++ src/sys/arch/alpha/alpha/machdep.c	Sat Jul 28 00:57:04 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.340 2012/06/13 17:13:41 njoly Exp $ */
+/* $NetBSD: machdep.c,v 1.341 2012/07/28 00:57:04 matt Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.340 2012/06/13 17:13:41 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.341 2012/07/28 00:57:04 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -143,7 +143,6 @@ void *msgbufaddr;
 int	maxmem;			/* max memory per process */
 
 int	totalphysmem;		/* total amount of physical memory in system */
-int	physmem;		/* physical memory used by NetBSD + some rsvd */
 int	resvmem;		/* amount of memory reserved for PROM */
 int	unusedmem;		/* amount of memory for OS that we don't use */
 int	unknownmem;		/* amount of memory with an unknown use */



CVS commit: src/sys/arch/xen

2012-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jul 28 02:08:51 UTC 2012

Modified Files:
src/sys/arch/xen/include: shutdown_xenbus.h
src/sys/arch/xen/xen: xen_machdep.c

Log Message:
Fix some -fno-common fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/xen/include/shutdown_xenbus.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/xen/xen/xen_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/include/shutdown_xenbus.h
diff -u src/sys/arch/xen/include/shutdown_xenbus.h:1.4 src/sys/arch/xen/include/shutdown_xenbus.h:1.5
--- src/sys/arch/xen/include/shutdown_xenbus.h:1.4	Tue Sep 20 00:12:24 2011
+++ src/sys/arch/xen/include/shutdown_xenbus.h	Sat Jul 28 02:08:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: shutdown_xenbus.h,v 1.4 2011/09/20 00:12:24 jym Exp $	*/
+/*	$NetBSD: shutdown_xenbus.h,v 1.5 2012/07/28 02:08:50 matt Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -30,7 +30,7 @@
 #define	_XEN_SHUTDOWN_XENBUS_H_
 
 /* Whether dom0 ordered a suspend (true) or not (false) */
-bool xen_suspend_allow;
+extern bool xen_suspend_allow;
 
 void shutdown_xenbus_setup(void);
 

Index: src/sys/arch/xen/xen/xen_machdep.c
diff -u src/sys/arch/xen/xen/xen_machdep.c:1.12 src/sys/arch/xen/xen/xen_machdep.c:1.13
--- src/sys/arch/xen/xen/xen_machdep.c:1.12	Sun Jul 22 19:30:19 2012
+++ src/sys/arch/xen/xen/xen_machdep.c	Sat Jul 28 02:08:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_machdep.c,v 1.12 2012/07/22 19:30:19 jym Exp $	*/
+/*	$NetBSD: xen_machdep.c,v 1.13 2012/07/28 02:08:51 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xen_machdep.c,v 1.12 2012/07/22 19:30:19 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_machdep.c,v 1.13 2012/07/28 02:08:51 matt Exp $);
 
 #include opt_xen.h
 
@@ -76,7 +76,9 @@ __KERNEL_RCSID(0, $NetBSD: xen_machdep.
 
 u_int	tsc_get_timecount(struct timecounter *);
 
-uint64_t tsc_freq;	/* XXX */
+bool xen_suspend_allow;
+
+extern uint64_t tsc_freq;	/* XXX */
 
 static int sysctl_xen_suspend(SYSCTLFN_ARGS);
 static void xen_suspend_domain(void);